#include "lib/dcp_decoder.h"
#include "lib/dcp_content_type.h"
#include "lib/dcp_subtitle_decoder.h"
-#include "lib/caption_content.h"
-#include "lib/content_caption.h"
+#include "lib/text_content.h"
+#include "lib/content_text.h"
#include "lib/font.h"
-#include "lib/caption_decoder.h"
+#include "lib/text_decoder.h"
#include "test.h"
#include <iostream>
using boost::shared_ptr;
using boost::optional;
-optional<ContentTextCaption> stored;
+optional<ContentStringText> stored;
static void
-store (ContentTextCaption sub)
+store (ContentStringText sub)
{
if (!stored) {
stored = sub;
BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(2).get());
- content->caption->set_use (true);
- content->caption->set_burn (false);
+ content->only_text()->set_use (true);
+ content->only_text()->set_burn (false);
film->make_dcp ();
BOOST_REQUIRE (!wait_for_jobs ());
BOOST_REQUIRE (!wait_for_jobs ());
shared_ptr<DCPDecoder> decoder (new DCPDecoder (content, film->log(), false));
- decoder->caption->PlainStart.connect (bind (store, _1));
+ decoder->only_text()->PlainStart.connect (bind (store, _1));
- stored = optional<ContentTextCaption> ();
+ stored = optional<ContentStringText> ();
while (!decoder->pass() && !stored) {}
BOOST_REQUIRE (stored);
BOOST_REQUIRE (!wait_for_jobs ());
shared_ptr<DCPSubtitleDecoder> decoder (new DCPSubtitleDecoder (content, film->log()));
- decoder->caption->PlainStart.connect (bind (store, _1));
+ decoder->only_text()->PlainStart.connect (bind (store, _1));
- stored = optional<ContentTextCaption> ();
+ stored = optional<ContentStringText> ();
while (!decoder->pass ()) {
if (stored && stored->from() == ContentTime(0)) {
BOOST_CHECK_EQUAL (stored->subs.front().text(), "<b>Hello world!</b>");
BOOST_REQUIRE (!wait_for_jobs ());
shared_ptr<DCPSubtitleDecoder> decoder (new DCPSubtitleDecoder (content, film->log()));
- stored = optional<ContentTextCaption> ();
+ stored = optional<ContentStringText> ();
while (!decoder->pass ()) {
- decoder->caption->PlainStart.connect (bind (store, _1));
+ decoder->only_text()->PlainStart.connect (bind (store, _1));
if (stored && stored->from() == ContentTime::from_seconds(0.08)) {
list<dcp::SubtitleString> s = stored->subs;
list<dcp::SubtitleString>::const_iterator i = s.begin ();
film->examine_and_add_content (content2);
BOOST_REQUIRE (!wait_for_jobs ());
- content->caption->add_font (shared_ptr<Font> (new Font ("font1")));
- content2->caption->add_font (shared_ptr<Font> (new Font ("font2")));
+ content->only_text()->add_font (shared_ptr<Font> (new Font ("font1")));
+ content2->only_text()->add_font (shared_ptr<Font> (new Font ("font2")));
film->make_dcp ();
BOOST_REQUIRE (!wait_for_jobs ());