*/
+
/** @file test/burnt_subtitle_test.cc
* @brief Test the burning of subtitles into the DCP.
* @ingroup feature
*/
-#include "lib/plain_text_content.h"
+
+#include "lib/config.h"
+#include "lib/content_factory.h"
+#include "lib/dcp_content.h"
+#include "lib/dcp_content_type.h"
#include "lib/dcp_text_content.h"
#include "lib/film.h"
+#include "lib/log_entry.h"
+#include "lib/plain_text_content.h"
#include "lib/ratio.h"
-#include "lib/dcp_content_type.h"
#include "lib/text_content.h"
-#include "lib/dcp_content.h"
-#include "lib/content_factory.h"
-#include "lib/config.h"
-#include "lib/log_entry.h"
#include "test.h"
#include <dcp/dcp.h>
#include <dcp/cpl.h>
#include <dcp/reel_picture_asset.h>
#include <dcp/reel_mono_picture_asset.h>
#include <boost/test/unit_test.hpp>
-#include <iostream>
-using std::cout;
-using std::map;
-using std::shared_ptr;
+
using std::dynamic_pointer_cast;
using std::make_shared;
+using std::map;
using namespace dcpomatic;
+
/** Build a small DCP with no picture and a single subtitle overlaid onto it from a SubRip file */
BOOST_AUTO_TEST_CASE (burnt_subtitle_test_subrip)
{
content->subtitle->set_burn (true);
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs());
- film->make_dcp ();
- BOOST_REQUIRE (!wait_for_jobs());
+ make_and_verify_dcp (film);
check_dcp ("test/data/burnt_subtitle_test_subrip", film->dir (film->dcp_name ()));
}
film->set_container (Ratio::from_id ("185"));
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
film->set_name ("frobozz");
- film->examine_and_add_content (content_factory(film, "test/data/flat_black.png").front());
+ film->examine_and_add_content (content_factory(film, "test/data/flat_black.png")[0]);
BOOST_REQUIRE (!wait_for_jobs());
make_and_verify_dcp (film);
auto background_dcp = make_shared<DCPContent>(film2, film->dir(film->dcp_name()));
film2->examine_and_add_content (background_dcp);
auto sub = dynamic_pointer_cast<StringText> (
- content_factory(film2, "test/data/subrip2.srt").front()
+ content_factory(film2, "test/data/subrip2.srt")[0]
);
sub->subtitle->set_burn (true);
sub->subtitle->set_outline (true);