+ auto fc = dynamic_pointer_cast<const FFmpegContent> (content);
+ if (fc) {
+ return make_shared<FFmpegDecoder>(film, fc, fast);
+ }
+
+ auto dc = dynamic_pointer_cast<const DCPContent> (content);
+ if (dc) {
+ try {
+ return make_shared<DCPDecoder>(film, dc, fast, tolerant, maybe_cast<DCPDecoder>(old_decoder));
+ } catch (KDMError& e) {
+ /* This will be found and reported to the user when the content is examined */
+ return {};
+ }
+ }
+
+ auto ic = dynamic_pointer_cast<const ImageContent> (content);
+ if (ic) {
+ return make_shared<ImageDecoder>(film, ic);
+ }
+
+ auto rc = dynamic_pointer_cast<const StringTextFileContent> (content);
+ if (rc) {
+ return make_shared<StringTextFileDecoder>(film, rc);
+ }
+
+ auto dsc = dynamic_pointer_cast<const DCPSubtitleContent> (content);
+ if (dsc) {
+ return make_shared<DCPSubtitleDecoder>(film, dsc);
+ }
+
+ auto vmc = dynamic_pointer_cast<const VideoMXFContent> (content);
+ if (vmc) {
+ return make_shared<VideoMXFDecoder>(film, vmc);
+ }
+
+ auto amc = dynamic_pointer_cast<const AtmosMXFContent> (content);
+ if (amc) {
+ return make_shared<AtmosMXFDecoder>(film, amc);
+ }
+
+ return {};