X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fwriter.cc;h=cff0b5be23925ea09592b03dbcc27410f6e64e9c;hb=4453965c2ab322122ffa5b51a9fc6efc0f896425;hp=ad81686d108a9e4ea3603a90250b4a2046383925;hpb=f074b7016ec58e831d9270f98ddc3ea31874a786;p=dcpomatic.git diff --git a/src/lib/writer.cc b/src/lib/writer.cc index ad81686d1..cff0b5be2 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -18,16 +18,19 @@ */ #include +#include #include #include #include #include +#include #include "writer.h" #include "compose.hpp" #include "film.h" #include "format.h" #include "log.h" #include "dcp_video_frame.h" +#include "config.h" #include "i18n.h" @@ -74,7 +77,7 @@ Writer::Writer (shared_ptr f) _picture_asset_writer = _picture_asset->start_write (_first_nonexistant_frame > 0); - AudioMapping m (_film->audio_channels ()); + AudioMapping m (_film); if (m.dcp_channels() > 0) { _sound_asset.reset ( @@ -320,7 +323,9 @@ Writer::finish () ) )); - dcp.write_xml (); + libdcp::XMLMetadata meta = Config::instance()->dcp_metadata (); + meta.set_issue_date_now (); + dcp.write_xml (meta); _film->log()->log (String::compose (N_("Wrote %1 FULL, %2 FAKE, %3 REPEAT; %4 pushed to disk"), _full_written, _fake_written, _repeat_written, _pushed_to_disk)); } @@ -348,8 +353,9 @@ Writer::check_existing_picture_mxf () boost::filesystem::path p; p /= _film->internal_video_mxf_dir (); p /= _film->internal_video_mxf_filename (); - FILE* mxf = fopen (p.string().c_str(), N_("rb")); + FILE* mxf = fopen (p.string().c_str(), "rb"); if (!mxf) { + _film->log()->log (String::compose ("Could not open existing MXF at %1 (errno=%2)", p.string(), errno)); return; }