Move things round a bit.
[dcpomatic.git] / src / lib / imagemagick_decoder.h
1 #include "decoder.h"
2
3 namespace Magick {
4         class Image;
5 }
6
7 class ImageMagickDecoder : public Decoder
8 {
9 public:
10         ImageMagickDecoder (boost::shared_ptr<const FilmState>, boost::shared_ptr<const Options>, Job *, Log *, bool, bool);
11
12         int length_in_frames () const {
13                 return 1;
14         }
15
16         float frames_per_second () const {
17                 return static_frames_per_second ();
18         }
19
20         Size native_size () const;
21
22         int audio_channels () const {
23                 return 0;
24         }
25
26         int audio_sample_rate () const {
27                 return 0;
28         }
29
30         AVSampleFormat audio_sample_format () const {
31                 return AV_SAMPLE_FMT_NONE;
32         }
33
34         static float static_frames_per_second () {
35                 return 24;
36         }
37
38 protected:
39         bool do_pass ();
40         PixelFormat pixel_format () const;
41
42         int time_base_numerator () const {
43                 return 0;
44         }
45
46         int time_base_denominator () const {
47                 return 0;
48         }
49
50         int sample_aspect_ratio_numerator () const {
51                 /* XXX */
52                 return 1;
53         }
54
55         int sample_aspect_ratio_denominator () const {
56                 /* XXX */
57                 return 1;
58         }
59
60 private:
61         Magick::Image* _magick_image;
62         bool _done;
63 };