diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-08-29 14:25:31 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-08-29 14:25:31 +0100 |
| commit | 9e124e8ce2eb7a9faeb91b33169ab1ae4912afb0 (patch) | |
| tree | dce175e929d64c6562b60a43138d41dfdd3da6d1 /src/lib/writer.cc | |
| parent | 86880ddcedaf39522a92a3a63d2a5df48fdf2284 (diff) | |
Better progress reporting during MXF hashing (#184).
Diffstat (limited to 'src/lib/writer.cc')
| -rw-r--r-- | src/lib/writer.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 2e0ffd833..5f94d5d6b 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -110,6 +110,8 @@ Writer::Writer (shared_ptr<const Film> f, shared_ptr<Job> j) _sound_asset_writer = _sound_asset->start_write (_film->interop ()); _thread = new boost::thread (boost::bind (&Writer::thread, this)); + + _job->descend (0.9); } void @@ -389,6 +391,18 @@ Writer::finish () ) )); + /* Compute the digests for the assets now so that we can keep track of progress. + We did _job->descend (0.9) in our constructor */ + _job->ascend (); + + _job->descend (0.1); + _picture_asset->compute_digest (boost::bind (&Job::set_progress, _job.get(), _1)); + _job->ascend (); + + _job->descend (0.1); + _sound_asset->compute_digest (boost::bind (&Job::set_progress, _job.get(), _1)); + _job->ascend (); + libdcp::XMLMetadata meta = Config::instance()->dcp_metadata (); meta.set_issue_date_now (); dcp.write_xml (_film->interop (), meta); |
