# Use distro-provided FFmpeg on Arch
deps = []
- deps.append(('libdcp', 'v1.8.67'))
+ deps.append(('libdcp', 'v1.8.68'))
deps.append(('libsub', 'v1.6.44'))
deps.append(('leqm-nrt', '4560105773c66ac9216b62313a24093bb0a027ae'))
deps.append(('rtaudio', 'f619b76'))
for (int i = 0; i < examiner->text_count(TextType::CLOSED_CAPTION); ++i) {
auto c = make_shared<TextContent>(this, TextType::CLOSED_CAPTION, TextType::CLOSED_CAPTION);
c->set_dcp_track (examiner->dcp_text_track(i));
+ add_fonts_from_examiner(c, examiner->fonts());
new_text.push_back (c);
}
LOG_GENERAL("Closed caption %1 of reel %2 found", ccap->id(), reel->id());
+ for (auto const& font: ccap->asset()->font_data()) {
+ reel_fonts.push_back(make_shared<dcpomatic::Font>(font.first, font.second));
+ }
}
if (reel->main_markers ()) {
shared_ptr<Result> reel_asset;
if (asset) {
- if (!std::is_same<Result, dcp::ReelClosedCaptionAsset>::value) {
- if (film->interop()) {
- if (chosen_interop_font) {
- /* We only add one font, as Interop will ignore subsequent ones (and some validators will
- * complain if they are even present)
- */
- asset->add_font(fonts.get(chosen_interop_font), chosen_interop_font->data().get_value_or(default_font));
- }
+ if (film->interop()) {
+ if (chosen_interop_font) {
+ /* We only add one font, as Interop will ignore subsequent ones (and some validators will
+ * complain if they are even present)
+ */
+ asset->add_font(fonts.get(chosen_interop_font), chosen_interop_font->data().get_value_or(default_font));
} else {
- for (auto const& font: fonts.map()) {
- asset->add_font(font.second, font.first->data().get_value_or(default_font));
- }
+ }
+ } else {
+ for (auto const& font: fonts.map()) {
+ asset->add_font(font.second, font.first->data().get_value_or(default_font));
}
}
i.set_out (dcp::Time(period.to.seconds() - _period.from.seconds(), tcr));
i.set_v_position(convert_vertical_position(i, film()->interop() ? dcp::SubtitleStandard::INTEROP : dcp::SubtitleStandard::SMPTE_2014));
auto sub = make_shared<dcp::SubtitleString>(i);
- if (type == TextType::OPEN_SUBTITLE) {
- sub->set_font(fonts.get(i.font));
- }
+ sub->set_font(fonts.get(i.font));
asset->add(sub);
}
if (note.size()) {
message.Replace("%size", std_to_wx(dcp::raw_convert<string>(note.size().get())));
}
+ if (note.id()) {
+ message.Replace("%id", std_to_wx(note.id().get()));
+ }
add_bullet (note.type(), message);
counts[note.type()]++;
};
case dcp::VerificationNote::Code::INCORRECT_SUBTITLE_NAMESPACE_COUNT:
add(i, _("The XML in the subtitle asset %n has more than one namespace declaration."));
break;
+ case dcp::VerificationNote::Code::MISSING_LOAD_FONT:
+ add(i, _("A subtitle or closed caption refers to a font with ID %id that does not have a corresponding <LoadFont> node."));
+ break;
}
}
}
}
+
+
+BOOST_AUTO_TEST_CASE(multi_reel_interop_ccap_test)
+{
+ auto pic1 = content_factory("test/data/flat_red.png").front();
+ auto ccap1 = content_factory("test/data/15s.srt").front();
+ auto pic2 = content_factory("test/data/flat_red.png").front();
+ auto ccap2 = content_factory("test/data/15s.srt").front();
+ auto film1 = new_test_film2("multi_reel_interop_ccap_test1", { pic1, ccap1, pic2, ccap2 });
+ film1->set_interop(true);
+ film1->set_reel_type(ReelType::BY_VIDEO_CONTENT);
+ ccap1->text[0]->set_type(TextType::CLOSED_CAPTION);
+ pic1->video->set_length(15 * 24);
+ ccap2->text[0]->set_type(TextType::CLOSED_CAPTION);
+ pic2->video->set_length(15 * 24);
+ make_and_verify_dcp(film1, { dcp::VerificationNote::Code::INVALID_STANDARD, dcp::VerificationNote::Code::INVALID_SUBTITLE_SPACING });
+
+ auto reload = make_shared<DCPContent>(film1->dir(film1->dcp_name()));
+ auto film2 = new_test_film2("multi_reel_interop_ccap_test2", { reload });
+ for (auto i: reload->text) {
+ i->set_use(true);
+ }
+ film2->set_interop(true);
+ make_and_verify_dcp(film2, { dcp::VerificationNote::Code::INVALID_STANDARD, dcp::VerificationNote::Code::INVALID_SUBTITLE_SPACING });
+}
+
from waflib import Logs, Context
APPNAME = 'dcpomatic'
-libdcp_version = '1.8.67'
+libdcp_version = '1.8.68'
libsub_version = '1.6.42'
this_version = subprocess.Popen(shlex.split('git tag -l --points-at HEAD'), stdout=subprocess.PIPE).communicate()[0]