X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimagemagick_decoder.h;h=e7c9dee9a3ac35373668433e6208d02128aafc0a;hb=47f25009bcbc765e397bcb471dd361a511c99daf;hp=809f3aecdb61ce6d6cb24fd7f933ebbf4abbd7a2;hpb=cc4a67b7eb8ecaed076e261960848f70e3e741af;p=dcpomatic.git diff --git a/src/lib/imagemagick_decoder.h b/src/lib/imagemagick_decoder.h index 809f3aecd..e7c9dee9a 100644 --- a/src/lib/imagemagick_decoder.h +++ b/src/lib/imagemagick_decoder.h @@ -17,53 +17,30 @@ */ -#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; - } - - float frames_per_second () const { - return static_frames_per_second (); - } - - Size native_size () const; - - int audio_channels () const { - return 0; - } + ImageMagickDecoder (boost::shared_ptr, boost::shared_ptr); - int audio_sample_rate () const { - return 0; - } - - AVSampleFormat audio_sample_format () const { - return AV_SAMPLE_FMT_NONE; - } - - int64_t audio_channel_layout () const { - return 0; + float video_frame_rate () const { + return 24; } - bool has_subtitles () const { - return false; - } + libdcp::Size native_size () const; + ContentVideoFrame video_length () const; - static float static_frames_per_second () { - return 24; - } + bool seek (double); + bool pass (); protected: - bool do_pass (); PixelFormat pixel_format () const; int time_base_numerator () const { @@ -85,6 +62,7 @@ protected: } private: - Magick::Image* _magick_image; - bool _done; + boost::shared_ptr _imagemagick_content; + boost::shared_ptr _image; + ContentVideoFrame _position; };