X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_examiner.cc;h=4409526dc4872015897357ffa385a28259a6acf2;hb=68f662ac50a00ad986e3bd258c3f7daac374ab26;hp=f28060a56da356d30f48295db8c4e9d0444cb56a;hpb=a3c4945f77fa8e7123c30026654cb86e99343f50;p=dcpomatic.git diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc index f28060a56..4409526dc 100644 --- a/src/lib/ffmpeg_examiner.cc +++ b/src/lib/ffmpeg_examiner.cc @@ -23,6 +23,7 @@ extern "C" { } #include "ffmpeg_examiner.h" #include "ffmpeg_content.h" +#include "job.h" #include "ffmpeg_audio_stream.h" #include "ffmpeg_subtitle_stream.h" #include "util.h" @@ -36,7 +37,8 @@ using std::max; using boost::shared_ptr; using boost::optional; -FFmpegExaminer::FFmpegExaminer (shared_ptr c) +/** @param job job that the examiner is operating in, or 0 */ +FFmpegExaminer::FFmpegExaminer (shared_ptr c, shared_ptr job) : FFmpeg (c) , _need_video_length (false) { @@ -69,6 +71,9 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr c) _need_video_length = _format_context->duration == AV_NOPTS_VALUE; if (!_need_video_length) { _video_length = ContentTime::from_seconds (double (_format_context->duration) / AV_TIME_BASE); + } else if (job) { + job->sub (_("Finding length")); + job->set_progress_unknown (); } /* Run through until we find: