Merge branch 'master' of ssh://houllier/home/carl/git/dvdomatic
[dcpomatic.git] / src / lib / ffmpeg_decoder.h
index 9a4e65ebc2ccd7a4db041df1dae59f6f03ec03e9..0c89b973dfbb9b47c237cd2e9ade391327758fd9 100644 (file)
@@ -86,7 +86,7 @@ private:
 class FFmpegDecoder : public VideoDecoder, public AudioDecoder
 {
 public:
-       FFmpegDecoder (boost::shared_ptr<Film>, DecodeOptions, Job *);
+       FFmpegDecoder (boost::shared_ptr<Film>, DecodeOptions);
        ~FFmpegDecoder ();
 
        float frames_per_second () const;
@@ -102,26 +102,28 @@ public:
 
        bool seek (double);
        bool seek_to_last ();
+       void seek_forward ();
+       void seek_back ();
 
 private:
 
        bool pass ();
-       bool do_seek (double p, bool);
+       bool do_seek (double p, bool, 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 filter_and_emit_video ();
 
        void setup_general ();
        void setup_video ();
        void setup_audio ();
        void setup_subtitle ();
 
+       void decode_audio_packet ();
+
        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);
 
@@ -141,9 +143,6 @@ private:
 
        AVPacket _packet;
 
-       boost::optional<double> _first_video;
-       boost::optional<double> _first_audio;
-
        std::list<boost::shared_ptr<FilterGraph> > _filter_graphs;
        boost::mutex _filter_graphs_mutex;
 };