summaryrefslogtreecommitdiff
path: root/src/lib/examine_content_job.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-11-15 22:26:16 +0000
committerCarl Hetherington <cth@carlh.net>2012-11-15 22:26:16 +0000
commit4fbd1901fdabc829cfa7e7d4d0c1272bba87033c (patch)
tree416701b4a2923cdc16983311239bd311282e8438 /src/lib/examine_content_job.cc
parentf5c40275a2dc444c295a547dfedcd8f9eee2bcb2 (diff)
Untested external audio support; AB transcodes still broken.
Diffstat (limited to 'src/lib/examine_content_job.cc')
-rw-r--r--src/lib/examine_content_job.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/examine_content_job.cc b/src/lib/examine_content_job.cc
index b13e9d9d5..8db74801f 100644
--- a/src/lib/examine_content_job.cc
+++ b/src/lib/examine_content_job.cc
@@ -30,9 +30,11 @@
#include "transcoder.h"
#include "log.h"
#include "film.h"
+#include "video_decoder.h"
using std::string;
using std::vector;
+using std::pair;
using boost::shared_ptr;
ExamineContentJob::ExamineContentJob (shared_ptr<Film> f, shared_ptr<Job> req)
@@ -72,10 +74,14 @@ ExamineContentJob::run ()
descend (0.5);
- _decoder = decoder_factory (_film, o, this);
- _decoder->go ();
+ pair<shared_ptr<VideoDecoder>, shared_ptr<AudioDecoder> > decoders = decoder_factory (_film, o, this);
- _film->set_length (_decoder->video_frame());
+ set_progress_unknown ();
+ while (!decoders.first->pass()) {
+ /* keep going */
+ }
+
+ _film->set_length (decoders.first->video_frame());
_film->log()->log (String::compose ("Video length is %1 frames", _film->length()));