diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-10-20 09:55:24 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-10-22 10:30:45 +0100 |
| commit | 2c5398adaea8bc56fe196144a9a233981657fba0 (patch) | |
| tree | f243d30eaef1f30045f0974b0f99fce3ed1d483b /src/lib/encoder.h | |
| parent | 3a626081718fe09edafb951ac9a69e44145bf551 (diff) | |
Various multi-reel fixes.
* _video_frames_enqueued -> _position
* some int -> Frame replacements
* Call Writer::ref_write when there is nothing to encode / write
for one frame.
* Assume Encoder::encode is called once per output video frame.
* Possibly correct some off-by-1 overlap bugs.
* Don't reset _last_written on FAKE write as I believe there is no need.
Diffstat (limited to 'src/lib/encoder.h')
| -rw-r--r-- | src/lib/encoder.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/lib/encoder.h b/src/lib/encoder.h index 76c87a9f7..3d0597cfa 100644 --- a/src/lib/encoder.h +++ b/src/lib/encoder.h @@ -59,10 +59,10 @@ public: /** Called to indicate that a processing run is about to begin */ void begin (); - /** Call with a frame of video. - * @param f Video frame. + /** Called to pass in zero or more bits of video to be encoded + * as the next DCP frame. */ - void enqueue (boost::shared_ptr<PlayerVideo> f); + void encode (std::list<boost::shared_ptr<PlayerVideo> > f); /** Called when a processing run has finished */ void end (); @@ -72,6 +72,7 @@ public: private: + void enqueue (boost::shared_ptr<PlayerVideo> f); void frame_done (); void encoder_thread (boost::optional<ServerDescription>); @@ -90,10 +91,8 @@ private: std::list<struct timeval> _time_history; /** Number of frames that we should keep history for */ static int const _history_size; - /** Number of video frames enqueued so far */ - int _video_frames_enqueued; - bool _left_done; - bool _right_done; + /** Current DCP frame index */ + Frame _position; /* XXX: probably should be atomic */ bool _terminate_enqueue; |
