X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimagemagick_decoder.h;h=3e551c3b7c0d86aba36b020c4201a149f0360c38;hb=75cd462257fbec6c6998f2d1339e37ab4ff16f31;hp=12a40976b5b72e1ab148a3269e798ada81a79775;hpb=930f0b02333ecc0a3a53fa57d943375daae99314;p=dcpomatic.git diff --git a/src/lib/imagemagick_decoder.h b/src/lib/imagemagick_decoder.h index 12a40976b..3e551c3b7 100644 --- a/src/lib/imagemagick_decoder.h +++ b/src/lib/imagemagick_decoder.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2013 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,6 +18,7 @@ */ #include "video_decoder.h" +#include "imagemagick.h" namespace Magick { class Image; @@ -25,45 +26,18 @@ namespace Magick { class ImageMagickContent; -class ImageMagickDecoder : public VideoDecoder +class ImageMagickDecoder : public VideoDecoder, public ImageMagick { public: ImageMagickDecoder (boost::shared_ptr, boost::shared_ptr); - float video_frame_rate () const { - return 24; - } + /* Decoder */ - libdcp::Size native_size () const; - ContentVideoFrame video_length () const; - - bool seek (double); - bool pass (); - -protected: - 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; - } - - int sample_aspect_ratio_denominator () const { - /* XXX */ - return 1; - } + void pass (); + void seek (VideoContent::Frame, bool); + bool done () const; private: - boost::shared_ptr _imagemagick_content; boost::shared_ptr _image; - ContentVideoFrame _position; - mutable boost::optional _native_size; + mutable boost::optional _video_size; };