X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimagemagick_decoder.h;h=b04bd88b10bba16d893769e0991656331b1c5da8;hb=127672223cca569986e35c91265e269ed5a6561c;hp=809f3aecdb61ce6d6cb24fd7f933ebbf4abbd7a2;hpb=009a58293bf2e9727d544d1a2648422cc395d81e;p=dcpomatic.git diff --git a/src/lib/imagemagick_decoder.h b/src/lib/imagemagick_decoder.h index 809f3aecd..b04bd88b1 100644 --- a/src/lib/imagemagick_decoder.h +++ b/src/lib/imagemagick_decoder.h @@ -17,53 +17,48 @@ */ -#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, boost::shared_ptr, Job *, Log *, bool, bool); - - int length_in_frames () const { - return 1; - } + ImageMagickDecoder (boost::shared_ptr, boost::shared_ptr, 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 { + ContentVideoFrame video_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 { return 0; } - bool has_subtitles () const { - return false; - } - - static float static_frames_per_second () { - return 24; - } + bool seek (double); + bool seek_to_last (); + bool pass (); protected: - bool do_pass (); PixelFormat pixel_format () const; int time_base_numerator () const { @@ -85,6 +80,8 @@ protected: } private: - Magick::Image* _magick_image; - bool _done; + void film_changed (Film::Property); + + boost::shared_ptr _imagemagick_content; + ContentVideoFrame _position; };