X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=decklink_output.h;h=5581c392860f67c89576e788ee59976b919d875a;hb=ee7da87b4aa284b7babd59dc21db925f7c384ce7;hp=d5e743aa2e801cc91d1156f082c2fe15e34a17ef;hpb=336009fd7baf47b4ad71adf8d7ead8a526045788;p=nageru diff --git a/decklink_output.h b/decklink_output.h index d5e743a..5581c39 100644 --- a/decklink_output.h +++ b/decklink_output.h @@ -2,6 +2,7 @@ #define _DECKLINK_OUTPUT_H 1 #include +#include #include #include #include @@ -40,7 +41,7 @@ public: void start_output(uint32_t mode, int64_t base_pts); // Mode comes from get_available_video_modes(). void end_output(); - void send_frame(GLuint y_tex, GLuint cbcr_tex, const std::vector &input_frames, int64_t pts, int64_t duration); + void send_frame(GLuint y_tex, GLuint cbcr_tex, movit::YCbCrLumaCoefficients ycbcr_coefficients, const std::vector &input_frames, int64_t pts, int64_t duration); void send_audio(int64_t pts, const std::vector &samples); // NOTE: The returned timestamp is undefined for preroll. @@ -59,6 +60,9 @@ public: // If the given mode is supported, return it. If not, pick some “best” valid mode. uint32_t pick_video_mode(uint32_t mode) const; + // Desired Y'CbCr coefficients for the current mode. Undefined before start_output(). + movit::YCbCrLumaCoefficients preferred_ycbcr_coefficients() const; + // IUnknown. HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID *ppv) override; ULONG STDMETHODCALLTYPE AddRef() override; @@ -132,6 +136,8 @@ private: std::condition_variable frame_queues_changed; bool playback_initiated = false, playback_started = false; int64_t base_pts, frame_duration; + BMDDisplayModeFlags current_mode_flags = 0; + bool last_frame_had_mode_mismatch = false; movit::ResourcePool *resource_pool; IDeckLinkOutput *output = nullptr;