diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-04-18 20:42:58 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-04-19 00:57:23 +0200 |
| commit | 6e003ef110717dd3e4ecdb009d33671f7834e024 (patch) | |
| tree | 575c073e8a06bd20cf9fd5d99aab9db3164e75cd /src/lib/reel_writer.h | |
| parent | be4082c68004d56ad7f14b7b9cddef640118dd62 (diff) | |
Add _last_written to Writer, containing the last written frame and eyes
to each reel. This is updated when things are popped off the queue, with
_state_mutex_held, and used in preference to the ones in ReelWriter
which were previously being updated during the time the _state_mutex
lock is unlocked in the body of Writer::thread(). This was not
thread safe (thanks, valgrind!)
Diffstat (limited to 'src/lib/reel_writer.h')
| -rw-r--r-- | src/lib/reel_writer.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/lib/reel_writer.h b/src/lib/reel_writer.h index d241c0fac..0b5a3dad5 100644 --- a/src/lib/reel_writer.h +++ b/src/lib/reel_writer.h @@ -64,7 +64,7 @@ public: ); void write (boost::optional<dcp::Data> encoded, Frame frame, Eyes eyes); - void fake_write (Frame frame, Eyes eyes, int size); + void fake_write (int size); void repeat_write (Frame frame, Eyes eyes); void write (boost::shared_ptr<const AudioBuffers> audio); void write (PlayerText text, TextType type, boost::optional<DCPTextTrack> track, dcpomatic::DCPTimePeriod period); @@ -79,14 +79,6 @@ public: return _period; } - int last_written_video_frame () const { - return _last_written_video_frame; - } - - Eyes last_written_eyes () const { - return _last_written_eyes; - } - int first_nonexistant_frame () const { return _first_nonexistant_frame; } @@ -109,9 +101,6 @@ private: int _first_nonexistant_frame; /** the data of the last written frame, if there is one */ boost::optional<dcp::Data> _last_written[EYES_COUNT]; - /** the index of the last written video frame within the reel */ - int _last_written_video_frame; - Eyes _last_written_eyes; /** index of this reel within the DCP (starting from 0) */ int _reel_index; /** number of reels in the DCP */ |
