X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimagemagick_decoder.h;h=286f473378396f9bbd44f39f28f08c7eeefaf0dd;hb=09a9ac376db005a40a351736bcff4077f098825d;hp=7ad08df03a2e82f131ebbede586e890e00c34ba6;hpb=6809fdcbf8c65afe3c986b0e2b430d55ce7b124c;p=dcpomatic.git diff --git a/src/lib/imagemagick_decoder.h b/src/lib/imagemagick_decoder.h index 7ad08df03..286f47337 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,63 +26,19 @@ namespace Magick { class ImageMagickContent; -class ImageMagickDecoder : public VideoDecoder +class ImageMagickDecoder : public VideoDecoder, public ImageMagick { public: ImageMagickDecoder (boost::shared_ptr, boost::shared_ptr); - float frames_per_second () const { - /* We don't know */ - return 0; - } + /* Decoder */ - libdcp::Size native_size () const; - - ContentVideoFrame video_length () const { - /* We don't know */ - return 0; - } - - int audio_channels () const { - return 0; - } - - int audio_sample_rate () const { - return 0; - } - - int64_t audio_channel_layout () const { - return 0; - } - - bool seek (double); - bool seek_to_last (); - 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); + void seek_back (); + bool done () const; private: - void film_changed (Film::Property); - - boost::shared_ptr _imagemagick_content; - ContentVideoFrame _position; + boost::shared_ptr _image; + mutable boost::optional _video_size; };