Merge master.
[dcpomatic.git] / src / lib / matcher.h
index b1680e13106301380a62412d926e56d6cdbfdef1..4ec0a3e96710bbc99ddda2330081ee23f3c5558a 100644 (file)
@@ -30,6 +30,10 @@ public:
        void process_end ();
 
 private:
+       void fix_start (double);
+       void match (double);
+       void repeat_last_video ();
+       
        int _sample_rate;
        float _frames_per_second;
        int _video_frames;
@@ -37,4 +41,23 @@ private:
        boost::optional<AVPixelFormat> _pixel_format;
        boost::optional<libdcp::Size> _size;
        boost::optional<int> _channels;
+
+       struct AudioRecord {
+               AudioRecord (boost::shared_ptr<AudioBuffers> a, double t)
+                       : audio (a)
+                       , time (t)
+               {}
+               
+               boost::shared_ptr<AudioBuffers> audio;
+               double time;
+       };
+
+       std::list<AudioRecord> _pending_audio;
+
+       boost::optional<double> _first_input;
+       boost::shared_ptr<Image> _last_image;
+       boost::shared_ptr<Subtitle> _last_subtitle;
+
+       bool _had_first_video;
+       bool _had_first_audio;
 };