Move audio into Encoder so that J2KStillEncoder can use it too. Rename J2KWAVEncoder...
[dcpomatic.git] / src / lib / encoder_factory.cc
index d16150fa6b699b46071d1f7398ebb0582aa98bb2..8384ecee3cb62095eaceff5a04343c4d2ba40314 100644 (file)
  */
 
 #include <boost/filesystem.hpp>
-#include "j2k_wav_encoder.h"
+#include "j2k_video_encoder.h"
 #include "j2k_still_encoder.h"
-#include "film_state.h"
+#include "film.h"
 
-using namespace std;
-using namespace boost;
+using boost::shared_ptr;
 
 shared_ptr<Encoder>
-encoder_factory (shared_ptr<const FilmState> fs, shared_ptr<const Options> o, Log* l)
+encoder_factory (shared_ptr<const Film> f, shared_ptr<const EncodeOptions> o)
 {
-       if (!filesystem::is_directory (fs->content_path()) && fs->content_type() == STILL) {
-               return shared_ptr<Encoder> (new J2KStillEncoder (fs, o, l));
+       if (!boost::filesystem::is_directory (f->content_path()) && f->content_type() == STILL) {
+               return shared_ptr<Encoder> (new J2KStillEncoder (f, o));
        }
        
-       return shared_ptr<Encoder> (new J2KWAVEncoder (fs, o, l));
+       return shared_ptr<Encoder> (new J2KVideoEncoder (f, o));
 }