Runs.
[dcpomatic.git] / src / lib / decoder_factory.cc
index 287bba0da9b1759a638e9317be188c14d2ff764f..feaa1c7ef2f64a51667fcd69c8565b2275277fbc 100644 (file)
 
 #include <boost/filesystem.hpp>
 #include "ffmpeg_decoder.h"
-#include "tiff_decoder.h"
 #include "imagemagick_decoder.h"
 #include "film.h"
+#include "sndfile_decoder.h"
+#include "decoder_factory.h"
 
 using std::string;
+using std::pair;
+using std::make_pair;
 using boost::shared_ptr;
+using boost::dynamic_pointer_cast;
 
-shared_ptr<Decoder>
+Decoders
 decoder_factory (
-       shared_ptr<Film> f, shared_ptr<const Options> o, Job* j, bool minimal = false
+       shared_ptr<Film> f, DecodeOptions o
        )
 {
-       if (boost::filesystem::is_directory (f->content_path ())) {
-               /* Assume a directory contains TIFFs */
-               return shared_ptr<Decoder> (new TIFFDecoder (f, o, j, minimal));
-       }
-
-       if (f->content_type() == STILL) {
-               return shared_ptr<Decoder> (new ImageMagickDecoder (f, o, j, minimal));
-       }
-       
-       return shared_ptr<Decoder> (new FFmpegDecoder (f, o, j, minimal));
+       return Decoders ();
 }