]> git.sesse.net Git - nageru/blobdiff - nageru/ffmpeg_capture.h
Log a warning when we kill a client that is not keeping up.
[nageru] / nageru / ffmpeg_capture.h
index a9a837115977348265115bb77ca0b59a935eecc9..843c83c254d4b9b5ac8cf46532c236cc269298c7 100644 (file)
@@ -33,6 +33,7 @@
 #include <string>
 #include <thread>
 
+#include <movit/effect.h>
 #include <movit/ycbcr.h>
 
 extern "C" {
@@ -181,6 +182,12 @@ public:
                return has_last_subtitle;
        }
 
+       // Same.
+       movit::RGBTriplet get_last_neutral_color() const
+       {
+               return last_neutral_color;
+       }
+
        void set_dequeue_thread_callbacks(std::function<void()> init, std::function<void()> cleanup) override
        {
                dequeue_init_callback = init;
@@ -254,6 +261,7 @@ private:
        bool running = false;
        int card_index = -1;
        double rate = 1.0;
+       bool play_as_fast_as_possible = false;  // Activated iff rate >= 10.0.
        std::atomic<bool> should_interrupt{false};
        bool last_frame_was_connected = true;
 
@@ -296,6 +304,8 @@ private:
        // Subtitles (no decoding done, really).
        bool has_last_subtitle = false;
        std::string last_subtitle;
+
+       movit::RGBTriplet last_neutral_color{1.0f, 1.0f, 1.0f};
 };
 
 #endif  // !defined(_FFMPEG_CAPTURE_H)