X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ffilm.cc;h=e066bfc50fe7bf0f48ebab851596c51c781cb7b6;hb=1ca0d61534209e4679cead26e0df1886704a3ef8;hp=9f766a749d656fcdac913d84c905eb02ce9fc457;hpb=e0adfd85dd7987ee2b77eea7f6d3c13885729a38;p=dcpomatic.git diff --git a/src/lib/film.cc b/src/lib/film.cc index 9f766a749..e066bfc50 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -274,7 +274,9 @@ Film::make_dcp () set_isdcf_date_today (); - environment_info (log ()); + BOOST_FOREACH (string i, environment_info ()) { + LOG_GENERAL_NC (i); + } BOOST_FOREACH (shared_ptr i, content ()) { LOG_GENERAL ("Content: %1", i->technical_summary()); @@ -594,7 +596,27 @@ Film::isdcf_name (bool if_created_now) const if (!dm.audio_language.empty ()) { d << "_" << dm.audio_language; if (!dm.subtitle_language.empty()) { - d << "-" << dm.subtitle_language; + + bool burnt_in = false; + BOOST_FOREACH (shared_ptr i, content ()) { + shared_ptr sc = dynamic_pointer_cast (i); + if (!sc) { + continue; + } + + if (sc->use_subtitles() && sc->burn_subtitles()) { + burnt_in = true; + } + } + + string language = dm.subtitle_language; + if (burnt_in) { + transform (language.begin(), language.end(), language.begin(), ::tolower); + } else { + transform (language.begin(), language.end(), language.begin(), ::toupper); + } + + d << "-" << language; } else { d << "-XX"; } @@ -831,6 +853,7 @@ Film::set_reel_type (ReelType t) signal_changed (REEL_TYPE); } +/** @param r Desired reel length in bytes */ void Film::set_reel_length (int64_t r) { @@ -865,7 +888,7 @@ Film::set_isdcf_date_today () } boost::filesystem::path -Film::j2c_path (int f, Eyes e, bool t) const +Film::j2c_path (int reel, Frame frame, Eyes eyes, bool tmp) const { boost::filesystem::path p; p /= "j2c"; @@ -873,17 +896,17 @@ Film::j2c_path (int f, Eyes e, bool t) const SafeStringStream s; s.width (8); - s << setfill('0') << f; + s << setfill('0') << reel << "_" << frame; - if (e == EYES_LEFT) { + if (eyes == EYES_LEFT) { s << ".L"; - } else if (e == EYES_RIGHT) { + } else if (eyes == EYES_RIGHT) { s << ".R"; } s << ".j2c"; - if (t) { + if (tmp) { s << ".tmp"; } @@ -1113,7 +1136,8 @@ Film::frame_size () const dcp::EncryptedKDM Film::make_kdm ( - dcp::Certificate target, + dcp::Certificate recipient, + vector trusted_devices, boost::filesystem::path cpl_file, dcp::LocalTime from, dcp::LocalTime until, @@ -1128,7 +1152,7 @@ Film::make_kdm ( return dcp::DecryptedKDM ( cpl, key(), from, until, "DCP-o-matic", cpl->content_title_text(), dcp::LocalTime().as_string() - ).encrypt (signer, target, formulation); + ).encrypt (signer, recipient, trusted_devices, formulation); } list @@ -1143,8 +1167,8 @@ Film::make_kdms ( list kdms; BOOST_FOREACH (shared_ptr i, screens) { - if (i->certificate) { - kdms.push_back (ScreenKDM (i, make_kdm (i->certificate.get(), dcp, from, until, formulation))); + if (i->recipient) { + kdms.push_back (ScreenKDM (i, make_kdm (i->recipient.get(), i->trusted_devices, dcp, from, until, formulation))); } } @@ -1253,6 +1277,8 @@ Film::audio_output_names () const return audio_processor()->input_names (); } + DCPOMATIC_ASSERT (MAX_DCP_AUDIO_CHANNELS == 16); + vector n; n.push_back (_("L")); n.push_back (_("R")); @@ -1266,6 +1292,10 @@ Film::audio_output_names () const n.push_back (_("Rc")); n.push_back (_("BsL")); n.push_back (_("BsR")); + n.push_back (_("DBP")); + n.push_back (_("DBS")); + n.push_back (""); + n.push_back (""); return vector (n.begin(), n.begin() + audio_channels ()); } @@ -1292,7 +1322,7 @@ list Film::reels () const { list p; - DCPTime const len = length (); + DCPTime const len = length().round_up (video_frame_rate ()); switch (reel_type ()) { case REELTYPE_SINGLE: