X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=decklink_output.h;h=44eb86dea9860e6480c4552aeaf352a5990bf979;hb=9e47a2f661b9d292598ef0277e507458e3dad62f;hp=7c0a17fad2d483c88a5232113f1bc1601bbb3bfb;hpb=aa472f3f2fcf37701198deb330d3169636151060;p=nageru diff --git a/decklink_output.h b/decklink_output.h index 7c0a17f..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(); @@ -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 .