/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
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
*/
#include "video_decoder.h"
+#include "imagemagick.h"
namespace Magick {
class Image;
class ImageMagickContent;
-class ImageMagickDecoder : public VideoDecoder
+class ImageMagickDecoder : public VideoDecoder, public ImageMagick
{
public:
ImageMagickDecoder (boost::shared_ptr<const Film>, boost::shared_ptr<const ImageMagickContent>);
- float video_frame_rate () const {
- return 24;
- }
+ /* Decoder */
- libdcp::Size native_size () const;
- ContentVideoFrame video_length () const;
-
- bool seek (double);
- bool pass ();
-
- boost::shared_ptr<const ImageMagickContent> content () const {
- return _imagemagick_content;
- }
-
-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<const ImageMagickContent> _imagemagick_content;
boost::shared_ptr<Image> _image;
- ContentVideoFrame _position;
- mutable boost::optional<libdcp::Size> _native_size;
+ mutable boost::optional<libdcp::Size> _video_size;
};