diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-05-29 00:58:36 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-05-29 00:59:58 +0100 |
| commit | cccf38a8c058ee45b4e2ea0d453a29c793ca274d (patch) | |
| tree | a5931ce7e89ffd64dd04e6cdd997a912e0ba32ba /src/lib/transcoder.cc | |
| parent | 2495aa7fb0867609245664375dccd0234235102d (diff) | |
Move transcode progress updating.
Do this in the transcoder rather than the writer so that it updates
even if video is being referenced.
Diffstat (limited to 'src/lib/transcoder.cc')
| -rw-r--r-- | src/lib/transcoder.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/transcoder.cc b/src/lib/transcoder.cc index eb787dee8..8afd64709 100644 --- a/src/lib/transcoder.cc +++ b/src/lib/transcoder.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net> + Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -40,6 +40,8 @@ #include <boost/foreach.hpp> #include <iostream> +#include "i18n.h" + using std::string; using std::cout; using std::list; @@ -53,6 +55,7 @@ using boost::dynamic_pointer_cast; */ Transcoder::Transcoder (shared_ptr<const Film> film, shared_ptr<Job> j) : _film (film) + , _job (j) , _player (new Player (film, film->playlist ())) , _writer (new Writer (film, j)) , _encoder (new Encoder (film, _writer)) @@ -67,6 +70,8 @@ Transcoder::go () _writer->start (); _encoder->begin (); + _job->sub (_("Encoding picture and sound")); + DCPTime const frame = DCPTime::from_frames (1, _film->video_frame_rate ()); DCPTime const length = _film->length (); @@ -93,6 +98,8 @@ Transcoder::go () if (non_burnt_subtitles) { _writer->write (_player->get_subtitles (t, frame, true, false, true)); } + + _job->set_progress (float(t.get()) / length.get()); } BOOST_FOREACH (ReferencedReelAsset i, _player->get_reel_assets ()) { |
