diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-11-28 23:45:34 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-04-19 23:04:32 +0100 |
| commit | a78b741c43830c84bcb4d18e3147746f13a668e5 (patch) | |
| tree | 170fdc1a80f397ccb6c2e9454a7a106448358dda /src/lib/encoder.cc | |
| parent | 3d90ce7a500a33b6147c30b65766efcbc447f5ab (diff) | |
Attempt to tidy up internal APIs slightly.
Diffstat (limited to 'src/lib/encoder.cc')
| -rw-r--r-- | src/lib/encoder.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc index f468f91e1..f8a2ee3bd 100644 --- a/src/lib/encoder.cc +++ b/src/lib/encoder.cc @@ -165,11 +165,11 @@ Encoder::current_encoding_rate () const int Encoder::video_frames_enqueued () const { - if (!_last_player_video) { + if (!_last_player_video_time) { return 0; } - return _last_player_video->time().frames_floor (_film->video_frame_rate ()); + return _last_player_video_time->frames_floor (_film->video_frame_rate ()); } /** Should be called when a frame has been encoded successfully. @@ -194,7 +194,7 @@ Encoder::frame_done () * for this DCP frame. */ void -Encoder::encode (shared_ptr<PlayerVideo> pv) +Encoder::encode (shared_ptr<PlayerVideo> pv, DCPTime time) { _waker.nudge (); @@ -222,7 +222,7 @@ Encoder::encode (shared_ptr<PlayerVideo> pv) */ rethrow (); - Frame const position = pv->time().frames_floor(_film->video_frame_rate()); + Frame const position = time.frames_floor(_film->video_frame_rate()); if (_writer->can_fake_write (position)) { /* We can fake-write this frame */ @@ -258,6 +258,7 @@ Encoder::encode (shared_ptr<PlayerVideo> pv) } _last_player_video = pv; + _last_player_video_time = time; } void |
