diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-01-23 23:17:36 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-01-23 23:17:36 +0000 |
| commit | 68f662ac50a00ad986e3bd258c3f7daac374ab26 (patch) | |
| tree | 2b8d4d7050ea1cd594997198fe05f3f4bbf57c21 /src/lib/ffmpeg_examiner.cc | |
| parent | a3c4945f77fa8e7123c30026654cb86e99343f50 (diff) | |
Hand-apply 111f02f4fc8ace359a16aea1c88c2821bf3dde31 from master; improve progress reporting when scanning a file for length.
Diffstat (limited to 'src/lib/ffmpeg_examiner.cc')
| -rw-r--r-- | src/lib/ffmpeg_examiner.cc | 7 |
1 files changed, 6 insertions, 1 deletions
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<const FFmpegContent> c) +/** @param job job that the examiner is operating in, or 0 */ +FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c, shared_ptr<Job> job) : FFmpeg (c) , _need_video_length (false) { @@ -69,6 +71,9 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> 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: |
