From 0b6f2d7b04819711228ed5fbc5d299b58cef997e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 14 Jun 2016 15:07:58 +0100 Subject: Clean up of 3D->2D conversion. It makes slightly more sense to discard 2D in the Transcoder rather than the Encoder. Unfortunately this requires quite invasive changes, mainly to remove Encoder::_position and instead derive this information from the PlayerVideo that is being handled. This is also nicer than before, I think. A notable change is that in player.cc; using time rather than content_video_to_dcp(). This means we are assuming that the decoder returns video at the time we ask it to, rather than checking what it has returned. I can't think of a problem with this (yet). --- src/lib/transcode_job.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/transcode_job.cc') diff --git a/src/lib/transcode_job.cc b/src/lib/transcode_job.cc index b52d0238f..7144f70d5 100644 --- a/src/lib/transcode_job.cc +++ b/src/lib/transcode_job.cc @@ -83,7 +83,7 @@ TranscodeJob::run () float fps = 0; if (finish.tv_sec != start.tv_sec) { - fps = _transcoder->video_frames_out() / (finish.tv_sec - start.tv_sec); + fps = _transcoder->video_frames_enqueued() / (finish.tv_sec - start.tv_sec); } LOG_GENERAL (N_("Transcode job completed successfully: %1 fps"), fps); @@ -118,7 +118,7 @@ TranscodeJob::status () const if (!finished () && !_transcoder->finishing ()) { /// TRANSLATORS: fps here is an abbreviation for frames per second - s << "; " << _transcoder->video_frames_out() << "/" + s << "; " << _transcoder->video_frames_enqueued() << "/" << _film->length().frames_round (_film->video_frame_rate ()) << " " << _("frames") << "; " << fixed << setprecision (1) << fps << " " << _("fps"); } @@ -144,5 +144,5 @@ TranscodeJob::remaining_time () const } /* Compute approximate proposed length here, as it's only here that we need it */ - return (_film->length().frames_round (_film->video_frame_rate ()) - t->video_frames_out()) / fps; + return (_film->length().frames_round (_film->video_frame_rate ()) - t->video_frames_enqueued()) / fps; } -- cgit v1.2.3