X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=decklink_output.h;h=44eb86dea9860e6480c4552aeaf352a5990bf979;hb=fa54f2630c56a1df0046923d6a77b1bd58abf240;hp=5581c392860f67c89576e788ee59976b919d875a;hpb=ee7da87b4aa284b7babd59dc21db925f7c384ce7;p=nageru diff --git a/decklink_output.h b/decklink_output.h index 5581c39..44eb86d 100644 --- a/decklink_output.h +++ b/decklink_output.h @@ -19,6 +19,7 @@ #include "context.h" #include "print_latency.h" +#include "quittable_sleeper.h" #include "ref_counted_frame.h" #include "ref_counted_gl_sync.h" @@ -37,7 +38,7 @@ class DeckLinkOutput : public IDeckLinkVideoOutputCallback { public: DeckLinkOutput(movit::ResourcePool *resource_pool, QSurface *surface, unsigned width, unsigned height, unsigned card_index); - void set_device(IDeckLink *output); + bool set_device(IDeckLink *output); void start_output(uint32_t mode, int64_t base_pts); // Mode comes from get_available_video_modes(). void end_output(); @@ -102,7 +103,7 @@ private: movit::ResourcePool *resource_pool; // These members are persistently allocated, and reused when the frame object is. - GLuint uyvy_tex; // Owned by . + GLuint uyvy_tex; // Owned by . Can also hold v210 data. GLuint pbo; uint8_t *uyvy_ptr; // Persistent mapping into the PBO. @@ -127,7 +128,7 @@ private: std::map video_modes; std::thread present_thread; - std::atomic should_quit{false}; + QuittableSleeper should_quit; std::mutex frame_queue_mutex; std::queue> pending_video_frames; // Under .