X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fwriter.cc;h=d42b23478f469e68e4c650f03b5606c918e2ec57;hb=e0935244e27bcc5e87588900e1010b291ee631bc;hp=2a2925cf0e1224a0e7776d5884633517833228f1;hpb=a31cfda11a8e3260cdf267be056cb9b4f4b158dd;p=dcpomatic.git diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 2a2925cf0..d42b23478 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -23,6 +23,7 @@ #include "audio_mapping.h" #include "compose.hpp" #include "config.h" +#include "constants.h" #include "cross.h" #include "dcp_content_type.h" #include "dcp_video.h" @@ -592,7 +593,7 @@ Writer::finish (boost::filesystem::path output_dcp) /* Add reels */ for (auto& i: _reels) { - cpl->add (i.create_reel(_reel_assets, _fonts, _chosen_interop_font, output_dcp, _have_subtitles, _have_closed_captions)); + cpl->add(i.create_reel(_reel_assets, output_dcp, _have_subtitles, _have_closed_captions)); } /* Add metadata */ @@ -645,22 +646,18 @@ Writer::finish (boost::filesystem::path output_dcp) } dcp::MCASoundField field; - if (film()->audio_channels() == 2) { - field = dcp::MCASoundField::STEREO; - } else if (film()->audio_channels() <= 6) { + if (film()->audio_channels() <= 6) { field = dcp::MCASoundField::FIVE_POINT_ONE; } else { field = dcp::MCASoundField::SEVEN_POINT_ONE; } - dcp::MainSoundConfiguration msc (field, film()->audio_channels()); + dcp::MainSoundConfiguration msc(field, MAX_DCP_AUDIO_CHANNELS); for (auto i: film()->mapped_audio_channels()) { - if (static_cast(i) < film()->audio_channels()) { - msc.set_mapping (i, static_cast(i)); - } + msc.set_mapping(i, static_cast(i)); } - cpl->set_main_sound_configuration (msc.to_string()); + cpl->set_main_sound_configuration(msc); cpl->set_main_sound_sample_rate (film()->audio_frame_rate()); cpl->set_main_picture_stored_area (film()->frame_size()); @@ -845,7 +842,7 @@ Writer::write (PlayerText text, TextType type, optional track, DCP period = back_off(period); } - (*reel)->write(text, type, track, period, _fonts); + (*reel)->write(text, type, track, period, _fonts, _chosen_interop_font); } @@ -1019,7 +1016,7 @@ Writer::write_hanging_text (ReelWriter& reel) vector new_hanging_texts; for (auto i: _hanging_texts) { if (i.period.from == reel.period().from) { - reel.write (i.text, i.type, i.track, i.period, _fonts); + reel.write(i.text, i.type, i.track, i.period, _fonts, _chosen_interop_font); } else { new_hanging_texts.push_back (i); }