Tidy up after mass rename.
authorCarl Hetherington <cth@carlh.net>
Mon, 23 Jul 2018 14:10:11 +0000 (15:10 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 23 Jul 2018 14:10:11 +0000 (15:10 +0100)
61 files changed:
src/lib/analyse_audio_job.cc
src/lib/content.cc
src/lib/content.h
src/lib/dcp_content.cc
src/lib/dcp_content.h
src/lib/dcp_decoder.cc
src/lib/dcp_decoder.h
src/lib/dcp_encoder.cc
src/lib/dcp_encoder.h
src/lib/dcp_examiner.cc
src/lib/dcp_examiner.h
src/lib/dcp_subtitle_content.cc
src/lib/dcp_subtitle_decoder.cc
src/lib/decoder.cc
src/lib/decoder.h
src/lib/ffmpeg_content.cc
src/lib/ffmpeg_decoder.cc
src/lib/ffmpeg_encoder.cc
src/lib/film.cc
src/lib/hints.cc
src/lib/player.cc
src/lib/player.h
src/lib/player_video.cc
src/lib/player_video.h
src/lib/playlist.cc
src/lib/playlist.h
src/lib/reel_writer.cc
src/lib/reel_writer.h
src/lib/string_text_file_content.cc
src/lib/string_text_file_decoder.cc
src/lib/text_content.cc
src/lib/types.cc
src/lib/types.h
src/lib/writer.cc
src/lib/writer.h
src/tools/dcpomatic.cc
src/tools/dcpomatic_player.cc
src/wx/content_panel.cc
src/wx/content_panel.h
src/wx/dcp_panel.cc
src/wx/film_viewer.cc
src/wx/paste_dialog.cc
src/wx/paste_dialog.h
src/wx/player_information.cc
src/wx/text_panel.cc
src/wx/text_panel.h
src/wx/text_view.cc
src/wx/timeline.cc
src/wx/timeline_labels_view.cc
src/wx/timeline_labels_view.h
src/wx/timing_panel.cc
test/client_server_test.cc
test/closed_caption_test.cc
test/dcp_subtitle_test.cc
test/ffmpeg_encoder_test.cc
test/player_test.cc
test/remake_with_subtitle_test.cc
test/srt_subtitle_test.cc
test/ssa_subtitle_test.cc
test/subtitle_reel_number_test.cc
test/vf_test.cc

index 03497b91e4208140864d562b442d7eb563a1bd8a..461b84b4f5dbaf4c2d6884770156550520ae29d2 100644 (file)
@@ -106,7 +106,7 @@ AnalyseAudioJob::run ()
 {
        shared_ptr<Player> player (new Player (_film, _playlist));
        player->set_ignore_video ();
-       player->set_ignore_caption ();
+       player->set_ignore_text ();
        player->set_fast ();
        player->set_play_referenced ();
        player->Audio.connect (bind (&AnalyseAudioJob::analyse, this, _1, _2));
index 7a808828939deeab28e9f80b0ebfe9a53d77ee22..c1812b9fd1dcb5fa014d84187237aa2d127f6228 100644 (file)
@@ -437,9 +437,9 @@ Content::take_settings_from (shared_ptr<const Content> c)
                audio->take_settings_from (c->audio);
        }
 
-       list<shared_ptr<TextContent> >::iterator i = caption.begin ();
-       list<shared_ptr<TextContent> >::const_iterator j = c->caption.begin ();
-       while (i != caption.end() && j != c->caption.end()) {
+       list<shared_ptr<TextContent> >::iterator i = text.begin ();
+       list<shared_ptr<TextContent> >::const_iterator j = c->text.begin ();
+       while (i != text.end() && j != c->text.end()) {
                (*i)->take_settings_from (*j);
                ++i;
                ++j;
@@ -447,19 +447,19 @@ Content::take_settings_from (shared_ptr<const Content> c)
 }
 
 shared_ptr<TextContent>
-Content::only_caption () const
+Content::only_text () const
 {
-       DCPOMATIC_ASSERT (caption.size() < 2);
-       if (caption.empty ()) {
+       DCPOMATIC_ASSERT (text.size() < 2);
+       if (text.empty ()) {
                return shared_ptr<TextContent> ();
        }
-       return caption.front ();
+       return text.front ();
 }
 
 shared_ptr<TextContent>
-Content::caption_of_original_type (TextType type) const
+Content::text_of_original_type (TextType type) const
 {
-       BOOST_FOREACH (shared_ptr<TextContent> i, caption) {
+       BOOST_FOREACH (shared_ptr<TextContent> i, text) {
                if (i->original_type() == type) {
                        return i;
                }
index 850cb0891d3af8918ee20a39dc01b49b9381b351..23afa2243046d85db3ccbb9ffe823ea58d6905b2 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -182,10 +182,10 @@ public:
 
        boost::shared_ptr<VideoContent> video;
        boost::shared_ptr<AudioContent> audio;
-       std::list<boost::shared_ptr<TextContent> > caption;
+       std::list<boost::shared_ptr<TextContent> > text;
 
-       boost::shared_ptr<TextContent> only_caption () const;
-       boost::shared_ptr<TextContent> caption_of_original_type (TextType type) const;
+       boost::shared_ptr<TextContent> only_text () const;
+       boost::shared_ptr<TextContent> text_of_original_type (TextType type) const;
 
        void signal_changed (int);
 
index aaf8064f3cfd66b597194840c584890589b232b7..5371fbc11ca170a3649df461e063388f6c356475 100644 (file)
@@ -58,9 +58,9 @@ int const DCPContentProperty::NEEDS_ASSETS       = 600;
 int const DCPContentProperty::NEEDS_KDM          = 601;
 int const DCPContentProperty::REFERENCE_VIDEO    = 602;
 int const DCPContentProperty::REFERENCE_AUDIO    = 603;
-int const DCPContentProperty::REFERENCE_CAPTION  = 604;
+int const DCPContentProperty::REFERENCE_TEXT     = 604;
 int const DCPContentProperty::NAME               = 605;
-int const DCPContentProperty::CAPTIONS           = 606;
+int const DCPContentProperty::TEXTS              = 606;
 
 DCPContent::DCPContent (shared_ptr<const Film> film, boost::filesystem::path p)
        : Content (film)
@@ -74,8 +74,8 @@ DCPContent::DCPContent (shared_ptr<const Film> film, boost::filesystem::path p)
        read_directory (p);
        set_default_colour_conversion ();
 
-       for (int i = 0; i < CAPTION_COUNT; ++i) {
-               _reference_caption[i] = false;
+       for (int i = 0; i < TEXT_COUNT; ++i) {
+               _reference_text[i] = false;
        }
 }
 
@@ -84,10 +84,10 @@ DCPContent::DCPContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, in
 {
        video = VideoContent::from_xml (this, node, version);
        audio = AudioContent::from_xml (this, node, version);
-       caption = TextContent::from_xml (this, node, version);
+       text = TextContent::from_xml (this, node, version);
 
-       for (int i = 0; i < CAPTION_COUNT; ++i) {
-               _reference_caption[i] = false;
+       for (int i = 0; i < TEXT_COUNT; ++i) {
+               _reference_text[i] = false;
        }
 
        if (video && audio) {
@@ -115,11 +115,11 @@ DCPContent::DCPContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, in
        _reference_video = node->optional_bool_child ("ReferenceVideo").get_value_or (false);
        _reference_audio = node->optional_bool_child ("ReferenceAudio").get_value_or (false);
        if (version >= 37) {
-               _reference_caption[CAPTION_OPEN] = node->optional_bool_child("ReferenceOpenCaption").get_value_or(false);
-               _reference_caption[CAPTION_CLOSED] = node->optional_bool_child("ReferenceClosedCaption").get_value_or(false);
+               _reference_text[TEXT_OPEN_SUBTITLE] = node->optional_bool_child("ReferenceOpenSubtitle").get_value_or(false);
+               _reference_text[TEXT_CLOSED_CAPTION] = node->optional_bool_child("ReferenceClosedCaption").get_value_or(false);
        } else {
-               _reference_caption[CAPTION_OPEN] = node->optional_bool_child("ReferenceSubtitle").get_value_or(false);
-               _reference_caption[CAPTION_CLOSED] = false;
+               _reference_text[TEXT_OPEN_SUBTITLE] = node->optional_bool_child("ReferenceSubtitle").get_value_or(false);
+               _reference_text[TEXT_CLOSED_CAPTION] = false;
        }
        if (node->optional_string_child("Standard")) {
                string const s = node->optional_string_child("Standard").get();
@@ -156,7 +156,7 @@ DCPContent::examine (shared_ptr<Job> job)
        bool const needed_assets = needs_assets ();
        bool const needed_kdm = needs_kdm ();
        string const old_name = name ();
-       int const old_captions = caption.size ();
+       int const old_texts = text.size ();
 
        if (job) {
                job->set_progress_unknown ();
@@ -187,16 +187,16 @@ DCPContent::examine (shared_ptr<Job> job)
                signal_changed (AudioContentProperty::STREAMS);
        }
 
-       int captions = 0;
+       int texts = 0;
        {
                boost::mutex::scoped_lock lm (_mutex);
                _name = examiner->name ();
-               for (int i = 0; i < CAPTION_COUNT; ++i) {
-                       if (examiner->has_caption(static_cast<TextType>(i))) {
-                               caption.push_back (shared_ptr<TextContent>(new TextContent(this, static_cast<TextType>(i))));
+               for (int i = 0; i < TEXT_COUNT; ++i) {
+                       if (examiner->has_text(static_cast<TextType>(i))) {
+                               text.push_back (shared_ptr<TextContent>(new TextContent(this, static_cast<TextType>(i))));
                        }
                }
-               captions = caption.size ();
+               texts = text.size ();
                _encrypted = examiner->encrypted ();
                _needs_assets = examiner->needs_assets ();
                _kdm_valid = examiner->kdm_valid ();
@@ -206,8 +206,8 @@ DCPContent::examine (shared_ptr<Job> job)
                _reel_lengths = examiner->reel_lengths ();
        }
 
-       if (old_captions != captions) {
-               signal_changed (DCPContentProperty::CAPTIONS);
+       if (old_texts != texts) {
+               signal_changed (DCPContentProperty::TEXTS);
        }
 
        if (needed_assets != needs_assets ()) {
@@ -267,7 +267,7 @@ DCPContent::as_xml (xmlpp::Node* node, bool with_paths) const
                audio->stream()->mapping().as_xml (node->add_child("AudioMapping"));
        }
 
-       BOOST_FOREACH (shared_ptr<TextContent> i, caption) {
+       BOOST_FOREACH (shared_ptr<TextContent> i, text) {
                i->as_xml (node);
        }
 
@@ -281,8 +281,8 @@ DCPContent::as_xml (xmlpp::Node* node, bool with_paths) const
        node->add_child("KDMValid")->add_child_text (_kdm_valid ? "1" : "0");
        node->add_child("ReferenceVideo")->add_child_text (_reference_video ? "1" : "0");
        node->add_child("ReferenceAudio")->add_child_text (_reference_audio ? "1" : "0");
-       node->add_child("ReferenceOpenCaption")->add_child_text(_reference_caption[CAPTION_OPEN] ? "1" : "0");
-       node->add_child("ReferenceClosedCaption")->add_child_text(_reference_caption[CAPTION_CLOSED] ? "1" : "0");
+       node->add_child("ReferenceOpenSubtitle")->add_child_text(_reference_text[TEXT_OPEN_SUBTITLE] ? "1" : "0");
+       node->add_child("ReferenceClosedCaption")->add_child_text(_reference_text[TEXT_CLOSED_CAPTION] ? "1" : "0");
        if (_standard) {
                switch (_standard.get ()) {
                case dcp::INTEROP:
@@ -323,13 +323,13 @@ DCPContent::identifier () const
                s += video->identifier() + "_";
        }
 
-       BOOST_FOREACH (shared_ptr<TextContent> i, caption) {
+       BOOST_FOREACH (shared_ptr<TextContent> i, text) {
                s += i->identifier () + " ";
        }
 
        s += string (_reference_video ? "1" : "0");
-       for (int i = 0; i < CAPTION_COUNT; ++i) {
-               s += string (_reference_caption[i] ? "1" : "0");
+       for (int i = 0; i < TEXT_COUNT; ++i) {
+               s += string (_reference_text[i] ? "1" : "0");
        }
        return s;
 }
@@ -416,14 +416,14 @@ DCPContent::set_reference_audio (bool r)
 }
 
 void
-DCPContent::set_reference_caption (TextType type, bool r)
+DCPContent::set_reference_text (TextType type, bool r)
 {
        {
                boost::mutex::scoped_lock lm (_mutex);
-               _reference_caption[type] = r;
+               _reference_text[type] = r;
        }
 
-       signal_changed (DCPContentProperty::REFERENCE_CAPTION);
+       signal_changed (DCPContentProperty::REFERENCE_TEXT);
 }
 
 list<DCPTimePeriod>
@@ -591,12 +591,12 @@ DCPContent::can_reference_audio (string& why_not) const
 }
 
 static
-bool check_caption (shared_ptr<const Content> c)
+bool check_text (shared_ptr<const Content> c)
 {
-       return !c->caption.empty();
+       return !c->text.empty();
 }
 bool
-DCPContent::can_reference_caption (TextType type, string& why_not) const
+DCPContent::can_reference_text (TextType type, string& why_not) const
 {
        shared_ptr<DCPDecoder> decoder;
        try {
@@ -610,12 +610,12 @@ DCPContent::can_reference_caption (TextType type, string& why_not) const
        }
 
         BOOST_FOREACH (shared_ptr<dcp::Reel> i, decoder->reels()) {
-                if (type == CAPTION_OPEN && !i->main_subtitle()) {
+                if (type == TEXT_OPEN_SUBTITLE && !i->main_subtitle()) {
                        /// TRANSLATORS: this string will follow "Cannot reference this DCP: "
-                        why_not = _("it does not have subtitles in all its reels.");
+                        why_not = _("it does not have open subtitles in all its reels.");
                         return false;
                 }
-               if (type == CAPTION_CLOSED && !i->closed_caption()) {
+               if (type == TEXT_CLOSED_CAPTION && !i->closed_caption()) {
                        /// TRANSLATORS: this string will follow "Cannot reference this DCP: "
                         why_not = _("it does not have closed captions in all its reels.");
                         return false;
@@ -623,7 +623,7 @@ DCPContent::can_reference_caption (TextType type, string& why_not) const
         }
 
        /// TRANSLATORS: this string will follow "Cannot reference this DCP: "
-       return can_reference (bind (&check_caption, _1), _("it overlaps other caption content; remove the other content."), why_not);
+       return can_reference (bind (&check_text, _1), _("it overlaps other text content; remove the other content."), why_not);
 }
 
 void
@@ -636,8 +636,8 @@ DCPContent::take_settings_from (shared_ptr<const Content> c)
 
        _reference_video = dc->_reference_video;
        _reference_audio = dc->_reference_audio;
-       for (int i = 0; i < CAPTION_COUNT; ++i) {
-               _reference_caption[i] = dc->_reference_caption[i];
+       for (int i = 0; i < TEXT_COUNT; ++i) {
+               _reference_text[i] = dc->_reference_text[i];
        }
 }
 
index fedc43d6417f90c978281ee18b36c931d42ff558..cccf127c31732d00f1003bdf82fc2d6d78bc3097 100644 (file)
@@ -36,9 +36,9 @@ public:
        static int const NEEDS_ASSETS;
        static int const REFERENCE_VIDEO;
        static int const REFERENCE_AUDIO;
-       static int const REFERENCE_CAPTION;
+       static int const REFERENCE_TEXT;
        static int const NAME;
-       static int const CAPTIONS;
+       static int const TEXTS;
 };
 
 class ContentPart;
@@ -108,17 +108,17 @@ public:
 
        bool can_reference_audio (std::string &) const;
 
-       void set_reference_caption (TextType type, bool r);
+       void set_reference_text (TextType type, bool r);
 
-       /** @param type Original type of captions in the DCP.
-        *  @return true if these captions are to be referenced.
+       /** @param type Original type of texts in the DCP.
+        *  @return true if these texts are to be referenced.
         */
-       bool reference_caption (TextType type) const {
+       bool reference_text (TextType type) const {
                boost::mutex::scoped_lock lm (_mutex);
-               return _reference_caption[type];
+               return _reference_text[type];
        }
 
-       bool can_reference_caption (TextType type, std::string &) const;
+       bool can_reference_text (TextType type, std::string &) const;
 
        void set_cpl (std::string id);
 
@@ -166,11 +166,11 @@ private:
         *  rather than by rewrapping.
         */
        bool _reference_audio;
-       /** true if the captions in this DCP should be included in the output by reference
-        *  rather than by rewrapping.  The types here are the original caption types,
+       /** true if the texts in this DCP should be included in the output by reference
+        *  rather than by rewrapping.  The types here are the original text types,
         *  not what they are being used for.
         */
-       bool _reference_caption[CAPTION_COUNT];
+       bool _reference_text[TEXT_COUNT];
 
        boost::optional<dcp::Standard> _standard;
        bool _three_d;
index 86152c817f6642eb0d931ca4a342ad00299e2ee2..85fa41ddde0a9e5c1e7ce075a4013fb606961cfc 100644 (file)
@@ -63,9 +63,9 @@ DCPDecoder::DCPDecoder (shared_ptr<const DCPContent> c, shared_ptr<Log> log, boo
        if (c->audio) {
                audio.reset (new AudioDecoder (this, c->audio, log, fast));
        }
-       BOOST_FOREACH (shared_ptr<TextContent> i, c->caption) {
+       BOOST_FOREACH (shared_ptr<TextContent> i, c->text) {
                /* XXX: this time here should be the time of the first subtitle, not 0 */
-               caption.push_back (shared_ptr<TextDecoder> (new TextDecoder (this, i, log, ContentTime())));
+               text.push_back (shared_ptr<TextDecoder> (new TextDecoder (this, i, log, ContentTime())));
        }
 
        list<shared_ptr<dcp::CPL> > cpl_list = cpls ();
@@ -110,10 +110,10 @@ DCPDecoder::pass ()
        /* Frame within the (played part of the) reel that is coming up next */
        int64_t const frame = _next.frames_round (vfr);
 
-       /* We must emit captions first as when we emit the video for this frame
-          it will expect already to have the captions.
+       /* We must emit texts first as when we emit the video for this frame
+          it will expect already to have the texts.
        */
-       pass_captions (_next);
+       pass_texts (_next);
 
        if ((_mono_reader || _stereo_reader) && (_decode_referenced || !_dcp_content->reference_video())) {
                shared_ptr<dcp::PictureAsset> asset = (*_reel)->main_picture()->asset ();
@@ -191,25 +191,25 @@ DCPDecoder::pass ()
 }
 
 void
-DCPDecoder::pass_captions (ContentTime next)
+DCPDecoder::pass_texts (ContentTime next)
 {
-       list<shared_ptr<TextDecoder> >::const_iterator decoder = caption.begin ();
+       list<shared_ptr<TextDecoder> >::const_iterator decoder = text.begin ();
        if ((*_reel)->main_subtitle()) {
-               pass_captions (
-                       next, (*_reel)->main_subtitle()->asset(), _dcp_content->reference_caption(CAPTION_OPEN), (*_reel)->main_subtitle()->entry_point(), *decoder
+               pass_texts (
+                       next, (*_reel)->main_subtitle()->asset(), _dcp_content->reference_text(TEXT_OPEN_SUBTITLE), (*_reel)->main_subtitle()->entry_point(), *decoder
                        );
                ++decoder;
        }
        if ((*_reel)->closed_caption()) {
-               pass_captions (
-                       next, (*_reel)->closed_caption()->asset(), _dcp_content->reference_caption(CAPTION_CLOSED), (*_reel)->closed_caption()->entry_point(), *decoder
+               pass_texts (
+                       next, (*_reel)->closed_caption()->asset(), _dcp_content->reference_text(TEXT_CLOSED_CAPTION), (*_reel)->closed_caption()->entry_point(), *decoder
                        );
                ++decoder;
        }
 }
 
 void
-DCPDecoder::pass_captions (ContentTime next, shared_ptr<dcp::SubtitleAsset> asset, bool reference, int64_t entry_point, shared_ptr<TextDecoder> decoder)
+DCPDecoder::pass_texts (ContentTime next, shared_ptr<dcp::SubtitleAsset> asset, bool reference, int64_t entry_point, shared_ptr<TextDecoder> decoder)
 {
        double const vfr = _dcp_content->active_video_frame_rate ();
        /* Frame within the (played part of the) reel that is coming up next */
@@ -314,11 +314,11 @@ DCPDecoder::seek (ContentTime t, bool accurate)
                next_reel ();
        }
 
-       /* Pass captions in the pre-roll */
+       /* Pass texts in the pre-roll */
 
        double const vfr = _dcp_content->active_video_frame_rate ();
        for (int i = 0; i < pre_roll_seconds * vfr; ++i) {
-               pass_captions (pre);
+               pass_texts (pre);
                pre += ContentTime::from_frames (1, vfr);
        }
 
index 2fbdb884a3f808b37087d008a2ba887c4ee8f35f..36b5bbafb049727d806a943053d0c4585aceaad9 100644 (file)
@@ -57,8 +57,8 @@ private:
 
        void next_reel ();
        void get_readers ();
-       void pass_captions (ContentTime next);
-       void pass_captions (ContentTime next, boost::shared_ptr<dcp::SubtitleAsset> asset, bool reference, int64_t entry_point, boost::shared_ptr<TextDecoder> decoder);
+       void pass_texts (ContentTime next);
+       void pass_texts (ContentTime next, boost::shared_ptr<dcp::SubtitleAsset> asset, bool reference, int64_t entry_point, boost::shared_ptr<TextDecoder> decoder);
 
        /** Time of next thing to return from pass relative to the start of _reel */
        ContentTime _next;
index 42984887daa029dc48e6f06c766d6809ddcc8c95..7fbbb2c635f6935f196d283a68f292a6d8990050 100644 (file)
@@ -61,10 +61,10 @@ DCPEncoder::DCPEncoder (shared_ptr<const Film> film, weak_ptr<Job> job)
 {
        _player_video_connection = _player->Video.connect (bind (&DCPEncoder::video, this, _1, _2));
        _player_audio_connection = _player->Audio.connect (bind (&DCPEncoder::audio, this, _1, _2));
-       _player_caption_connection = _player->Caption.connect (bind (&DCPEncoder::caption, this, _1, _2, _3));
+       _player_text_connection = _player->Text.connect (bind (&DCPEncoder::text, this, _1, _2, _3));
 
        BOOST_FOREACH (shared_ptr<const Content> c, film->content ()) {
-               BOOST_FOREACH (shared_ptr<TextContent> i, c->caption) {
+               BOOST_FOREACH (shared_ptr<TextContent> i, c->text) {
                        if (i->use() && !i->burn()) {
                                _non_burnt_subtitles = true;
                        }
@@ -77,7 +77,7 @@ DCPEncoder::~DCPEncoder ()
        /* We must stop receiving more video data before we die */
        _player_video_connection.release ();
        _player_audio_connection.release ();
-       _player_caption_connection.release ();
+       _player_text_connection.release ();
 }
 
 void
@@ -143,9 +143,9 @@ DCPEncoder::audio (shared_ptr<AudioBuffers> data, DCPTime time)
 }
 
 void
-DCPEncoder::caption (PlayerText data, TextType type, DCPTimePeriod period)
+DCPEncoder::text (PlayerText data, TextType type, DCPTimePeriod period)
 {
-       if (type == CAPTION_CLOSED || _non_burnt_subtitles) {
+       if (type == TEXT_CLOSED_CAPTION || _non_burnt_subtitles) {
                _writer->write (data, type, period);
        }
 }
index 23b05d0dcbc752a1863007c7b2bad1b1fa7d824e..8a2ad947dcc95d3f391d878f7ef18cad0a9ed2e6 100644 (file)
@@ -52,7 +52,7 @@ private:
 
        void video (boost::shared_ptr<PlayerVideo>, DCPTime);
        void audio (boost::shared_ptr<AudioBuffers>, DCPTime);
-       void caption (PlayerText, TextType, DCPTimePeriod);
+       void text (PlayerText, TextType, DCPTimePeriod);
 
        boost::shared_ptr<Writer> _writer;
        boost::shared_ptr<J2KEncoder> _j2k_encoder;
@@ -61,5 +61,5 @@ private:
 
        boost::signals2::scoped_connection _player_video_connection;
        boost::signals2::scoped_connection _player_audio_connection;
-       boost::signals2::scoped_connection _player_caption_connection;
+       boost::signals2::scoped_connection _player_text_connection;
 };
index 6b4f854f8d66d456b6da1c6974bb644c1b2cf846..4b9238e5b3d1c7f3758c833fc615a0d76d780bc0 100644 (file)
@@ -65,8 +65,8 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content)
 {
        shared_ptr<dcp::CPL> cpl;
 
-       for (int i = 0; i < CAPTION_COUNT; ++i) {
-               _has_caption[i] = false;
+       for (int i = 0; i < TEXT_COUNT; ++i) {
+               _has_text[i] = false;
        }
 
        if (content->cpl ()) {
@@ -169,7 +169,7 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content)
                                return;
                        }
 
-                       _has_caption[CAPTION_OPEN] = true;
+                       _has_text[TEXT_OPEN_SUBTITLE] = true;
                }
 
                if (i->closed_caption ()) {
@@ -179,7 +179,7 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content)
                                return;
                        }
 
-                       _has_caption[CAPTION_CLOSED] = true;
+                       _has_text[TEXT_CLOSED_CAPTION] = true;
                }
 
                if (i->main_picture()) {
index 29fcc48d2c1962f7c93db0c440dcb38ba7b0c41a..4b93bfa4298e99606f9d61f4e14923221065f268 100644 (file)
@@ -83,8 +83,8 @@ public:
                return _audio_frame_rate.get_value_or (48000);
        }
 
-       bool has_caption (TextType type) const {
-               return _has_caption[type];
+       bool has_text (TextType type) const {
+               return _has_text[type];
        }
 
        bool kdm_valid () const {
@@ -119,7 +119,7 @@ private:
        bool _has_video;
        /** true if this DCP has audio content (but false if it has unresolved references to audio content) */
        bool _has_audio;
-       bool _has_caption[CAPTION_COUNT];
+       bool _has_text[TEXT_COUNT];
        bool _encrypted;
        bool _needs_assets;
        bool _kdm_valid;
index 6a7e381534844a9fa4ebd74db40d68d0ec8c999f..5acc51ac4da1d8bc0119ae66fbc0513b383ba66c 100644 (file)
@@ -40,14 +40,14 @@ using dcp::raw_convert;
 DCPSubtitleContent::DCPSubtitleContent (shared_ptr<const Film> film, boost::filesystem::path path)
        : Content (film, path)
 {
-       caption.push_back (shared_ptr<TextContent> (new TextContent (this, CAPTION_OPEN)));
+       text.push_back (shared_ptr<TextContent> (new TextContent (this, TEXT_OPEN_SUBTITLE)));
 }
 
 DCPSubtitleContent::DCPSubtitleContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
        : Content (film, node)
        , _length (node->number_child<ContentTime::Type> ("Length"))
 {
-       caption = TextContent::from_xml (this, node, version);
+       text = TextContent::from_xml (this, node, version);
 }
 
 void
@@ -66,18 +66,18 @@ DCPSubtitleContent::examine (shared_ptr<Job> job)
        boost::mutex::scoped_lock lm (_mutex);
 
        /* Default to turning these subtitles on */
-       only_caption()->set_use (true);
+       only_text()->set_use (true);
 
        if (iop) {
-               only_caption()->set_language (iop->language ());
+               only_text()->set_language (iop->language ());
        } else if (smpte) {
-               only_caption()->set_language (smpte->language().get_value_or (""));
+               only_text()->set_language (smpte->language().get_value_or (""));
        }
 
        _length = ContentTime::from_seconds (sc->latest_subtitle_out().as_seconds ());
 
        BOOST_FOREACH (shared_ptr<dcp::LoadFontNode> i, sc->load_font_nodes ()) {
-               only_caption()->add_font (shared_ptr<Font> (new Font (i->id)));
+               only_text()->add_font (shared_ptr<Font> (new Font (i->id)));
        }
 }
 
@@ -106,8 +106,8 @@ DCPSubtitleContent::as_xml (xmlpp::Node* node, bool with_paths) const
        node->add_child("Type")->add_child_text ("DCPSubtitle");
        Content::as_xml (node, with_paths);
 
-       if (only_caption()) {
-               only_caption()->as_xml (node);
+       if (only_text()) {
+               only_text()->as_xml (node);
        }
 
        node->add_child("Length")->add_child_text (raw_convert<string> (_length.get ()));
index 05d81526508a26b540202b3317931149e38227c9..9c803a3b61d012a965fcfece5d4a7ed675b70b38 100644 (file)
@@ -39,7 +39,7 @@ DCPSubtitleDecoder::DCPSubtitleDecoder (shared_ptr<const DCPSubtitleContent> con
        if (_next != _subtitles.end()) {
                first = content_time_period(*_next).from;
        }
-       caption.push_back (shared_ptr<TextDecoder> (new TextDecoder (this, content->only_caption(), log, first)));
+       text.push_back (shared_ptr<TextDecoder> (new TextDecoder (this, content->only_text(), log, first)));
 }
 
 void
@@ -81,7 +81,7 @@ DCPSubtitleDecoder::pass ()
                /* XXX: image subtitles */
        }
 
-       only_caption()->emit_plain (p, s);
+       only_text()->emit_plain (p, s);
        return false;
 }
 
index 52949a0989d83be7895f2117591a3dc7fedadc17..6078141dcfab4d0f84fff1026154106ff389595d 100644 (file)
@@ -43,7 +43,7 @@ Decoder::position () const
                pos = audio->position();
        }
 
-       BOOST_FOREACH (shared_ptr<TextDecoder> i, caption) {
+       BOOST_FOREACH (shared_ptr<TextDecoder> i, text) {
                if (!i->ignore() && (!pos || i->position() < *pos)) {
                        pos = i->position();
                }
@@ -61,17 +61,17 @@ Decoder::seek (ContentTime, bool)
        if (audio) {
                audio->seek ();
        }
-       BOOST_FOREACH (shared_ptr<TextDecoder> i, caption) {
+       BOOST_FOREACH (shared_ptr<TextDecoder> i, text) {
                i->seek ();
        }
 }
 
 shared_ptr<TextDecoder>
-Decoder::only_caption () const
+Decoder::only_text () const
 {
-       DCPOMATIC_ASSERT (caption.size() < 2);
-       if (caption.empty ()) {
+       DCPOMATIC_ASSERT (text.size() < 2);
+       if (text.empty ()) {
                return shared_ptr<TextDecoder> ();
        }
-       return caption.front ();
+       return text.front ();
 }
index 1b330316ecc7c5c8812720ba4c8f1835f12fda9c..55d9cfc64b92172d35e1714708965e4672f430de 100644 (file)
@@ -45,9 +45,9 @@ public:
 
        boost::shared_ptr<VideoDecoder> video;
        boost::shared_ptr<AudioDecoder> audio;
-       std::list<boost::shared_ptr<TextDecoder> > caption;
+       std::list<boost::shared_ptr<TextDecoder> > text;
 
-       boost::shared_ptr<TextDecoder> only_caption () const;
+       boost::shared_ptr<TextDecoder> only_text () const;
 
        /** Do some decoding and perhaps emit video, audio or subtitle data.
         *  @return true if this decoder will emit no more data unless a seek() happens.
index 86965ff4952b7edaa3fd56437ec0b2f855012d00..fc2a3ff4080070196e57c417193be92e129b9efb 100644 (file)
@@ -85,7 +85,7 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> film, cxml::ConstNodePtr no
 {
        video = VideoContent::from_xml (this, node, version);
        audio = AudioContent::from_xml (this, node, version);
-       caption = TextContent::from_xml (this, node, version);
+       text = TextContent::from_xml (this, node, version);
 
        list<cxml::NodePtr> c = node->node_children ("SubtitleStream");
        for (list<cxml::NodePtr>::const_iterator i = c.begin(); i != c.end(); ++i) {
@@ -135,12 +135,12 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> film, vector<shared_ptr<Con
 
        bool need_video = false;
        bool need_audio = false;
-       bool need_caption = false;
+       bool need_text = false;
 
        if (i != c.end ()) {
                need_video = static_cast<bool> ((*i)->video);
                need_audio = static_cast<bool> ((*i)->audio);
-               need_caption = !(*i)->caption.empty();
+               need_text = !(*i)->text.empty();
        }
 
        while (i != c.end ()) {
@@ -150,8 +150,8 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> film, vector<shared_ptr<Con
                if (need_audio != static_cast<bool> ((*i)->audio)) {
                        throw JoinError (_("Content to be joined must all have or not have audio"));
                }
-               if (need_caption != !(*i)->caption.empty()) {
-                       throw JoinError (_("Content to be joined must all have or not have captions"));
+               if (need_text != !(*i)->text.empty()) {
+                       throw JoinError (_("Content to be joined must all have or not have subtitles or captions"));
                }
                ++i;
        }
@@ -162,8 +162,8 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> film, vector<shared_ptr<Con
        if (need_audio) {
                audio.reset (new AudioContent (this, c));
        }
-       if (need_caption) {
-               caption.push_back (shared_ptr<TextContent> (new TextContent (this, c)));
+       if (need_text) {
+               text.push_back (shared_ptr<TextContent> (new TextContent (this, c)));
        }
 
        shared_ptr<FFmpegContent> ref = dynamic_pointer_cast<FFmpegContent> (c[0]);
@@ -171,7 +171,7 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> film, vector<shared_ptr<Con
 
        for (size_t i = 0; i < c.size(); ++i) {
                shared_ptr<FFmpegContent> fc = dynamic_pointer_cast<FFmpegContent> (c[i]);
-               if (fc->only_caption() && fc->only_caption()->use() && *(fc->_subtitle_stream.get()) != *(ref->_subtitle_stream.get())) {
+               if (fc->only_text() && fc->only_text()->use() && *(fc->_subtitle_stream.get()) != *(ref->_subtitle_stream.get())) {
                        throw JoinError (_("Content to be joined must use the same subtitle stream."));
                }
        }
@@ -209,8 +209,8 @@ FFmpegContent::as_xml (xmlpp::Node* node, bool with_paths) const
                }
        }
 
-       if (only_caption()) {
-               only_caption()->as_xml (node);
+       if (only_text()) {
+               only_text()->as_xml (node);
        }
 
        boost::mutex::scoped_lock lm (_mutex);
@@ -303,8 +303,8 @@ FFmpegContent::examine (shared_ptr<Job> job)
 
                _subtitle_streams = examiner->subtitle_streams ();
                if (!_subtitle_streams.empty ()) {
-                       caption.clear ();
-                       caption.push_back (shared_ptr<TextContent> (new TextContent (this, CAPTION_OPEN)));
+                       text.clear ();
+                       text.push_back (shared_ptr<TextContent> (new TextContent (this, TEXT_OPEN_SUBTITLE)));
                        _subtitle_stream = _subtitle_streams.front ();
                }
 
@@ -427,8 +427,8 @@ FFmpegContent::identifier () const
                s += "_" + video->identifier();
        }
 
-       if (only_caption() && only_caption()->use() && only_caption()->burn()) {
-               s += "_" + only_caption()->identifier();
+       if (only_text() && only_text()->use() && only_text()->burn()) {
+               s += "_" + only_text()->identifier();
        }
 
        boost::mutex::scoped_lock lm (_mutex);
index 665ee3e13d630217e07041744caffa55142d06c7..32e9c231414d8905def48f2a293a7bb4d0415152 100644 (file)
@@ -97,9 +97,9 @@ FFmpegDecoder::FFmpegDecoder (shared_ptr<const FFmpegContent> c, shared_ptr<Log>
                audio.reset (new AudioDecoder (this, c->audio, log, fast));
        }
 
-       if (c->only_caption()) {
+       if (c->only_text()) {
                /* XXX: this time here should be the time of the first subtitle, not 0 */
-               caption.push_back (shared_ptr<TextDecoder> (new TextDecoder (this, c->only_caption(), log, ContentTime())));
+               text.push_back (shared_ptr<TextDecoder> (new TextDecoder (this, c->only_text(), log, ContentTime())));
        }
 
        _next_time.resize (_format_context->nb_streams);
@@ -184,7 +184,7 @@ FFmpegDecoder::pass ()
 
        if (_video_stream && si == _video_stream.get() && !video->ignore()) {
                decode_video_packet ();
-       } else if (fc->subtitle_stream() && fc->subtitle_stream()->uses_index(_format_context, si) && !only_caption()->ignore()) {
+       } else if (fc->subtitle_stream() && fc->subtitle_stream()->uses_index(_format_context, si) && !only_text()->ignore()) {
                decode_subtitle_packet ();
        } else {
                decode_audio_packet ();
@@ -549,9 +549,9 @@ FFmpegDecoder::decode_subtitle_packet ()
        /* Stop any current subtitle, either at the time it was supposed to stop, or now if now is sooner */
        if (_have_current_subtitle) {
                if (_current_subtitle_to) {
-                       only_caption()->emit_stop (min(*_current_subtitle_to, subtitle_period(sub).from + _pts_offset));
+                       only_text()->emit_stop (min(*_current_subtitle_to, subtitle_period(sub).from + _pts_offset));
                } else {
-                       only_caption()->emit_stop (subtitle_period(sub).from + _pts_offset);
+                       only_text()->emit_stop (subtitle_period(sub).from + _pts_offset);
                }
                _have_current_subtitle = false;
        }
@@ -593,7 +593,7 @@ FFmpegDecoder::decode_subtitle_packet ()
        }
 
        if (_current_subtitle_to) {
-               only_caption()->emit_stop (*_current_subtitle_to);
+               only_text()->emit_stop (*_current_subtitle_to);
        }
 
        avsubtitle_free (&sub);
@@ -669,7 +669,7 @@ FFmpegDecoder::decode_bitmap_subtitle (AVSubtitleRect const * rect, ContentTime
                static_cast<double> (rect->h) / target_height
                );
 
-       only_caption()->emit_bitmap_start (from, image, scaled_rect);
+       only_text()->emit_bitmap_start (from, image, scaled_rect);
 }
 
 void
@@ -702,6 +702,6 @@ FFmpegDecoder::decode_ass_subtitle (string ass, ContentTime from)
                );
 
        BOOST_FOREACH (sub::Subtitle const & i, sub::collect<list<sub::Subtitle> > (raw)) {
-               only_caption()->emit_plain_start (from, i);
+               only_text()->emit_plain_start (from, i);
        }
 }
index f82290c6cd2f1183edb71063fd18337940ebddce..71063c12371d3c4765e42c5120089bca1b051af7 100644 (file)
@@ -72,7 +72,7 @@ FFmpegEncoder::FFmpegEncoder (shared_ptr<const Film> film, weak_ptr<Job> job, bo
                break;
        }
 
-       _player->set_always_burn_open_captions ();
+       _player->set_always_burn_open_subtitles ();
        _player->set_play_referenced ();
 
        int const ch = film->audio_channels ();
index 475d28b4f24b6c5af2c9923677344a8e07332eee..ba97f833ea39b7df3d6a8bd903dedb3767a942d8 100644 (file)
@@ -704,10 +704,10 @@ Film::isdcf_name (bool if_created_now) const
                        bool burnt_in = true;
                        bool ccap = false;
                        BOOST_FOREACH (shared_ptr<Content> i, content()) {
-                               BOOST_FOREACH (shared_ptr<TextContent> j, i->caption) {
-                                       if (j->type() == CAPTION_OPEN && j->use() && !j->burn()) {
+                               BOOST_FOREACH (shared_ptr<TextContent> j, i->text) {
+                                       if (j->type() == TEXT_OPEN_SUBTITLE && j->use() && !j->burn()) {
                                                burnt_in = false;
-                                       } else if (j->type() == CAPTION_CLOSED) {
+                                       } else if (j->type() == TEXT_CLOSED_CAPTION) {
                                                ccap = true;
                                        }
                                }
@@ -782,13 +782,13 @@ Film::isdcf_name (bool if_created_now) const
                        continue;
                }
 
-               bool any_caption = false;
-               for (int i = 0; i < CAPTION_COUNT; ++i) {
-                       if (dc->reference_caption(static_cast<TextType>(i))) {
-                               any_caption = true;
+               bool any_text = false;
+               for (int i = 0; i < TEXT_COUNT; ++i) {
+                       if (dc->reference_text(static_cast<TextType>(i))) {
+                               any_text = true;
                        }
                }
-               if (dc->reference_video() || dc->reference_audio() || any_caption) {
+               if (dc->reference_video() || dc->reference_audio() || any_text) {
                        vf = true;
                }
        }
@@ -1102,8 +1102,8 @@ Film::add_content (shared_ptr<Content> c)
        /* Add {video,subtitle} content after any existing {video,subtitle} content */
        if (c->video) {
                c->set_position (_playlist->video_end());
-       } else if (!c->caption.empty()) {
-               c->set_position (_playlist->caption_end());
+       } else if (!c->text.empty()) {
+               c->set_position (_playlist->text_end());
        }
 
        if (_template_film) {
@@ -1391,7 +1391,7 @@ Film::subtitle_language () const
        set<string> languages;
 
        BOOST_FOREACH (shared_ptr<Content> i, content()) {
-               BOOST_FOREACH (shared_ptr<TextContent> j, i->caption) {
+               BOOST_FOREACH (shared_ptr<TextContent> j, i->text) {
                        languages.insert (j->language ());
                }
        }
index 8cc0cfbfbe4cf0c10fa6c7273a31226d57205508..31b2ad84922a0d4268d011f3cc96cbcdf15c2b03 100644 (file)
@@ -56,7 +56,7 @@ get_hints (shared_ptr<const Film> film)
        bool big_font_files = false;
        if (film->interop ()) {
                BOOST_FOREACH (shared_ptr<Content> i, content) {
-                       BOOST_FOREACH (shared_ptr<TextContent> j, i->caption) {
+                       BOOST_FOREACH (shared_ptr<TextContent> j, i->text) {
                                BOOST_FOREACH (shared_ptr<Font> k, j->fonts()) {
                                        for (int l = 0; l < FontFiles::VARIANTS; ++l) {
                                                optional<boost::filesystem::path> const p = k->file (static_cast<FontFiles::Variant>(l));
index 22526edefcd5afba6528a46d0f427e5e261497e8..831d503f9e6824279a3f82aaadafe651b256823f 100644 (file)
@@ -89,7 +89,7 @@ Player::Player (shared_ptr<const Film> film, shared_ptr<const Playlist> playlist
        , _playlist (playlist)
        , _have_valid_pieces (false)
        , _ignore_video (false)
-       , _ignore_caption (false)
+       , _ignore_text (false)
        , _fast (false)
        , _play_referenced (false)
        , _audio_merger (_film->audio_frame_rate())
@@ -137,8 +137,8 @@ Player::setup_pieces ()
                        decoder->video->set_ignore (true);
                }
 
-               if (_ignore_caption) {
-                       BOOST_FOREACH (shared_ptr<TextDecoder> i, decoder->caption) {
+               if (_ignore_text) {
+                       BOOST_FOREACH (shared_ptr<TextDecoder> i, decoder->text) {
                                i->set_ignore (true);
                        }
                }
@@ -167,9 +167,9 @@ Player::setup_pieces ()
                        decoder->audio->Data.connect (bind (&Player::audio, this, weak_ptr<Piece> (piece), _1, _2));
                }
 
-               list<shared_ptr<TextDecoder> >::const_iterator j = decoder->caption.begin();
+               list<shared_ptr<TextDecoder> >::const_iterator j = decoder->text.begin();
 
-               while (j != decoder->caption.end()) {
+               while (j != decoder->text.end()) {
                        (*j)->BitmapStart.connect (
                                bind(&Player::bitmap_text_start, this, weak_ptr<Piece>(piece), weak_ptr<const TextContent>((*j)->content()), _1)
                                );
@@ -302,7 +302,7 @@ Player::film_changed (Film::Property p)
 }
 
 list<PositionImage>
-Player::transform_bitmap_captions (list<BitmapText> subs) const
+Player::transform_bitmap_texts (list<BitmapText> subs) const
 {
        list<PositionImage> all;
 
@@ -419,7 +419,7 @@ Player::get_subtitle_fonts ()
 
        list<shared_ptr<Font> > fonts;
        BOOST_FOREACH (shared_ptr<Piece> i, _pieces) {
-               BOOST_FOREACH (shared_ptr<TextContent> j, i->content->caption) {
+               BOOST_FOREACH (shared_ptr<TextContent> j, i->content->text) {
                        /* XXX: things may go wrong if there are duplicate font IDs
                           with different font files.
                        */
@@ -439,16 +439,16 @@ Player::set_ignore_video ()
 }
 
 void
-Player::set_ignore_caption ()
+Player::set_ignore_text ()
 {
-       _ignore_caption = true;
+       _ignore_text = true;
 }
 
-/** Set the player to always burn open captions into the image regardless of the content settings */
+/** Set the player to always burn open texts into the image regardless of the content settings */
 void
-Player::set_always_burn_open_captions ()
+Player::set_always_burn_open_subtitles ()
 {
-       _always_burn_open_captions = true;
+       _always_burn_open_subtitles = true;
 }
 
 /** Sets up the player to be faster, possibly at the expense of quality */
@@ -514,7 +514,7 @@ Player::get_reel_assets ()
                                        );
                        }
 
-                       if (j->reference_caption (CAPTION_OPEN)) {
+                       if (j->reference_text (TEXT_OPEN_SUBTITLE)) {
                                shared_ptr<dcp::ReelAsset> ra = k->main_subtitle ();
                                DCPOMATIC_ASSERT (ra);
                                ra->set_entry_point (ra->entry_point() + trim_start);
@@ -524,7 +524,7 @@ Player::get_reel_assets ()
                                        );
                        }
 
-                       if (j->reference_caption (CAPTION_CLOSED)) {
+                       if (j->reference_text (TEXT_CLOSED_CAPTION)) {
                                shared_ptr<dcp::ReelAsset> ra = k->closed_caption ();
                                DCPOMATIC_ASSERT (ra);
                                ra->set_entry_point (ra->entry_point() + trim_start);
@@ -570,10 +570,10 @@ Player::pass ()
                        i->done = true;
                } else {
 
-                       /* Given two choices at the same time, pick the one with captions so we see it before
+                       /* Given two choices at the same time, pick the one with texts so we see it before
                           the video.
                        */
-                       if (!earliest_time || t < *earliest_time || (t == *earliest_time && !i->decoder->caption.empty())) {
+                       if (!earliest_time || t < *earliest_time || (t == *earliest_time && !i->decoder->text.empty())) {
                                earliest_time = t;
                                earliest_content = i;
                        }
@@ -679,25 +679,25 @@ Player::pass ()
 list<PlayerText>
 Player::closed_captions_for_frame (DCPTime time) const
 {
-       return _active_captions[CAPTION_CLOSED].get (
+       return _active_texts[TEXT_CLOSED_CAPTION].get (
                DCPTimePeriod(time, time + DCPTime::from_frames(1, _film->video_frame_rate()))
                );
 }
 
-/** @return Open captions for the frame at the given time, converted to images */
+/** @return Open subtitles for the frame at the given time, converted to images */
 optional<PositionImage>
-Player::open_captions_for_frame (DCPTime time) const
+Player::open_subtitles_for_frame (DCPTime time) const
 {
        list<PositionImage> captions;
        int const vfr = _film->video_frame_rate();
 
        BOOST_FOREACH (
                PlayerText j,
-               _active_captions[CAPTION_OPEN].get_burnt(DCPTimePeriod(time, time + DCPTime::from_frames(1, vfr)), _always_burn_open_captions)
+               _active_texts[TEXT_OPEN_SUBTITLE].get_burnt(DCPTimePeriod(time, time + DCPTime::from_frames(1, vfr)), _always_burn_open_subtitles)
                ) {
 
                /* Image subtitles */
-               list<PositionImage> c = transform_bitmap_captions (j.image);
+               list<PositionImage> c = transform_bitmap_texts (j.image);
                copy (c.begin(), c.end(), back_inserter (captions));
 
                /* Text subtitles (rendered to an image) */
@@ -873,36 +873,36 @@ void
 Player::bitmap_text_start (weak_ptr<Piece> wp, weak_ptr<const TextContent> wc, ContentBitmapText subtitle)
 {
        shared_ptr<Piece> piece = wp.lock ();
-       shared_ptr<const TextContent> caption = wc.lock ();
-       if (!piece || !caption) {
+       shared_ptr<const TextContent> text = wc.lock ();
+       if (!piece || !text) {
                return;
        }
 
        /* Apply content's subtitle offsets */
-       subtitle.sub.rectangle.x += caption->x_offset ();
-       subtitle.sub.rectangle.y += caption->y_offset ();
+       subtitle.sub.rectangle.x += text->x_offset ();
+       subtitle.sub.rectangle.y += text->y_offset ();
 
        /* Apply a corrective translation to keep the subtitle centred after the scale that is coming up */
-       subtitle.sub.rectangle.x -= subtitle.sub.rectangle.width * ((caption->x_scale() - 1) / 2);
-       subtitle.sub.rectangle.y -= subtitle.sub.rectangle.height * ((caption->y_scale() - 1) / 2);
+       subtitle.sub.rectangle.x -= subtitle.sub.rectangle.width * ((text->x_scale() - 1) / 2);
+       subtitle.sub.rectangle.y -= subtitle.sub.rectangle.height * ((text->y_scale() - 1) / 2);
 
        /* Apply content's subtitle scale */
-       subtitle.sub.rectangle.width *= caption->x_scale ();
-       subtitle.sub.rectangle.height *= caption->y_scale ();
+       subtitle.sub.rectangle.width *= text->x_scale ();
+       subtitle.sub.rectangle.height *= text->y_scale ();
 
        PlayerText ps;
        ps.image.push_back (subtitle.sub);
        DCPTime from (content_time_to_dcp (piece, subtitle.from()));
 
-       _active_captions[subtitle.type()].add_from (wc, ps, from);
+       _active_texts[subtitle.type()].add_from (wc, ps, from);
 }
 
 void
 Player::plain_text_start (weak_ptr<Piece> wp, weak_ptr<const TextContent> wc, ContentStringText subtitle)
 {
        shared_ptr<Piece> piece = wp.lock ();
-       shared_ptr<const TextContent> caption = wc.lock ();
-       if (!piece || !caption) {
+       shared_ptr<const TextContent> text = wc.lock ();
+       if (!piece || !text) {
                return;
        }
 
@@ -914,10 +914,10 @@ Player::plain_text_start (weak_ptr<Piece> wp, weak_ptr<const TextContent> wc, Co
        }
 
        BOOST_FOREACH (dcp::SubtitleString s, subtitle.subs) {
-               s.set_h_position (s.h_position() + caption->x_offset ());
-               s.set_v_position (s.v_position() + caption->y_offset ());
-               float const xs = caption->x_scale();
-               float const ys = caption->y_scale();
+               s.set_h_position (s.h_position() + text->x_offset ());
+               s.set_v_position (s.v_position() + text->y_offset ());
+               float const xs = text->x_scale();
+               float const ys = text->y_scale();
                float size = s.size();
 
                /* Adjust size to express the common part of the scaling;
@@ -934,23 +934,23 @@ Player::plain_text_start (weak_ptr<Piece> wp, weak_ptr<const TextContent> wc, Co
                }
 
                s.set_in (dcp::Time(from.seconds(), 1000));
-               ps.text.push_back (StringText (s, caption->outline_width()));
-               ps.add_fonts (caption->fonts ());
+               ps.text.push_back (StringText (s, text->outline_width()));
+               ps.add_fonts (text->fonts ());
        }
 
-       _active_captions[subtitle.type()].add_from (wc, ps, from);
+       _active_texts[subtitle.type()].add_from (wc, ps, from);
 }
 
 void
 Player::subtitle_stop (weak_ptr<Piece> wp, weak_ptr<const TextContent> wc, ContentTime to, TextType type)
 {
-       if (!_active_captions[type].have (wc)) {
+       if (!_active_texts[type].have (wc)) {
                return;
        }
 
        shared_ptr<Piece> piece = wp.lock ();
-       shared_ptr<const TextContent> caption = wc.lock ();
-       if (!piece || !caption) {
+       shared_ptr<const TextContent> text = wc.lock ();
+       if (!piece || !text) {
                return;
        }
 
@@ -960,11 +960,11 @@ Player::subtitle_stop (weak_ptr<Piece> wp, weak_ptr<const TextContent> wc, Conte
                return;
        }
 
-       pair<PlayerText, DCPTime> from = _active_captions[type].add_to (wc, dcp_to);
+       pair<PlayerText, DCPTime> from = _active_texts[type].add_to (wc, dcp_to);
 
-       bool const always = type == CAPTION_OPEN && _always_burn_open_captions;
-       if (caption->use() && !always && !caption->burn()) {
-               Caption (from.first, type, DCPTimePeriod (from.second, dcp_to));
+       bool const always = type == TEXT_OPEN_SUBTITLE && _always_burn_open_subtitles;
+       if (text->use() && !always && !text->burn()) {
+               Text (from.first, type, DCPTimePeriod (from.second, dcp_to));
        }
 }
 
@@ -986,8 +986,8 @@ Player::seek (DCPTime time, bool accurate)
        }
 
        _audio_merger.clear ();
-       for (int i = 0; i < CAPTION_COUNT; ++i) {
-               _active_captions[i].clear ();
+       for (int i = 0; i < TEXT_COUNT; ++i) {
+               _active_texts[i].clear ();
        }
 
        BOOST_FOREACH (shared_ptr<Piece> i, _pieces) {
@@ -1047,14 +1047,14 @@ void
 Player::do_emit_video (shared_ptr<PlayerVideo> pv, DCPTime time)
 {
        if (pv->eyes() == EYES_BOTH || pv->eyes() == EYES_RIGHT) {
-               for (int i = 0; i < CAPTION_COUNT; ++i) {
-                       _active_captions[i].clear_before (time);
+               for (int i = 0; i < TEXT_COUNT; ++i) {
+                       _active_texts[i].clear_before (time);
                }
        }
 
-       optional<PositionImage> captions = open_captions_for_frame (time);
-       if (captions) {
-               pv->set_caption (captions.get ());
+       optional<PositionImage> subtitles = open_subtitles_for_frame (time);
+       if (subtitles) {
+               pv->set_text (subtitles.get ());
        }
 
        Video (pv, time);
index 280373738f0cee45e34c690441264f6886edd8f0..223db86b3d442e7cd7540d0c60442d1e426570bc 100644 (file)
@@ -78,8 +78,8 @@ public:
 
        void set_video_container_size (dcp::Size);
        void set_ignore_video ();
-       void set_ignore_caption ();
-       void set_always_burn_open_captions ();
+       void set_ignore_text ();
+       void set_always_burn_open_subtitles ();
        void set_fast ();
        void set_play_referenced ();
        void set_dcp_decode_reduction (boost::optional<int> reduction);
@@ -100,10 +100,10 @@ public:
        /** Emitted when a video frame is ready.  These emissions happen in the correct order. */
        boost::signals2::signal<void (boost::shared_ptr<PlayerVideo>, DCPTime)> Video;
        boost::signals2::signal<void (boost::shared_ptr<AudioBuffers>, DCPTime)> Audio;
-       /** Emitted when a caption is ready.  This signal may be emitted considerably
+       /** Emitted when a text is ready.  This signal may be emitted considerably
         *  after the corresponding Video.
         */
-       boost::signals2::signal<void (PlayerText, TextType, DCPTimePeriod)> Caption;
+       boost::signals2::signal<void (PlayerText, TextType, DCPTimePeriod)> Text;
 
 private:
        friend class PlayerWrapper;
@@ -118,7 +118,7 @@ private:
        void film_changed (Film::Property);
        void playlist_changed ();
        void playlist_content_changed (boost::weak_ptr<Content>, int, bool);
-       std::list<PositionImage> transform_bitmap_captions (std::list<BitmapText>) const;
+       std::list<PositionImage> transform_bitmap_texts (std::list<BitmapText>) const;
        Frame dcp_to_content_video (boost::shared_ptr<const Piece> piece, DCPTime t) const;
        DCPTime content_video_to_dcp (boost::shared_ptr<const Piece> piece, Frame f) const;
        Frame dcp_to_resampled_audio (boost::shared_ptr<const Piece> piece, DCPTime t) const;
@@ -136,7 +136,7 @@ private:
        std::pair<boost::shared_ptr<AudioBuffers>, DCPTime> discard_audio (
                boost::shared_ptr<const AudioBuffers> audio, DCPTime time, DCPTime discard_to
                ) const;
-       boost::optional<PositionImage> open_captions_for_frame (DCPTime time) const;
+       boost::optional<PositionImage> open_subtitles_for_frame (DCPTime time) const;
        void emit_video (boost::shared_ptr<PlayerVideo> pv, DCPTime time);
        void do_emit_video (boost::shared_ptr<PlayerVideo> pv, DCPTime time);
        void emit_audio (boost::shared_ptr<AudioBuffers> data, DCPTime time);
@@ -154,9 +154,9 @@ private:
 
        /** true if the player should ignore all video; i.e. never produce any */
        bool _ignore_video;
-       /** true if the player should ignore all captions; i.e. never produce any */
-       bool _ignore_caption;
-       bool _always_burn_open_captions;
+       /** true if the player should ignore all text; i.e. never produce any */
+       bool _ignore_text;
+       bool _always_burn_open_subtitles;
        /** true if we should try to be fast rather than high quality */
        bool _fast;
        /** true if we should `play' (i.e output) referenced DCP data (e.g. for preview) */
@@ -195,7 +195,7 @@ private:
        Empty _black;
        Empty _silent;
 
-       ActiveText _active_captions[CAPTION_COUNT];
+       ActiveText _active_texts[TEXT_COUNT];
        boost::shared_ptr<AudioProcessor> _audio_processor;
 
        boost::signals2::scoped_connection _film_changed_connection;
index c8fb044aa191d9c8b766fd35a64d5c0c8e07463d..02c85be12ea34c0cecc6526e0c8e4766de4d68ca 100644 (file)
@@ -92,14 +92,14 @@ PlayerVideo::PlayerVideo (shared_ptr<cxml::Node> node, shared_ptr<Socket> socket
 
                image->read_from_socket (socket);
 
-               _caption = PositionImage (image, Position<int> (node->number_child<int> ("SubtitleX"), node->number_child<int> ("SubtitleY")));
+               _text = PositionImage (image, Position<int> (node->number_child<int> ("SubtitleX"), node->number_child<int> ("SubtitleY")));
        }
 }
 
 void
-PlayerVideo::set_caption (PositionImage image)
+PlayerVideo::set_text (PositionImage image)
 {
-       _caption = image;
+       _text = image;
 }
 
 /** Create an image for this frame.
@@ -153,8 +153,8 @@ PlayerVideo::image (dcp::NoteHandler note, function<AVPixelFormat (AVPixelFormat
                total_crop, _inter_size, _out_size, yuv_to_rgb, pixel_format (_in->pixel_format()), aligned, fast
                );
 
-       if (_caption) {
-               out->alpha_blend (Image::ensure_aligned (_caption->image), _caption->position);
+       if (_text) {
+               out->alpha_blend (Image::ensure_aligned (_text->image), _text->position);
        }
 
        if (_fade) {
@@ -181,11 +181,11 @@ PlayerVideo::add_metadata (xmlpp::Node* node) const
        if (_colour_conversion) {
                _colour_conversion.get().as_xml (node);
        }
-       if (_caption) {
-               node->add_child ("SubtitleWidth")->add_child_text (raw_convert<string> (_caption->image->size().width));
-               node->add_child ("SubtitleHeight")->add_child_text (raw_convert<string> (_caption->image->size().height));
-               node->add_child ("SubtitleX")->add_child_text (raw_convert<string> (_caption->position.x));
-               node->add_child ("SubtitleY")->add_child_text (raw_convert<string> (_caption->position.y));
+       if (_text) {
+               node->add_child ("SubtitleWidth")->add_child_text (raw_convert<string> (_text->image->size().width));
+               node->add_child ("SubtitleHeight")->add_child_text (raw_convert<string> (_text->image->size().height));
+               node->add_child ("SubtitleX")->add_child_text (raw_convert<string> (_text->position.x));
+               node->add_child ("SubtitleY")->add_child_text (raw_convert<string> (_text->position.y));
        }
 }
 
@@ -193,8 +193,8 @@ void
 PlayerVideo::send_binary (shared_ptr<Socket> socket) const
 {
        _in->send_binary (socket);
-       if (_caption) {
-               _caption->image->write_to_socket (socket);
+       if (_text) {
+               _text->image->write_to_socket (socket);
        }
 }
 
@@ -208,7 +208,7 @@ PlayerVideo::has_j2k () const
                return false;
        }
 
-       return _crop == Crop () && _out_size == j2k->size() && !_caption && !_fade && !_colour_conversion;
+       return _crop == Crop () && _out_size == j2k->size() && !_text && !_fade && !_colour_conversion;
 }
 
 Data
@@ -239,13 +239,13 @@ PlayerVideo::same (shared_ptr<const PlayerVideo> other) const
                return false;
        }
 
-       if ((!_caption && other->_caption) || (_caption && !other->_caption)) {
-               /* One has a caption and the other doesn't */
+       if ((!_text && other->_text) || (_text && !other->_text)) {
+               /* One has a text and the other doesn't */
                return false;
        }
 
-       if (_caption && other->_caption && !_caption->same (other->_caption.get ())) {
-               /* They both have captions but they are different */
+       if (_text && other->_text && !_text->same (other->_text.get ())) {
+               /* They both have texts but they are different */
                return false;
        }
 
@@ -278,7 +278,7 @@ PlayerVideo::memory_used () const
        return _in->memory_used();
 }
 
-/** @return Shallow copy of this; _in and _caption are shared between the original and the copy */
+/** @return Shallow copy of this; _in and _text are shared between the original and the copy */
 shared_ptr<PlayerVideo>
 PlayerVideo::shallow_copy () const
 {
index 96878e0bd4a51198b55ebe49218510cb42e47ed0..cd904af0613d5b9aa842e07cdbacad89e4e24466 100644 (file)
@@ -60,7 +60,7 @@ public:
 
        boost::shared_ptr<PlayerVideo> shallow_copy () const;
 
-       void set_caption (PositionImage);
+       void set_text (PositionImage);
 
        void prepare ();
        boost::shared_ptr<Image> image (dcp::NoteHandler note, boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, bool aligned, bool fast) const;
@@ -109,7 +109,7 @@ private:
        Eyes _eyes;
        Part _part;
        boost::optional<ColourConversion> _colour_conversion;
-       boost::optional<PositionImage> _caption;
+       boost::optional<PositionImage> _text;
        /** Content that we came from.  This is so that reset_metadata() can work */
        boost::weak_ptr<Content> _content;
        /** Video frame that we came from.  Again, this is for reset_metadata() */
index a55893291138d4b46a0b3b20d43d898349db1624..c830e5e1e49c3b8e83a3de969f47551853bec826 100644 (file)
@@ -135,7 +135,7 @@ Playlist::maybe_sequence ()
 
        DCPTime next;
        BOOST_FOREACH (shared_ptr<Content> i, _content) {
-               if (i->caption.empty() || find (placed.begin(), placed.end(), i) != placed.end()) {
+               if (i->text.empty() || find (placed.begin(), placed.end(), i) != placed.end()) {
                        continue;
                }
 
@@ -156,7 +156,7 @@ Playlist::video_identifier () const
 
        BOOST_FOREACH (shared_ptr<const Content> i, _content) {
                bool burn = false;
-               BOOST_FOREACH (shared_ptr<TextContent> j, i->caption) {
+               BOOST_FOREACH (shared_ptr<TextContent> j, i->text) {
                        if (j->burn()) {
                                burn = true;
                        }
@@ -368,11 +368,11 @@ Playlist::video_end () const
 }
 
 DCPTime
-Playlist::caption_end () const
+Playlist::text_end () const
 {
        DCPTime end;
        BOOST_FOREACH (shared_ptr<Content> i, _content) {
-               if (!i->caption.empty ()) {
+               if (!i->text.empty ()) {
                        end = max (end, i->end ());
                }
        }
index 073e53de71c44dd42d3f0ddfb939071588b1a006..4ee1201989f5a3842d1d9e1a9a7b83bd816fe6a3 100644 (file)
@@ -64,7 +64,7 @@ public:
 
        int best_video_frame_rate () const;
        DCPTime video_end () const;
-       DCPTime caption_end () const;
+       DCPTime text_end () const;
        FrameRateChange active_frame_rate_change (DCPTime, int dcp_frame_rate) const;
        std::string content_summary (DCPTimePeriod period) const;
        std::pair<double, double> speed_up_range (int dcp_video_frame_rate) const;
index 7f5572c36469ba3bafb0e4bad7709d239bde57d3..2561e556ad29450cc3b8efe05fd980ad9a759d3f 100644 (file)
@@ -508,8 +508,8 @@ ReelWriter::create_reel (list<ReferencedReelAsset> const & refs, list<shared_ptr
        }
        reel->add (reel_sound_asset);
 
-       maybe_add_captions<dcp::ReelSubtitleAsset>      (_caption_asset[CAPTION_OPEN],   reel_picture_asset->duration(), reel, refs, fonts, _film, _period);
-       maybe_add_captions<dcp::ReelClosedCaptionAsset> (_caption_asset[CAPTION_CLOSED], reel_picture_asset->duration(), reel, refs, fonts, _film, _period);
+       maybe_add_captions<dcp::ReelSubtitleAsset>      (_caption_asset[TEXT_OPEN_SUBTITLE],   reel_picture_asset->duration(), reel, refs, fonts, _film, _period);
+       maybe_add_captions<dcp::ReelClosedCaptionAsset> (_caption_asset[TEXT_CLOSED_CAPTION], reel_picture_asset->duration(), reel, refs, fonts, _film, _period);
 
        return reel;
 }
index 8007b7f2900231e94f2e4f4f378fb469edea5640..a46c3efa7812d80692bbd58d745ecb8db46f9ac9 100644 (file)
@@ -113,7 +113,7 @@ private:
        boost::shared_ptr<dcp::PictureAssetWriter> _picture_asset_writer;
        boost::shared_ptr<dcp::SoundAsset> _sound_asset;
        boost::shared_ptr<dcp::SoundAssetWriter> _sound_asset_writer;
-       boost::shared_ptr<dcp::SubtitleAsset> _caption_asset[CAPTION_COUNT];
+       boost::shared_ptr<dcp::SubtitleAsset> _caption_asset[TEXT_COUNT];
 
        static int const _info_size;
 };
index 6c181bb912093c55fc2b30e724a05ab9b6a3127a..2698dbb6d733fad73da91e07cf1d4cbfed301cb0 100644 (file)
@@ -38,14 +38,14 @@ using dcp::raw_convert;
 StringTextFileContent::StringTextFileContent (shared_ptr<const Film> film, boost::filesystem::path path)
        : Content (film, path)
 {
-       caption.push_back (shared_ptr<TextContent> (new TextContent (this, CAPTION_OPEN)));
+       text.push_back (shared_ptr<TextContent> (new TextContent (this, TEXT_OPEN_SUBTITLE)));
 }
 
 StringTextFileContent::StringTextFileContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
        : Content (film, node)
        , _length (node->number_child<ContentTime::Type> ("Length"))
 {
-       caption = TextContent::from_xml (this, node, version);
+       text = TextContent::from_xml (this, node, version);
 }
 
 void
@@ -55,11 +55,11 @@ StringTextFileContent::examine (boost::shared_ptr<Job> job)
        StringTextFile s (shared_from_this ());
 
        /* Default to turning these subtitles on */
-       only_caption()->set_use (true);
+       only_text()->set_use (true);
 
        boost::mutex::scoped_lock lm (_mutex);
        _length = s.length ();
-       only_caption()->add_font (shared_ptr<Font> (new Font (TEXT_FONT_ID)));
+       only_text()->add_font (shared_ptr<Font> (new Font (TEXT_FONT_ID)));
 }
 
 string
@@ -80,8 +80,8 @@ StringTextFileContent::as_xml (xmlpp::Node* node, bool with_paths) const
        node->add_child("Type")->add_child_text ("TextSubtitle");
        Content::as_xml (node, with_paths);
 
-       if (only_caption()) {
-               only_caption()->as_xml (node);
+       if (only_text()) {
+               only_text()->as_xml (node);
        }
 
        node->add_child("Length")->add_child_text (raw_convert<string> (_length.get ()));
index a81f2592da4ff36797694c596f267f30d8637beb..8286c1e391d0c3a2e441d16b02c02fb596c6a254 100644 (file)
@@ -43,7 +43,7 @@ StringTextFileDecoder::StringTextFileDecoder (shared_ptr<const StringTextFileCon
        if (!_subtitles.empty()) {
                first = content_time_period(_subtitles[0]).from;
        }
-       caption.push_back (shared_ptr<TextDecoder> (new TextDecoder (this, content->only_caption(), log, first)));
+       text.push_back (shared_ptr<TextDecoder> (new TextDecoder (this, content->only_text(), log, first)));
 }
 
 void
@@ -73,7 +73,7 @@ StringTextFileDecoder::pass ()
        }
 
        ContentTimePeriod const p = content_time_period (_subtitles[_next]);
-       only_caption()->emit_plain (p, _subtitles[_next]);
+       only_text()->emit_plain (p, _subtitles[_next]);
 
        ++_next;
        return false;
index fbc7d82af9cbef12b1b9c8061c144f50dd106a5b..011c42f35fff5318ef2ad528608708250970141a 100644 (file)
@@ -120,8 +120,8 @@ TextContent::TextContent (Content* parent, cxml::ConstNodePtr node, int version)
        , _y_scale (1)
        , _line_spacing (node->optional_number_child<double>("LineSpacing").get_value_or (1))
        , _outline_width (node->optional_number_child<int>("OutlineWidth").get_value_or (2))
-       , _type (CAPTION_OPEN)
-       , _original_type (CAPTION_OPEN)
+       , _type (TEXT_OPEN_SUBTITLE)
+       , _original_type (TEXT_OPEN_SUBTITLE)
 {
        if (version >= 37) {
                _use = node->bool_child ("Use");
@@ -225,59 +225,59 @@ TextContent::TextContent (Content* parent, cxml::ConstNodePtr node, int version)
 
        connect_to_fonts ();
 
-       _type = string_to_caption_type (node->optional_string_child("Type").get_value_or("open"));
-       _original_type = string_to_caption_type (node->optional_string_child("OriginalType").get_value_or("open"));
+       _type = string_to_text_type (node->optional_string_child("Type").get_value_or("open"));
+       _original_type = string_to_text_type (node->optional_string_child("OriginalType").get_value_or("open"));
 }
 
 TextContent::TextContent (Content* parent, vector<shared_ptr<Content> > c)
        : ContentPart (parent)
 {
        /* This constructor is for join which is only supported for content types
-          that have a single caption, so we can use only_caption() here.
+          that have a single text, so we can use only_text() here.
        */
-       shared_ptr<TextContent> ref = c[0]->only_caption();
+       shared_ptr<TextContent> ref = c[0]->only_text();
        DCPOMATIC_ASSERT (ref);
        list<shared_ptr<Font> > ref_fonts = ref->fonts ();
 
        for (size_t i = 1; i < c.size(); ++i) {
 
-               if (c[i]->only_caption()->use() != ref->use()) {
+               if (c[i]->only_text()->use() != ref->use()) {
                        throw JoinError (_("Content to be joined must have the same 'use subtitles' setting."));
                }
 
-               if (c[i]->only_caption()->burn() != ref->burn()) {
+               if (c[i]->only_text()->burn() != ref->burn()) {
                        throw JoinError (_("Content to be joined must have the same 'burn subtitles' setting."));
                }
 
-               if (c[i]->only_caption()->x_offset() != ref->x_offset()) {
+               if (c[i]->only_text()->x_offset() != ref->x_offset()) {
                        throw JoinError (_("Content to be joined must have the same subtitle X offset."));
                }
 
-               if (c[i]->only_caption()->y_offset() != ref->y_offset()) {
+               if (c[i]->only_text()->y_offset() != ref->y_offset()) {
                        throw JoinError (_("Content to be joined must have the same subtitle Y offset."));
                }
 
-               if (c[i]->only_caption()->x_scale() != ref->x_scale()) {
+               if (c[i]->only_text()->x_scale() != ref->x_scale()) {
                        throw JoinError (_("Content to be joined must have the same subtitle X scale."));
                }
 
-               if (c[i]->only_caption()->y_scale() != ref->y_scale()) {
+               if (c[i]->only_text()->y_scale() != ref->y_scale()) {
                        throw JoinError (_("Content to be joined must have the same subtitle Y scale."));
                }
 
-               if (c[i]->only_caption()->line_spacing() != ref->line_spacing()) {
+               if (c[i]->only_text()->line_spacing() != ref->line_spacing()) {
                        throw JoinError (_("Content to be joined must have the same subtitle line spacing."));
                }
 
-               if ((c[i]->only_caption()->fade_in() != ref->fade_in()) || (c[i]->only_caption()->fade_out() != ref->fade_out())) {
+               if ((c[i]->only_text()->fade_in() != ref->fade_in()) || (c[i]->only_text()->fade_out() != ref->fade_out())) {
                        throw JoinError (_("Content to be joined must have the same subtitle fades."));
                }
 
-               if ((c[i]->only_caption()->outline_width() != ref->outline_width())) {
+               if ((c[i]->only_text()->outline_width() != ref->outline_width())) {
                        throw JoinError (_("Content to be joined must have the same outline width."));
                }
 
-               list<shared_ptr<Font> > fonts = c[i]->only_caption()->fonts ();
+               list<shared_ptr<Font> > fonts = c[i]->only_text()->fonts ();
                if (fonts.size() != ref_fonts.size()) {
                        throw JoinError (_("Content to be joined must use the same fonts."));
                }
@@ -318,53 +318,53 @@ TextContent::as_xml (xmlpp::Node* root) const
 {
        boost::mutex::scoped_lock lm (_mutex);
 
-       xmlpp::Element* caption = root->add_child ("Caption");
+       xmlpp::Element* text = root->add_child ("Text");
 
-       caption->add_child("Use")->add_child_text (_use ? "1" : "0");
-       caption->add_child("Burn")->add_child_text (_burn ? "1" : "0");
-       caption->add_child("XOffset")->add_child_text (raw_convert<string> (_x_offset));
-       caption->add_child("YOffset")->add_child_text (raw_convert<string> (_y_offset));
-       caption->add_child("XScale")->add_child_text (raw_convert<string> (_x_scale));
-       caption->add_child("YScale")->add_child_text (raw_convert<string> (_y_scale));
-       caption->add_child("Language")->add_child_text (_language);
+       text->add_child("Use")->add_child_text (_use ? "1" : "0");
+       text->add_child("Burn")->add_child_text (_burn ? "1" : "0");
+       text->add_child("XOffset")->add_child_text (raw_convert<string> (_x_offset));
+       text->add_child("YOffset")->add_child_text (raw_convert<string> (_y_offset));
+       text->add_child("XScale")->add_child_text (raw_convert<string> (_x_scale));
+       text->add_child("YScale")->add_child_text (raw_convert<string> (_y_scale));
+       text->add_child("Language")->add_child_text (_language);
        if (_colour) {
-               caption->add_child("Red")->add_child_text (raw_convert<string> (_colour->r));
-               caption->add_child("Green")->add_child_text (raw_convert<string> (_colour->g));
-               caption->add_child("Blue")->add_child_text (raw_convert<string> (_colour->b));
+               text->add_child("Red")->add_child_text (raw_convert<string> (_colour->r));
+               text->add_child("Green")->add_child_text (raw_convert<string> (_colour->g));
+               text->add_child("Blue")->add_child_text (raw_convert<string> (_colour->b));
        }
        if (_effect) {
                switch (*_effect) {
                case dcp::NONE:
-                       caption->add_child("Effect")->add_child_text("none");
+                       text->add_child("Effect")->add_child_text("none");
                        break;
                case dcp::BORDER:
-                       caption->add_child("Effect")->add_child_text("outline");
+                       text->add_child("Effect")->add_child_text("outline");
                        break;
                case dcp::SHADOW:
-                       caption->add_child("Effect")->add_child_text("shadow");
+                       text->add_child("Effect")->add_child_text("shadow");
                        break;
                }
        }
        if (_effect_colour) {
-               caption->add_child("EffectRed")->add_child_text (raw_convert<string> (_effect_colour->r));
-               caption->add_child("EffectGreen")->add_child_text (raw_convert<string> (_effect_colour->g));
-               caption->add_child("EffectBlue")->add_child_text (raw_convert<string> (_effect_colour->b));
+               text->add_child("EffectRed")->add_child_text (raw_convert<string> (_effect_colour->r));
+               text->add_child("EffectGreen")->add_child_text (raw_convert<string> (_effect_colour->g));
+               text->add_child("EffectBlue")->add_child_text (raw_convert<string> (_effect_colour->b));
        }
-       caption->add_child("LineSpacing")->add_child_text (raw_convert<string> (_line_spacing));
+       text->add_child("LineSpacing")->add_child_text (raw_convert<string> (_line_spacing));
        if (_fade_in) {
-               caption->add_child("FadeIn")->add_child_text (raw_convert<string> (_fade_in->get()));
+               text->add_child("FadeIn")->add_child_text (raw_convert<string> (_fade_in->get()));
        }
        if (_fade_out) {
-               caption->add_child("FadeOut")->add_child_text (raw_convert<string> (_fade_out->get()));
+               text->add_child("FadeOut")->add_child_text (raw_convert<string> (_fade_out->get()));
        }
-       caption->add_child("OutlineWidth")->add_child_text (raw_convert<string> (_outline_width));
+       text->add_child("OutlineWidth")->add_child_text (raw_convert<string> (_outline_width));
 
        for (list<shared_ptr<Font> >::const_iterator i = _fonts.begin(); i != _fonts.end(); ++i) {
-               (*i)->as_xml (caption->add_child("Font"));
+               (*i)->as_xml (text->add_child("Font"));
        }
 
-       caption->add_child("Type")->add_child_text (caption_type_to_string(_type));
-       caption->add_child("OriginalType")->add_child_text (caption_type_to_string(_original_type));
+       text->add_child("Type")->add_child_text (text_type_to_string(_type));
+       text->add_child("OriginalType")->add_child_text (text_type_to_string(_original_type));
 }
 
 string
index 7f0bf43057d75f9c770e7369b6ffde721c8b522a..d25c9aba4bf2557072704e7f3236a9b358f9a910 100644 (file)
@@ -94,37 +94,37 @@ Crop::as_xml (xmlpp::Node* node) const
 }
 
 TextType
-string_to_caption_type (string s)
+string_to_text_type (string s)
 {
-       if (s == "open") {
-               return CAPTION_OPEN;
+       if (s == "open-subtitle") {
+               return TEXT_OPEN_SUBTITLE;
        } else if (s == "closed") {
-               return CAPTION_CLOSED;
+               return TEXT_CLOSED_CAPTION;
        } else {
-               throw MetadataError (String::compose ("Unknown caption type %1", s));
+               throw MetadataError (String::compose ("Unknown text type %1", s));
        }
 }
 
 string
-caption_type_to_string (TextType t)
+text_type_to_string (TextType t)
 {
        switch (t) {
-       case CAPTION_OPEN:
-               return "open";
-       case CAPTION_CLOSED:
-               return "closed";
+       case TEXT_OPEN_SUBTITLE:
+               return "open-subtitle";
+       case TEXT_CLOSED_CAPTION:
+               return "closed-caption";
        default:
                DCPOMATIC_ASSERT (false);
        }
 }
 
 string
-caption_type_to_name (TextType t)
+text_type_to_name (TextType t)
 {
        switch (t) {
-       case CAPTION_OPEN:
-               return _("Subtitles");
-       case CAPTION_CLOSED:
+       case TEXT_OPEN_SUBTITLE:
+               return _("Open subtitles");
+       case TEXT_CLOSED_CAPTION:
                return _("Closed captions");
        default:
                DCPOMATIC_ASSERT (false);
index 6e3732d3112ce2c1092291a69a22b717eb2f74a0..02d71e2973c159bc6e1480df367996d558d9f599 100644 (file)
@@ -130,25 +130,28 @@ enum ReelType
 };
 
 /** Type of captions.
- *  For better or worse DoM has uses two names for text that appears
- *  with the DCP:
  *
- *  open captions:   text that is shown to everybody on-screen (aka subtitles).
- *  closed captions: text that is shown to some viewers using some other method.
+ *  The generally accepted definitions seem to be:
+ *  - subtitles: text for an audience who doesn't speak the film's language
+ *  - captions:  text for a hearing-impaired audience
+ *  - open:      on-screen
+ *  - closed:    only visible by some audience members
  *
- *  There is also still use of the word `subtitle' in the code; these are the
- *  same as open captions in DoM.
+ *  At the moment DoM supports open subtitles and closed captions.
+ *
+ *  There is some use of the word `subtitle' in the code which may mean
+ *  caption in some contexts.
  */
 enum TextType
 {
-       CAPTION_OPEN,
-       CAPTION_CLOSED,
-       CAPTION_COUNT
+       TEXT_OPEN_SUBTITLE,
+       TEXT_CLOSED_CAPTION,
+       TEXT_COUNT
 };
 
-extern std::string caption_type_to_string (TextType t);
-extern std::string caption_type_to_name (TextType t);
-extern TextType string_to_caption_type (std::string s);
+extern std::string text_type_to_string (TextType t);
+extern std::string text_type_to_name (TextType t);
+extern TextType string_to_text_type (std::string s);
 
 /** @struct Crop
  *  @brief A description of the crop of an image or video.
index 3ab1cc5b9e014aa08ce9519acd0f9d983c32dc05..b4655baf98ff46af6181a079b3d68a5bda3c327c 100644 (file)
@@ -95,7 +95,7 @@ Writer::Writer (shared_ptr<const Film> film, weak_ptr<Job> j)
           and captions arrive to the Writer in sequence.  This is not so for video.
        */
        _audio_reel = _reels.begin ();
-       for (int i = 0; i < CAPTION_COUNT; ++i) {
+       for (int i = 0; i < TEXT_COUNT; ++i) {
                _caption_reel[i] = _reels.begin ();
        }
 
index 71d11b773242fe7b9038ae36b1304241b1314327..8fc0ce29ebb926ee2a8e5b8b6ebdc4afdb289bda 100644 (file)
@@ -124,7 +124,7 @@ private:
        boost::weak_ptr<Job> _job;
        std::vector<ReelWriter> _reels;
        std::vector<ReelWriter>::iterator _audio_reel;
-       std::vector<ReelWriter>::iterator _caption_reel[CAPTION_COUNT];
+       std::vector<ReelWriter>::iterator _caption_reel[TEXT_COUNT];
 
        /** our thread, or 0 */
        boost::thread* _thread;
index a2b55691ed6557f9517097a9a7eebf09a9b9a311..a97e12b6952f51f2dc00a28518ce678b5cc3c4b5 100644 (file)
@@ -567,7 +567,7 @@ private:
        {
                DCPOMATIC_ASSERT (_clipboard);
 
-               PasteDialog* d = new PasteDialog (this, static_cast<bool>(_clipboard->video), static_cast<bool>(_clipboard->audio), !_clipboard->caption.empty());
+               PasteDialog* d = new PasteDialog (this, static_cast<bool>(_clipboard->video), static_cast<bool>(_clipboard->audio), !_clipboard->text.empty());
                if (d->ShowModal() == wxID_OK) {
                        BOOST_FOREACH (shared_ptr<Content> i, _film_editor->content_panel()->selected()) {
                                if (d->video() && i->video) {
@@ -579,10 +579,10 @@ private:
                                        i->audio->take_settings_from (_clipboard->audio);
                                }
 
-                               if (d->caption()) {
-                                       list<shared_ptr<TextContent> >::iterator j = i->caption.begin ();
-                                       list<shared_ptr<TextContent> >::const_iterator k = _clipboard->caption.begin ();
-                                       while (j != i->caption.end() && k != _clipboard->caption.end()) {
+                               if (d->text()) {
+                                       list<shared_ptr<TextContent> >::iterator j = i->text.begin ();
+                                       list<shared_ptr<TextContent> >::const_iterator k = _clipboard->text.begin ();
+                                       while (j != i->text.end() && k != _clipboard->text.end()) {
                                                (*j)->take_settings_from (*k);
                                                ++j;
                                                ++k;
index 44c6b8606cbe57c9364bfcde8fae496dcdccfb55..fce069d7edd6c743ae7716ffa9ab4a3d3b1d919c 100644 (file)
@@ -626,7 +626,7 @@ private:
 
        void setup_from_dcp (shared_ptr<DCPContent> dcp)
        {
-               BOOST_FOREACH (shared_ptr<TextContent> i, dcp->caption) {
+               BOOST_FOREACH (shared_ptr<TextContent> i, dcp->text) {
                        i->set_use (true);
                }
 
index a6338ecfd090f99b2f6def10683abadf16559817..8203727282edfc876d9171f0a88e1afcc87f437a 100644 (file)
@@ -127,9 +127,9 @@ ContentPanel::ContentPanel (wxNotebook* n, boost::shared_ptr<Film> film, FilmVie
        _panels.push_back (_video_panel);
        _audio_panel = new AudioPanel (this);
        _panels.push_back (_audio_panel);
-       for (int i = 0; i < CAPTION_COUNT; ++i) {
-               _caption_panel[i] = new TextPanel (this, static_cast<TextType>(i));
-               _panels.push_back (_caption_panel[i]);
+       for (int i = 0; i < TEXT_COUNT; ++i) {
+               _text_panel[i] = new TextPanel (this, static_cast<TextType>(i));
+               _panels.push_back (_text_panel[i]);
        }
        _timing_panel = new TimingPanel (this, _film_viewer);
        _panels.push_back (_timing_panel);
@@ -195,12 +195,12 @@ ContentPanel::selected_audio ()
 }
 
 ContentList
-ContentPanel::selected_caption ()
+ContentPanel::selected_text ()
 {
        ContentList sc;
 
        BOOST_FOREACH (shared_ptr<Content> i, selected ()) {
-               if (!i->caption.empty()) {
+               if (!i->text.empty()) {
                        sc.push_back (i);
                }
        }
@@ -298,7 +298,7 @@ ContentPanel::selection_changed ()
 
        bool have_video = false;
        bool have_audio = false;
-       bool have_caption[CAPTION_COUNT] = { false, false };
+       bool have_text[TEXT_COUNT] = { false, false };
        BOOST_FOREACH (shared_ptr<Content> i, selected()) {
                if (i->video) {
                        have_video = true;
@@ -306,23 +306,23 @@ ContentPanel::selection_changed ()
                if (i->audio) {
                        have_audio = true;
                }
-               BOOST_FOREACH (shared_ptr<TextContent> j, i->caption) {
-                       have_caption[j->original_type()] = true;
+               BOOST_FOREACH (shared_ptr<TextContent> j, i->text) {
+                       have_text[j->original_type()] = true;
                }
        }
 
        bool video_panel = false;
        bool audio_panel = false;
-       bool caption_panel[CAPTION_COUNT] = { false, false };
+       bool text_panel[TEXT_COUNT] = { false, false };
        for (size_t i = 0; i < _notebook->GetPageCount(); ++i) {
                if (_notebook->GetPage(i) == _video_panel) {
                        video_panel = true;
                } else if (_notebook->GetPage(i) == _audio_panel) {
                        audio_panel = true;
                }
-               for (int j = 0; j < CAPTION_COUNT; ++j) {
-                       if (_notebook->GetPage(i) == _caption_panel[j]) {
-                               caption_panel[j] = true;
+               for (int j = 0; j < TEXT_COUNT; ++j) {
+                       if (_notebook->GetPage(i) == _text_panel[j]) {
+                               text_panel[j] = true;
                        }
                }
        }
@@ -355,16 +355,16 @@ ContentPanel::selection_changed ()
                ++off;
        }
 
-       for (int i = 0; i < CAPTION_COUNT; ++i) {
-               if (have_caption[i] != caption_panel[i]) {
-                       if (caption_panel[i]) {
+       for (int i = 0; i < TEXT_COUNT; ++i) {
+               if (have_text[i] != text_panel[i]) {
+                       if (text_panel[i]) {
                                _notebook->RemovePage (off);
                        }
-                       if (have_caption[i]) {
-                               _notebook->InsertPage (off, _caption_panel[i], _caption_panel[i]->name());
+                       if (have_text[i]) {
+                               _notebook->InsertPage (off, _text_panel[i], _text_panel[i]->name());
                        }
                }
-               if (have_caption[i]) {
+               if (have_text[i]) {
                        ++off;
                }
        }
@@ -550,8 +550,8 @@ ContentPanel::setup_sensitivity ()
 
        _video_panel->Enable    (_generally_sensitive && video_selection.size() > 0);
        _audio_panel->Enable    (_generally_sensitive && audio_selection.size() > 0);
-       for (int i = 0; i < CAPTION_COUNT; ++i) {
-               _caption_panel[i]->Enable  (_generally_sensitive && selection.size() == 1 && !selection.front()->caption.empty());
+       for (int i = 0; i < TEXT_COUNT; ++i) {
+               _text_panel[i]->Enable  (_generally_sensitive && selection.size() == 1 && !selection.front()->text.empty());
        }
        _timing_panel->Enable   (_generally_sensitive);
 }
index d31375c8e12a1d5a1fec90dc149a00dddde7de4e..82cb2ed88f6b5dd9e9a70b9c64d2794f268e87b2 100644 (file)
@@ -65,7 +65,7 @@ public:
        ContentList selected ();
        ContentList selected_video ();
        ContentList selected_audio ();
-       ContentList selected_caption ();
+       ContentList selected_text ();
        FFmpegContentList selected_ffmpeg ();
 
        void add_file_clicked ();
@@ -105,7 +105,7 @@ private:
        wxButton* _timeline;
        ContentSubPanel* _video_panel;
        AudioPanel* _audio_panel;
-       TextPanel* _caption_panel[CAPTION_COUNT];
+       TextPanel* _text_panel[TEXT_COUNT];
        ContentSubPanel* _timing_panel;
        std::list<ContentSubPanel *> _panels;
        ContentMenu* _menu;
index f1f82287d018590dc2f9987287d1742c83c44476..5c4d3148d233a7b5850ca68329e2a77e330bd1e7 100644 (file)
@@ -438,7 +438,7 @@ DCPPanel::film_content_changed (int property)
            property == VideoContentProperty::SCALE ||
            property == DCPContentProperty::REFERENCE_VIDEO ||
            property == DCPContentProperty::REFERENCE_AUDIO ||
-           property == DCPContentProperty::REFERENCE_CAPTION) {
+           property == DCPContentProperty::REFERENCE_TEXT) {
                setup_dcp_name ();
                setup_sensitivity ();
        }
index 651196d3c34161277c5d654b4ecde92c73ec3ed6..ef28018e96b0a960623ba665d4cc6344851f07b0 100644 (file)
@@ -224,7 +224,7 @@ FilmViewer::set_film (shared_ptr<Film> film)
 
        _closed_captions_dialog->set_player (_player);
 
-       _player->set_always_burn_open_captions ();
+       _player->set_always_burn_open_subtitles ();
        _player->set_play_referenced ();
 
        _film->Changed.connect (boost::bind (&FilmViewer::film_changed, this, _1));
index 07a3b156c240bc94e88d471518e5cb07721a74d5..c613cad3b6f39a791bfacd6007f0125e2c7822ef 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "paste_dialog.h"
 
-PasteDialog::PasteDialog (wxWindow* parent, bool video, bool audio, bool caption)
+PasteDialog::PasteDialog (wxWindow* parent, bool video, bool audio, bool text)
        : TableDialog (parent, _("Paste"), 1, 0, true)
 {
        _video = new wxCheckBox (this, wxID_ANY, _("Paste video settings"));
@@ -29,9 +29,9 @@ PasteDialog::PasteDialog (wxWindow* parent, bool video, bool audio, bool caption
        _audio = new wxCheckBox (this, wxID_ANY, _("Paste audio settings"));
        _audio->Enable (audio);
        add (_audio);
-       _caption = new wxCheckBox (this, wxID_ANY, _("Paste caption settings"));
-       _caption->Enable (caption);
-       add (_caption);
+       _text = new wxCheckBox (this, wxID_ANY, _("Paste subtitle and caption settings"));
+       _text->Enable (text);
+       add (_text);
 
        layout ();
 }
@@ -49,7 +49,7 @@ PasteDialog::audio () const
 }
 
 bool
-PasteDialog::caption () const
+PasteDialog::text () const
 {
-       return _caption->GetValue ();
+       return _text->GetValue ();
 }
index 7de38fd2caaf1a378018119416e4230d3dfaa757..792195947274288c48881daab79398dd4a91a0c4 100644 (file)
 class PasteDialog : public TableDialog
 {
 public:
-       PasteDialog (wxWindow* parent, bool video, bool audio, bool caption);
+       PasteDialog (wxWindow* parent, bool video, bool audio, bool text);
 
        bool video () const;
        bool audio () const;
-       bool caption () const;
+       bool text () const;
 
 private:
        wxCheckBox* _video;
        wxCheckBox* _audio;
-       wxCheckBox* _caption;
+       wxCheckBox* _text;
 };
index c2bf77259c021efb798cbeee58052ab3e0d351c6..dbb394c645d7309708cc49c7e5c0836cdc278e91 100644 (file)
@@ -131,7 +131,7 @@ PlayerInformation::triggered_update ()
        if (dcp->audio && !dcp->audio->streams().empty()) {
                checked_set (_dcp[r++], wxString::Format(_("Audio channels: %d"), dcp->audio->streams().front()->channels()));
        }
-       if (!dcp->caption.empty()) {
+       if (!dcp->text.empty()) {
                checked_set (_dcp[r++], _("Subtitles: yes"));
        } else {
                checked_set (_dcp[r++], _("Subtitles: no"));
index bc1183443b7efefe9553de6753878f690587d274..81ea9c9418f0cd831406f095a7fbb5c75570947b 100644 (file)
@@ -45,8 +45,8 @@ using boost::shared_ptr;
 using boost::dynamic_pointer_cast;
 
 TextPanel::TextPanel (ContentPanel* p, TextType t)
-       : ContentSubPanel (p, std_to_wx(caption_type_to_name(t)))
-       , _caption_view (0)
+       : ContentSubPanel (p, std_to_wx(text_type_to_name(t)))
+       , _text_view (0)
        , _fonts_dialog (0)
        , _original_type (t)
 {
@@ -73,7 +73,7 @@ TextPanel::TextPanel (ContentPanel* p, TextType t)
        _use = new wxCheckBox (this, wxID_ANY, _("Use as"));
        use->Add (_use, 0, wxEXPAND | wxRIGHT, DCPOMATIC_SIZER_GAP);
        _type = new wxChoice (this, wxID_ANY);
-       _type->Append (_("subtitles (open captions)"));
+       _type->Append (_("open subtitles"));
        _type->Append (_("closed captions"));
        use->Add (_type, 1, wxEXPAND, 0);
        grid->Add (use, wxGBPosition (r, 0), wxGBSpan (1, 2));
@@ -146,8 +146,8 @@ TextPanel::TextPanel (ContentPanel* p, TextType t)
        {
                wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
 
-               _caption_view_button = new wxButton (this, wxID_ANY, _("View..."));
-               s->Add (_caption_view_button, 1, wxALL, DCPOMATIC_SIZER_GAP);
+               _text_view_button = new wxButton (this, wxID_ANY, _("View..."));
+               s->Add (_text_view_button, 1, wxALL, DCPOMATIC_SIZER_GAP);
                _fonts_dialog_button = new wxButton (this, wxID_ANY, _("Fonts..."));
                s->Add (_fonts_dialog_button, 1, wxALL, DCPOMATIC_SIZER_GAP);
                _appearance_dialog_button = new wxButton (this, wxID_ANY, _("Appearance..."));
@@ -165,7 +165,7 @@ TextPanel::TextPanel (ContentPanel* p, TextType t)
 
        _reference->Bind                (wxEVT_CHECKBOX, boost::bind (&TextPanel::reference_clicked, this));
        _use->Bind                      (wxEVT_CHECKBOX, boost::bind (&TextPanel::use_toggled, this));
-       _type->Bind              (wxEVT_CHOICE,   boost::bind (&TextPanel::type_changed, this));
+       _type->Bind                     (wxEVT_CHOICE,   boost::bind (&TextPanel::type_changed, this));
        _burn->Bind                     (wxEVT_CHECKBOX, boost::bind (&TextPanel::burn_toggled, this));
        _x_offset->Bind                 (wxEVT_SPINCTRL, boost::bind (&TextPanel::x_offset_changed, this));
        _y_offset->Bind                 (wxEVT_SPINCTRL, boost::bind (&TextPanel::y_offset_changed, this));
@@ -174,7 +174,7 @@ TextPanel::TextPanel (ContentPanel* p, TextType t)
        _line_spacing->Bind             (wxEVT_SPINCTRL, boost::bind (&TextPanel::line_spacing_changed, this));
        _language->Bind                 (wxEVT_TEXT,     boost::bind (&TextPanel::language_changed, this));
        _stream->Bind                   (wxEVT_CHOICE,   boost::bind (&TextPanel::stream_changed, this));
-       _caption_view_button->Bind      (wxEVT_BUTTON,   boost::bind (&TextPanel::caption_view_clicked, this));
+       _text_view_button->Bind         (wxEVT_BUTTON,   boost::bind (&TextPanel::text_view_clicked, this));
        _fonts_dialog_button->Bind      (wxEVT_BUTTON,   boost::bind (&TextPanel::fonts_dialog_clicked, this));
        _appearance_dialog_button->Bind (wxEVT_BUTTON,   boost::bind (&TextPanel::appearance_dialog_clicked, this));
 }
@@ -191,7 +191,7 @@ void
 TextPanel::film_content_changed (int property)
 {
        FFmpegContentList fc = _parent->selected_ffmpeg ();
-       ContentList sc = _parent->selected_caption ();
+       ContentList sc = _parent->selected_text ();
 
        shared_ptr<FFmpegContent> fcs;
        if (fc.size() == 1) {
@@ -203,9 +203,9 @@ TextPanel::film_content_changed (int property)
                scs = sc.front ();
        }
 
-       shared_ptr<TextContent> caption;
+       shared_ptr<TextContent> text;
        if (scs) {
-               caption = scs->caption_of_original_type(_original_type);
+               text = scs->text_of_original_type(_original_type);
        }
 
        if (property == FFmpegContentProperty::SUBTITLE_STREAMS) {
@@ -224,15 +224,15 @@ TextPanel::film_content_changed (int property)
                }
                setup_sensitivity ();
        } else if (property == TextContentProperty::USE) {
-               checked_set (_use, caption ? caption->use() : false);
+               checked_set (_use, text ? text->use() : false);
                setup_sensitivity ();
        } else if (property == TextContentProperty::TYPE) {
-               if (caption) {
-                       switch (caption->type()) {
-                       case CAPTION_OPEN:
+               if (text) {
+                       switch (text->type()) {
+                       case TEXT_OPEN_SUBTITLE:
                                _type->SetSelection (0);
                                break;
-                       case CAPTION_CLOSED:
+                       case TEXT_CLOSED_CAPTION:
                                _type->SetSelection (1);
                                break;
                        default:
@@ -243,29 +243,29 @@ TextPanel::film_content_changed (int property)
                }
                setup_sensitivity ();
        } else if (property == TextContentProperty::BURN) {
-               checked_set (_burn, caption ? caption->burn() : false);
+               checked_set (_burn, text ? text->burn() : false);
        } else if (property == TextContentProperty::X_OFFSET) {
-               checked_set (_x_offset, caption ? lrint (caption->x_offset() * 100) : 0);
+               checked_set (_x_offset, text ? lrint (text->x_offset() * 100) : 0);
        } else if (property == TextContentProperty::Y_OFFSET) {
-               checked_set (_y_offset, caption ? lrint (caption->y_offset() * 100) : 0);
+               checked_set (_y_offset, text ? lrint (text->y_offset() * 100) : 0);
        } else if (property == TextContentProperty::X_SCALE) {
-               checked_set (_x_scale, caption ? lrint (caption->x_scale() * 100) : 100);
+               checked_set (_x_scale, text ? lrint (text->x_scale() * 100) : 100);
        } else if (property == TextContentProperty::Y_SCALE) {
-               checked_set (_y_scale, caption ? lrint (caption->y_scale() * 100) : 100);
+               checked_set (_y_scale, text ? lrint (text->y_scale() * 100) : 100);
        } else if (property == TextContentProperty::LINE_SPACING) {
-               checked_set (_line_spacing, caption ? lrint (caption->line_spacing() * 100) : 100);
+               checked_set (_line_spacing, text ? lrint (text->line_spacing() * 100) : 100);
        } else if (property == TextContentProperty::LANGUAGE) {
-               checked_set (_language, caption ? caption->language() : "");
-       } else if (property == DCPContentProperty::REFERENCE_CAPTION) {
+               checked_set (_language, text ? text->language() : "");
+       } else if (property == DCPContentProperty::REFERENCE_TEXT) {
                if (scs) {
                        shared_ptr<DCPContent> dcp = dynamic_pointer_cast<DCPContent> (scs);
-                       checked_set (_reference, dcp ? dcp->reference_caption(_original_type) : false);
+                       checked_set (_reference, dcp ? dcp->reference_text(_original_type) : false);
                } else {
                        checked_set (_reference, false);
                }
 
                setup_sensitivity ();
-       } else if (property == DCPContentProperty::CAPTIONS) {
+       } else if (property == DCPContentProperty::TEXTS) {
                setup_sensitivity ();
        }
 }
@@ -273,21 +273,21 @@ TextPanel::film_content_changed (int property)
 void
 TextPanel::use_toggled ()
 {
-       BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption()) {
-               i->caption_of_original_type(_original_type)->set_use (_use->GetValue());
+       BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text()) {
+               i->text_of_original_type(_original_type)->set_use (_use->GetValue());
        }
 }
 
 void
 TextPanel::type_changed ()
 {
-       BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption()) {
+       BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text()) {
                switch (_type->GetSelection()) {
                case 0:
-                       i->caption_of_original_type(_original_type)->set_type (CAPTION_OPEN);
+                       i->text_of_original_type(_original_type)->set_type (TEXT_OPEN_SUBTITLE);
                        break;
                case 1:
-                       i->caption_of_original_type(_original_type)->set_type (CAPTION_CLOSED);
+                       i->text_of_original_type(_original_type)->set_type (TEXT_CLOSED_CAPTION);
                        break;
                }
        }
@@ -296,8 +296,8 @@ TextPanel::type_changed ()
 void
 TextPanel::burn_toggled ()
 {
-       BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption ()) {
-               i->caption_of_original_type(_original_type)->set_burn (_burn->GetValue());
+       BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text ()) {
+               i->text_of_original_type(_original_type)->set_burn (_burn->GetValue());
        }
 }
 
@@ -306,7 +306,7 @@ TextPanel::setup_sensitivity ()
 {
        int any_subs = 0;
        int ffmpeg_subs = 0;
-       ContentList sel = _parent->selected_caption ();
+       ContentList sel = _parent->selected_text ();
        BOOST_FOREACH (shared_ptr<Content> i, sel) {
                /* These are the content types that could include subtitles */
                shared_ptr<const FFmpegContent> fc = boost::dynamic_pointer_cast<const FFmpegContent> (i);
@@ -314,7 +314,7 @@ TextPanel::setup_sensitivity ()
                shared_ptr<const DCPContent> dc = boost::dynamic_pointer_cast<const DCPContent> (i);
                shared_ptr<const DCPSubtitleContent> dsc = boost::dynamic_pointer_cast<const DCPSubtitleContent> (i);
                if (fc) {
-                       if (!fc->caption.empty()) {
+                       if (!fc->text.empty()) {
                                ++ffmpeg_subs;
                                ++any_subs;
                        }
@@ -332,7 +332,7 @@ TextPanel::setup_sensitivity ()
        }
 
        string why_not;
-       bool const can_reference = dcp && dcp->can_reference_caption (_original_type, why_not);
+       bool const can_reference = dcp && dcp->can_reference_text (_original_type, why_not);
        setup_refer_button (_reference, _reference_note, dcp, can_reference, why_not);
 
        bool const reference = _reference->GetValue ();
@@ -349,7 +349,7 @@ TextPanel::setup_sensitivity ()
        _line_spacing->Enable (!reference && use);
        _language->Enable (!reference && any_subs > 0 && use);
        _stream->Enable (!reference && ffmpeg_subs == 1);
-       _caption_view_button->Enable (!reference);
+       _text_view_button->Enable (!reference);
        _fonts_dialog_button->Enable (!reference);
        _appearance_dialog_button->Enable (!reference && any_subs > 0 && use);
 }
@@ -379,49 +379,49 @@ TextPanel::stream_changed ()
 void
 TextPanel::x_offset_changed ()
 {
-       BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption ()) {
-               i->caption_of_original_type(_original_type)->set_x_offset (_x_offset->GetValue() / 100.0);
+       BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text ()) {
+               i->text_of_original_type(_original_type)->set_x_offset (_x_offset->GetValue() / 100.0);
        }
 }
 
 void
 TextPanel::y_offset_changed ()
 {
-       BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption ()) {
-               i->caption_of_original_type(_original_type)->set_y_offset (_y_offset->GetValue() / 100.0);
+       BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text ()) {
+               i->text_of_original_type(_original_type)->set_y_offset (_y_offset->GetValue() / 100.0);
        }
 }
 
 void
 TextPanel::x_scale_changed ()
 {
-       ContentList c = _parent->selected_caption ();
+       ContentList c = _parent->selected_text ();
        if (c.size() == 1) {
-               c.front()->caption_of_original_type(_original_type)->set_x_scale (_x_scale->GetValue() / 100.0);
+               c.front()->text_of_original_type(_original_type)->set_x_scale (_x_scale->GetValue() / 100.0);
        }
 }
 
 void
 TextPanel::y_scale_changed ()
 {
-       BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption ()) {
-               i->caption_of_original_type(_original_type)->set_y_scale (_y_scale->GetValue() / 100.0);
+       BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text ()) {
+               i->text_of_original_type(_original_type)->set_y_scale (_y_scale->GetValue() / 100.0);
        }
 }
 
 void
 TextPanel::line_spacing_changed ()
 {
-       BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption ()) {
-               i->caption_of_original_type(_original_type)->set_line_spacing (_line_spacing->GetValue() / 100.0);
+       BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text ()) {
+               i->text_of_original_type(_original_type)->set_line_spacing (_line_spacing->GetValue() / 100.0);
        }
 }
 
 void
 TextPanel::language_changed ()
 {
-       BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption ()) {
-               i->caption_of_original_type(_original_type)->set_language (wx_to_std (_language->GetValue()));
+       BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text ()) {
+               i->text_of_original_type(_original_type)->set_language (wx_to_std (_language->GetValue()));
        }
 }
 
@@ -439,25 +439,25 @@ TextPanel::content_selection_changed ()
        film_content_changed (TextContentProperty::LANGUAGE);
        film_content_changed (TextContentProperty::FONTS);
        film_content_changed (TextContentProperty::TYPE);
-       film_content_changed (DCPContentProperty::REFERENCE_CAPTION);
+       film_content_changed (DCPContentProperty::REFERENCE_TEXT);
 }
 
 void
-TextPanel::caption_view_clicked ()
+TextPanel::text_view_clicked ()
 {
-       if (_caption_view) {
-               _caption_view->Destroy ();
-               _caption_view = 0;
+       if (_text_view) {
+               _text_view->Destroy ();
+               _text_view = 0;
        }
 
-       ContentList c = _parent->selected_caption ();
+       ContentList c = _parent->selected_text ();
        DCPOMATIC_ASSERT (c.size() == 1);
 
        shared_ptr<Decoder> decoder = decoder_factory (c.front(), _parent->film()->log(), false);
 
        if (decoder) {
-               _caption_view = new TextView (this, _parent->film(), c.front(), c.front()->caption_of_original_type(_original_type), decoder, _parent->film_viewer());
-               _caption_view->Show ();
+               _text_view = new TextView (this, _parent->film(), c.front(), c.front()->text_of_original_type(_original_type), decoder, _parent->film_viewer());
+               _text_view->Show ();
        }
 }
 
@@ -469,10 +469,10 @@ TextPanel::fonts_dialog_clicked ()
                _fonts_dialog = 0;
        }
 
-       ContentList c = _parent->selected_caption ();
+       ContentList c = _parent->selected_text ();
        DCPOMATIC_ASSERT (c.size() == 1);
 
-       _fonts_dialog = new FontsDialog (this, c.front(), c.front()->caption_of_original_type(_original_type));
+       _fonts_dialog = new FontsDialog (this, c.front(), c.front()->text_of_original_type(_original_type));
        _fonts_dialog->Show ();
 }
 
@@ -489,16 +489,16 @@ TextPanel::reference_clicked ()
                return;
        }
 
-       d->set_reference_caption (_original_type, _reference->GetValue ());
+       d->set_reference_text (_original_type, _reference->GetValue ());
 }
 
 void
 TextPanel::appearance_dialog_clicked ()
 {
-       ContentList c = _parent->selected_caption ();
+       ContentList c = _parent->selected_text ();
        DCPOMATIC_ASSERT (c.size() == 1);
 
-       SubtitleAppearanceDialog* d = new SubtitleAppearanceDialog (this, c.front(), c.front()->caption_of_original_type(_original_type));
+       SubtitleAppearanceDialog* d = new SubtitleAppearanceDialog (this, c.front(), c.front()->text_of_original_type(_original_type));
        if (d->ShowModal () == wxID_OK) {
                d->apply ();
        }
index 70d46dacd10e692cdbc3c7756197238e487f1ba9..86381e6ff6d7f56212f4ba43baffb405cb964b9c 100644 (file)
@@ -45,7 +45,7 @@ private:
        void line_spacing_changed ();
        void language_changed ();
        void stream_changed ();
-       void caption_view_clicked ();
+       void text_view_clicked ();
        void fonts_dialog_clicked ();
        void reference_clicked ();
        void appearance_dialog_clicked ();
@@ -64,8 +64,8 @@ private:
        wxSpinCtrl* _line_spacing;
        wxTextCtrl* _language;
        wxChoice* _stream;
-       wxButton* _caption_view_button;
-       TextView* _caption_view;
+       wxButton* _text_view_button;
+       TextView* _text_view;
        wxButton* _fonts_dialog_button;
        FontsDialog* _fonts_dialog;
        wxButton* _appearance_dialog_button;
index 583632dd0ae9d0cedd6de021b27c176f2dbe2184..2106a3dec242899b38301ffd279e50b45293a392 100644 (file)
@@ -35,7 +35,7 @@ using boost::shared_ptr;
 using boost::bind;
 using boost::dynamic_pointer_cast;
 
-TextView::TextView (wxWindow* parent, shared_ptr<Film> film, shared_ptr<Content> content, shared_ptr<TextContent> caption, shared_ptr<Decoder> decoder, FilmViewer* viewer)
+TextView::TextView (wxWindow* parent, shared_ptr<Film> film, shared_ptr<Content> content, shared_ptr<TextContent> text, shared_ptr<Decoder> decoder, FilmViewer* viewer)
        : wxDialog (parent, wxID_ANY, _("Captions"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
        , _content (content)
        , _film_viewer (viewer)
@@ -87,8 +87,8 @@ TextView::TextView (wxWindow* parent, shared_ptr<Film> film, shared_ptr<Content>
        _frc = film->active_frame_rate_change (content->position());
 
        /* Find the decoder that is being used for our TextContent and attach to it */
-       BOOST_FOREACH (shared_ptr<TextDecoder> i, decoder->caption) {
-               if (i->content() == caption) {
+       BOOST_FOREACH (shared_ptr<TextDecoder> i, decoder->text) {
+               if (i->content() == text) {
                        i->PlainStart.connect (bind (&TextView::data_start, this, _1));
                        i->Stop.connect (bind (&TextView::data_stop, this, _1));
                }
index b0a3a72474e955737567259fdc3469001ff57166..dc0234376cfedb641e35326fba64e074e18cb034 100644 (file)
@@ -228,7 +228,7 @@ Timeline::recreate_views ()
                        _views.push_back (shared_ptr<TimelineView> (new TimelineAudioContentView (*this, i)));
                }
 
-               BOOST_FOREACH (shared_ptr<TextContent> j, i->caption) {
+               BOOST_FOREACH (shared_ptr<TextContent> j, i->text) {
                        _views.push_back (shared_ptr<TimelineView> (new TimelineTextContentView (*this, i, j)));
                }
 
@@ -334,9 +334,9 @@ Timeline::assign_tracks ()
        /* Tracks are:
           Video (mono or left-eye)
           Video (right-eye)
-          Caption 1
-          Caption 2
-          Caption N
+          Text 1
+          Text 2
+          Text N
           Atmos
           Audio 1
           Audio 2
@@ -373,9 +373,9 @@ Timeline::assign_tracks ()
 
        _tracks = max (_tracks, 1);
 
-       /* Captions */
+       /* Texts */
 
-       int const caption_tracks = place<TimelineTextContentView> (_views, _tracks);
+       int const text_tracks = place<TimelineTextContentView> (_views, _tracks);
 
        /* Atmos */
 
@@ -405,7 +405,7 @@ Timeline::assign_tracks ()
 
        _labels_view->set_3d (have_3d);
        _labels_view->set_audio_tracks (audio_tracks);
-       _labels_view->set_caption_tracks (caption_tracks);
+       _labels_view->set_text_tracks (text_tracks);
        _labels_view->set_atmos (have_atmos);
 
        _time_axis_view->set_y (tracks());
index af9cb771e29273b8c088d5c02e028940b464c42f..56228a7e70a280fce9ba74350c43f3b8146c83cc 100644 (file)
@@ -32,13 +32,13 @@ TimelineLabelsView::TimelineLabelsView (Timeline& tl)
        : TimelineView (tl)
        , _threed (true)
        , _audio_tracks (0)
-       , _caption_tracks (0)
+       , _text_tracks (0)
        , _atmos (true)
 {
        wxString labels[] = {
                _("Video"),
                _("Audio"),
-               _("Captions"),
+               _("Subtitles/captions"),
                _("Atmos")
        };
 
@@ -70,9 +70,9 @@ TimelineLabelsView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int> >
        gc->DrawText (_("Video"), 0, (ty + fy) / 2 - 8);
        fy = ty;
 
-       if (_caption_tracks) {
-               ty = fy + _caption_tracks * h;
-               gc->DrawText (_("Captions"), 0, (ty + fy) / 2 - 8);
+       if (_text_tracks) {
+               ty = fy + _text_tracks * h;
+               gc->DrawText (_("Subtitle/captions"), 0, (ty + fy) / 2 - 8);
                fy = ty;
        }
 
@@ -101,9 +101,9 @@ TimelineLabelsView::set_audio_tracks (int n)
 }
 
 void
-TimelineLabelsView::set_caption_tracks (int n)
+TimelineLabelsView::set_text_tracks (int n)
 {
-       _caption_tracks = n;
+       _text_tracks = n;
 }
 
 void
index 646d93a588dda155f1126e6091bc70289150f8b3..f26c9762b879abed4f73e1347b513489c183336f 100644 (file)
@@ -31,7 +31,7 @@ public:
 
        void set_3d (bool s);
        void set_audio_tracks (int n);
-       void set_caption_tracks (int n);
+       void set_text_tracks (int n);
        void set_atmos (bool s);
 
 private:
@@ -40,6 +40,6 @@ private:
        int _width;
        bool _threed;
        int _audio_tracks;
-       int _caption_tracks;
+       int _text_tracks;
        bool _atmos;
 };
index bf987e51e1fc412483bce9a0a2a7e40f33716d7d..e9fc51f58344fbbe651a8e448144cab0d47d1599 100644 (file)
@@ -282,7 +282,7 @@ TimingPanel::film_content_changed (int property)
                                ++count_ac;
                                content = i;
                        }
-                       if (!i->caption.empty() && i->video_frame_rate()) {
+                       if (!i->text.empty() && i->video_frame_rate()) {
                                ++count_sc;
                                content = i;
                        }
index 74f0cae59c8dadb932b78dc135f94dbf0ecca94c..592a7e294fe2c55caa10804515d17a6de46f81b8 100644 (file)
@@ -101,7 +101,7 @@ BOOST_AUTO_TEST_CASE (client_server_test_rgb)
                        )
                );
 
-       pvf->set_caption (PositionImage (sub_image, Position<int> (50, 60)));
+       pvf->set_text (PositionImage (sub_image, Position<int> (50, 60)));
 
        shared_ptr<DCPVideo> frame (
                new DCPVideo (
@@ -186,7 +186,7 @@ BOOST_AUTO_TEST_CASE (client_server_test_yuv)
                        )
                );
 
-       pvf->set_caption (PositionImage (sub_image, Position<int> (50, 60)));
+       pvf->set_text (PositionImage (sub_image, Position<int> (50, 60)));
 
        shared_ptr<DCPVideo> frame (
                new DCPVideo (
index 8cceec483dacff61830da2785032602e9ead1846..53538cd7ca416ac1978b68d4ee18062d0e442367 100644 (file)
@@ -37,7 +37,7 @@ BOOST_AUTO_TEST_CASE (closed_caption_test1)
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs ());
 
-       content->only_caption()->set_type (CAPTION_CLOSED);
+       content->only_text()->set_type (TEXT_CLOSED_CAPTION);
 
        film->make_dcp ();
        BOOST_REQUIRE (!wait_for_jobs ());
index 2dbf43b2a0418f7a5e1c74a5e8f2e2780ab2549f..47938d30922395e9b82ee61343436167069da2ab 100644 (file)
@@ -71,8 +71,8 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test)
 
        BOOST_CHECK_EQUAL (content->full_length().get(), DCPTime::from_seconds(2).get());
 
-       content->only_caption()->set_use (true);
-       content->only_caption()->set_burn (false);
+       content->only_text()->set_use (true);
+       content->only_text()->set_burn (false);
        film->make_dcp ();
        BOOST_REQUIRE (!wait_for_jobs ());
 
@@ -91,7 +91,7 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_within_dcp_test)
        BOOST_REQUIRE (!wait_for_jobs ());
 
        shared_ptr<DCPDecoder> decoder (new DCPDecoder (content, film->log(), false));
-       decoder->only_caption()->PlainStart.connect (bind (store, _1));
+       decoder->only_text()->PlainStart.connect (bind (store, _1));
 
        stored = optional<ContentStringText> ();
        while (!decoder->pass() && !stored) {}
@@ -114,7 +114,7 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test2)
        BOOST_REQUIRE (!wait_for_jobs ());
 
        shared_ptr<DCPSubtitleDecoder> decoder (new DCPSubtitleDecoder (content, film->log()));
-       decoder->only_caption()->PlainStart.connect (bind (store, _1));
+       decoder->only_text()->PlainStart.connect (bind (store, _1));
 
        stored = optional<ContentStringText> ();
        while (!decoder->pass ()) {
@@ -142,7 +142,7 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test3)
        shared_ptr<DCPSubtitleDecoder> decoder (new DCPSubtitleDecoder (content, film->log()));
        stored = optional<ContentStringText> ();
        while (!decoder->pass ()) {
-               decoder->only_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 ();
@@ -171,8 +171,8 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test4)
        film->examine_and_add_content (content2);
        BOOST_REQUIRE (!wait_for_jobs ());
 
-       content->only_caption()->add_font (shared_ptr<Font> (new Font ("font1")));
-       content2->only_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 ());
index d1d07e28c6f97e17e6c01befe4fc2cb4910b6069..b286bbdb4ed387e23aeb58fb8a5b3ffe532950ea 100644 (file)
@@ -124,9 +124,9 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_test6)
        shared_ptr<StringTextFileContent> s (new StringTextFileContent (film, "test/data/subrip2.srt"));
        film->examine_and_add_content (s);
        BOOST_REQUIRE (!wait_for_jobs ());
-       s->only_caption()->set_colour (dcp::Colour (255, 255, 0));
-       s->only_caption()->set_effect (dcp::SHADOW);
-       s->only_caption()->set_effect_colour (dcp::Colour (0, 255, 255));
+       s->only_text()->set_colour (dcp::Colour (255, 255, 0));
+       s->only_text()->set_effect (dcp::SHADOW);
+       s->only_text()->set_effect_colour (dcp::Colour (0, 255, 255));
        film->write_metadata();
 
        shared_ptr<Job> job (new TranscodeJob (film));
@@ -149,9 +149,9 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_test7)
        shared_ptr<StringTextFileContent> s (new StringTextFileContent (film, "test/data/subrip.srt"));
        film->examine_and_add_content (s);
        BOOST_REQUIRE (!wait_for_jobs ());
-       s->only_caption()->set_colour (dcp::Colour (255, 255, 0));
-       s->only_caption()->set_effect (dcp::SHADOW);
-       s->only_caption()->set_effect_colour (dcp::Colour (0, 255, 255));
+       s->only_text()->set_colour (dcp::Colour (255, 255, 0));
+       s->only_text()->set_effect (dcp::SHADOW);
+       s->only_text()->set_effect_colour (dcp::Colour (0, 255, 255));
 
        shared_ptr<Job> job (new TranscodeJob (film));
        FFmpegEncoder encoder (film, job, "build/test/ffmpeg_encoder_prores_test7.mov", FFmpegEncoder::FORMAT_PRORES, false);
@@ -175,9 +175,9 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_h264_test2)
        shared_ptr<StringTextFileContent> s (new StringTextFileContent (film, "test/data/subrip2.srt"));
        film->examine_and_add_content (s);
        BOOST_REQUIRE (!wait_for_jobs ());
-       s->only_caption()->set_colour (dcp::Colour (255, 255, 0));
-       s->only_caption()->set_effect (dcp::SHADOW);
-       s->only_caption()->set_effect_colour (dcp::Colour (0, 255, 255));
+       s->only_text()->set_colour (dcp::Colour (255, 255, 0));
+       s->only_text()->set_effect (dcp::SHADOW);
+       s->only_text()->set_effect_colour (dcp::Colour (0, 255, 255));
        film->write_metadata();
 
        shared_ptr<Job> job (new TranscodeJob (film));
@@ -200,9 +200,9 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_h264_test3)
        shared_ptr<StringTextFileContent> s (new StringTextFileContent (film, "test/data/subrip.srt"));
        film->examine_and_add_content (s);
        BOOST_REQUIRE (!wait_for_jobs ());
-       s->only_caption()->set_colour (dcp::Colour (255, 255, 0));
-       s->only_caption()->set_effect (dcp::SHADOW);
-       s->only_caption()->set_effect_colour (dcp::Colour (0, 255, 255));
+       s->only_text()->set_colour (dcp::Colour (255, 255, 0));
+       s->only_text()->set_effect (dcp::SHADOW);
+       s->only_text()->set_effect_colour (dcp::Colour (0, 255, 255));
        film->write_metadata();
 
        shared_ptr<Job> job (new TranscodeJob (film));
index b86a944037a6f586842f8b49f599660ca4680a00..7cc846affec8bc344776f736ff6c49fa4defcab7 100644 (file)
@@ -211,11 +211,11 @@ BOOST_AUTO_TEST_CASE (player_seek_test)
        shared_ptr<DCPContent> dcp (new DCPContent (film, private_data / "awkward_subs"));
        film->examine_and_add_content (dcp, true);
        BOOST_REQUIRE (!wait_for_jobs ());
-       dcp->only_caption()->set_use (true);
+       dcp->only_text()->set_use (true);
 
        shared_ptr<Player> player (new Player (film, film->playlist()));
        player->set_fast ();
-       player->set_always_burn_open_captions ();
+       player->set_always_burn_open_subtitles ();
        player->set_play_referenced ();
 
        shared_ptr<Butler> butler (new Butler (player, film->log(), AudioMapping(), 2));
@@ -242,11 +242,11 @@ BOOST_AUTO_TEST_CASE (player_seek_test2)
        shared_ptr<DCPContent> dcp (new DCPContent (film, private_data / "awkward_subs2"));
        film->examine_and_add_content (dcp, true);
        BOOST_REQUIRE (!wait_for_jobs ());
-       dcp->only_caption()->set_use (true);
+       dcp->only_text()->set_use (true);
 
        shared_ptr<Player> player (new Player (film, film->playlist()));
        player->set_fast ();
-       player->set_always_burn_open_captions ();
+       player->set_always_burn_open_subtitles ();
        player->set_play_referenced ();
 
        shared_ptr<Butler> butler (new Butler (player, film->log(), AudioMapping(), 2));
index 61cf0187fdf523dd1c6c5018823ee24e9e1b141e..c54dee61fd205b001fc5bf5939de6f63356aa44f 100644 (file)
@@ -37,14 +37,14 @@ BOOST_AUTO_TEST_CASE (remake_with_subtitle_test)
        shared_ptr<FFmpegContent> content = dynamic_pointer_cast<FFmpegContent>(content_factory(film, private_data / "prophet_short_clip.mkv").front());
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs ());
-       content->only_caption()->set_burn (true);
-       content->only_caption()->set_use (true);
+       content->only_text()->set_burn (true);
+       content->only_text()->set_use (true);
        film->make_dcp ();
        BOOST_REQUIRE (!wait_for_jobs ());
 
        boost::filesystem::remove_all (film->dir (film->dcp_name(), false));
 
-       content->only_caption()->set_use (false);
+       content->only_text()->set_use (false);
        film->make_dcp ();
        BOOST_REQUIRE (!wait_for_jobs ());
 
index eb7918914323e9a000c71a693e70ab06282f9da6..c4bdd76d1c71efdac4aae6bf645f93f02f5bd2aa 100644 (file)
@@ -51,8 +51,8 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test)
        film->examine_and_add_content (content);
        wait_for_jobs ();
 
-       content->only_caption()->set_use (true);
-       content->only_caption()->set_burn (false);
+       content->only_text()->set_use (true);
+       content->only_text()->set_burn (false);
        film->make_dcp ();
        wait_for_jobs ();
 
@@ -73,10 +73,10 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test2)
        film->examine_and_add_content (content);
        wait_for_jobs ();
 
-       content->only_caption()->set_use (true);
-       content->only_caption()->set_burn (false);
+       content->only_text()->set_use (true);
+       content->only_text()->set_burn (false);
        /* Use test/data/subrip2.srt as if it were a font file  */
-       content->only_caption()->fonts().front()->set_file (FontFiles::NORMAL, "test/data/subrip2.srt");
+       content->only_text()->fonts().front()->set_file (FontFiles::NORMAL, "test/data/subrip2.srt");
 
        film->make_dcp ();
        wait_for_jobs ();
@@ -108,8 +108,8 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test3)
        film->examine_and_add_content (content);
        wait_for_jobs ();
 
-       content->only_caption()->set_use (true);
-       content->only_caption()->set_burn (false);
+       content->only_text()->set_use (true);
+       content->only_text()->set_burn (false);
 
        film->make_dcp ();
        wait_for_jobs ();
@@ -126,8 +126,8 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test4)
        film->set_name ("frobozz");
        film->set_interop (false);
        shared_ptr<StringTextFileContent> content (new StringTextFileContent (film, "test/data/subrip2.srt"));
-       content->only_caption()->set_use (true);
-       content->only_caption()->set_burn (false);
+       content->only_text()->set_use (true);
+       content->only_text()->set_burn (false);
        film->examine_and_add_content (content);
        wait_for_jobs ();
        film->make_dcp ();
@@ -147,8 +147,8 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test5)
        film->set_interop (true);
        film->set_sequence (false);
        shared_ptr<StringTextFileContent> content (new StringTextFileContent (film, "test/data/subrip2.srt"));
-       content->only_caption()->set_use (true);
-       content->only_caption()->set_burn (false);
+       content->only_text()->set_use (true);
+       content->only_text()->set_burn (false);
        film->examine_and_add_content (content);
        film->examine_and_add_content (content);
        wait_for_jobs ();
@@ -165,8 +165,8 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test6)
        shared_ptr<Film> film = new_test_film2 ("srt_subtitle_test6");
        film->set_interop (false);
        shared_ptr<StringTextFileContent> content (new StringTextFileContent (film, "test/data/frames.srt"));
-       content->only_caption()->set_use (true);
-       content->only_caption()->set_burn (false);
+       content->only_text()->set_use (true);
+       content->only_text()->set_burn (false);
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs ());
        film->make_dcp ();
index 5a6eaaa688102c3a389236a9ca63d7abed6ca8dc..cd22450a62d41d655500e0525bec9537e69b46a7 100644 (file)
@@ -51,8 +51,8 @@ BOOST_AUTO_TEST_CASE (ssa_subtitle_test1)
        film->examine_and_add_content (content);
        wait_for_jobs ();
 
-       content->only_caption()->set_use (true);
-       content->only_caption()->set_burn (false);
+       content->only_text()->set_use (true);
+       content->only_text()->set_burn (false);
 
        film->make_dcp ();
        wait_for_jobs ();
index d78cb63d7c1076271ef695f4e90323d8955a98b7..f02920b7f5ed43620e66177561897a8db08f03d3 100644 (file)
@@ -46,8 +46,8 @@ BOOST_AUTO_TEST_CASE (subtitle_reel_number_test)
        shared_ptr<StringTextFileContent> content (new StringTextFileContent (film, "test/data/subrip5.srt"));
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs ());
-       content->only_caption()->set_use (true);
-       content->only_caption()->set_burn (false);
+       content->only_text()->set_use (true);
+       content->only_text()->set_burn (false);
        film->set_reel_type (REELTYPE_BY_LENGTH);
        film->set_interop (true);
        film->set_reel_length (1024 * 1024 * 512);
index 5cded6e256d8ca91b6f2f6e5b81aef4331226eee..fa1e7cdab71c8990c8280ee67d4481cdb630dced 100644 (file)
@@ -57,16 +57,16 @@ BOOST_AUTO_TEST_CASE (vf_test1)
        string why_not;
        BOOST_CHECK (!dcp->can_reference_video(why_not));
        BOOST_CHECK (!dcp->can_reference_audio(why_not));
-       BOOST_CHECK (!dcp->can_reference_caption(CAPTION_OPEN, why_not));
-       BOOST_CHECK (!dcp->can_reference_caption(CAPTION_CLOSED, why_not));
+       BOOST_CHECK (!dcp->can_reference_text(TEXT_OPEN_SUBTITLE, why_not));
+       BOOST_CHECK (!dcp->can_reference_text(TEXT_CLOSED_CAPTION, why_not));
 
        /* Multi-reel DCP can be referenced if we are using by-video-content */
        film->set_reel_type (REELTYPE_BY_VIDEO_CONTENT);
        BOOST_CHECK (dcp->can_reference_video(why_not));
        BOOST_CHECK (dcp->can_reference_audio(why_not));
-       /* (but reels_test2 has no captions to reference) */
-       BOOST_CHECK (!dcp->can_reference_caption(CAPTION_OPEN, why_not));
-       BOOST_CHECK (!dcp->can_reference_caption(CAPTION_CLOSED, why_not));
+       /* (but reels_test2 has no texts to reference) */
+       BOOST_CHECK (!dcp->can_reference_text(TEXT_OPEN_SUBTITLE, why_not));
+       BOOST_CHECK (!dcp->can_reference_text(TEXT_CLOSED_CAPTION, why_not));
 
        shared_ptr<FFmpegContent> other (new FFmpegContent (film, "test/data/test.mp4"));
        film->examine_and_add_content (other);
@@ -76,16 +76,16 @@ BOOST_AUTO_TEST_CASE (vf_test1)
        other->set_position (DCPTime (0));
        BOOST_CHECK (!dcp->can_reference_video(why_not));
        BOOST_CHECK (!dcp->can_reference_audio(why_not));
-       BOOST_CHECK (!dcp->can_reference_caption(CAPTION_OPEN, why_not));
-       BOOST_CHECK (!dcp->can_reference_caption(CAPTION_CLOSED, why_not));
+       BOOST_CHECK (!dcp->can_reference_text(TEXT_OPEN_SUBTITLE, why_not));
+       BOOST_CHECK (!dcp->can_reference_text(TEXT_CLOSED_CAPTION, why_not));
 
        /* This should not be considered an overlap */
        other->set_position (dcp->end ());
        BOOST_CHECK (dcp->can_reference_video(why_not));
        BOOST_CHECK (dcp->can_reference_audio(why_not));
-       /* (reels_test2 has no captions to reference) */
-       BOOST_CHECK (!dcp->can_reference_caption(CAPTION_OPEN, why_not));
-       BOOST_CHECK (!dcp->can_reference_caption(CAPTION_CLOSED, why_not));
+       /* (reels_test2 has no texts to reference) */
+       BOOST_CHECK (!dcp->can_reference_text(TEXT_OPEN_SUBTITLE, why_not));
+       BOOST_CHECK (!dcp->can_reference_text(TEXT_CLOSED_CAPTION, why_not));
 }
 
 /** Make a OV with video and audio and a VF referencing the OV and adding subs */