Merge master and multifarious hackery.
[dcpomatic.git] / src / lib / ffmpeg_decoder.h
index f3f6b126b3a183cdb9a2c1b931699f9b0ac0b24e..c3747961266789a8b2da5447d15dc9c578d3cc1b 100644 (file)
@@ -62,13 +62,21 @@ public:
        FFmpegDecoder (boost::shared_ptr<const Film>, boost::shared_ptr<const FFmpegContent>, bool video, bool audio, bool subtitles);
        ~FFmpegDecoder ();
 
+       /* Decoder */
+
+       void pass ();
+       void seek (Time);
+       void seek_back ();
+       void seek_forward ();
+       Time next () const;
+
+       /* VideoDecoder */
+
        float video_frame_rate () const;
-       libdcp::Size native_size () const;
+       libdcp::Size video_size () const;
        ContentVideoFrame video_length () const;
-       int time_base_numerator () const;
-       int time_base_denominator () const;
-       int sample_aspect_ratio_numerator () const;
-       int sample_aspect_ratio_denominator () const;
+
+       /* FFmpegDecoder */
 
        std::vector<boost::shared_ptr<FFmpegSubtitleStream> > subtitle_streams () const {
                return _subtitle_streams;
@@ -78,10 +86,9 @@ public:
                return _audio_streams;
        }
 
-       bool seek (double);
-       bool seek_forward ();
-       bool seek_back ();
-       bool pass ();
+       boost::shared_ptr<const FFmpegContent> ffmpeg_content () const {
+               return _ffmpeg_content;
+       }
 
 private:
 
@@ -92,7 +99,7 @@ private:
        PixelFormat pixel_format () const;
        AVSampleFormat audio_sample_format () const;
        int bytes_per_audio_sample () const;
-       bool do_seek (double, bool, bool);
+       void do_seek (Time, bool, bool);
 
        void setup_general ();
        void setup_video ();
@@ -105,8 +112,6 @@ private:
        void maybe_add_subtitle ();
        boost::shared_ptr<AudioBuffers> deinterleave_audio (uint8_t** data, int size);
 
-       void film_changed (Film::Property);
-
        std::string stream_name (AVStream* s) const;
 
        boost::shared_ptr<const FFmpegContent> _ffmpeg_content;