X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimagemagick_decoder.h;h=82c87876bdc8dba4a69de0c4872ffcfc015897ae;hb=0b97307b78b1d5e017e97ff90d5d05102cb70c1c;hp=84a6f15f9aa8b63d762ada2deb5ac94ccd756646;hpb=39c65e47432c76a4e34aaea5317bd7362409aed0;p=dcpomatic.git diff --git a/src/lib/imagemagick_decoder.h b/src/lib/imagemagick_decoder.h index 84a6f15f9..82c87876b 100644 --- a/src/lib/imagemagick_decoder.h +++ b/src/lib/imagemagick_decoder.h @@ -23,67 +23,36 @@ namespace Magick { class Image; } +class ImageMagickContent; + class ImageMagickDecoder : public VideoDecoder { public: - ImageMagickDecoder (boost::shared_ptr, DecodeOptions, Job *); + ImageMagickDecoder (boost::shared_ptr, boost::shared_ptr); - float frames_per_second () const { - /* We don't know */ - return 0; - } + /* Decoder */ - libdcp::Size native_size () const; + void pass (); + void seek (Time); + void seek_back (); + void seek_forward (); + Time next () const; + bool done () const; - SourceFrame length () const { - /* We don't know */ - return 0; - } + /* VideoDecoder */ - int audio_channels () const { - return 0; - } + float video_frame_rate () const; + libdcp::Size video_size () const; + ContentVideoFrame video_length () const; - int audio_sample_rate () const { - return 0; - } - - int64_t audio_channel_layout () const { - return 0; - } - - bool has_subtitles () const { - return false; - } - - bool seek (double); - bool seek_to_last (); - -protected: - bool pass (); - PixelFormat pixel_format () const; - - int time_base_numerator () const { - return 0; - } - - int time_base_denominator () const { - return 0; - } - - int sample_aspect_ratio_numerator () const { - /* XXX */ - return 1; - } + /* ImageMagickDecoder */ - int sample_aspect_ratio_denominator () const { - /* XXX */ - return 1; + boost::shared_ptr content () const { + return _imagemagick_content; } private: - void film_changed (Film::Property); - - std::list _files; - std::list::iterator _iter; + boost::shared_ptr _imagemagick_content; + boost::shared_ptr _image; + mutable boost::optional _video_size; };