X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimagemagick_decoder.h;h=3e551c3b7c0d86aba36b020c4201a149f0360c38;hb=77fd65d0dd95506b5b51802ab58b6bd5eae60dc7;hp=de49c1b566b6ef0a36ae2bb44c0e05d77a65da6c;hpb=92a16acdd9a91977e154d09120160fa427adf3f7;p=dcpomatic.git diff --git a/src/lib/imagemagick_decoder.h b/src/lib/imagemagick_decoder.h index de49c1b56..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,67 +18,26 @@ */ #include "video_decoder.h" +#include "imagemagick.h" namespace Magick { class Image; } -class ImageMagickDecoder : public VideoDecoder +class ImageMagickContent; + +class ImageMagickDecoder : public VideoDecoder, public ImageMagick { public: - ImageMagickDecoder (boost::shared_ptr, boost::shared_ptr, Job *); - - float frames_per_second () const { - /* We don't know */ - return 0; - } - - Size native_size () const; - - SourceFrame 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 has_subtitles () const { - return false; - } - -protected: - bool pass (); - PixelFormat pixel_format () const; - - int time_base_numerator () const { - return 0; - } - - int time_base_denominator () const { - return 0; - } + ImageMagickDecoder (boost::shared_ptr, boost::shared_ptr); - int sample_aspect_ratio_numerator () const { - /* XXX */ - return 1; - } + /* Decoder */ - int sample_aspect_ratio_denominator () const { - /* XXX */ - return 1; - } + void pass (); + void seek (VideoContent::Frame, bool); + bool done () const; private: - std::list _files; - std::list::iterator _iter; + boost::shared_ptr _image; + mutable boost::optional _video_size; };