X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimagemagick_decoder.h;h=286f473378396f9bbd44f39f28f08c7eeefaf0dd;hb=09a9ac376db005a40a351736bcff4077f098825d;hp=809f3aecdb61ce6d6cb24fd7f933ebbf4abbd7a2;hpb=cc4a67b7eb8ecaed076e261960848f70e3e741af;p=dcpomatic.git diff --git a/src/lib/imagemagick_decoder.h b/src/lib/imagemagick_decoder.h index 809f3aecd..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 @@ -17,74 +17,28 @@ */ -#include "decoder.h" +#include "video_decoder.h" +#include "imagemagick.h" namespace Magick { class Image; } -class ImageMagickDecoder : public Decoder +class ImageMagickContent; + +class ImageMagickDecoder : public VideoDecoder, public ImageMagick { 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; - } - - 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; - } - - bool has_subtitles () const { - return false; - } - - static float static_frames_per_second () { - return 24; - } - -protected: - bool do_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); + void seek_back (); + bool done () const; private: - Magick::Image* _magick_image; - bool _done; + boost::shared_ptr _image; + mutable boost::optional _video_size; };