Basics of multiple captions per content so that DCPContent can
[dcpomatic.git] / src / lib / hints.cc
index d29002ad56273e8fb51f94b61a29d2ffa5ee9881..33c2faba5938a371a10888d290621a3408bdca0a 100644 (file)
@@ -23,7 +23,7 @@
 #include "film.h"
 #include "content.h"
 #include "video_content.h"
-#include "text_content.h"
+#include "caption_content.h"
 #include "audio_processor.h"
 #include "font.h"
 #include "ratio.h"
@@ -56,10 +56,10 @@ get_hints (shared_ptr<const Film> film)
        bool big_font_files = false;
        if (film->interop ()) {
                BOOST_FOREACH (shared_ptr<Content> i, content) {
-                       if (i->subtitle) {
-                               BOOST_FOREACH (shared_ptr<Font> j, i->subtitle->fonts ()) {
-                                       for (int k = 0; k < FontFiles::VARIANTS; ++k) {
-                                               optional<boost::filesystem::path> const p = j->file (static_cast<FontFiles::Variant> (k));
+                       BOOST_FOREACH (shared_ptr<CaptionContent> j, i->caption) {
+                               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));
                                                if (p && boost::filesystem::file_size (p.get()) >= (640 * 1024)) {
                                                        big_font_files = true;
                                                }