]> git.sesse.net Git - nageru/blobdiff - player.h
Move QueuedFrame instead of copying it around.
[nageru] / player.h
index 63d4871c8c653ebdbe02bb1ef10259d93ea46b01..f5adcf7a505dfed1636466bb06cf689c788bba5a 100644 (file)
--- a/player.h
+++ b/player.h
@@ -64,6 +64,11 @@ private:
        int override_stream_idx = -1;  // Under queue_state_mu.
 
        std::unique_ptr<VideoStream> video_stream;  // Can be nullptr.
+
+       // under queue_state_mu. Part of this instead of VideoStream so that we own
+       // its lock and can sleep on it.
+       size_t num_queued_frames = 0;
+       static constexpr size_t max_queued_frames = 10;
 };
 
 #endif  // !defined(_PLAYER_H)