summaryrefslogtreecommitdiff
path: root/src/lib/transcoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-05-08 20:37:53 +0100
committerCarl Hetherington <cth@carlh.net>2013-05-08 20:37:53 +0100
commitfd040c2bd27fde35424a384174ecb56c643764cd (patch)
tree074906414d27d93a21224f110129a7e857a6ee04 /src/lib/transcoder.cc
parent72d36df1174810d8d871a06d085b81b1652edf67 (diff)
Some tidying up. Do encode progress in the writer to improve progress bar movement with still-image DCPs (#130).
Diffstat (limited to 'src/lib/transcoder.cc')
-rw-r--r--src/lib/transcoder.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/lib/transcoder.cc b/src/lib/transcoder.cc
index 2e33931bd..f8fe0c8d5 100644
--- a/src/lib/transcoder.cc
+++ b/src/lib/transcoder.cc
@@ -36,6 +36,7 @@
#include "audio_decoder.h"
#include "player.h"
#include "trimmer.h"
+#include "job.h"
using std::string;
using boost::shared_ptr;
@@ -49,7 +50,7 @@ using boost::dynamic_pointer_cast;
Transcoder::Transcoder (shared_ptr<Film> f, shared_ptr<Job> j)
: _job (j)
, _player (f->player ())
- , _encoder (new Encoder (f))
+ , _encoder (new Encoder (f, j))
{
_matcher.reset (new Matcher (f->log(), f->audio_frame_rate(), f->video_frame_rate()));
_delay_line.reset (new DelayLine (f->log(), f->audio_delay() * f->audio_frame_rate() / 1000));
@@ -82,13 +83,9 @@ void
Transcoder::go ()
{
_encoder->process_begin ();
- while (1) {
- if (_player->pass ()) {
- break;
- }
- _player->set_progress (_job);
- }
+ while (!_player->pass ()) {}
+
_delay_line->process_end ();
if (_matcher) {
_matcher->process_end ();