#pragma once #include #include #include "DeckLinkAPI_h.h" class OpenGLComposite; //////////////////////////////////////////// // Capture Delegate Class //////////////////////////////////////////// class CaptureDelegate : public IDeckLinkInputCallback { OpenGLComposite* m_pOwner; LONG mRefCount; public: CaptureDelegate(OpenGLComposite* pOwner); // IUnknown needs only a dummy implementation virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID* ppv); virtual ULONG STDMETHODCALLTYPE AddRef(); virtual ULONG STDMETHODCALLTYPE Release(); virtual HRESULT STDMETHODCALLTYPE VideoInputFrameArrived(IDeckLinkVideoInputFrame* videoFrame, IDeckLinkAudioInputPacket* audioPacket); virtual HRESULT STDMETHODCALLTYPE VideoInputFormatChanged(BMDVideoInputFormatChangedEvents notificationEvents, IDeckLinkDisplayMode* newDisplayMode, BMDDetectedVideoInputFormatFlags detectedSignalFlags); }; //////////////////////////////////////////// // Render Delegate Class //////////////////////////////////////////// class PlayoutDelegate : public IDeckLinkVideoOutputCallback { OpenGLComposite* m_pOwner; LONG mRefCount; public: PlayoutDelegate(OpenGLComposite* pOwner); // IUnknown needs only a dummy implementation virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID* ppv); virtual ULONG STDMETHODCALLTYPE AddRef(); virtual ULONG STDMETHODCALLTYPE Release(); virtual HRESULT STDMETHODCALLTYPE ScheduledFrameCompleted(IDeckLinkVideoFrame* completedFrame, BMDOutputFrameCompletionResult result); virtual HRESULT STDMETHODCALLTYPE ScheduledPlaybackHasStopped(); };