]> git.sesse.net Git - nageru/blobdiff - decklink_capture.h
Add a menu option where the user can change the input resolution.
[nageru] / decklink_capture.h
index c591cdc9867424fb84e58271f26afa4402e18679..322adb5b0d6c62352f0397c4a357c7c66fc837ec 100644 (file)
@@ -71,15 +71,22 @@ public:
                return description;
        }
 
-       void configure_card() override {}
+       void configure_card() override;
        void start_bm_capture() override;
        void stop_dequeue_thread() override;
 
+       std::map<uint32_t, VideoMode> get_available_video_modes() const override { return video_modes; }
+       void set_video_mode(uint32_t video_mode_id) override;
+       uint32_t get_current_video_mode() const override { return current_video_mode; }
+
 private:
+       void set_video_mode_no_restart(uint32_t video_mode_id);
+
        std::atomic<int> refcount{1};
        bool done_init = false;
        std::string description;
        uint16_t timecode = 0;
+       int card_index;
 
        bool has_dequeue_callbacks = false;
        std::function<void()> dequeue_init_callback = nullptr;
@@ -92,6 +99,9 @@ private:
        IDeckLinkInput *input = nullptr;
        BMDTimeValue frame_duration;
        BMDTimeScale time_scale;
+
+       std::map<uint32_t, VideoMode> video_modes;
+       BMDDisplayMode current_video_mode;
 };
 
 #endif  // !defined(_DECKLINK_CAPTURE_H)