]> git.sesse.net Git - nageru/blobdiff - nageru/mixer.h
When reconnecting an SRT input, try to use the same slot as last time.
[nageru] / nageru / mixer.h
index ff8a197bccdd61c6af9de3598f6239e6645553d5..235dd8da3fba1bf1b9c4325f89c7bf0a6c11b130 100644 (file)
@@ -510,11 +510,19 @@ private:
        // frame rate is integer, will always stay zero.
        unsigned fractional_samples = 0;
 
+       // Monotonic counter that lets us know which slot was last turned into
+       // a fake capture. Used for SRT re-plugging.
+       unsigned fake_capture_counter = 0;
+
        mutable std::mutex card_mutex;
        bool has_bmusb_thread = false;
        struct CaptureCard {
                std::unique_ptr<bmusb::CaptureInterface> capture;
                bool is_fake_capture;
+               // If is_fake_capture is true, contains a monotonic timer value for when
+               // it was last changed. Otherwise undefined. Used for SRT re-plugging.
+               int fake_capture_counter;
+               std::string last_srt_stream_id = "<default, matches nothing>";  // Used for SRT re-plugging.
                CardType type;
                std::unique_ptr<DeckLinkOutput> output;