#pragma once #include "DeckLinkAPI_h.h" #include #include class DeckLinkSession; class OpenGLRenderer; class RuntimeHost; class OpenGLDeckLinkBridge { public: using RenderEffectCallback = std::function; using PaintCallback = std::function; OpenGLDeckLinkBridge( DeckLinkSession& deckLink, OpenGLRenderer& renderer, RuntimeHost& runtimeHost, CRITICAL_SECTION& mutex, HDC hdc, HGLRC hglrc, RenderEffectCallback renderEffect, PaintCallback paint); void VideoFrameArrived(IDeckLinkVideoInputFrame* inputFrame, bool hasNoInputSource); void PlayoutFrameCompleted(IDeckLinkVideoFrame* completedFrame, BMDOutputFrameCompletionResult completionResult); private: DeckLinkSession& mDeckLink; OpenGLRenderer& mRenderer; RuntimeHost& mRuntimeHost; CRITICAL_SECTION& mMutex; HDC mHdc; HGLRC mHglrc; RenderEffectCallback mRenderEffect; PaintCallback mPaint; };