42 lines
924 B
C++
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;
|
|
};
|