*/
#include "lib/content_factory.h"
+#include "lib/dcp_subtitle_content.h"
#include "lib/film.h"
#include "lib/image_content.h"
-#include "lib/dcp_subtitle_content.h"
#include "lib/text_content.h"
#include "lib/video_content.h"
#include "test.h"
using std::list;
-using std::string;
-using std::shared_ptr;
using std::make_shared;
+using std::string;
using boost::optional;
red_a->set_position (film, dcpomatic::DCPTime());
red_a->video->set_length (240);
sub_a->set_position (film, dcpomatic::DCPTime());
+ sub_a->only_text()->set_language(dcp::LanguageTag("de"));
red_b->set_position (film, dcpomatic::DCPTime::from_seconds(10));
red_b->video->set_length (240);
sub_b->set_position (film, dcpomatic::DCPTime::from_seconds(10));
+ sub_b->only_text()->set_language(dcp::LanguageTag("de"));
film->set_reel_type (ReelType::BY_VIDEO_CONTENT);
dcp::DCP dcp ("build/test/subtitle_reel_test/" + film->dcp_name());
dcp.read ();
BOOST_REQUIRE_EQUAL (dcp.cpls().size(), 1U);
- shared_ptr<dcp::CPL> cpl = dcp.cpls().front();
+ auto cpl = dcp.cpls().front();
auto reels = cpl->reels ();
BOOST_REQUIRE_EQUAL (reels.size(), 2U);
{
dcp::VerificationNote::Code::INVALID_SUBTITLE_FIRST_TEXT_TIME,
dcp::VerificationNote::Code::INVALID_SUBTITLE_SPACING
- });
+ },
+ true,
+ /* ClairMeta gives an error with multiple ClosedCaption assets */
+ false
+ );
dcp::DCP dcp ("build/test/closed_captions_in_all_reels_test/" + film->dcp_name());
dcp.read ();
auto subtitle = content_factory("test/data/45s.srt")[0];
film->examine_and_add_content (subtitle);
BOOST_REQUIRE (!wait_for_jobs());
+ subtitle->only_text()->set_language(dcp::LanguageTag("de"));
make_and_verify_dcp (film, { dcp::VerificationNote::Code::INVALID_STANDARD });