05dc7f113386caef7384493e0ff9bdf8e9114fe8
[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         int64_t audio_channel_layout () const {
35                 return 0;
36         }
37
38         bool has_subtitles () const {
39                 return false;
40         }
41
42         static float static_frames_per_second () {
43                 return 24;
44         }
45
46 protected:
47         bool do_pass ();
48         PixelFormat pixel_format () const;
49
50         int time_base_numerator () const {
51                 return 0;
52         }
53
54         int time_base_denominator () const {
55                 return 0;
56         }
57
58         int sample_aspect_ratio_numerator () const {
59                 /* XXX */
60                 return 1;
61         }
62
63         int sample_aspect_ratio_denominator () const {
64                 /* XXX */
65                 return 1;
66         }
67
68 private:
69         Magick::Image* _magick_image;
70         bool _done;
71 };