Untested merge of master.
[dcpomatic.git] / src / lib / imagemagick_decoder.h
index cf417d373e3906afee7aa9c4a09ba829bd436053..e7c9dee9a3ac35373668433e6208d02128aafc0a 100644 (file)
@@ -23,43 +23,24 @@ namespace Magick {
        class Image;
 }
 
+class ImageMagickContent;
+
 class ImageMagickDecoder : public VideoDecoder
 {
 public:
-       ImageMagickDecoder (boost::shared_ptr<Film>, boost::shared_ptr<const DecodeOptions>, Job *);
-
-       float frames_per_second () const {
-               /* We don't know */
-               return 0;
-       }
-
-       Size native_size () const;
-
-       SourceFrame length () const {
-               /* We don't know */
-               return 0;
-       }
-
-       int audio_channels () const {
-               return 0;
-       }
+       ImageMagickDecoder (boost::shared_ptr<const Film>, boost::shared_ptr<const ImageMagickContent>);
 
-       int audio_sample_rate () const {
-               return 0;
+       float video_frame_rate () const {
+               return 24;
        }
 
-       int64_t audio_channel_layout () const {
-               return 0;
-       }
+       libdcp::Size native_size () const;
+       ContentVideoFrame video_length () const;
 
-       bool has_subtitles () const {
-               return false;
-       }
-
-       bool seek (SourceFrame);
+       bool seek (double);
+       bool pass ();
 
 protected:
-       bool pass ();
        PixelFormat pixel_format () const;
 
        int time_base_numerator () const {
@@ -81,8 +62,7 @@ protected:
        }
 
 private:
-       void film_changed (Film::Property);
-       
-       std::list<std::string> _files;
-       std::list<std::string>::iterator _iter;
+       boost::shared_ptr<const ImageMagickContent> _imagemagick_content;
+       boost::shared_ptr<Image> _image;
+       ContentVideoFrame _position;
 };