]> git.sesse.net Git - nageru/blobdiff - mixer.h
Release Nageru 1.7.2.
[nageru] / mixer.h
diff --git a/mixer.h b/mixer.h
index 5a3e203dc9dc0dd5f02c6eb2c100364313521291..d1bf79519452113a49183e7539596f6c96600010 100644 (file)
--- a/mixer.h
+++ b/mixer.h
@@ -421,6 +421,8 @@ public:
                theme->set_theme_menu_callback(callback);
        }
 
+       void wait_for_next_frame();
+
 private:
        struct CaptureCard;
 
@@ -482,7 +484,10 @@ private:
        movit::YCbCrInput *display_input;
 
        int64_t pts_int = 0;  // In TIMEBASE units.
-       unsigned frame_num = 0;
+
+       mutable std::mutex frame_num_mutex;
+       std::condition_variable frame_num_updated;
+       unsigned frame_num = 0;  // Under <frame_num_mutex>.
 
        // Accumulated errors in number of 1/TIMEBASE audio samples. If OUTPUT_FREQUENCY divided by
        // frame rate is integer, will always stay zero.