Merge branch 'master' of /home/carl/git/dvdomatic
[dcpomatic.git] / src / lib / imagemagick_decoder.h
index 3e58e645fca46b4692135f64aafc122e750f2c48..0e375f6e9e3127a040f862d014189e1d689527ca 100644 (file)
 
 */
 
-#include "decoder.h"
+#include "video_decoder.h"
 
 namespace Magick {
        class Image;
 }
 
-class ImageMagickDecoder : public Decoder
+class ImageMagickDecoder : public VideoDecoder
 {
 public:
-       ImageMagickDecoder (boost::shared_ptr<const FilmState>, boost::shared_ptr<const Options>, Job *, Log *, bool, bool);
+       ImageMagickDecoder (boost::shared_ptr<Film>, DecodeOptions);
 
        float frames_per_second () const {
-               return static_frames_per_second ();
+               /* We don't know */
+               return 0;
        }
 
-       Size native_size () const;
+       libdcp::Size native_size () const;
 
-       int audio_channels () const {
+       SourceFrame length () const {
+               /* We don't know */
                return 0;
        }
 
-       int audio_sample_rate () const {
+       int audio_channels () const {
                return 0;
        }
 
-       AVSampleFormat audio_sample_format () const {
-               return AV_SAMPLE_FMT_NONE;
+       int audio_sample_rate () const {
+               return 0;
        }
 
        int64_t audio_channel_layout () const {
@@ -54,12 +56,11 @@ public:
                return false;
        }
 
-       static float static_frames_per_second () {
-               return 24;
-       }
+       bool seek (double);
+       bool seek_to_last ();
 
 protected:
-       bool do_pass ();
+       bool pass ();
        PixelFormat pixel_format () const;
 
        int time_base_numerator () const {
@@ -81,6 +82,8 @@ protected:
        }
 
 private:
-       Magick::Image* _magick_image;
-       bool _done;
+       void film_changed (Film::Property);
+       
+       std::list<std::string> _files;
+       std::list<std::string>::iterator _iter;
 };