diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-01-17 21:30:16 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-01-17 21:30:16 +0000 |
| commit | 39c65e47432c76a4e34aaea5317bd7362409aed0 (patch) | |
| tree | 5bacc1d631de0a2b7f0aa492ddaf05a65e06d97c /src/lib/transcode_job.cc | |
| parent | 3882d34aed9dee417ceed93bf0bf5372b3970ff6 (diff) | |
Try to tidy up frame indexing; use DCP length obtained from the transcode to make the DCP.
Diffstat (limited to 'src/lib/transcode_job.cc')
| -rw-r--r-- | src/lib/transcode_job.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/lib/transcode_job.cc b/src/lib/transcode_job.cc index c9792ed2e..6dd74c36c 100644 --- a/src/lib/transcode_job.cc +++ b/src/lib/transcode_job.cc @@ -67,7 +67,10 @@ TranscodeJob::run () set_progress (1); set_state (FINISHED_OK); + _film->set_dcp_intrinsic_duration (_encoder->video_frames_out ()); + _film->log()->log ("Transcode job completed successfully"); + _film->log()->log (String::compose ("DCP intrinsic duration is %1", _encoder->video_frames_out())); } catch (std::exception& e) { @@ -115,11 +118,19 @@ TranscodeJob::remaining_time () const return 0; } - if (!_film->dcp_length()) { + if (!_film->length()) { return 0; } + /* Compute approximate proposed length here, as it's only here that we need it */ + int length = _film->length().get(); + DCPFrameRate const dfr (_film->frames_per_second ()); + if (dfr.skip) { + length /= 2; + } + /* If we are repeating it shouldn't affect transcode time, so don't take it into account */ + /* We assume that dcp_length() is valid, if it is set */ - SourceFrame const left = _film->trim_start() + _film->dcp_length().get() - _encoder->video_frame(); + int const left = length - _encoder->video_frames_out(); return left / fps; } |
