More renaming; text -> plain.
[dcpomatic.git] / src / lib / decoder_factory.cc
index b661d494bf9f02b85864d9a1477974e85400f761..4301edd17bf814b2336a7c9d866fe7013b7277a4 100644 (file)
 #include "dcp_decoder.h"
 #include "image_content.h"
 #include "image_decoder.h"
-#include "text_subtitle_content.h"
-#include "text_subtitle_decoder.h"
-#include "dcp_subtitle_content.h"
-#include "dcp_subtitle_decoder.h"
+#include "plain_text_content.h"
+#include "plain_text_decoder.h"
+#include "dcp_text_content.h"
+#include "dcp_text_decoder.h"
 #include "video_mxf_content.h"
 #include "video_mxf_decoder.h"
 #include <boost/foreach.hpp>
@@ -37,16 +37,16 @@ using boost::shared_ptr;
 using boost::dynamic_pointer_cast;
 
 shared_ptr<Decoder>
-decoder_factory (shared_ptr<const Content> content, shared_ptr<Log> log)
+decoder_factory (shared_ptr<const Content> content, shared_ptr<Log> log, bool fast)
 {
        shared_ptr<const FFmpegContent> fc = dynamic_pointer_cast<const FFmpegContent> (content);
        if (fc) {
-               return shared_ptr<Decoder> (new FFmpegDecoder (fc, log));
+               return shared_ptr<Decoder> (new FFmpegDecoder (fc, log, fast));
        }
 
        shared_ptr<const DCPContent> dc = dynamic_pointer_cast<const DCPContent> (content);
        if (dc) {
-               return shared_ptr<Decoder> (new DCPDecoder (dc, log));
+               return shared_ptr<Decoder> (new DCPDecoder (dc, log, fast));
        }
 
        shared_ptr<const ImageContent> ic = dynamic_pointer_cast<const ImageContent> (content);
@@ -54,14 +54,14 @@ decoder_factory (shared_ptr<const Content> content, shared_ptr<Log> log)
                return shared_ptr<Decoder> (new ImageDecoder (ic, log));
        }
 
-       shared_ptr<const TextSubtitleContent> rc = dynamic_pointer_cast<const TextSubtitleContent> (content);
+       shared_ptr<const PlainText> rc = dynamic_pointer_cast<const PlainText> (content);
        if (rc) {
-               return shared_ptr<Decoder> (new TextSubtitleDecoder (rc, log));
+               return shared_ptr<Decoder> (new TextTextDecoder (rc, log));
        }
 
-       shared_ptr<const DCPSubtitleContent> dsc = dynamic_pointer_cast<const DCPSubtitleContent> (content);
+       shared_ptr<const DCPTextContent> dsc = dynamic_pointer_cast<const DCPTextContent> (content);
        if (dsc) {
-               return shared_ptr<Decoder> (new DCPSubtitleDecoder (dsc, log));
+               return shared_ptr<Decoder> (new DCPTextDecoder (dsc, log));
        }
 
        shared_ptr<const VideoMXFContent> vmc = dynamic_pointer_cast<const VideoMXFContent> (content);