Tweak message.
[dcpomatic.git] / src / lib / film.cc
index b56f85dbe8ba806f19270aa4c43ef16db9b12bcd..ba97f833ea39b7df3d6a8bd903dedb3767a942d8 100644 (file)
@@ -46,7 +46,7 @@
 #include "screen.h"
 #include "audio_content.h"
 #include "video_content.h"
-#include "caption_content.h"
+#include "text_content.h"
 #include "ffmpeg_content.h"
 #include "dcp_content.h"
 #include "screen_kdm.h"
@@ -125,7 +125,7 @@ string const Film::metadata_file = "metadata.xml";
  * 35 -> 36
  * EffectColour rather than OutlineColour in Subtitle.
  * 36 -> 37
- * CaptionContent can be in a Caption tag, and some of the tag names
+ * TextContent can be in a Caption tag, and some of the tag names
  * have had Subtitle prefixes or suffixes removed.
  */
 int const Film::current_state_version = 37;
@@ -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<CaptionContent> 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<CaptionType>(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<CaptionContent> j, i->caption) {
+               BOOST_FOREACH (shared_ptr<TextContent> j, i->text) {
                        languages.insert (j->language ());
                }
        }