Improve FFmpeg sync, in theory.
[dcpomatic.git] / src / lib / ffmpeg_decoder.h
index a8eabb9725c533870d38887436f68ae793232716..8f0482aad8331dcd12685e1d4724e08469b20eb8 100644 (file)
@@ -38,6 +38,7 @@ extern "C" {
 #include "ffmpeg.h"
 
 class Film;
+class ffmpeg_pts_offset_test;
 
 /** @class FFmpegDecoder
  *  @brief A decoder using FFmpeg to decode content.
@@ -54,11 +55,14 @@ public:
        bool done () const;
 
 private:
+       friend class ::ffmpeg_pts_offset_test;
 
        /* No copy construction */
        FFmpegDecoder (FFmpegDecoder const &);
        FFmpegDecoder& operator= (FFmpegDecoder const &);
 
+       static double compute_pts_offset (double, double, float);
+
        void setup_subtitle ();
 
        AVSampleFormat audio_sample_format () const;
@@ -79,4 +83,6 @@ private:
 
        bool _decode_video;
        bool _decode_audio;
+
+       double _pts_offset;
 };