- if (boost::filesystem::is_directory (f->content_path()) || f->content_type() == STILL) {
- /* A single image file, or a directory of them */
- return Decoders (
- shared_ptr<VideoDecoder> (new ImageMagickDecoder (f, o, j)),
- shared_ptr<AudioDecoder> ()
- );
+ shared_ptr<const FFmpegContent> fc = dynamic_pointer_cast<const FFmpegContent> (content);
+ if (fc) {
+ return make_shared<FFmpegDecoder> (fc, log, fast);
+ }
+
+ shared_ptr<const DCPContent> dc = dynamic_pointer_cast<const DCPContent> (content);
+ if (dc) {
+ return make_shared<DCPDecoder> (dc, log, fast);
+ }
+
+ shared_ptr<const ImageContent> ic = dynamic_pointer_cast<const ImageContent> (content);
+ if (ic) {
+ return make_shared<ImageDecoder> (ic, log);
+ }
+
+ shared_ptr<const TextSubtitleContent> rc = dynamic_pointer_cast<const TextSubtitleContent> (content);
+ if (rc) {
+ return make_shared<TextSubtitleDecoder> (rc);
+ }
+
+ shared_ptr<const DCPSubtitleContent> dsc = dynamic_pointer_cast<const DCPSubtitleContent> (content);
+ if (dsc) {
+ return make_shared<DCPSubtitleDecoder> (dsc);