Merge master.
[dcpomatic.git] / src / lib / imagemagick_decoder.h
index b7ab9af18119cf0c1677d3c6a0993f2b48335463..52c7bec186495cdbe4026e7bce1d325d3d6a8211 100644 (file)
 
 */
 
-#include "decoder.h"
+#include "video_decoder.h"
 
 namespace Magick {
        class Image;
 }
 
-class ImageMagickDecoder : public Decoder
+class ImageMagickContent;
+
+class ImageMagickDecoder : public VideoDecoder
 {
 public:
-       ImageMagickDecoder (boost::shared_ptr<Film>, boost::shared_ptr<const Options>, Job *);
+       ImageMagickDecoder (boost::shared_ptr<const Film>, boost::shared_ptr<const ImageMagickContent>);
 
-       float frames_per_second () const {
-               return static_frames_per_second ();
+       float video_frame_rate () const {
+               return 24;
        }
 
-       Size native_size () const;
+       libdcp::Size native_size () const;
+       ContentVideoFrame video_length () const;
 
        int audio_channels () const {
                return 0;
@@ -42,24 +45,14 @@ public:
                return 0;
        }
 
-       AVSampleFormat audio_sample_format () const {
-               return AV_SAMPLE_FMT_NONE;
-       }
-
        int64_t audio_channel_layout () const {
                return 0;
        }
 
-       bool has_subtitles () const {
-               return false;
-       }
-
-       static float static_frames_per_second () {
-               return 24;
-       }
+       bool seek (double);
+       bool pass ();
 
 protected:
-       bool pass ();
        PixelFormat pixel_format () const;
 
        int time_base_numerator () const {
@@ -81,6 +74,6 @@ protected:
        }
 
 private:
-       Magick::Image* _magick_image;
-       bool _done;
+       boost::shared_ptr<const ImageMagickContent> _imagemagick_content;
+       ContentVideoFrame _position;
 };