Files
video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLDeckLinkBridge.h
Aiden 1b67777c4a
Some checks failed
CI / Native Windows Build And Tests (push) Has been cancelled
CI / React UI Build (push) Has been cancelled
CI / Windows Release Package (push) Has been cancelled
Extract frame transfer callbacks
2026-05-06 10:53:53 +10:00

42 lines
924 B
C++

#pragma once
#include "DeckLinkAPI_h.h"
#include <windows.h>
#include <functional>
class DeckLinkSession;
class OpenGLRenderer;
class RuntimeHost;
class OpenGLDeckLinkBridge
{
public:
using RenderEffectCallback = std::function<void()>;
using PaintCallback = std::function<void()>;
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;
};