Fix another bit of incorrect logic (this_is_first_audio was inverted). Also try...
[dcpomatic.git] / src / lib / matcher.h
index 41aa373a412cd51808dc5d7967e3c04640cc7a80..aab6adad96c7a863efd45dc2afd63f8beb42182d 100644 (file)
@@ -25,6 +25,9 @@ class Matcher : public Processor, public TimedAudioSink, public TimedVideoSink,
 {
 public:
        Matcher (boost::shared_ptr<Log> log, int sample_rate, float frames_per_second);
+
+       void set_audio_starts_with_video (bool);
+       
        void process_video (boost::shared_ptr<const Image> i, bool, boost::shared_ptr<Subtitle> s, double);
        void process_audio (boost::shared_ptr<const AudioBuffers>, double);
        void process_end ();
@@ -55,9 +58,12 @@ private:
        std::list<AudioRecord> _pending_audio;
 
        boost::optional<double> _first_input;
+       boost::optional<double> _first_video;
        boost::shared_ptr<const Image> _last_image;
        boost::shared_ptr<Subtitle> _last_subtitle;
 
        bool _had_first_video;
        bool _had_first_audio;
+
+       bool _audio_starts_with_video;
 };