Merge branch 'master' into i18n
[dcpomatic.git] / src / lib / ffmpeg_decoder.h
index 1db46a4230c7390b908ea651684be5d9b06820c7..c383b8d1325ef8eb82d8b20e16ddc2168a822407 100644 (file)
@@ -58,7 +58,7 @@ public:
                , _name (n)
                , _id (i)
        {}
-                 
+
        std::string to_string () const;
 
        std::string name () const {
@@ -86,11 +86,12 @@ private:
 class FFmpegDecoder : public VideoDecoder, public AudioDecoder
 {
 public:
-       FFmpegDecoder (boost::shared_ptr<Film>, boost::shared_ptr<const DecodeOptions>, Job *);
+       FFmpegDecoder (boost::shared_ptr<Film>, DecodeOptions);
        ~FFmpegDecoder ();
 
        float frames_per_second () const;
-       Size native_size () const;
+       libdcp::Size native_size () const;
+       SourceFrame length () const;
        int time_base_numerator () const;
        int time_base_denominator () const;
        int sample_aspect_ratio_numerator () const;
@@ -99,17 +100,20 @@ public:
        void set_audio_stream (boost::shared_ptr<AudioStream>);
        void set_subtitle_stream (boost::shared_ptr<SubtitleStream>);
 
-       bool seek (SourceFrame);
+       bool seek (double);
+       bool seek_to_last ();
 
 private:
 
        bool pass ();
+       bool do_seek (double p, bool);
        PixelFormat pixel_format () const;
        AVSampleFormat audio_sample_format () const;
        int bytes_per_audio_sample () const;
 
        void out_with_sync ();
        void filter_and_emit_video (AVFrame *);
+       double frame_time () const;
 
        void setup_general ();
        void setup_video ();
@@ -117,10 +121,9 @@ private:
        void setup_subtitle ();
 
        void maybe_add_subtitle ();
-       boost::shared_ptr<AudioBuffers> deinterleave_audio (uint8_t* data, int size);
+       boost::shared_ptr<AudioBuffers> deinterleave_audio (uint8_t** data, int size);
 
        void film_changed (Film::Property);
-       boost::signals2::scoped_connection _film_connection;
 
        std::string stream_name (AVStream* s) const;