4 #include "include/DeckLinkAPI.h"
10 class CDeckLinkGLWidget;
11 class PlaybackDelegate;
13 class DeckLinkCaptureDelegate : public QObject, public IDeckLinkInputCallback
17 DeckLinkCaptureDelegate();
18 virtual ~DeckLinkCaptureDelegate();
20 virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID /*iid*/, LPVOID */*ppv*/) { return E_NOINTERFACE; }
21 virtual ULONG STDMETHODCALLTYPE AddRef(void);
22 virtual ULONG STDMETHODCALLTYPE Release(void);
23 virtual HRESULT STDMETHODCALLTYPE VideoInputFormatChanged(BMDVideoInputFormatChangedEvents, IDeckLinkDisplayMode*, BMDDetectedVideoInputFormatFlags);
24 virtual HRESULT STDMETHODCALLTYPE VideoInputFrameArrived(IDeckLinkVideoInputFrame*, IDeckLinkAudioInputPacket*);
28 pthread_mutex_t m_mutex;
30 void gotTimeCode(ulong);
31 void gotMessage(const QString &);
34 class CaptureHandler : public QObject
38 CaptureHandler(QVBoxLayout *lay, QWidget *parent = 0);
40 CDeckLinkGLWidget *previewView;
41 void startPreview(int deviceId, int captureMode);
43 void startCapture(const QString &path);
45 void captureFrame(const QString &fname);
46 void showOverlay(QImage img, bool transparent = true);
48 void hidePreview(bool hide);
51 IDeckLinkIterator *deckLinkIterator;
52 DeckLinkCaptureDelegate *delegate;
53 IDeckLinkDisplayMode *displayMode;
55 IDeckLinkInput *deckLinkInput;
56 IDeckLinkDisplayModeIterator *displayModeIterator;
57 QVBoxLayout *m_layout;
61 void gotTimeCode(ulong);
62 void gotMessage(const QString &);