X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Freel_writer.cc;h=e008bf6311ae5acbcbcfa8a1b1d41bbfb75aa225;hb=b20c4b11abff0bd57dab03174070ec8571bbe4d5;hp=6432c294bbee29746280a953fd5bce5052bb9dfe;hpb=9518d2a417833b530d2ef00c33179b27bcfa41da;p=dcpomatic.git diff --git a/src/lib/reel_writer.cc b/src/lib/reel_writer.cc index 6432c294b..e008bf631 100644 --- a/src/lib/reel_writer.cc +++ b/src/lib/reel_writer.cc @@ -88,6 +88,7 @@ ReelWriter::ReelWriter ( if (_film->encrypted ()) { _picture_asset->set_key (_film->key ()); + _picture_asset->set_context_id (_film->context_id ()); } _picture_asset->set_file ( @@ -134,10 +135,14 @@ ReelWriter::write_frame_info (Frame frame, Eyes eyes, dcp::FrameInfo info) const bool const read = boost::filesystem::exists (info_file); #ifdef DCPOMATIC_WINDOWS - LOG_GENERAL ( - "Checked %1 (exists %2) length is %3 perms are %4", - info_file, read ? 1 : 0, boost::filesystem::file_size (info_file), int(boost::filesystem::status(info_file).permissions()) - ); + if (read) { + LOG_GENERAL ( + "Checked %1 (which exists) length is %2 perms are %3", + info_file, boost::filesystem::file_size (info_file), int(boost::filesystem::status(info_file).permissions()) + ); + } else { + LOG_GENERAL ("Checked %1 (which does not exist)", info_file); + } #endif if (read) { @@ -271,6 +276,7 @@ ReelWriter::finish () { if (!_picture_asset_writer->finalize ()) { /* Nothing was written to the picture asset */ + LOG_GENERAL ("Nothing was written to reel %1 of %2", _reel_index, _reel_count); _picture_asset.reset (); } @@ -339,15 +345,21 @@ ReelWriter::create_reel (list const & refs, list k = dynamic_pointer_cast (j.asset); + if (k) { + LOG_GENERAL ("candidate picture asset period is %1-%2", j.period.from.get(), j.period.to.get()); + } if (k && j.period == _period) { reel_picture_asset = k; } } } + LOG_GENERAL ("create_reel for %1-%2; %3 of %4", _period.from.get(), _period.to.get(), _reel_index, _reel_count); + DCPOMATIC_ASSERT (reel_picture_asset); reel->add (reel_picture_asset); @@ -468,7 +480,7 @@ ReelWriter::write (shared_ptr audio) _sound_asset_writer->write (audio->data(), audio->frames()); } - ++_total_written_audio_frames; + _total_written_audio_frames += audio->frames (); } void