├── .gitattributes ├── .gitignore ├── ActionHandler.cpp ├── ActionHandler.h ├── AncillaryDataTable.cpp ├── AncillaryDataTable.h ├── COPYING.txt ├── CudaPlugin ├── CudaPlugin.pro ├── Makefile ├── cudaplugin.json ├── exampleapp.pro ├── exampleapp │ └── main.cpp ├── mk.sh └── src │ ├── Cuda.cpp │ ├── Cuda.h │ ├── CudaInterface.cpp │ ├── CudaInterface.h │ ├── CudaPlugin.cpp │ ├── CudaPlugin.h │ ├── cudalib.cu.cpp │ └── cudalib.cu.o ├── DeckLinkAPI.cpp ├── DeckLinkAPI.h ├── DeckLinkCapture.cpp ├── DeckLinkCapture.h ├── DeckLinkCapture.pro ├── DeckLinkDeviceDiscovery.cpp ├── DeckLinkDeviceDiscovery.h ├── DeckLinkInputDevice.cpp ├── DeckLinkInputDevice.h ├── Deinterlace.cpp ├── Deinterlace.h ├── FFmpegVideoEncoder.cpp ├── FFmpegVideoEncoder.h ├── FrameProcessThread.cpp ├── FrameProcessThread.h ├── FrameRateCounter.cpp ├── FrameRateCounter.h ├── GlobalData.cpp ├── GlobalData.h ├── Image.cpp ├── Image.h ├── ImageUtil.cpp ├── ImageUtil.h ├── ImageWidget.cpp ├── ImageWidget.h ├── MainWindow.cpp ├── MainWindow.h ├── MainWindow.ui ├── Makefile ├── MyDeckLinkAPI.cpp ├── MyDeckLinkAPI.h ├── MySettings.cpp ├── MySettings.h ├── ProfileCallback.cpp ├── ProfileCallback.h ├── README.md ├── Rational.cpp ├── Rational.h ├── RecordingDialog.cpp ├── RecordingDialog.h ├── RecordingDialog.ui ├── StatusLabel.cpp ├── StatusLabel.h ├── TestForm.cpp ├── TestForm.h ├── TestForm.ui ├── UIWidget.cpp ├── UIWidget.h ├── UIWidget.ui ├── VideoEncoderOption.h ├── VideoFrameData.cpp ├── VideoFrameData.h ├── common.h ├── docs └── screenshot.jpg ├── includeffmpeg.h ├── joinpath.cpp ├── joinpath.h ├── main.cpp ├── main.h ├── resources.qrc └── sdk ├── Linux └── include │ ├── DeckLinkAPI.h │ ├── DeckLinkAPIConfiguration.h │ ├── DeckLinkAPIConfiguration_v10_11.h │ ├── DeckLinkAPIConfiguration_v10_2.h │ ├── DeckLinkAPIConfiguration_v10_4.h │ ├── DeckLinkAPIConfiguration_v10_5.h │ ├── DeckLinkAPIConfiguration_v10_9.h │ ├── DeckLinkAPIDeckControl.h │ ├── DeckLinkAPIDiscovery.h │ ├── DeckLinkAPIDispatch.cpp │ ├── DeckLinkAPIDispatch_v10_11.cpp │ ├── DeckLinkAPIDispatch_v10_8.cpp │ ├── DeckLinkAPIDispatch_v7_6.cpp │ ├── DeckLinkAPIDispatch_v8_0.cpp │ ├── DeckLinkAPIModes.h │ ├── DeckLinkAPITypes.h │ ├── DeckLinkAPIVersion.h │ ├── DeckLinkAPIVideoEncoderInput_v10_11.h │ ├── DeckLinkAPIVideoInput_v10_11.h │ ├── DeckLinkAPIVideoInput_v11_4.h │ ├── DeckLinkAPIVideoOutput_v10_11.h │ ├── DeckLinkAPIVideoOutput_v11_4.h │ ├── DeckLinkAPI_v10_11.h │ ├── DeckLinkAPI_v10_2.h │ ├── DeckLinkAPI_v10_4.h │ ├── DeckLinkAPI_v10_5.h │ ├── DeckLinkAPI_v10_6.h │ ├── DeckLinkAPI_v10_9.h │ ├── DeckLinkAPI_v11_5.h │ ├── DeckLinkAPI_v7_1.h │ ├── DeckLinkAPI_v7_3.h │ ├── DeckLinkAPI_v7_6.h │ ├── DeckLinkAPI_v7_9.h │ ├── DeckLinkAPI_v8_0.h │ ├── DeckLinkAPI_v8_1.h │ ├── DeckLinkAPI_v9_2.h │ ├── DeckLinkAPI_v9_9.h │ └── LinuxCOM.h ├── Mac └── include │ ├── DeckLinkAPI.h │ ├── DeckLinkAPIConfiguration.h │ ├── DeckLinkAPIConfiguration_v10_11.h │ ├── DeckLinkAPIConfiguration_v10_2.h │ ├── DeckLinkAPIConfiguration_v10_4.h │ ├── DeckLinkAPIConfiguration_v10_5.h │ ├── DeckLinkAPIConfiguration_v10_9.h │ ├── DeckLinkAPIDeckControl.h │ ├── DeckLinkAPIDiscovery.h │ ├── DeckLinkAPIDispatch.cpp │ ├── DeckLinkAPIDispatch_v10_11.cpp │ ├── DeckLinkAPIDispatch_v10_8.cpp │ ├── DeckLinkAPIDispatch_v7_6.cpp │ ├── DeckLinkAPIDispatch_v8_0.cpp │ ├── DeckLinkAPIModes.h │ ├── DeckLinkAPIStreaming.h │ ├── DeckLinkAPIStreaming_v10_11.h │ ├── DeckLinkAPITypes.h │ ├── DeckLinkAPIVersion.h │ ├── DeckLinkAPIVideoEncoderInput_v10_11.h │ ├── DeckLinkAPIVideoInput_v10_11.h │ ├── DeckLinkAPIVideoInput_v11_4.h │ ├── DeckLinkAPIVideoOutput_v10_11.h │ ├── DeckLinkAPIVideoOutput_v11_4.h │ ├── DeckLinkAPI_v10_11.h │ ├── DeckLinkAPI_v10_2.h │ ├── DeckLinkAPI_v10_4.h │ ├── DeckLinkAPI_v10_5.h │ ├── DeckLinkAPI_v10_6.h │ ├── DeckLinkAPI_v10_9.h │ ├── DeckLinkAPI_v11_5.h │ ├── DeckLinkAPI_v7_1.h │ ├── DeckLinkAPI_v7_3.h │ ├── DeckLinkAPI_v7_6.h │ ├── DeckLinkAPI_v7_9.h │ ├── DeckLinkAPI_v8_0.h │ ├── DeckLinkAPI_v8_1.h │ ├── DeckLinkAPI_v9_2.h │ └── DeckLinkAPI_v9_9.h └── Win ├── DeckLinkAPI_h.h ├── DeckLinkAPI_i.c └── include ├── DeckLinkAPI.idl ├── DeckLinkAPIConfiguration.idl ├── DeckLinkAPIDeckControl.idl ├── DeckLinkAPIDiscovery.idl ├── DeckLinkAPIModes.idl ├── DeckLinkAPIStreaming.idl ├── DeckLinkAPIStreaming_v10_8.idl ├── DeckLinkAPITypes.idl ├── DeckLinkAPIVersion.h ├── DeckLinkAPI_v10_11.idl ├── DeckLinkAPI_v10_2.idl ├── DeckLinkAPI_v10_4.idl ├── DeckLinkAPI_v10_5.idl ├── DeckLinkAPI_v10_6.idl ├── DeckLinkAPI_v10_8.idl ├── DeckLinkAPI_v10_9.idl ├── DeckLinkAPI_v11_4.idl ├── DeckLinkAPI_v11_5.idl ├── DeckLinkAPI_v7_1.idl ├── DeckLinkAPI_v7_3.idl ├── DeckLinkAPI_v7_6.idl ├── DeckLinkAPI_v7_9.idl ├── DeckLinkAPI_v8_0.idl ├── DeckLinkAPI_v8_1.idl ├── DeckLinkAPI_v9_2.idl └── DeckLinkAPI_v9_9.idl /.gitattributes: -------------------------------------------------------------------------------- 1 | sdk/* linguist-vendored -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.user 2 | _*/ 3 | CudaPlugin/_build1/ 4 | CudaPlugin/_build2/ 5 | -------------------------------------------------------------------------------- /ActionHandler.cpp: -------------------------------------------------------------------------------- 1 | #include "ActionHandler.h" 2 | #include "MainWindow.h" 3 | #include 4 | 5 | ActionHandler::ActionHandler(QObject *parent, QAction *action, const QString &name, const std::function fn) 6 | : QObject(parent) 7 | , name_(name) 8 | , callback_fn(fn) 9 | { 10 | connect(action, &QAction::triggered, this, &ActionHandler::triggered); 11 | } 12 | 13 | void ActionHandler::triggered(bool checked) 14 | { 15 | callback_fn(name_); 16 | } 17 | -------------------------------------------------------------------------------- /ActionHandler.h: -------------------------------------------------------------------------------- 1 | #ifndef ACTIONHANDLER_H 2 | #define ACTIONHANDLER_H 3 | 4 | #include 5 | #include 6 | 7 | class MainWindow; 8 | class QAction; 9 | 10 | class ActionHandler : public QObject { 11 | Q_OBJECT 12 | private: 13 | QString name_; 14 | std::function callback_fn; 15 | public: 16 | explicit ActionHandler(QObject *parent, QAction *action, QString const &name, std::function fn); 17 | public slots: 18 | void triggered(bool checked); 19 | }; 20 | 21 | #endif // ACTIONHANDLER_H 22 | -------------------------------------------------------------------------------- /COPYING.txt: -------------------------------------------------------------------------------- 1 | 2 | DeckLinkCapture - Blackmagic Design DeckLink Recorder Video Capture Program 3 | This project was developed based on the DeckLink SDK example program. 4 | Original: Copyright (C) 2018 Blackmagic Design 5 | Modified: Copyright (C) 2019 Shinichi Fuchita (@soramimi_jp) 6 | 7 | 8 | The following files are distributed under the MIT license. 9 | 10 | - Deinterlace.h 11 | - Deinterlace.cpp 12 | 13 | 14 | Other files inherit the DeckLink SDK license. 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /CudaPlugin/CudaPlugin.pro: -------------------------------------------------------------------------------- 1 | 2 | QT = core 3 | 4 | TARGET = cudaplugin 5 | #CONFIG(release,debug|release):TARGET = cudaplugin 6 | #CONFIG(debug,debug|release):TARGET = cudaplugind 7 | TEMPLATE = lib 8 | CONFIG += plugin 9 | 10 | DESTDIR = $$PWD/_bin 11 | 12 | unix:LIBS += -ldl 13 | win32:LIBS += -lole32 -loleaut32 14 | 15 | LIBS += -L/opt/cuda/targets/x86_64-linux/lib -lcudart 16 | 17 | pre.target = pre 18 | pre.commands = cd $$PWD && make build 19 | QMAKE_EXTRA_TARGETS += pre 20 | PRE_TARGETDEPS += pre 21 | 22 | HEADERS += \ 23 | src/Cuda.h \ 24 | src/CudaInterface.h \ 25 | src/CudaPlugin.h 26 | SOURCES += \ 27 | src/Cuda.cpp \ 28 | src/CudaInterface.cpp \ 29 | src/CudaPlugin.cpp 30 | 31 | LIBS += \ 32 | $$PWD/_build1/cudalib.cu.o 33 | 34 | DISTFILES += \ 35 | src/cudalib.cu.cpp \ 36 | cudaplugin.json 37 | -------------------------------------------------------------------------------- /CudaPlugin/Makefile: -------------------------------------------------------------------------------- 1 | 2 | NVCC = nvcc -c -O2 -Xcompiler -fPIC -x cu 3 | 4 | main: 5 | -mkdir _build1 6 | cd _build1 && qmake ../CudaPlugin.pro && make -j4 7 | 8 | build: prepare _build1/cudalib.cu.o 9 | 10 | prepare: 11 | -mkdir _build1 12 | 13 | _build1/cudalib.cu.o: src/cudalib.cu.cpp 14 | ${NVCC} $^ -o $@ 15 | 16 | clean: 17 | -rm -fr _bin 2>/dev/null 18 | -rm -fr _build1 2>/dev/null 19 | -rm -fr _build2 2>/dev/null 20 | -------------------------------------------------------------------------------- /CudaPlugin/cudaplugin.json: -------------------------------------------------------------------------------- 1 | { 2 | } 3 | 4 | -------------------------------------------------------------------------------- /CudaPlugin/exampleapp.pro: -------------------------------------------------------------------------------- 1 | QT += core 2 | TEMPLATE = app 3 | TARGET = exampleapp 4 | 5 | DESTDIR = $$PWD/_bin 6 | 7 | SOURCES += exampleapp/main.cpp 8 | -------------------------------------------------------------------------------- /CudaPlugin/exampleapp/main.cpp: -------------------------------------------------------------------------------- 1 | #include "../src/Cuda.h" 2 | #include "../src/CudaInterface.h" 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | 9 | int main(int argc, char **argv) 10 | { 11 | QCoreApplication a(argc, argv); 12 | 13 | QPluginLoader loader("cudaplugin"); 14 | CudaInterface *plugin = dynamic_cast(loader.instance()); 15 | if (plugin) { 16 | auto p = std::shared_ptr(plugin->create()); 17 | QString s = p->func("Hello,", " world"); 18 | qDebug() << s; 19 | } else { 20 | qDebug() << "failed to load the plugin"; 21 | } 22 | 23 | return 0; 24 | } 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /CudaPlugin/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm _build1 -fr 4 | rm _build2 -fr 5 | mkdir _build1 2>/dev/null 6 | mkdir _build2 2>/dev/null 7 | 8 | # make plugin module 9 | 10 | cd _build1 11 | QT_SELECT=5 qmake ../CudaPlugin.pro 12 | make -j4 13 | cd .. 14 | 15 | # make example application 16 | 17 | cd _build2 18 | QT_SELECT=5 qmake ../exampleapp.pro 19 | make 20 | cd .. 21 | -------------------------------------------------------------------------------- /CudaPlugin/src/Cuda.cpp: -------------------------------------------------------------------------------- 1 | #include "Cuda.h" 2 | 3 | Cuda::Cuda() 4 | { 5 | } 6 | 7 | Cuda::~Cuda() 8 | { 9 | } 10 | 11 | extern bool cuda_init(); 12 | extern void cuda_convert_uyvy_to_rgb(int w, int h, const uint8_t *s, uint8_t *d); 13 | extern void cuda_convert_yuyv_to_rgb(int w, int h, const uint8_t *s, uint8_t *d); 14 | extern void cuda_convert_uyvy_to_gray(int w, int h, const uint8_t *s, uint8_t *d); 15 | extern void cuda_convert_yuyv_to_gray(int w, int h, const uint8_t *s, uint8_t *d); 16 | 17 | bool Cuda::init() 18 | { 19 | return cuda_init(); 20 | } 21 | 22 | void Cuda::convert_uyvy_to_rgb(int w, int h, const uint8_t *src, uint8_t *dst) 23 | { 24 | cuda_convert_uyvy_to_rgb(w, h, src, dst); 25 | } 26 | 27 | void Cuda::convert_yuyv_to_rgb(int w, int h, const uint8_t *src, uint8_t *dst) 28 | { 29 | cuda_convert_yuyv_to_rgb(w, h, src, dst); 30 | } 31 | 32 | void Cuda::convert_uyvy_to_gray(int w, int h, const uint8_t *src, uint8_t *dst) 33 | { 34 | cuda_convert_uyvy_to_gray(w, h, src, dst); 35 | } 36 | 37 | void Cuda::convert_yuyv_to_gray(int w, int h, const uint8_t *src, uint8_t *dst) 38 | { 39 | cuda_convert_yuyv_to_gray(w, h, src, dst); 40 | } 41 | 42 | -------------------------------------------------------------------------------- /CudaPlugin/src/Cuda.h: -------------------------------------------------------------------------------- 1 | #ifndef CUDA_H 2 | #define CUDA_H 3 | 4 | #include 5 | #include 6 | 7 | class Cuda : public QObject { 8 | Q_OBJECT 9 | public: 10 | Cuda(); 11 | ~Cuda(); 12 | 13 | virtual bool init(); 14 | 15 | virtual void convert_uyvy_to_rgb(int w, int h, uint8_t const *src, uint8_t *dst); 16 | virtual void convert_yuyv_to_rgb(int w, int h, uint8_t const *src, uint8_t *dst); 17 | virtual void convert_uyvy_to_gray(int w, int h, uint8_t const *src, uint8_t *dst); 18 | virtual void convert_yuyv_to_gray(int w, int h, uint8_t const *src, uint8_t *dst); 19 | 20 | 21 | }; 22 | 23 | #endif // CUDA_H 24 | -------------------------------------------------------------------------------- /CudaPlugin/src/CudaInterface.cpp: -------------------------------------------------------------------------------- 1 | #include "CudaInterface.h" 2 | 3 | CudaInterface::CudaInterface() 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /CudaPlugin/src/CudaInterface.h: -------------------------------------------------------------------------------- 1 | #ifndef CUDAINTERFACE_H 2 | #define CUDAINTERFACE_H 3 | 4 | #include 5 | #include "Cuda.h" 6 | 7 | class CudaInterface { 8 | public: 9 | CudaInterface(); 10 | virtual ~CudaInterface() {} 11 | virtual Cuda *create() = 0; 12 | }; 13 | 14 | Q_DECLARE_INTERFACE(CudaInterface, "mynamespace.CudaPlugin/1.0") 15 | 16 | #endif // CUDAINTERFACE_H 17 | -------------------------------------------------------------------------------- /CudaPlugin/src/CudaPlugin.cpp: -------------------------------------------------------------------------------- 1 | #include "CudaPlugin.h" 2 | 3 | -------------------------------------------------------------------------------- /CudaPlugin/src/CudaPlugin.h: -------------------------------------------------------------------------------- 1 | #ifndef CUDAPLUGIN_H 2 | #define CUDAPLUGIN_H 3 | 4 | #include 5 | #include "CudaInterface.h" 6 | 7 | class CudaPlugin : public QObject, public CudaInterface { 8 | Q_OBJECT 9 | Q_PLUGIN_METADATA(IID "mynamespace.CudaPlugin" FILE "cudaplugin.json") 10 | Q_INTERFACES(CudaInterface) 11 | public: 12 | Cuda *create() override 13 | { 14 | return new Cuda(); 15 | } 16 | }; 17 | 18 | #endif // CUDAPLUGIN_H 19 | -------------------------------------------------------------------------------- /CudaPlugin/src/cudalib.cu.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soramimi/DeckLinkCapture/519c7ba5e8af0592d832eb274ebd21444db861f7/CudaPlugin/src/cudalib.cu.o -------------------------------------------------------------------------------- /DeckLinkAPI.cpp: -------------------------------------------------------------------------------- 1 | #include "DeckLinkAPI.h" 2 | 3 | HRESULT GetDeckLinkIterator(IDeckLinkIterator **deckLinkIterator) 4 | { 5 | HRESULT result = S_OK; 6 | 7 | // Create an IDeckLinkIterator object to enumerate all DeckLink cards in the system 8 | #ifdef Q_OS_WIN 9 | if (CoCreateInstance(CLSID_CDeckLinkIterator, nullptr, CLSCTX_ALL, IID_IDeckLinkIterator, (void **)deckLinkIterator) != S_OK) { 10 | *deckLinkIterator = nullptr; 11 | result = E_FAIL; 12 | } 13 | #else 14 | *deckLinkIterator = CreateDeckLinkIteratorInstance(); 15 | if (!*deckLinkIterator) { 16 | fprintf(stderr, "A DeckLink iterator could not be created. The DeckLink drivers may not be installed.\n"); 17 | result = E_FAIL; 18 | } 19 | #endif 20 | 21 | return result; 22 | } 23 | 24 | // DLString 25 | 26 | DLString::~DLString() 27 | { 28 | clear(); 29 | } 30 | 31 | void DLString::clear() 32 | { 33 | if (str) { 34 | #ifdef Q_OS_WIN 35 | SysFreeString(str); 36 | #endif 37 | #ifdef Q_OS_MAC 38 | CFRelease(str); 39 | #endif 40 | #ifdef Q_OS_LINUX 41 | free((void *)str); 42 | #endif 43 | str = nullptr; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /DeckLinkAPI.h: -------------------------------------------------------------------------------- 1 | #ifndef DECKLINKAPI_H 2 | #define DECKLINKAPI_H 3 | 4 | #include 5 | #include 6 | 7 | #if defined(Q_OS_WIN) 8 | #include "sdk/Win/DeckLinkAPI_h.h" 9 | typedef IID CFUUIDBytes; 10 | 11 | class DLString { 12 | private: 13 | BSTR str = nullptr; 14 | public: 15 | ~DLString(); 16 | void clear(); 17 | BSTR *operator & () 18 | { 19 | return &str; 20 | } 21 | operator QString () 22 | { 23 | return str ? QString::fromUtf16((ushort const *)str) : QString(); 24 | } 25 | operator std::string () 26 | { 27 | return operator QString ().toStdString(); 28 | } 29 | bool empty() const 30 | { 31 | return !(str && *str); 32 | } 33 | }; 34 | 35 | #elif defined(Q_OS_MAC) 36 | #include "sdk/Mac/include/DeckLinkAPI.h" 37 | 38 | typedef bool BOOL; 39 | 40 | class DLString { 41 | private: 42 | CFStringRef str = nullptr; 43 | public: 44 | ~DLString(); 45 | void clear(); 46 | CFStringRef *operator & () 47 | { 48 | return &str; 49 | } 50 | operator QString () const 51 | { 52 | if (!str) return QString(); 53 | CFIndex length = CFStringGetLength(str); 54 | if (length == 0) return QString(); 55 | QString string(length, Qt::Uninitialized); 56 | CFStringGetCharacters(str, CFRangeMake(0, length), reinterpret_cast(const_cast(string.unicode()))); 57 | return string; 58 | } 59 | operator std::string () const 60 | { 61 | return operator QString ().toStdString(); 62 | } 63 | bool empty() const 64 | { 65 | return !(str && CFStringGetLength(str) > 0); 66 | } 67 | }; 68 | 69 | #elif defined(Q_OS_LINUX) 70 | #include "sdk/Linux/include/DeckLinkAPI.h" 71 | typedef bool BOOL; 72 | 73 | class DLString { 74 | private: 75 | char const *str = nullptr; 76 | public: 77 | ~DLString(); 78 | void clear(); 79 | char const **operator & () 80 | { 81 | return &str; 82 | } 83 | operator QString () const 84 | { 85 | return str ? QString::fromUtf8(str) : QString(); 86 | } 87 | operator std::string () const 88 | { 89 | return str ? std::string(str) : std::string(); 90 | } 91 | bool empty() const 92 | { 93 | return !(str && *str); 94 | } 95 | }; 96 | 97 | #endif 98 | 99 | HRESULT GetDeckLinkIterator(IDeckLinkIterator **deckLinkIterator); 100 | 101 | #endif // DECKLINKAPI_H 102 | -------------------------------------------------------------------------------- /DeckLinkCapture.h: -------------------------------------------------------------------------------- 1 | #ifndef DECKLINKCAPTURE_H 2 | #define DECKLINKCAPTURE_H 3 | 4 | #include "DeckLinkInputDevice.h" 5 | #include "Image.h" 6 | #include "VideoFrameData.h" 7 | #include "Rational.h" 8 | 9 | class Image; 10 | class DeckLinkInputDevice; 11 | 12 | class DeviceEvent : public QEvent { 13 | public: 14 | enum Operation { 15 | Add, 16 | Remove, 17 | } op; 18 | IDeckLink *decklink; 19 | DeviceEvent(Operation op, IDeckLink *decklink) 20 | : QEvent(QEvent::User) 21 | , op(op) 22 | , decklink(decklink) 23 | { 24 | 25 | } 26 | ~DeviceEvent() override = default; 27 | }; 28 | 29 | class DeckLinkCaptureDelegate { 30 | public: 31 | virtual void addDevice(IDeckLink *decklink) = 0; 32 | virtual void removeDevice(IDeckLink *decklink) = 0; 33 | virtual void updateProfile(IDeckLinkProfile *newProfile) = 0; 34 | virtual void changeDisplayMode(BMDDisplayMode dispmode, Rational const &fps) = 0; 35 | // virtual void videoFrameArrived(AncillaryDataStruct const *ancillary_data, HDRMetadataStruct const *hdr_metadata, bool signal_valid) = 0; 36 | virtual void haltStreams() = 0; 37 | virtual void criticalError(QString const &title, QString const &message) = 0; 38 | }; 39 | 40 | class DeckLinkCapture : public QObject { 41 | Q_OBJECT 42 | friend class DeckLinkInputDevice; 43 | friend class ProfileCallback; 44 | private: 45 | struct Private; 46 | Private *m; 47 | 48 | static Image createImage(int w, int h, BMDPixelFormat pixel_format, uint8_t const *data, int size); 49 | 50 | DeckLinkCaptureDelegate *delegate(); 51 | 52 | void addDevice(IDeckLink *decklink); 53 | void removeDevice(IDeckLink* decklink); 54 | void updateProfile(IDeckLinkProfile *newProfile); 55 | void changeDisplayMode(BMDDisplayMode dispmode, Rational const &fps); 56 | // void videoFrameArrived(AncillaryDataStruct const *ancillary_data, HDRMetadataStruct const *hdr_metadata, bool signal_valid); 57 | void haltStreams(); 58 | void criticalError(QString const &title, QString const &message); 59 | void clearCriticalError(); 60 | 61 | // BMDPixelFormat pixelFormat() const; 62 | void setPixelFormat(BMDPixelFormat pixel_format); 63 | protected: 64 | void customEvent(QEvent *event) override; 65 | 66 | public: 67 | DeckLinkCapture(DeckLinkCaptureDelegate *delegate); 68 | ~DeckLinkCapture() override; 69 | bool startCapture(DeckLinkInputDevice *selectedDevice_, BMDDisplayMode displayMode, BMDFieldDominance fieldDominance, bool applyDetectedInputMode, bool input_audio); 70 | signals: 71 | void newFrame(VideoFrameData const &frame); 72 | }; 73 | 74 | #endif // DECKLINKCAPTURE_H 75 | -------------------------------------------------------------------------------- /DeckLinkCapture.pro: -------------------------------------------------------------------------------- 1 | 2 | TARGET = DeckLinkCapture 3 | TEMPLATE = app 4 | QT += core gui widgets opengl multimedia 5 | CONFIG += c++17 6 | 7 | DESTDIR = $$PWD/_bin 8 | 9 | win32:INCLUDEPATH += C:\opencv\build\include 10 | 11 | linux:QMAKE_CXXFLAGS += -fopenmp 12 | linux:QMAKE_LFLAGS += -fopenmp 13 | 14 | linux:LIBS += -ldl 15 | win32:LIBS += -lole32 -loleaut32 16 | macx:LIBS += -framework CoreFoundation 17 | 18 | gcc:QMAKE_CXXFLAGS += -Wno-switch 19 | 20 | pre.target = pre 21 | pre.commands = cd $$PWD && make 22 | QMAKE_EXTRA_TARGETS += pre 23 | PRE_TARGETDEPS += pre 24 | 25 | # recording 26 | 27 | win32 { 28 | INCLUDEPATH += C:/ffmpeg-4.1.3-win64-dev/include 29 | LIBS += -LC:/ffmpeg-4.1.3-win64-dev/lib 30 | } 31 | macx:INCLUDEPATH += /usr/local/Cellar/ffmpeg/4.1.4_1/include 32 | macx:LIBS += -L/usr/local/Cellar/ffmpeg/4.1.4_1/lib 33 | !linux:LIBS += -lavutil -lavcodec -lavformat -lswscale -lswresample 34 | 35 | #CONFIG += static_ffmpeg 36 | static_ffmpeg { 37 | 38 | INCLUDEPATH += $$PWD/../FFmpeg 39 | INCLUDEPATH += $$PWD/../FFmpeg/fftools 40 | 41 | LIBS += \ 42 | $$PWD/../FFmpeg/libavdevice/libavdevice.a \ 43 | $$PWD/../FFmpeg/libavcodec/libavcodec.a \ 44 | $$PWD/../FFmpeg/libavformat/libavformat.a \ 45 | $$PWD/../FFmpeg/libavutil/libavutil.a \ 46 | $$PWD/../FFmpeg/libswresample/libswresample.a \ 47 | $$PWD/../FFmpeg/libavfilter/libavfilter.a \ 48 | $$PWD/../FFmpeg/libswscale/libswscale.a 49 | 50 | LIBS += -lpthread 51 | LIBS += -L/usr/local/lib -lSvtAv1Enc -lSvtAv1Dec -lpthread -lm 52 | LIBS += -lX11 -lXext -lbz2 -lz -llzma -lopus -lva -lva-drm -lva-x11 -lvdpau 53 | LIBS += -ldl 54 | 55 | SOURCES += \ 56 | ../FFmpeg/libavcodec/adts_parser.c \ 57 | ../FFmpeg/libavcodec/avfft.c \ 58 | ../FFmpeg/libavformat/mux.c \ 59 | ../FFmpeg/libavutil/file.c \ 60 | ../FFmpeg/libavutil/pixelutils.c 61 | 62 | HEADERS += \ 63 | ../FFmpeg/libavcodec/adts_parser.h \ 64 | ../FFmpeg/libavcodec/avfft.h \ 65 | ../FFmpeg/libavcodec/codec2utils.h \ 66 | ../FFmpeg/libavutil/file.h \ 67 | ../FFmpeg/libavutil/pixelutils.h 68 | } 69 | !static_ffmpeg { 70 | linux:LIBS += -lavutil -lavcodec -lavformat -lswscale -lswresample 71 | } 72 | 73 | # 74 | 75 | SOURCES += \ 76 | ActionHandler.cpp \ 77 | AncillaryDataTable.cpp \ 78 | DeckLinkCapture.cpp \ 79 | DeckLinkDeviceDiscovery.cpp \ 80 | DeckLinkInputDevice.cpp \ 81 | Deinterlace.cpp \ 82 | FFmpegVideoEncoder.cpp \ 83 | FrameProcessThread.cpp \ 84 | FrameRateCounter.cpp \ 85 | GlobalData.cpp \ 86 | Image.cpp \ 87 | ImageUtil.cpp \ 88 | ImageWidget.cpp \ 89 | MainWindow.cpp \ 90 | MyDeckLinkAPI.cpp \ 91 | MySettings.cpp \ 92 | ProfileCallback.cpp \ 93 | Rational.cpp \ 94 | RecordingDialog.cpp \ 95 | StatusLabel.cpp \ 96 | TestForm.cpp \ 97 | UIWidget.cpp \ 98 | VideoFrameData.cpp \ 99 | joinpath.cpp \ 100 | main.cpp 101 | 102 | HEADERS += \ 103 | ActionHandler.h \ 104 | AncillaryDataTable.h \ 105 | DeckLinkCapture.h \ 106 | DeckLinkDeviceDiscovery.h \ 107 | DeckLinkInputDevice.h \ 108 | Deinterlace.h \ 109 | FFmpegVideoEncoder.h \ 110 | FrameProcessThread.h \ 111 | FrameRateCounter.h \ 112 | GlobalData.h \ 113 | Image.h \ 114 | ImageUtil.h \ 115 | ImageWidget.h \ 116 | MainWindow.h \ 117 | MyDeckLinkAPI.h \ 118 | MySettings.h \ 119 | ProfileCallback.h \ 120 | Rational.h \ 121 | RecordingDialog.h \ 122 | StatusLabel.h \ 123 | TestForm.h \ 124 | UIWidget.h \ 125 | VideoEncoderOption.h \ 126 | VideoFrameData.h \ 127 | common.h \ 128 | includeffmpeg.h \ 129 | joinpath.h \ 130 | main.h 131 | 132 | FORMS += \ 133 | MainWindow.ui \ 134 | RecordingDialog.ui \ 135 | TestForm.ui \ 136 | UIWidget.ui 137 | 138 | RESOURCES += \ 139 | resources.qrc 140 | 141 | DISTFILES += \ 142 | CudaPlugin/src/cudalib.cu.cpp 143 | 144 | win32:SOURCES += sdk/Win/DeckLinkAPI_i.c 145 | win32:HEADERS += sdk/Win/DeckLinkAPI_h.h 146 | linux:SOURCES += sdk/Linux/include/DeckLinkAPIDispatch.cpp 147 | macx:SOURCES += sdk/Mac/include/DeckLinkAPIDispatch.cpp 148 | -------------------------------------------------------------------------------- /DeckLinkDeviceDiscovery.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2018 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | // 28 | // DeckLinkDeviceDiscovery.h 29 | // DeckLink Device Discovery Callback 30 | // 31 | 32 | #pragma once 33 | 34 | #include "MyDeckLinkAPI.h" 35 | #include 36 | 37 | class DeckLinkCapture; 38 | 39 | class DeckLinkDeviceDiscovery : public IDeckLinkDeviceNotificationCallback { 40 | private: 41 | IDeckLinkDiscovery *decklink_discovery_; 42 | DeckLinkCapture *delegate_; 43 | QAtomicInt refcount_; 44 | 45 | public: 46 | DeckLinkDeviceDiscovery(DeckLinkCapture *owner); 47 | virtual ~DeckLinkDeviceDiscovery(); 48 | 49 | bool enable(); 50 | void disable(); 51 | 52 | // IDeckLinkDeviceArrivalNotificationCallback interface 53 | virtual HRESULT STDMETHODCALLTYPE DeckLinkDeviceArrived(/* in */ IDeckLink *decklink); 54 | virtual HRESULT STDMETHODCALLTYPE DeckLinkDeviceRemoved(/* in */ IDeckLink *decklink); 55 | 56 | // IUnknown needs only a dummy implementation 57 | virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void **ppv); 58 | virtual ULONG STDMETHODCALLTYPE AddRef(); 59 | virtual ULONG STDMETHODCALLTYPE Release(); 60 | }; 61 | 62 | class DeckLinkDeviceDiscoveryEvent : public QEvent { 63 | private: 64 | IDeckLink *decklink_; 65 | public: 66 | DeckLinkDeviceDiscoveryEvent(QEvent::Type type, IDeckLink *deckLinkDevice) 67 | : QEvent(type) 68 | , decklink_(deckLinkDevice) 69 | { 70 | decklink_->AddRef(); 71 | } 72 | 73 | virtual ~DeckLinkDeviceDiscoveryEvent() 74 | { 75 | decklink_->Release(); 76 | } 77 | 78 | IDeckLink *decklink() const 79 | { 80 | return decklink_; 81 | } 82 | }; 83 | -------------------------------------------------------------------------------- /Deinterlace.h: -------------------------------------------------------------------------------- 1 | #ifndef DEINTERLACE_H 2 | #define DEINTERLACE_H 3 | 4 | #include "Image.h" 5 | #include 6 | #include 7 | 8 | class Deinterlace { 9 | private: 10 | std::mutex mutex_; 11 | std::condition_variable cond_; 12 | int image_index_ = 0; 13 | int image_count_ = 0; 14 | static const int NBUF = 8; 15 | Image image_buffer_[NBUF]; 16 | template Image process(const Image &input); 17 | public: 18 | Image deinterlace(const Image &input); 19 | }; 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /FFmpegVideoEncoder.h: -------------------------------------------------------------------------------- 1 | #ifndef FFMPEGVIDEOENCODER_H 2 | #define FFMPEGVIDEOENCODER_H 3 | 4 | #include "Image.h" 5 | #include "VideoEncoderOption.h" 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | struct AVCodecContext; 14 | struct AVFormatContext; 15 | struct AVCodec; 16 | struct AVStream; 17 | 18 | class VideoFrameData; 19 | 20 | namespace VideoEncoderInternal { 21 | class AudioFrame { 22 | public: 23 | QByteArray samples; 24 | operator bool () const 25 | { 26 | return !samples.isEmpty(); 27 | } 28 | }; 29 | class VideoFrame { 30 | public: 31 | Image image; 32 | operator bool () const 33 | { 34 | return (bool)image; 35 | } 36 | int width() const 37 | { 38 | return image ? image.width() : 0; 39 | } 40 | int height() const 41 | { 42 | return image ? image.height() : 0; 43 | } 44 | }; 45 | } 46 | 47 | class FFmpegVideoEncoder { 48 | public: 49 | class MyPicture; 50 | private: 51 | struct Private; 52 | Private *m; 53 | 54 | bool is_interruption_requested() const; 55 | bool get_audio_frame(int16_t *samples, int frame_size, int nb_channels); 56 | bool get_video_frame(MyPicture *pict); 57 | bool open_audio(AVCodecContext *cc, AVCodec const *codec, AVStream *st, const VideoEncoderOption::AudioOption &opt); 58 | bool next_audio_frame(AVCodecContext *cc, AVFormatContext *fc, AVStream *st, bool flush); 59 | void close_audio(); 60 | bool open_video(AVCodecContext *cc, const AVCodec *codec, AVStream *st, const VideoEncoderOption::VideoOption &opt); 61 | bool next_video_frame(AVCodecContext *cc, AVFormatContext *fc, AVStream *st, bool flush); 62 | void close_video(); 63 | void run(); 64 | bool put_video_frame(const VideoEncoderInternal::VideoFrame &img); 65 | bool put_audio_frame(const VideoEncoderInternal::AudioFrame &pcm); 66 | void default_get_video_frame(VideoEncoderInternal::VideoFrame *out); 67 | void default_get_audio_frame(int16_t *samples, int frame_size, int nb_channels); 68 | void request_interruption(); 69 | public: 70 | FFmpegVideoEncoder(); 71 | virtual ~FFmpegVideoEncoder(); 72 | bool create(std::string const &filepath, VideoEncoderOption::Format format, VideoEncoderOption::VideoOption const &vopt, VideoEncoderOption::AudioOption const &aopt); 73 | void close(); 74 | bool is_recording() const; 75 | void put_frame(const VideoFrameData &frame); 76 | VideoEncoderOption::AudioOption const *audio_option() const; 77 | VideoEncoderOption::VideoOption const *video_option() const; 78 | }; 79 | 80 | #endif // FFMPEGVIDEOENCODER_H 81 | -------------------------------------------------------------------------------- /FrameProcessThread.h: -------------------------------------------------------------------------------- 1 | #ifndef FRAMEPROCESSTHREAD_H 2 | #define FRAMEPROCESSTHREAD_H 3 | 4 | #include "Image.h" 5 | #include "VideoFrameData.h" 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | class VideoFrameData; 12 | 13 | class FrameProcessThread : public QObject { 14 | Q_OBJECT 15 | private: 16 | struct Private; 17 | Private *m; 18 | void run(); 19 | public: 20 | FrameProcessThread(); 21 | ~FrameProcessThread() override; 22 | void start(); 23 | void stop(); 24 | void request(const VideoFrameData &image, QSize const &size); 25 | void enableDeinterlace(bool enable); 26 | signals: 27 | void ready(VideoFrameData const &image); 28 | }; 29 | 30 | #endif // FRAMEPROCESSTHREAD_H 31 | -------------------------------------------------------------------------------- /FrameRateCounter.cpp: -------------------------------------------------------------------------------- 1 | #include "FrameRateCounter.h" 2 | 3 | #include 4 | 5 | FrameRateCounter::FrameRateCounter() 6 | { 7 | } 8 | 9 | void FrameRateCounter::stop() 10 | { 11 | this->requestInterruption(); 12 | this->waiter_.wakeAll(); 13 | this->wait(); 14 | } 15 | 16 | void FrameRateCounter::run() 17 | { 18 | while (1) { 19 | { 20 | QMutexLocker lock(&mutex_); 21 | waiter_.wait(&mutex_, 1000); 22 | } 23 | if (isInterruptionRequested()) break; 24 | fps_ = counter_; 25 | counter_ = 0; 26 | } 27 | } 28 | 29 | void FrameRateCounter::increment() 30 | { 31 | counter_++; 32 | } 33 | 34 | int FrameRateCounter::fps() 35 | { 36 | return fps_; 37 | } 38 | -------------------------------------------------------------------------------- /FrameRateCounter.h: -------------------------------------------------------------------------------- 1 | #ifndef FRAMERATECOUNTER_H 2 | #define FRAMERATECOUNTER_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | 9 | 10 | class FrameRateCounter : public QThread { 11 | private: 12 | int fps_ = 0; 13 | int counter_ = 0; 14 | QMutex mutex_; 15 | QWaitCondition waiter_; 16 | protected: 17 | void run() override; 18 | public: 19 | FrameRateCounter(); 20 | void stop(); 21 | void increment(); 22 | int fps(); 23 | }; 24 | 25 | #endif // FRAMERATECOUNTER_H 26 | -------------------------------------------------------------------------------- /GlobalData.cpp: -------------------------------------------------------------------------------- 1 | #include "GlobalData.h" 2 | 3 | GlobalData *global; 4 | 5 | -------------------------------------------------------------------------------- /GlobalData.h: -------------------------------------------------------------------------------- 1 | #ifndef GLOBALDATA_H 2 | #define GLOBALDATA_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #define ORGANIZATION_NAME "soramimi.jp" 9 | #define APPLICATION_NAME "DeckLinkCapture" 10 | 11 | class Cuda; 12 | 13 | struct GlobalData { 14 | QString organization_name; 15 | QString application_name; 16 | QString generic_config_dir; 17 | QString app_config_dir; 18 | QString config_file_path; 19 | QCursor invisible_cursor; 20 | 21 | std::shared_ptr cuda_plugin; 22 | }; 23 | 24 | extern GlobalData *global; 25 | 26 | #endif // GLOBALDATA_H 27 | -------------------------------------------------------------------------------- /Image.h: -------------------------------------------------------------------------------- 1 | #ifndef IMAGE_H 2 | #define IMAGE_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | class RefCounter { 11 | private: 12 | std::atomic_uint32_t ref; 13 | public: 14 | void operator = (RefCounter const &r) 15 | { 16 | ref.store(r.ref.load()); 17 | } 18 | operator unsigned int () const 19 | { 20 | return ref; 21 | } 22 | void operator ++ (int) 23 | { 24 | ref++; 25 | } 26 | void operator -- (int) 27 | { 28 | ref--; 29 | } 30 | }; 31 | 32 | class Image { 33 | public: 34 | enum class Format { 35 | None, 36 | RGB8, 37 | UYVY8, 38 | YUYV8, 39 | UINT8, 40 | UINT16, 41 | UINT32, 42 | }; 43 | static int bytesPerPixel(Format f) 44 | { 45 | switch (f) { 46 | case Format::UINT8: 47 | return 1; 48 | case Format::RGB8: 49 | return 3; 50 | case Format::UYVY8: 51 | case Format::YUYV8: 52 | case Format::UINT16: 53 | return 2; 54 | case Format::UINT32: 55 | return 4; 56 | } 57 | return 0; 58 | } 59 | private: 60 | struct Core { 61 | RefCounter ref; 62 | int width = 0; 63 | int height = 0; 64 | enum Format format = Format::RGB8; 65 | char *data() const 66 | { 67 | return (char *)this + sizeof(Core); 68 | } 69 | // char data[0]; 70 | }; 71 | Core *core_ = nullptr; 72 | void assign(Core *p) 73 | { 74 | if (p) { 75 | p->ref++; 76 | } 77 | if (core_) { 78 | if (core_->ref > 1) { 79 | core_->ref--; 80 | } else { 81 | core_->~Core(); 82 | free(core_); 83 | } 84 | } 85 | core_ = p; 86 | } 87 | void copy_on_write() 88 | { 89 | if (core_ && core_->ref > 1) { 90 | Image img = copy(); 91 | assign(img.core_); 92 | } 93 | } 94 | public: 95 | Image() = default; 96 | Image(int w, int h, Format format) 97 | { 98 | create(w, h, format); 99 | } 100 | ~Image() 101 | { 102 | clear(); 103 | } 104 | Image(Image const &t) 105 | { 106 | assign(t.core_); 107 | } 108 | void operator = (Image const &t) 109 | { 110 | assign(t.core_); 111 | } 112 | void clear() 113 | { 114 | assign(nullptr); 115 | } 116 | bool isNull() const 117 | { 118 | return !core_; 119 | } 120 | operator bool () const 121 | { 122 | return !isNull(); 123 | } 124 | void create(int w, int h, Format format) 125 | { 126 | size_t datalen = bytesPerPixel(format) * w * h; 127 | Core *p = (Core *)malloc(sizeof(Core) + datalen); 128 | *p = {}; 129 | p->width = w; 130 | p->height = h; 131 | p->format = format; 132 | assign(p); 133 | } 134 | int width() const 135 | { 136 | return core_ ? core_->width : 0; 137 | } 138 | int height() const 139 | { 140 | return core_ ? core_->height : 0; 141 | } 142 | Format format() const 143 | { 144 | return core_ ? core_->format : Format::None; 145 | } 146 | int bytesPerPixel() const 147 | { 148 | return bytesPerPixel(format()); 149 | } 150 | int bytesPerLine() const 151 | { 152 | return bytesPerPixel() * width(); 153 | } 154 | uint8_t const *scanLine(int y) const 155 | { 156 | return core_ ? ((uint8_t const *)core_->data() + bytesPerLine() * y) : nullptr; 157 | } 158 | uint8_t *scanLine(int y) 159 | { 160 | copy_on_write(); 161 | return core_ ? ((uint8_t *)core_->data() + bytesPerLine() * y) : nullptr; 162 | } 163 | uint8_t const *bits() const 164 | { 165 | return core_ ? (uint8_t const *)core_->data() : nullptr; 166 | } 167 | uint8_t *bits() 168 | { 169 | copy_on_write(); 170 | return core_ ? (uint8_t *)core_->data() : nullptr; 171 | } 172 | Image copy() const 173 | { 174 | Image newimg; 175 | if (core_) { 176 | int w = width(); 177 | int h = height(); 178 | Format f = format(); 179 | newimg.create(w, h, f); 180 | memcpy(newimg.core_->data(), core_->data(), bytesPerPixel(f) * w * h); 181 | } 182 | return newimg; 183 | } 184 | Image convertToFormat(Image::Format dformat) const; 185 | 186 | void swap(Image &r) 187 | { 188 | std::swap(core_, r.core_); 189 | } 190 | }; 191 | 192 | namespace std { 193 | template <> inline void swap(Image &l, Image &r) 194 | { 195 | l.swap(r); 196 | } 197 | } 198 | 199 | #endif // IMAGE_H 200 | -------------------------------------------------------------------------------- /ImageUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "ImageUtil.h" 2 | #include 3 | 4 | static inline uint8_t clamp_uint8(int v) 5 | { 6 | return v < 0 ? 0 : (v > 255 ? 255 : v); 7 | } 8 | 9 | QImage ImageUtil::qimage(const Image &image) 10 | { 11 | QImage newimage; 12 | int w = image.width(); 13 | int h = image.height(); 14 | if (w > 0 && h > 0) { 15 | Image srcimage; 16 | switch (image.format()) { 17 | case Image::Format::UYVY8: 18 | case Image::Format::YUYV8: 19 | case Image::Format::RGB8: 20 | newimage = QImage(w, h, QImage::Format_RGB888); 21 | srcimage = image.convertToFormat(Image::Format::RGB8); 22 | break; 23 | case Image::Format::UINT8: 24 | newimage = QImage(w, h, QImage::Format_Grayscale8); 25 | srcimage = image; 26 | break; 27 | } 28 | int stride = srcimage.bytesPerLine(); 29 | for (int y = 0; y < h; y++) { 30 | uint8_t const *s = srcimage.scanLine(y); 31 | uint8_t *d = newimage.scanLine(y); 32 | memcpy(d, s, stride); 33 | } 34 | } 35 | return newimage; 36 | } 37 | 38 | Image ImageUtil::image(const QImage &image, Image::Format format) 39 | { 40 | if (image.format() == QImage::Format_RGB32) { 41 | return ImageUtil::image(image.convertToFormat(QImage::Format_RGB888), format); 42 | } 43 | int w = image.width(); 44 | int h = image.height(); 45 | if (format == Image::Format::YUYV8 || format == Image::Format::UYVY8) { 46 | const QImage srcimage = image.convertToFormat(QImage::Format_RGB888); 47 | Image newimage(w, h, Image::Format::RGB8); 48 | int stride = newimage.bytesPerLine(); 49 | for (int y = 0; y < h; y++) { 50 | uint8_t const *s = srcimage.scanLine(y); 51 | uint8_t *d = newimage.scanLine(y); 52 | memcpy(d, s, stride); 53 | } 54 | return newimage.convertToFormat(format); 55 | } else { 56 | QImage::Format qf = QImage::Format_Invalid; 57 | switch (format) { 58 | case Image::Format::UINT8: 59 | qf = QImage::Format_Grayscale8; 60 | break; 61 | case Image::Format::RGB8: 62 | qf = QImage::Format_RGB888; 63 | break; 64 | } 65 | if (qf != QImage::Format_Invalid) { 66 | const QImage srcimage = image.convertToFormat(qf); 67 | Image newimage(w, h, format); 68 | int stride = newimage.bytesPerLine(); 69 | for (int y = 0; y < h; y++) { 70 | uint8_t const *s = srcimage.scanLine(y); 71 | uint8_t *d = newimage.scanLine(y); 72 | memcpy(d, s, stride); 73 | } 74 | return newimage; 75 | } 76 | } 77 | return {}; 78 | } 79 | -------------------------------------------------------------------------------- /ImageUtil.h: -------------------------------------------------------------------------------- 1 | #ifndef IMAGEUTIL_H 2 | #define IMAGEUTIL_H 3 | 4 | #include 5 | #include "Image.h" 6 | 7 | class ImageUtil { 8 | public: 9 | static QImage qimage(Image const &image); 10 | static Image image(QImage const &image, Image::Format format); 11 | }; 12 | 13 | #endif // IMAGEUTIL_H 14 | -------------------------------------------------------------------------------- /ImageWidget.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "ImageWidget.h" 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include "Image.h" 10 | #include "FrameProcessThread.h" 11 | #include "ImageUtil.h" 12 | #include "VideoFrameData.h" 13 | 14 | struct ImageWidget::Private { 15 | QImage scaled_image; 16 | ViewMode view_mode = ViewMode::SmallLQ; 17 | qint64 recording_pregress_current = 0; 18 | qint64 recording_pregress_length = 0; 19 | QFont large_font; 20 | QFont error_font; 21 | QString critical_error_title; 22 | QString critical_error_message; 23 | }; 24 | 25 | ImageWidget::ImageWidget(QWidget *parent) 26 | : QWidget(parent) 27 | , m(new Private) 28 | { 29 | startTimer(1000); 30 | m->large_font = QFont("Monospace", 24); 31 | m->large_font.setStyleHint(QFont::TypeWriter); 32 | m->error_font = QFont("Sans", 12); 33 | } 34 | 35 | ImageWidget::~ImageWidget() 36 | { 37 | delete m; 38 | } 39 | 40 | void ImageWidget::clear() 41 | { 42 | m->recording_pregress_current = 0; 43 | m->recording_pregress_length = 0; 44 | } 45 | 46 | void ImageWidget::setViewMode(ImageWidget::ViewMode vm) 47 | { 48 | m->view_mode = vm; 49 | update(); 50 | } 51 | 52 | ImageWidget::ViewMode ImageWidget::viewMode() const 53 | { 54 | return m->view_mode; 55 | } 56 | 57 | void ImageWidget::updateRecordingProgress(qint64 current, qint64 length) 58 | { 59 | m->recording_pregress_current = current; 60 | m->recording_pregress_length = length; 61 | update(); 62 | } 63 | 64 | QSize ImageWidget::scaledSize(Image const &image) 65 | { 66 | auto FitSize = [](QSize const &size, int dw, int dh){ 67 | int w = size.width(); 68 | int h = size.height(); 69 | if (w < 1 || h < 1) { 70 | return QSize(); 71 | } 72 | if (dh * w > dw * h) { 73 | h = h * dw / w; 74 | w = dw; 75 | } else { 76 | w = w * dh / h; 77 | h = dh; 78 | } 79 | return QSize(w, h); 80 | }; 81 | 82 | if (m->view_mode == ViewMode::SmallLQ) { 83 | return {960, 540}; 84 | } else if (m->view_mode == ViewMode::FitToWindow) { 85 | return FitSize({image.width(), image.height()}, width(), height()); 86 | } else if (m->view_mode == ViewMode::DotByDot) { 87 | return {image.width(), image.height()}; 88 | } 89 | return {}; 90 | } 91 | 92 | void ImageWidget::paintEvent(QPaintEvent *) 93 | { 94 | QPainter pr(this); 95 | 96 | if (!m->scaled_image.isNull()) { 97 | pr.save(); 98 | QPainterPath path1; 99 | path1.addRect(rect()); 100 | const int w = m->scaled_image.width(); 101 | const int h = m->scaled_image.height(); 102 | if (w > 0 && h > 0) { 103 | int x = (width() - w) / 2; 104 | int y = (height() - h) / 2; 105 | QRect r(x, y, w, h); 106 | pr.drawImage(r, m->scaled_image); 107 | QPainterPath path2; 108 | path2.addRect(r); 109 | path1 = path1.subtracted(path2); 110 | } 111 | pr.setClipPath(path1); 112 | pr.fillRect(0, 0, width(), height(), Qt::black); 113 | pr.restore(); 114 | } 115 | 116 | int y = 0; 117 | auto DrawText = [](QPainter *p, int y, QString const &s){ 118 | auto fm = p->fontMetrics(); 119 | auto sz = fm.size(Qt::TextSingleLine, s); 120 | p->fillRect(0, y, sz.width(), sz.height(), QColor(64, 64, 64, 192)); 121 | p->drawText(0, y + fm.ascent(), s); 122 | return sz.height(); 123 | }; 124 | 125 | if (!m->critical_error_message.isEmpty()) { 126 | pr.setFont(m->error_font); 127 | pr.setPen(QColor(255, 128, 0)); 128 | y += DrawText(&pr, y, m->critical_error_title); 129 | y += DrawText(&pr, y, m->critical_error_message); 130 | } 131 | 132 | if (m->recording_pregress_current > 0 || m->recording_pregress_length > 0) { 133 | pr.setFont(m->large_font); 134 | pr.setPen(Qt::white); 135 | auto TimeString = [](qint64 secs){ 136 | auto h = secs; 137 | int s = h % 60; 138 | h /= 60; 139 | int m = h % 60; 140 | h /= 60; 141 | return QString::asprintf("%02d:%02d:%02d", h, m, s); 142 | }; 143 | QString s = QString("REC ") + TimeString(m->recording_pregress_current) + " / " + TimeString(m->recording_pregress_length); 144 | y += DrawText(&pr, y, s); 145 | } 146 | } 147 | 148 | void ImageWidget::setImage(QImage const &image) 149 | { 150 | m->scaled_image = image; 151 | update(); 152 | } 153 | 154 | void ImageWidget::setCriticalError(const QString &title, const QString &message) 155 | { 156 | m->critical_error_title = title; 157 | m->critical_error_message = message; 158 | update(); 159 | } 160 | 161 | -------------------------------------------------------------------------------- /ImageWidget.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef IMAGEWIDGET_H 3 | #define IMAGEWIDGET_H 4 | 5 | #include 6 | 7 | class Image; 8 | class VideoFrameData; 9 | 10 | class ImageWidget : public QWidget { 11 | Q_OBJECT 12 | public: 13 | enum class ViewMode { 14 | SmallLQ, 15 | DotByDot, 16 | FitToWindow, 17 | }; 18 | private: 19 | struct Private; 20 | Private *m; 21 | protected: 22 | void paintEvent(QPaintEvent *) override; 23 | public: 24 | ImageWidget(QWidget *parent = nullptr); 25 | ~ImageWidget() override; 26 | void clear(); 27 | void setViewMode(ViewMode vm); 28 | ViewMode viewMode() const; 29 | void updateRecordingProgress(qint64 current, qint64 length); 30 | QSize scaledSize(const Image &image); 31 | void setImage(const QImage &image); 32 | void setCriticalError(const QString &title, const QString &message); 33 | }; 34 | 35 | #endif // IMAGEWIDGET_H 36 | -------------------------------------------------------------------------------- /MainWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include "ui_MainWindow.h" 5 | #include "DeckLinkCapture.h" 6 | #include "DeckLinkDeviceDiscovery.h" 7 | #include "ImageWidget.h" 8 | #include "ProfileCallback.h" 9 | #include "common.h" 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | class VideoFrameData; 16 | class DeckLinkDeviceDiscovery; 17 | class DeckLinkInputDevice; 18 | class ProfileCallback; 19 | class QCheckBox; 20 | class QListWidget; 21 | class QListWidgetItem; 22 | 23 | class MainWindow : public QMainWindow, public DeckLinkCaptureDelegate { 24 | Q_OBJECT 25 | friend class UIWidget; 26 | public: 27 | enum { 28 | Dummy_ = QEvent::User, 29 | }; 30 | private: 31 | Ui::MainWindow *ui; 32 | 33 | struct Private; 34 | Private *m; 35 | 36 | QListWidget *listWidget_input_device(); 37 | QListWidget *listWidget_input_connection(); 38 | QListWidget *listWidget_display_mode(); 39 | QCheckBox *checkBox_audio(); 40 | QCheckBox *checkBox_deinterlace(); 41 | QCheckBox *checkBox_display_mode_auto_detection(); 42 | 43 | void setStatusBarText(const QString &text); 44 | bool isVideoFormatAutoDetectionEnabled() const; 45 | void updateUI(); 46 | void internalStartCapture(bool start); 47 | void toggleRecord(); 48 | void setSignalStatus(bool valid); 49 | bool isRecording() const; 50 | bool isValidSignal() const; 51 | void onInterval1s(); 52 | void notifyRecordingProgress(qint64 current, qint64 length); 53 | void updateCursor(); 54 | bool changeAudioOutputDevice(const QString &name, bool save); 55 | void setFullScreen(bool f); 56 | ImageWidget *currentImageWidget(); 57 | void updateStatusLabel(); 58 | protected: 59 | void timerEvent(QTimerEvent *event) override; 60 | void mouseDoubleClickEvent(QMouseEvent *event) override; 61 | void mouseMoveEvent(QMouseEvent *event) override; 62 | bool event(QEvent *event) override; 63 | public: 64 | explicit MainWindow(QWidget *parent = nullptr); 65 | ~MainWindow() override; 66 | 67 | void closeEvent(QCloseEvent *event) override; 68 | 69 | void setup(); 70 | 71 | void startCapture(); 72 | void stopCapture(); 73 | void restartCapture(); 74 | 75 | void refreshDisplayModeMenu(); 76 | void refreshInputConnectionMenu(); 77 | 78 | void addDevice(IDeckLink *decklink) override; 79 | void removeDevice(IDeckLink *decklink) override; 80 | void haltStreams() override; 81 | void updateProfile(IDeckLinkProfile* newProfile) override; 82 | void criticalError(const QString &title, const QString &message) override; 83 | void changeDisplayMode(BMDDisplayMode dispmode, const Rational &fps) override; 84 | 85 | bool isCapturing() const; 86 | 87 | void changeInputDevice(int selectedDeviceIndex); 88 | void changeInputConnection(BMDVideoConnection conn, bool errorcheck); 89 | bool isAudioCaptureEnabled() const; 90 | void stopRecord(); 91 | void startRecord(); 92 | private slots: 93 | void newFrame(const VideoFrameData &frame); 94 | void on_action_recording_start_triggered(); 95 | void on_action_recording_stop_triggered(); 96 | void on_action_view_dot_by_dot_triggered(); 97 | void on_action_view_fit_window_triggered(); 98 | void on_action_view_small_lq_triggered(); 99 | void on_checkBox_audio_stateChanged(int arg1); 100 | void on_checkBox_deinterlace_stateChanged(int arg1); 101 | void on_checkBox_display_mode_auto_detection_clicked(bool checked); 102 | void on_listWidget_display_mode_currentRowChanged(int currentRow); 103 | void on_listWidget_display_mode_itemDoubleClicked(QListWidgetItem *item); 104 | void on_listWidget_input_connection_currentRowChanged(int currentRow); 105 | void on_listWidget_input_device_currentRowChanged(int currentRow); 106 | void ready(const VideoFrameData &frame); 107 | void test(); 108 | }; 109 | 110 | #endif // MAINWINDOW_H 111 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: 3 | cd CudaPlugin && make 4 | cp CudaPlugin/_bin/libcudaplugin.so _bin/ 5 | 6 | -------------------------------------------------------------------------------- /MyDeckLinkAPI.cpp: -------------------------------------------------------------------------------- 1 | #include "MyDeckLinkAPI.h" 2 | 3 | HRESULT GetDeckLinkIterator(IDeckLinkIterator **deckLinkIterator) 4 | { 5 | HRESULT result = S_OK; 6 | 7 | // Create an IDeckLinkIterator object to enumerate all DeckLink cards in the system 8 | #ifdef Q_OS_WIN 9 | if (CoCreateInstance(CLSID_CDeckLinkIterator, nullptr, CLSCTX_ALL, IID_IDeckLinkIterator, (void **)deckLinkIterator) != S_OK) { 10 | *deckLinkIterator = nullptr; 11 | result = E_FAIL; 12 | } 13 | #else 14 | *deckLinkIterator = CreateDeckLinkIteratorInstance(); 15 | if (!*deckLinkIterator) { 16 | fprintf(stderr, "A DeckLink iterator could not be created. The DeckLink drivers may not be installed.\n"); 17 | result = E_FAIL; 18 | } 19 | #endif 20 | 21 | return result; 22 | } 23 | 24 | // DLString 25 | 26 | DLString::~DLString() 27 | { 28 | clear(); 29 | } 30 | 31 | void DLString::clear() 32 | { 33 | if (str) { 34 | #ifdef Q_OS_WIN 35 | SysFreeString(str); 36 | #endif 37 | #ifdef Q_OS_MAC 38 | CFRelease(str); 39 | #endif 40 | #ifdef Q_OS_LINUX 41 | free((void *)str); 42 | #endif 43 | str = nullptr; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /MyDeckLinkAPI.h: -------------------------------------------------------------------------------- 1 | #ifndef DECKLINKAPI_H 2 | #define DECKLINKAPI_H 3 | 4 | #include 5 | #include 6 | 7 | #if defined(Q_OS_WIN) 8 | #include "sdk/Win/DeckLinkAPI_h.h" 9 | typedef IID CFUUIDBytes; 10 | 11 | class DLString { 12 | private: 13 | BSTR str = nullptr; 14 | public: 15 | ~DLString(); 16 | void clear(); 17 | BSTR *operator & () 18 | { 19 | return &str; 20 | } 21 | operator QString () 22 | { 23 | return str ? QString::fromUtf16((ushort const *)str) : QString(); 24 | } 25 | operator std::string () 26 | { 27 | return operator QString ().toStdString(); 28 | } 29 | bool empty() const 30 | { 31 | return !(str && *str); 32 | } 33 | }; 34 | 35 | #elif defined(Q_OS_MAC) 36 | #include "sdk/Mac/include/DeckLinkAPI.h" 37 | 38 | typedef bool BOOL; 39 | 40 | class DLString { 41 | private: 42 | CFStringRef str = nullptr; 43 | public: 44 | ~DLString(); 45 | void clear(); 46 | CFStringRef *operator & () 47 | { 48 | return &str; 49 | } 50 | operator QString () const 51 | { 52 | if (!str) return QString(); 53 | CFIndex length = CFStringGetLength(str); 54 | if (length == 0) return QString(); 55 | QString string(length, Qt::Uninitialized); 56 | CFStringGetCharacters(str, CFRangeMake(0, length), reinterpret_cast(const_cast(string.unicode()))); 57 | return string; 58 | } 59 | operator std::string () const 60 | { 61 | return operator QString ().toStdString(); 62 | } 63 | bool empty() const 64 | { 65 | return !(str && CFStringGetLength(str) > 0); 66 | } 67 | }; 68 | 69 | #elif defined(Q_OS_LINUX) 70 | #include "sdk/Linux/include/DeckLinkAPI.h" 71 | typedef bool BOOL; 72 | 73 | class DLString { 74 | private: 75 | char const *str = nullptr; 76 | public: 77 | ~DLString(); 78 | void clear(); 79 | char const **operator & () 80 | { 81 | return &str; 82 | } 83 | operator QString () const 84 | { 85 | return str ? QString::fromUtf8(str) : QString(); 86 | } 87 | operator std::string () const 88 | { 89 | return str ? std::string(str) : std::string(); 90 | } 91 | bool empty() const 92 | { 93 | return !(str && *str); 94 | } 95 | }; 96 | 97 | #endif 98 | 99 | HRESULT GetDeckLinkIterator(IDeckLinkIterator **deckLinkIterator); 100 | 101 | #endif // DECKLINKAPI_H 102 | -------------------------------------------------------------------------------- /MySettings.cpp: -------------------------------------------------------------------------------- 1 | #include "MySettings.h" 2 | #include "GlobalData.h" 3 | #include "main.h" 4 | 5 | MySettings::MySettings(QObject *) 6 | : QSettings(global->config_file_path, QSettings::IniFormat) 7 | { 8 | } 9 | 10 | -------------------------------------------------------------------------------- /MySettings.h: -------------------------------------------------------------------------------- 1 | #ifndef MYSETTINGS_H 2 | #define MYSETTINGS_H 3 | 4 | #include 5 | 6 | class MySettings : public QSettings { 7 | Q_OBJECT 8 | public: 9 | explicit MySettings(QObject *parent = nullptr); 10 | }; 11 | 12 | #endif // MYSETTINGS_H 13 | -------------------------------------------------------------------------------- /ProfileCallback.cpp: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2018 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | // ProfileCallback.cpp : implementation file 28 | // DeckLink Device Profile Callback 29 | // 30 | 31 | #include "DeckLinkCapture.h" 32 | #include "ProfileCallback.h" 33 | #include "common.h" 34 | #include 35 | 36 | ProfileCallback::ProfileCallback(DeckLinkCapture *owner) 37 | : delegate_(owner) 38 | , refcount_(1) 39 | { 40 | } 41 | 42 | HRESULT ProfileCallback::ProfileChanging(IDeckLinkProfile * /* profileToBeActivated */, BOOL streamsWillBeForcedToStop) 43 | { 44 | // When streamsWillBeForcedToStop is true, the profile to be activated is incompatible with the current 45 | // profile and capture will be stopped by the DeckLink driver. It is better to notify the 46 | // controller to gracefully stop capture, so that the UI is set to a known state. 47 | if (streamsWillBeForcedToStop) { 48 | delegate_->haltStreams(); 49 | } 50 | return S_OK; 51 | } 52 | 53 | HRESULT ProfileCallback::ProfileActivated(IDeckLinkProfile *activatedProfile) 54 | { 55 | QCoreApplication::postEvent(delegate_, new DeckLinkProfileCallbackEvent(kProfileActivatedEvent, activatedProfile)); 56 | // delegate_->updateProfile(activatedProfile); 57 | return S_OK; 58 | } 59 | 60 | HRESULT ProfileCallback::QueryInterface(REFIID iid, void **ppv) 61 | { 62 | CFUUIDBytes iunknown; 63 | HRESULT result = E_NOINTERFACE; 64 | 65 | if (!ppv) return E_INVALIDARG; 66 | 67 | // Initialise the return result 68 | *ppv = nullptr; 69 | 70 | // Obtain the IUnknown interface and compare it the provided REFIID 71 | #ifdef Q_OS_WIN 72 | iunknown = IID_IUnknown; 73 | #else 74 | iunknown = CFUUIDGetUUIDBytes(IUnknownUUID); 75 | #endif 76 | if (memcmp(&iid, &iunknown, sizeof(REFIID)) == 0) { 77 | *ppv = this; 78 | AddRef(); 79 | result = S_OK; 80 | } 81 | 82 | return result; 83 | } 84 | 85 | ULONG ProfileCallback::AddRef(void) 86 | { 87 | return (ULONG) refcount_.fetchAndAddAcquire(1); 88 | } 89 | 90 | ULONG ProfileCallback::Release(void) 91 | { 92 | ULONG newRefValue = (ULONG)refcount_.fetchAndAddAcquire(-1); 93 | if (newRefValue == 0) { 94 | delete this; 95 | return 0; 96 | } 97 | 98 | return newRefValue; 99 | } 100 | 101 | -------------------------------------------------------------------------------- /ProfileCallback.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2018 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | // ProfileCallback.h : header file 28 | // DeckLink Device Profile Callback 29 | // 30 | 31 | #pragma once 32 | 33 | #include "MyDeckLinkAPI.h" 34 | 35 | #include 36 | 37 | class DeckLinkCapture; 38 | 39 | class ProfileCallback : public IDeckLinkProfileCallback { 40 | private: 41 | DeckLinkCapture *delegate_; 42 | QAtomicInt refcount_; 43 | 44 | public: 45 | ProfileCallback(DeckLinkCapture *owner); 46 | virtual ~ProfileCallback() {} 47 | 48 | // IDeckLinkProfileCallback interface 49 | virtual HRESULT STDMETHODCALLTYPE ProfileChanging(IDeckLinkProfile *profileToBeActivated, BOOL streamsWillBeForcedToStop); 50 | virtual HRESULT STDMETHODCALLTYPE ProfileActivated(IDeckLinkProfile *activatedProfile); 51 | 52 | // IUnknown interface 53 | virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void **ppv); 54 | virtual ULONG STDMETHODCALLTYPE AddRef(); 55 | virtual ULONG STDMETHODCALLTYPE Release(); 56 | }; 57 | 58 | class DeckLinkProfileCallbackEvent : public QEvent { 59 | private: 60 | IDeckLinkProfile *profile_; 61 | 62 | public: 63 | DeckLinkProfileCallbackEvent(QEvent::Type type, IDeckLinkProfile *profile) 64 | : QEvent(type) 65 | , profile_(profile) 66 | { 67 | profile_->AddRef(); 68 | } 69 | virtual ~DeckLinkProfileCallbackEvent() 70 | { 71 | profile_->Release(); 72 | } 73 | IDeckLinkProfile *Profile() const 74 | { 75 | return profile_; 76 | } 77 | }; 78 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DeckLinkCapture 2 | Video capture program for Blackmagic Design's devices 3 | 4 | ## Platforms 5 | 6 | - Windows 7 | - macOS 8 | - Linux 9 | 10 | ## Development 11 | 12 | - C++11 13 | - Qt5 14 | - OpenCV (option) 15 | - FFmpeg (option) 16 | 17 | ## Screenshot 18 | 19 | ![screenshot](https://soramimi.github.io/DeckLinkCapture/screenshot.jpg) 20 | -------------------------------------------------------------------------------- /Rational.cpp: -------------------------------------------------------------------------------- 1 | #include "Rational.h" 2 | 3 | 4 | -------------------------------------------------------------------------------- /Rational.h: -------------------------------------------------------------------------------- 1 | #ifndef RATIONAL_H 2 | #define RATIONAL_H 3 | 4 | #include 5 | #include 6 | 7 | class Rational { 8 | public: 9 | int64_t num = 0; 10 | int64_t den = 1; 11 | Rational() = default; 12 | Rational(int64_t num, int64_t den) 13 | : num(num) 14 | , den(den) 15 | { 16 | } 17 | }; 18 | 19 | Q_DECLARE_METATYPE(Rational) 20 | 21 | #endif // RATIONAL_H 22 | -------------------------------------------------------------------------------- /RecordingDialog.cpp: -------------------------------------------------------------------------------- 1 | #include "RecordingDialog.h" 2 | #include "ui_RecordingDialog.h" 3 | #include "MySettings.h" 4 | #include 5 | 6 | RecordingDialog::RecordingDialog(QWidget *parent) 7 | : QDialog(parent) 8 | , ui(new Ui::RecoringDialog) 9 | { 10 | ui->setupUi(this); 11 | 12 | setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); 13 | 14 | ui->timeEdit->setTime(QTime(3, 0, 0)); 15 | 16 | { 17 | MySettings s; 18 | s.beginGroup("Global"); 19 | { 20 | QString path = s.value("SaveVideoPath").toString(); 21 | ui->lineEdit_path->setText(path); 22 | } 23 | { 24 | QString t = s.value("MaximumLength").toString(); 25 | int h, m, s; 26 | h = m = s = 0; 27 | if (sscanf(t.toStdString().c_str(), "%d:%d:%d", &h, &m, &s) != 3) { 28 | h = 3; 29 | m = s = 0; 30 | } 31 | ui->timeEdit->setTime({h, m, s}); 32 | } 33 | s.endGroup(); 34 | } 35 | } 36 | 37 | RecordingDialog::~RecordingDialog() 38 | { 39 | delete ui; 40 | } 41 | 42 | QTime RecordingDialog::maximumLength() const 43 | { 44 | return ui->timeEdit->time(); 45 | } 46 | 47 | QString RecordingDialog::path() const 48 | { 49 | return ui->lineEdit_path->text(); 50 | } 51 | 52 | void RecordingDialog::on_pushButton_browse_clicked() 53 | { 54 | QString path = ui->lineEdit_path->text(); 55 | path = QFileDialog::getSaveFileName(this, tr("Save as"), path); 56 | if (!path.isEmpty()) { 57 | ui->lineEdit_path->setText(path); 58 | } 59 | } 60 | 61 | void RecordingDialog::done(int v) 62 | { 63 | if (v == QDialog::Accepted) { 64 | QTime t = ui->timeEdit->time(); 65 | MySettings s; 66 | s.beginGroup("Global"); 67 | s.setValue("SaveVideoPath", path()); 68 | s.setValue("MaximumLength", QString::asprintf("%d:%02d:%02d", t.hour(), t.minute(), t.second())); 69 | s.endGroup(); 70 | } 71 | QDialog::done(v); 72 | } 73 | 74 | 75 | -------------------------------------------------------------------------------- /RecordingDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef RECORDINGDIALOG_H 2 | #define RECORDINGDIALOG_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class RecoringDialog; 8 | } 9 | 10 | class RecordingDialog : public QDialog { 11 | Q_OBJECT 12 | private: 13 | Ui::RecoringDialog *ui; 14 | public: 15 | explicit RecordingDialog(QWidget *parent = nullptr); 16 | ~RecordingDialog(); 17 | QTime maximumLength() const; 18 | QString path() const; 19 | private slots: 20 | void on_pushButton_browse_clicked(); 21 | public slots: 22 | void done(int v); 23 | }; 24 | 25 | #endif // RECORDINGDIALOG_H 26 | -------------------------------------------------------------------------------- /StatusLabel.cpp: -------------------------------------------------------------------------------- 1 | #include "StatusLabel.h" 2 | 3 | StatusLabel::StatusLabel(QWidget *parent) 4 | : QLabel(parent) 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /StatusLabel.h: -------------------------------------------------------------------------------- 1 | #ifndef STATUSLABEL_H 2 | #define STATUSLABEL_H 3 | 4 | #include 5 | 6 | class StatusLabel : public QLabel { 7 | public: 8 | StatusLabel(QWidget *parent = 0); 9 | QSize sizeHint() const 10 | { 11 | return QSize(0, QLabel::sizeHint().height()); 12 | } 13 | }; 14 | 15 | #endif // STATUSLABEL_H 16 | -------------------------------------------------------------------------------- /TestForm.cpp: -------------------------------------------------------------------------------- 1 | #include "TestForm.h" 2 | #include "ui_TestForm.h" 3 | 4 | TestForm::TestForm(QWidget *parent) : 5 | QWidget(parent), 6 | ui(new Ui::TestForm) 7 | { 8 | ui->setupUi(this); 9 | } 10 | 11 | TestForm::~TestForm() 12 | { 13 | delete ui; 14 | } 15 | -------------------------------------------------------------------------------- /TestForm.h: -------------------------------------------------------------------------------- 1 | #ifndef TESTFORM_H 2 | #define TESTFORM_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class TestForm; 8 | } 9 | 10 | class TestForm : public QWidget 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit TestForm(QWidget *parent = nullptr); 16 | ~TestForm(); 17 | 18 | private: 19 | Ui::TestForm *ui; 20 | }; 21 | 22 | #endif // TESTFORM_H 23 | -------------------------------------------------------------------------------- /TestForm.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | TestForm 6 | 7 | 8 | 9 | 0 10 | 0 11 | 400 12 | 300 13 | 14 | 15 | 16 | Form 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /UIWidget.cpp: -------------------------------------------------------------------------------- 1 | #include "MainWindow.h" 2 | #include "UIWidget.h" 3 | #include "ui_UIWidget.h" 4 | 5 | UIWidget::UIWidget(QWidget *parent) 6 | : QWidget(parent) 7 | , ui(new Ui::UIWidget) 8 | { 9 | ui->setupUi(this); 10 | // setWindowFlags(Qt::Popup | Qt::Sheet | Qt::FramelessWindowHint); 11 | 12 | // connect(ui->pushButton_start, &QPushButton::clicked, mainwindow(), &MainWindow::on_pushButton_start_clicked); 13 | } 14 | 15 | UIWidget::~UIWidget() 16 | { 17 | delete ui; 18 | } 19 | 20 | QListWidget *UIWidget::listWidget_input_device() 21 | { 22 | return ui->listWidget_input_device; 23 | } 24 | 25 | QListWidget *UIWidget::listWidget_input_connection() 26 | { 27 | return ui->listWidget_input_connection; 28 | } 29 | 30 | QListWidget *UIWidget::listWidget_display_mode() 31 | { 32 | return ui->listWidget_display_mode; 33 | } 34 | 35 | QCheckBox *UIWidget::checkBox_audio() 36 | { 37 | return ui->checkBox_audio; 38 | } 39 | 40 | QCheckBox *UIWidget::checkBox_deinterlace() 41 | { 42 | return ui->checkBox_deinterlace; 43 | } 44 | 45 | QCheckBox *UIWidget::checkBox_display_mode_auto_detection() 46 | { 47 | return ui->checkBox_display_mode_auto_detection; 48 | } 49 | 50 | MainWindow *UIWidget::mainwindow() 51 | { 52 | return mainwindow_; 53 | } 54 | 55 | void UIWidget::closeEvent(QCloseEvent *event) 56 | { 57 | mainwindow()->close(); 58 | } 59 | 60 | #if 0 61 | void UIWidget::on_listWidget_input_device_currentRowChanged(int currentRow) 62 | { 63 | mainwindow()->on_listWidget_input_device_currentRowChanged(currentRow); 64 | } 65 | 66 | void UIWidget::on_listWidget_input_connection_currentRowChanged(int currentRow) 67 | { 68 | mainwindow()->on_listWidget_input_connection_currentRowChanged(currentRow); 69 | } 70 | 71 | void UIWidget::on_listWidget_display_mode_currentRowChanged(int currentRow) 72 | { 73 | mainwindow()->on_listWidget_display_mode_currentRowChanged(currentRow); 74 | } 75 | 76 | void UIWidget::on_checkBox_audio_stateChanged(int arg1) 77 | { 78 | mainwindow()->on_checkBox_audio_stateChanged(arg1); 79 | } 80 | 81 | void UIWidget::on_checkBox_display_mode_auto_detection_clicked() 82 | { 83 | mainwindow()->checkBox_display_mode_auto_detection(); 84 | } 85 | 86 | void UIWidget::on_checkBox_deinterlace_stateChanged(int arg1) 87 | { 88 | mainwindow()->on_checkBox_deinterlace_stateChanged(arg1); 89 | } 90 | #endif 91 | -------------------------------------------------------------------------------- /UIWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef UIWIDGET_H 2 | #define UIWIDGET_H 3 | 4 | #include 5 | 6 | class MainWindow; 7 | class QListWidget; 8 | class QListWidgetItem; 9 | class QCheckBox; 10 | 11 | namespace Ui { 12 | class UIWidget; 13 | } 14 | 15 | class UIWidget : public QWidget { 16 | Q_OBJECT 17 | private: 18 | Ui::UIWidget *ui; 19 | MainWindow *mainwindow_ = nullptr; 20 | MainWindow *mainwindow(); 21 | protected: 22 | void closeEvent(QCloseEvent *event) override; 23 | public: 24 | explicit UIWidget(QWidget *parent = nullptr); 25 | ~UIWidget() override; 26 | void bindMainWindow(MainWindow *mw) 27 | { 28 | mainwindow_ = mw; 29 | } 30 | QListWidget *listWidget_input_device(); 31 | QListWidget *listWidget_input_connection(); 32 | QListWidget *listWidget_display_mode(); 33 | QCheckBox *checkBox_audio(); 34 | QCheckBox *checkBox_deinterlace(); 35 | QCheckBox *checkBox_display_mode_auto_detection(); 36 | private slots: 37 | #if 0 38 | void on_listWidget_input_device_currentRowChanged(int currentRow); 39 | void on_listWidget_input_connection_currentRowChanged(int currentRow); 40 | void on_listWidget_display_mode_currentRowChanged(int currentRow); 41 | void on_checkBox_audio_stateChanged(int arg1); 42 | void on_checkBox_deinterlace_stateChanged(int arg1); 43 | void on_checkBox_display_mode_auto_detection_clicked(); 44 | #endif 45 | }; 46 | 47 | #endif // UIWIDGET_H 48 | -------------------------------------------------------------------------------- /UIWidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | UIWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 309 10 | 672 11 | 12 | 13 | 14 | Widget 15 | 16 | 17 | 18 | 19 | 20 | Input Device: 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 0 29 | 0 30 | 31 | 32 | 33 | 34 | 16777215 35 | 160 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | Input Connection: 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 0 52 | 0 53 | 54 | 55 | 56 | 57 | 16777215 58 | 160 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | Video Format: 67 | 68 | 69 | 70 | 71 | 72 | 73 | Auto Format Detection 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 0 82 | 0 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | Audio 91 | 92 | 93 | 94 | 95 | 96 | 97 | Deinterlace 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /VideoEncoderOption.h: -------------------------------------------------------------------------------- 1 | #ifndef VIDEOENCODEROPTION_H 2 | #define VIDEOENCODEROPTION_H 3 | 4 | #include "Rational.h" 5 | #include 6 | 7 | namespace VideoEncoderInternal { 8 | class AudioFrame; 9 | class VideoFrame; 10 | } 11 | 12 | namespace VideoEncoderOption { 13 | enum class Format { 14 | MPEG4, 15 | H264_NVENC, 16 | HEVC_NVENC, 17 | LIBSVTAV1, 18 | }; 19 | struct AudioOption { 20 | bool active = false; 21 | bool drop_if_overflow = true; 22 | int sample_rate = 48000; 23 | int channels = 2; 24 | }; 25 | struct VideoOption { 26 | bool active = false; 27 | bool drop_if_overflow = true; 28 | int src_w = 1920; 29 | int src_h = 1080; 30 | int dst_w = 1920; 31 | int dst_h = 1080; 32 | Rational fps = {30, 1}; 33 | }; 34 | } 35 | 36 | 37 | #endif // VIDEOENCODEROPTION_H 38 | -------------------------------------------------------------------------------- /VideoFrameData.cpp: -------------------------------------------------------------------------------- 1 | #include "VideoFrameData.h" 2 | 3 | 4 | -------------------------------------------------------------------------------- /VideoFrameData.h: -------------------------------------------------------------------------------- 1 | #ifndef VIDEOFRAMEDATA_H 2 | #define VIDEOFRAMEDATA_H 3 | 4 | #include "Image.h" 5 | #include 6 | #include 7 | #include 8 | 9 | #include "AncillaryDataTable.h" 10 | #include "DeckLinkAPI.h" 11 | 12 | class VideoFrameData { 13 | public: 14 | enum State { 15 | Idle, 16 | Busy, 17 | Ready, 18 | }; 19 | struct Data { 20 | State state = Idle; 21 | Image image; 22 | QByteArray audio; 23 | QImage image_for_view; 24 | bool signal_valid = false; 25 | 26 | AncillaryDataStruct ancillary_data = {}; 27 | BMDPixelFormat pixfmt = bmdFormatUnspecified; 28 | HDRMetadataStruct hdr_metadata = {}; 29 | }; 30 | std::shared_ptr d; 31 | VideoFrameData() 32 | : d(std::make_shared()) 33 | { 34 | } 35 | operator bool () const 36 | { 37 | return d->signal_valid && d->image; 38 | } 39 | int width() const 40 | { 41 | return d->image.width(); 42 | } 43 | int height() const 44 | { 45 | return d->image.height(); 46 | } 47 | }; 48 | 49 | Q_DECLARE_METATYPE(VideoFrameData) 50 | 51 | #endif // VIDEOFRAMEDATA_H 52 | -------------------------------------------------------------------------------- /common.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMON_H 2 | #define COMMON_H 3 | 4 | // Define custom event type 5 | static const QEvent::Type kAddDeviceEvent = static_cast(QEvent::User + 1); 6 | static const QEvent::Type kRemoveDeviceEvent = static_cast(QEvent::User + 2); 7 | static const QEvent::Type kVideoFormatChangedEvent = static_cast(QEvent::User + 3); 8 | static const QEvent::Type kVideoFrameArrivedEvent = static_cast(QEvent::User + 4); 9 | static const QEvent::Type kProfileActivatedEvent = static_cast(QEvent::User + 5); 10 | 11 | #endif // COMMON_H 12 | -------------------------------------------------------------------------------- /docs/screenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soramimi/DeckLinkCapture/519c7ba5e8af0592d832eb274ebd21444db861f7/docs/screenshot.jpg -------------------------------------------------------------------------------- /includeffmpeg.h: -------------------------------------------------------------------------------- 1 | #ifndef INCLUDEFFMPEG_H 2 | #define INCLUDEFFMPEG_H 3 | 4 | extern "C" { 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | } 14 | 15 | #endif // INCLUDEFFMPEG_H 16 | -------------------------------------------------------------------------------- /joinpath.cpp: -------------------------------------------------------------------------------- 1 | #include "joinpath.h" 2 | #include 3 | #include 4 | #include 5 | 6 | #ifdef WIN32 7 | #pragma warning(disable:4996) 8 | #endif 9 | 10 | template static inline void trimquot(T const **begin, T const **end) 11 | { 12 | if (*begin + 1 < *end && (*begin)[0] == '"' && (*end)[-1] == '"') { 13 | (*begin)++; 14 | (*end)--; 15 | } 16 | } 17 | 18 | template void joinpath_(T const *left, T const *right, U *vec) 19 | { 20 | size_t llen = 0; 21 | size_t rlen = 0; 22 | if (left) { 23 | T const *leftend = left + std::char_traits::length(left); 24 | trimquot(&left, &leftend); 25 | while (left < leftend && (leftend[-1] == '/' || leftend[-1] == '\\')) { 26 | leftend--; 27 | } 28 | llen = leftend - left; 29 | } 30 | if (right) { 31 | T const *rightend = right + std::char_traits::length(right); 32 | trimquot(&right, &rightend); 33 | while (right < rightend && (right[0] == '/' || right[0] == '\\')) { 34 | right++; 35 | } 36 | rlen = rightend - right; 37 | } 38 | vec->resize(llen + 1 + rlen); 39 | if (llen > 0) { 40 | std::char_traits::copy(&vec->at(0), left, llen); 41 | } 42 | vec->at(llen) = '/'; 43 | if (rlen > 0) { 44 | std::char_traits::copy(&vec->at(llen + 1), right, rlen); 45 | } 46 | } 47 | 48 | std::string joinpath(char const *left, char const *right) 49 | { 50 | std::vector vec; 51 | joinpath_(left, right, &vec); 52 | return std::string(vec.begin(), vec.end()); 53 | } 54 | 55 | std::string joinpath(std::string const &left, std::string const &right) 56 | { 57 | return joinpath(left.c_str(), right.c_str()); 58 | } 59 | 60 | QString qjoinpath(ushort const *left, ushort const *right) 61 | { 62 | std::vector vec; 63 | joinpath_(left, right, &vec); 64 | if (vec.empty()) return QString(); 65 | return QString::fromUtf16(&vec[0], vec.size()); 66 | } 67 | 68 | -------------------------------------------------------------------------------- /joinpath.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __JOINPATH_H 3 | #define __JOINPATH_H 4 | 5 | #include 6 | 7 | std::string joinpath(char const *left, char const *right); 8 | std::string joinpath(std::string const &left, std::string const &right); 9 | 10 | static inline std::string operator / (std::string const &left, std::string const &right) 11 | { 12 | return joinpath(left, right); 13 | } 14 | 15 | #include 16 | QString qjoinpath(ushort const *left, ushort const *right); 17 | inline QString joinpath(QString const &left, QString const &right) 18 | { 19 | return qjoinpath(left.utf16(), right.utf16()); 20 | } 21 | 22 | static inline QString operator / (QString const &left, QString const &right) 23 | { 24 | return joinpath(left, right); 25 | } 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /main.cpp: -------------------------------------------------------------------------------- 1 | #include "MainWindow.h" 2 | #include "VideoFrameData.h" 3 | #include "GlobalData.h" 4 | #include "joinpath.h" 5 | #include "main.h" 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include "CudaPlugin/src/CudaPlugin.h" 14 | 15 | class DebugMessageHandler { 16 | public: 17 | DebugMessageHandler() = delete; 18 | 19 | static void install(); 20 | 21 | static void abort(const QMessageLogContext &context, const QString &message); 22 | }; 23 | 24 | void DebugMessageHandler::abort(QMessageLogContext const &/*context*/, const QString &/*message*/) 25 | { 26 | ::abort(); 27 | } 28 | 29 | void debugMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message) 30 | { 31 | (QTextStream(stderr) << qFormatLogMessage(type, context, message) << '\n').flush(); 32 | 33 | if (type == QtFatalMsg) { 34 | DebugMessageHandler::abort(context, message); 35 | } 36 | } 37 | 38 | void DebugMessageHandler::install() 39 | { 40 | qInstallMessageHandler(debugMessageHandler); 41 | } 42 | 43 | Cuda *get_cuda_plugin() 44 | { 45 | return global->cuda_plugin.get(); 46 | } 47 | 48 | int main(int argc, char *argv[]) 49 | { 50 | putenv("QT_ASSUME_STDERR_HAS_CONSOLE=1"); 51 | 52 | #ifdef Q_OS_WIN 53 | CoInitialize(nullptr); 54 | #endif 55 | 56 | DebugMessageHandler::install(); 57 | 58 | global = new GlobalData; 59 | 60 | global->organization_name = ORGANIZATION_NAME; 61 | global->application_name = APPLICATION_NAME; 62 | global->generic_config_dir = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation); 63 | global->app_config_dir = global->generic_config_dir / global->organization_name / global->application_name; 64 | global->config_file_path = joinpath(global->app_config_dir, global->application_name + ".ini"); 65 | if (!QFileInfo(global->app_config_dir).isDir()) { 66 | QDir().mkpath(global->app_config_dir); 67 | } 68 | 69 | QApplication a(argc, argv); 70 | 71 | QPluginLoader loader("cudaplugin"); 72 | CudaInterface *plugin = dynamic_cast(loader.instance()); 73 | if (plugin) { 74 | global->cuda_plugin = std::shared_ptr(plugin->create()); 75 | if (!global->cuda_plugin->init()) { 76 | qDebug() << "failed to init the plugin"; 77 | } 78 | } else { 79 | qDebug() << "failed to load the plugin"; 80 | } 81 | 82 | qRegisterMetaType(); 83 | qRegisterMetaType(); 84 | 85 | { 86 | QPixmap pm(1, 1); 87 | pm.fill(Qt::transparent); 88 | global->invisible_cursor = QCursor(pm); 89 | } 90 | 91 | MainWindow w; 92 | w.show(); 93 | w.setup(); 94 | 95 | int r = a.exec(); 96 | 97 | #ifdef Q_OS_WIN 98 | CoUninitialize(); 99 | #endif 100 | 101 | delete global; 102 | 103 | return r; 104 | } 105 | -------------------------------------------------------------------------------- /main.h: -------------------------------------------------------------------------------- 1 | #ifndef MAIN_H 2 | #define MAIN_H 3 | 4 | #endif // MAIN_H 5 | -------------------------------------------------------------------------------- /resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /sdk/Linux/include/DeckLinkAPIConfiguration_v10_11.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2017 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPICONFIGURATION_v10_11_H 29 | #define BMD_DECKLINKAPICONFIGURATION_v10_11_H 30 | 31 | #include "DeckLinkAPIConfiguration.h" 32 | 33 | // Interface ID Declarations 34 | 35 | BMD_CONST REFIID IID_IDeckLinkConfiguration_v10_11 = /* EF90380B-4AE5-4346-9077-E288E149F129 */ {0xEF,0x90,0x38,0x0B,0x4A,0xE5,0x43,0x46,0x90,0x77,0xE2,0x88,0xE1,0x49,0xF1,0x29}; 36 | 37 | /* Enum BMDDeckLinkConfigurationID_v10_11 - DeckLink Configuration ID */ 38 | 39 | typedef uint32_t BMDDeckLinkConfigurationID_v10_11; 40 | enum _BMDDeckLinkConfigurationID_v10_11 { 41 | 42 | /* Video Input/Output Integers */ 43 | 44 | bmdDeckLinkConfigDuplexMode_v10_11 = /* 'dupx' */ 0x64757078, 45 | }; 46 | 47 | // Forward Declarations 48 | 49 | class IDeckLinkConfiguration_v10_11; 50 | 51 | /* Interface IDeckLinkConfiguration_v10_11 - DeckLink Configuration interface */ 52 | 53 | class BMD_PUBLIC IDeckLinkConfiguration_v10_11 : public IUnknown 54 | { 55 | public: 56 | virtual HRESULT SetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ bool value) = 0; 57 | virtual HRESULT GetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ bool *value) = 0; 58 | virtual HRESULT SetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ int64_t value) = 0; 59 | virtual HRESULT GetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ int64_t *value) = 0; 60 | virtual HRESULT SetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ double value) = 0; 61 | virtual HRESULT GetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ double *value) = 0; 62 | virtual HRESULT SetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ const char *value) = 0; 63 | virtual HRESULT GetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ const char **value) = 0; 64 | virtual HRESULT WriteConfigurationToPreferences (void) = 0; 65 | 66 | protected: 67 | virtual ~IDeckLinkConfiguration_v10_11 () {} // call Release method to drop reference count 68 | }; 69 | 70 | 71 | #endif /* defined(BMD_DECKLINKAPICONFIGURATION_v10_11_H) */ 72 | -------------------------------------------------------------------------------- /sdk/Linux/include/DeckLinkAPIConfiguration_v10_2.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2014 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPICONFIGURATION_v10_2_H 29 | #define BMD_DECKLINKAPICONFIGURATION_v10_2_H 30 | 31 | #include "DeckLinkAPIConfiguration.h" 32 | 33 | // Interface ID Declarations 34 | 35 | BMD_CONST REFIID IID_IDeckLinkConfiguration_v10_2 = /* C679A35B-610C-4D09-B748-1D0478100FC0 */ {0xC6,0x79,0xA3,0x5B,0x61,0x0C,0x4D,0x09,0xB7,0x48,0x1D,0x04,0x78,0x10,0x0F,0xC0}; 36 | 37 | // Forward Declarations 38 | 39 | class IDeckLinkConfiguration_v10_2; 40 | 41 | /* Interface IDeckLinkConfiguration_v10_2 - DeckLink Configuration interface */ 42 | 43 | class BMD_PUBLIC IDeckLinkConfiguration_v10_2 : public IUnknown 44 | { 45 | public: 46 | virtual HRESULT SetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ bool value) = 0; 47 | virtual HRESULT GetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ bool *value) = 0; 48 | virtual HRESULT SetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ int64_t value) = 0; 49 | virtual HRESULT GetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ int64_t *value) = 0; 50 | virtual HRESULT SetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ double value) = 0; 51 | virtual HRESULT GetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ double *value) = 0; 52 | virtual HRESULT SetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ const char *value) = 0; 53 | virtual HRESULT GetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ const char **value) = 0; 54 | virtual HRESULT WriteConfigurationToPreferences (void) = 0; 55 | 56 | protected: 57 | virtual ~IDeckLinkConfiguration_v10_2 () {} // call Release method to drop reference count 58 | }; 59 | 60 | #endif /* defined(BMD_DECKLINKAPICONFIGURATION_v10_2_H) */ 61 | -------------------------------------------------------------------------------- /sdk/Linux/include/DeckLinkAPIConfiguration_v10_4.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2015 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPICONFIGURATION_v10_4_H 29 | #define BMD_DECKLINKAPICONFIGURATION_v10_4_H 30 | 31 | #include "DeckLinkAPIConfiguration.h" 32 | 33 | // Interface ID Declarations 34 | 35 | BMD_CONST REFIID IID_IDeckLinkConfiguration_v10_4 = /* 1E69FCF6-4203-4936-8076-2A9F4CFD50CB */ {0x1E,0x69,0xFC,0xF6,0x42,0x03,0x49,0x36,0x80,0x76,0x2A,0x9F,0x4C,0xFD,0x50,0xCB}; 36 | 37 | 38 | // 39 | // Forward Declarations 40 | 41 | class IDeckLinkConfiguration_v10_4; 42 | 43 | /* Interface IDeckLinkConfiguration_v10_4 - DeckLink Configuration interface */ 44 | 45 | class BMD_PUBLIC IDeckLinkConfiguration_v10_4 : public IUnknown 46 | { 47 | public: 48 | virtual HRESULT SetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ bool value) = 0; 49 | virtual HRESULT GetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ bool *value) = 0; 50 | virtual HRESULT SetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ int64_t value) = 0; 51 | virtual HRESULT GetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ int64_t *value) = 0; 52 | virtual HRESULT SetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ double value) = 0; 53 | virtual HRESULT GetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ double *value) = 0; 54 | virtual HRESULT SetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ const char *value) = 0; 55 | virtual HRESULT GetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ const char **value) = 0; 56 | virtual HRESULT WriteConfigurationToPreferences (void) = 0; 57 | 58 | protected: 59 | virtual ~IDeckLinkConfiguration_v10_4 () {} // call Release method to drop reference count 60 | }; 61 | 62 | 63 | #endif /* defined(BMD_DECKLINKAPICONFIGURATION_v10_4_H) */ 64 | -------------------------------------------------------------------------------- /sdk/Linux/include/DeckLinkAPIConfiguration_v10_5.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2015 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPICONFIGURATION_v10_5_H 29 | #define BMD_DECKLINKAPICONFIGURATION_v10_5_H 30 | 31 | #include "DeckLinkAPIConfiguration.h" 32 | 33 | // Interface ID Declarations 34 | 35 | BMD_CONST REFIID IID_IDeckLinkEncoderConfiguration_v10_5 = /* 67455668-0848-45DF-8D8E-350A77C9A028 */ {0x67,0x45,0x56,0x68,0x08,0x48,0x45,0xDF,0x8D,0x8E,0x35,0x0A,0x77,0xC9,0xA0,0x28}; 36 | 37 | // Forward Declarations 38 | 39 | class IDeckLinkEncoderConfiguration_v10_5; 40 | 41 | /* Interface IDeckLinkEncoderConfiguration_v10_5 - DeckLink Encoder Configuration interface. Obtained from IDeckLinkEncoderInput */ 42 | 43 | class BMD_PUBLIC IDeckLinkEncoderConfiguration_v10_5 : public IUnknown 44 | { 45 | public: 46 | virtual HRESULT SetFlag (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* in */ bool value) = 0; 47 | virtual HRESULT GetFlag (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ bool *value) = 0; 48 | virtual HRESULT SetInt (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* in */ int64_t value) = 0; 49 | virtual HRESULT GetInt (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ int64_t *value) = 0; 50 | virtual HRESULT SetFloat (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* in */ double value) = 0; 51 | virtual HRESULT GetFloat (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ double *value) = 0; 52 | virtual HRESULT SetString (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* in */ const char *value) = 0; 53 | virtual HRESULT GetString (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ const char **value) = 0; 54 | virtual HRESULT GetDecoderConfigurationInfo (/* out */ void *buffer, /* in */ long bufferSize, /* out */ long *returnedSize) = 0; 55 | 56 | protected: 57 | virtual ~IDeckLinkEncoderConfiguration_v10_5 () {} // call Release method to drop reference count 58 | }; 59 | 60 | #endif /* defined(BMD_DECKLINKAPICONFIGURATION_v10_5_H) */ 61 | -------------------------------------------------------------------------------- /sdk/Linux/include/DeckLinkAPIConfiguration_v10_9.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2017 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPICONFIGURATION_v10_9_H 29 | #define BMD_DECKLINKAPICONFIGURATION_v10_9_H 30 | 31 | #include "DeckLinkAPIConfiguration.h" 32 | 33 | // Interface ID Declarations 34 | 35 | BMD_CONST REFIID IID_IDeckLinkConfiguration_v10_9 = /* CB71734A-FE37-4E8D-8E13-802133A1C3F2 */ {0xCB,0x71,0x73,0x4A,0xFE,0x37,0x4E,0x8D,0x8E,0x13,0x80,0x21,0x33,0xA1,0xC3,0xF2}; 36 | 37 | // 38 | // Forward Declarations 39 | 40 | class IDeckLinkConfiguration_v10_9; 41 | 42 | /* Interface IDeckLinkConfiguration_v10_9 - DeckLink Configuration interface */ 43 | 44 | class BMD_PUBLIC IDeckLinkConfiguration_v10_9 : public IUnknown 45 | { 46 | public: 47 | virtual HRESULT SetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ bool value) = 0; 48 | virtual HRESULT GetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ bool *value) = 0; 49 | virtual HRESULT SetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ int64_t value) = 0; 50 | virtual HRESULT GetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ int64_t *value) = 0; 51 | virtual HRESULT SetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ double value) = 0; 52 | virtual HRESULT GetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ double *value) = 0; 53 | virtual HRESULT SetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ const char *value) = 0; 54 | virtual HRESULT GetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ const char **value) = 0; 55 | virtual HRESULT WriteConfigurationToPreferences (void) = 0; 56 | 57 | protected: 58 | virtual ~IDeckLinkConfiguration_v10_9 () {} // call Release method to drop reference count 59 | }; 60 | 61 | 62 | #endif /* defined(BMD_DECKLINKAPICONFIGURATION_v10_9_H) */ 63 | -------------------------------------------------------------------------------- /sdk/Linux/include/DeckLinkAPIDiscovery.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2020 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPIDISCOVERY_H 29 | #define BMD_DECKLINKAPIDISCOVERY_H 30 | 31 | 32 | #ifndef BMD_CONST 33 | #if defined(_MSC_VER) 34 | #define BMD_CONST __declspec(selectany) static const 35 | #else 36 | #define BMD_CONST static const 37 | #endif 38 | #endif 39 | 40 | #ifndef BMD_PUBLIC 41 | #define BMD_PUBLIC 42 | #endif 43 | 44 | // Type Declarations 45 | 46 | 47 | // Interface ID Declarations 48 | 49 | BMD_CONST REFIID IID_IDeckLink = /* C418FBDD-0587-48ED-8FE5-640F0A14AF91 */ { 0xC4,0x18,0xFB,0xDD,0x05,0x87,0x48,0xED,0x8F,0xE5,0x64,0x0F,0x0A,0x14,0xAF,0x91 }; 50 | 51 | #if defined(__cplusplus) 52 | 53 | // Forward Declarations 54 | 55 | class IDeckLink; 56 | 57 | /* Interface IDeckLink - Represents a DeckLink device */ 58 | 59 | class BMD_PUBLIC IDeckLink : public IUnknown 60 | { 61 | public: 62 | virtual HRESULT GetModelName (/* out */ const char** modelName) = 0; 63 | virtual HRESULT GetDisplayName (/* out */ const char** displayName) = 0; 64 | 65 | protected: 66 | virtual ~IDeckLink () {} // call Release method to drop reference count 67 | }; 68 | 69 | /* Functions */ 70 | 71 | extern "C" { 72 | 73 | 74 | } 75 | 76 | #endif /* defined(__cplusplus) */ 77 | #endif /* defined(BMD_DECKLINKAPIDISCOVERY_H) */ 78 | -------------------------------------------------------------------------------- /sdk/Linux/include/DeckLinkAPIDispatch_v7_6.cpp: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2009 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | **/ 27 | 28 | #include 29 | #include 30 | #include 31 | 32 | #include "DeckLinkAPI_v7_6.h" 33 | 34 | #define kDeckLinkAPI_Name "libDeckLinkAPI.so" 35 | #define KDeckLinkPreviewAPI_Name "libDeckLinkPreviewAPI.so" 36 | 37 | typedef IDeckLinkIterator* (*CreateIteratorFunc_v7_6)(void); 38 | typedef IDeckLinkGLScreenPreviewHelper_v7_6* (*CreateOpenGLScreenPreviewHelperFunc_v7_6)(void); 39 | typedef IDeckLinkVideoConversion_v7_6* (*CreateVideoConversionInstanceFunc_v7_6)(void); 40 | 41 | static pthread_once_t gDeckLinkOnceControl = PTHREAD_ONCE_INIT; 42 | static pthread_once_t gPreviewOnceControl = PTHREAD_ONCE_INIT; 43 | 44 | static CreateIteratorFunc_v7_6 gCreateIteratorFunc = NULL; 45 | static CreateOpenGLScreenPreviewHelperFunc_v7_6 gCreateOpenGLPreviewFunc = NULL; 46 | static CreateVideoConversionInstanceFunc_v7_6 gCreateVideoConversionFunc = NULL; 47 | 48 | static void InitDeckLinkAPI_v7_6 (void) 49 | { 50 | void *libraryHandle; 51 | 52 | libraryHandle = dlopen(kDeckLinkAPI_Name, RTLD_NOW|RTLD_GLOBAL); 53 | if (!libraryHandle) 54 | { 55 | fprintf(stderr, "%s\n", dlerror()); 56 | return; 57 | } 58 | 59 | gCreateIteratorFunc = (CreateIteratorFunc_v7_6)dlsym(libraryHandle, "CreateDeckLinkIteratorInstance"); 60 | if (!gCreateIteratorFunc) 61 | fprintf(stderr, "%s\n", dlerror()); 62 | gCreateVideoConversionFunc = (CreateVideoConversionInstanceFunc_v7_6)dlsym(libraryHandle, "CreateVideoConversionInstance"); 63 | if (!gCreateVideoConversionFunc) 64 | fprintf(stderr, "%s\n", dlerror()); 65 | } 66 | 67 | static void InitDeckLinkPreviewAPI_v7_6 (void) 68 | { 69 | void *libraryHandle; 70 | 71 | libraryHandle = dlopen(KDeckLinkPreviewAPI_Name, RTLD_NOW|RTLD_GLOBAL); 72 | if (!libraryHandle) 73 | { 74 | fprintf(stderr, "%s\n", dlerror()); 75 | return; 76 | } 77 | gCreateOpenGLPreviewFunc = (CreateOpenGLScreenPreviewHelperFunc_v7_6)dlsym(libraryHandle, "CreateOpenGLScreenPreviewHelper"); 78 | if (!gCreateOpenGLPreviewFunc) 79 | fprintf(stderr, "%s\n", dlerror()); 80 | } 81 | 82 | IDeckLinkIterator* CreateDeckLinkIteratorInstance_v7_6 (void) 83 | { 84 | pthread_once(&gDeckLinkOnceControl, InitDeckLinkAPI_v7_6); 85 | 86 | if (gCreateIteratorFunc == NULL) 87 | return NULL; 88 | return gCreateIteratorFunc(); 89 | } 90 | 91 | IDeckLinkGLScreenPreviewHelper_v7_6* CreateOpenGLScreenPreviewHelper_v7_6 (void) 92 | { 93 | pthread_once(&gDeckLinkOnceControl, InitDeckLinkAPI_v7_6); 94 | pthread_once(&gPreviewOnceControl, InitDeckLinkPreviewAPI_v7_6); 95 | 96 | if (gCreateOpenGLPreviewFunc == NULL) 97 | return NULL; 98 | return gCreateOpenGLPreviewFunc(); 99 | } 100 | 101 | IDeckLinkVideoConversion_v7_6* CreateVideoConversionInstance_v7_6 (void) 102 | { 103 | pthread_once(&gDeckLinkOnceControl, InitDeckLinkAPI_v7_6); 104 | 105 | if (gCreateVideoConversionFunc == NULL) 106 | return NULL; 107 | return gCreateVideoConversionFunc(); 108 | } 109 | 110 | -------------------------------------------------------------------------------- /sdk/Linux/include/DeckLinkAPIVersion.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | * ** Copyright (c) 2014 Blackmagic Design 3 | * ** 4 | * ** Permission is hereby granted, free of charge, to any person or organization 5 | * ** obtaining a copy of the software and accompanying documentation covered by 6 | * ** this license (the "Software") to use, reproduce, display, distribute, 7 | * ** execute, and transmit the Software, and to prepare derivative works of the 8 | * ** Software, and to permit third-parties to whom the Software is furnished to 9 | * ** do so, all subject to the following: 10 | * ** 11 | * ** The copyright notices in the Software and this entire statement, including 12 | * ** the above license grant, this restriction and the following disclaimer, 13 | * ** must be included in all copies of the Software, in whole or in part, and 14 | * ** all derivative works of the Software, unless such copies or derivative 15 | * ** works are solely in the form of machine-executable object code generated by 16 | * ** a source language processor. 17 | * ** 18 | * ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | * ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | * ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | * ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | * ** DEALINGS IN THE SOFTWARE. 25 | * ** -LICENSE-END- 26 | * */ 27 | 28 | /* DeckLinkAPIVersion.h */ 29 | 30 | #ifndef __DeckLink_API_Version_h__ 31 | #define __DeckLink_API_Version_h__ 32 | 33 | #define BLACKMAGIC_DECKLINK_API_VERSION 0x0b050100 34 | #define BLACKMAGIC_DECKLINK_API_VERSION_STRING "11.5.1" 35 | 36 | #endif // __DeckLink_API_Version_h__ 37 | 38 | -------------------------------------------------------------------------------- /sdk/Linux/include/DeckLinkAPIVideoEncoderInput_v10_11.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2017 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPIVIDEOENCODERINPUT_v10_11_H 29 | #define BMD_DECKLINKAPIVIDEOENCODERINPUT_v10_11_H 30 | 31 | #include "DeckLinkAPI.h" 32 | #include "DeckLinkAPI_v10_11.h" 33 | 34 | // Type Declarations 35 | BMD_CONST REFIID IID_IDeckLinkEncoderInput_v10_11 = /* 270587DA-6B7D-42E7-A1F0-6D853F581185 */ {0x27,0x05,0x87,0xDA,0x6B,0x7D,0x42,0xE7,0xA1,0xF0,0x6D,0x85,0x3F,0x58,0x11,0x85}; 36 | 37 | /* Interface IDeckLinkEncoderInput_v10_11 - Created by QueryInterface from IDeckLink. */ 38 | 39 | class IDeckLinkEncoderInput_v10_11 : public IUnknown 40 | { 41 | public: 42 | virtual HRESULT DoesSupportVideoMode (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags, /* out */ BMDDisplayModeSupport_v10_11 *result, /* out */ IDeckLinkDisplayMode **resultDisplayMode) = 0; 43 | virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator **iterator) = 0; 44 | 45 | /* Video Input */ 46 | 47 | virtual HRESULT EnableVideoInput (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags) = 0; 48 | virtual HRESULT DisableVideoInput (void) = 0; 49 | virtual HRESULT GetAvailablePacketsCount (/* out */ uint32_t *availablePacketsCount) = 0; 50 | virtual HRESULT SetMemoryAllocator (/* in */ IDeckLinkMemoryAllocator *theAllocator) = 0; 51 | 52 | /* Audio Input */ 53 | 54 | virtual HRESULT EnableAudioInput (/* in */ BMDAudioFormat audioFormat, /* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount) = 0; 55 | virtual HRESULT DisableAudioInput (void) = 0; 56 | virtual HRESULT GetAvailableAudioSampleFrameCount (/* out */ uint32_t *availableSampleFrameCount) = 0; 57 | 58 | /* Input Control */ 59 | 60 | virtual HRESULT StartStreams (void) = 0; 61 | virtual HRESULT StopStreams (void) = 0; 62 | virtual HRESULT PauseStreams (void) = 0; 63 | virtual HRESULT FlushStreams (void) = 0; 64 | virtual HRESULT SetCallback (/* in */ IDeckLinkEncoderInputCallback *theCallback) = 0; 65 | 66 | /* Hardware Timing */ 67 | 68 | virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *hardwareTime, /* out */ BMDTimeValue *timeInFrame, /* out */ BMDTimeValue *ticksPerFrame) = 0; 69 | 70 | protected: 71 | virtual ~IDeckLinkEncoderInput_v10_11 () {} // call Release method to drop reference count 72 | }; 73 | 74 | #endif /* defined(BMD_DECKLINKAPIVIDEOENCODERINPUT_v10_11_H) */ 75 | -------------------------------------------------------------------------------- /sdk/Linux/include/DeckLinkAPIVideoInput_v10_11.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2017 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPIVIDEOINPUT_v10_11_H 29 | #define BMD_DECKLINKAPIVIDEOINPUT_v10_11_H 30 | 31 | #include "DeckLinkAPI.h" 32 | #include "DeckLinkAPI_v10_11.h" 33 | 34 | // Type Declarations 35 | BMD_CONST REFIID IID_IDeckLinkInput_v10_11 = /* AF22762B-DFAC-4846-AA79-FA8883560995 */ {0xAF,0x22,0x76,0x2B,0xDF,0xAC,0x48,0x46,0xAA,0x79,0xFA,0x88,0x83,0x56,0x09,0x95}; 36 | 37 | /* Interface IDeckLinkInput_v10_11 - DeckLink input interface. */ 38 | 39 | class IDeckLinkInput_v10_11 : public IUnknown 40 | { 41 | public: 42 | virtual HRESULT DoesSupportVideoMode (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags, /* out */ BMDDisplayModeSupport_v10_11 *result, /* out */ IDeckLinkDisplayMode **resultDisplayMode) = 0; 43 | virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator **iterator) = 0; 44 | 45 | virtual HRESULT SetScreenPreviewCallback (/* in */ IDeckLinkScreenPreviewCallback *previewCallback) = 0; 46 | 47 | /* Video Input */ 48 | 49 | virtual HRESULT EnableVideoInput (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags) = 0; 50 | virtual HRESULT DisableVideoInput (void) = 0; 51 | virtual HRESULT GetAvailableVideoFrameCount (/* out */ uint32_t *availableFrameCount) = 0; 52 | virtual HRESULT SetVideoInputFrameMemoryAllocator (/* in */ IDeckLinkMemoryAllocator *theAllocator) = 0; 53 | 54 | /* Audio Input */ 55 | 56 | virtual HRESULT EnableAudioInput (/* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount) = 0; 57 | virtual HRESULT DisableAudioInput (void) = 0; 58 | virtual HRESULT GetAvailableAudioSampleFrameCount (/* out */ uint32_t *availableSampleFrameCount) = 0; 59 | 60 | /* Input Control */ 61 | 62 | virtual HRESULT StartStreams (void) = 0; 63 | virtual HRESULT StopStreams (void) = 0; 64 | virtual HRESULT PauseStreams (void) = 0; 65 | virtual HRESULT FlushStreams (void) = 0; 66 | virtual HRESULT SetCallback (/* in */ IDeckLinkInputCallback *theCallback) = 0; 67 | 68 | /* Hardware Timing */ 69 | 70 | virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *hardwareTime, /* out */ BMDTimeValue *timeInFrame, /* out */ BMDTimeValue *ticksPerFrame) = 0; 71 | 72 | protected: 73 | virtual ~IDeckLinkInput_v10_11 () {} // call Release method to drop reference count 74 | }; 75 | 76 | #endif /* defined(BMD_DECKLINKAPIVIDEOINPUT_v10_11_H) */ 77 | -------------------------------------------------------------------------------- /sdk/Linux/include/DeckLinkAPIVideoInput_v11_4.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2019 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPIVIDEOINPUT_v11_4_H 29 | #define BMD_DECKLINKAPIVIDEOINPUT_v11_4_H 30 | 31 | #include "DeckLinkAPI.h" 32 | 33 | // Type Declarations 34 | BMD_CONST REFIID IID_IDeckLinkInput_v11_4 = /* 2A88CF76-F494-4216-A7EF-DC74EEB83882 */ { 0x2A,0x88,0xCF,0x76,0xF4,0x94,0x42,0x16,0xA7,0xEF,0xDC,0x74,0xEE,0xB8,0x38,0x82 }; 35 | 36 | /* Interface IDeckLinkInput - Created by QueryInterface from IDeckLink. */ 37 | 38 | class BMD_PUBLIC IDeckLinkInput_v11_4 : public IUnknown 39 | { 40 | public: 41 | virtual HRESULT DoesSupportVideoMode (/* in */ BMDVideoConnection connection /* If a value of 0 is specified, the caller does not care about the connection */, /* in */ BMDDisplayMode requestedMode, /* in */ BMDPixelFormat requestedPixelFormat, /* in */ BMDSupportedVideoModeFlags flags, /* out */ bool* supported) = 0; 42 | virtual HRESULT GetDisplayMode (/* in */ BMDDisplayMode displayMode, /* out */ IDeckLinkDisplayMode** resultDisplayMode) = 0; 43 | virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator** iterator) = 0; 44 | virtual HRESULT SetScreenPreviewCallback (/* in */ IDeckLinkScreenPreviewCallback* previewCallback) = 0; 45 | 46 | /* Video Input */ 47 | 48 | virtual HRESULT EnableVideoInput (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags) = 0; 49 | virtual HRESULT DisableVideoInput (void) = 0; 50 | virtual HRESULT GetAvailableVideoFrameCount (/* out */ uint32_t* availableFrameCount) = 0; 51 | virtual HRESULT SetVideoInputFrameMemoryAllocator (/* in */ IDeckLinkMemoryAllocator* theAllocator) = 0; 52 | 53 | /* Audio Input */ 54 | 55 | virtual HRESULT EnableAudioInput (/* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount) = 0; 56 | virtual HRESULT DisableAudioInput (void) = 0; 57 | virtual HRESULT GetAvailableAudioSampleFrameCount (/* out */ uint32_t* availableSampleFrameCount) = 0; 58 | 59 | /* Input Control */ 60 | 61 | virtual HRESULT StartStreams (void) = 0; 62 | virtual HRESULT StopStreams (void) = 0; 63 | virtual HRESULT PauseStreams (void) = 0; 64 | virtual HRESULT FlushStreams (void) = 0; 65 | virtual HRESULT SetCallback (/* in */ IDeckLinkInputCallback* theCallback) = 0; 66 | 67 | /* Hardware Timing */ 68 | 69 | virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue* hardwareTime, /* out */ BMDTimeValue* timeInFrame, /* out */ BMDTimeValue* ticksPerFrame) = 0; 70 | 71 | protected: 72 | virtual ~IDeckLinkInput_v11_4 () {} // call Release method to drop reference count 73 | }; 74 | 75 | #endif /* defined(BMD_DECKLINKAPIVIDEOINPUT_v11_4_H) */ 76 | -------------------------------------------------------------------------------- /sdk/Linux/include/DeckLinkAPI_v10_2.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2014 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPI_v10_2_H 29 | #define BMD_DECKLINKAPI_v10_2_H 30 | 31 | #include "DeckLinkAPI.h" 32 | 33 | // Type Declarations 34 | 35 | /* Enum BMDDeckLinkConfigurationID - DeckLink Configuration ID */ 36 | 37 | typedef uint32_t BMDDeckLinkConfigurationID_v10_2; 38 | enum _BMDDeckLinkConfigurationID_v10_2 { 39 | /* Video output flags */ 40 | 41 | bmdDeckLinkConfig3GBpsVideoOutput_v10_2 = '3gbs', 42 | }; 43 | 44 | /* Enum BMDAudioConnection_v10_2 - Audio connection types */ 45 | 46 | typedef uint32_t BMDAudioConnection_v10_2; 47 | enum _BMDAudioConnection_v10_2 { 48 | bmdAudioConnectionEmbedded_v10_2 = /* 'embd' */ 0x656D6264, 49 | bmdAudioConnectionAESEBU_v10_2 = /* 'aes ' */ 0x61657320, 50 | bmdAudioConnectionAnalog_v10_2 = /* 'anlg' */ 0x616E6C67, 51 | bmdAudioConnectionAnalogXLR_v10_2 = /* 'axlr' */ 0x61786C72, 52 | bmdAudioConnectionAnalogRCA_v10_2 = /* 'arca' */ 0x61726361 53 | }; 54 | 55 | #endif /* defined(BMD_DECKLINKAPI_v10_2_H) */ 56 | -------------------------------------------------------------------------------- /sdk/Linux/include/DeckLinkAPI_v10_4.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2015 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPI_v10_4_H 29 | #define BMD_DECKLINKAPI_v10_4_H 30 | 31 | #include "DeckLinkAPI.h" 32 | 33 | // Type Declarations 34 | 35 | /* Enum BMDDeckLinkConfigurationID - DeckLink Configuration ID */ 36 | 37 | typedef uint32_t BMDDeckLinkConfigurationID_v10_4; 38 | enum _BMDDeckLinkConfigurationID_v10_4 { 39 | 40 | /* Video output flags */ 41 | 42 | bmdDeckLinkConfigSingleLinkVideoOutput_v10_4 = /* 'sglo' */ 0x73676C6F, 43 | }; 44 | 45 | #endif /* defined(BMD_DECKLINKAPI_v10_4_H) */ 46 | -------------------------------------------------------------------------------- /sdk/Linux/include/DeckLinkAPI_v10_5.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2015 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPI_v10_5_H 29 | #define BMD_DECKLINKAPI_v10_5_H 30 | 31 | #include "DeckLinkAPI.h" 32 | 33 | // Type Declarations 34 | 35 | /* Enum BMDDeckLinkAttributeID - DeckLink Attribute ID */ 36 | 37 | typedef uint32_t BMDDeckLinkAttributeID_v10_5; 38 | enum _BMDDeckLinkAttributeID_v10_5 { 39 | 40 | /* Integers */ 41 | 42 | BMDDeckLinkDeviceBusyState_v10_5 = /* 'dbst' */ 0x64627374, 43 | }; 44 | 45 | #endif /* defined(BMD_DECKLINKAPI_v10_5_H) */ 46 | 47 | -------------------------------------------------------------------------------- /sdk/Linux/include/DeckLinkAPI_v10_6.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2016 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPI_v10_6_H 29 | #define BMD_DECKLINKAPI_v10_6_H 30 | 31 | #include "DeckLinkAPI.h" 32 | 33 | // Type Declarations 34 | 35 | /* Enum BMDDeckLinkAttributeID - DeckLink Attribute ID */ 36 | 37 | typedef uint32_t BMDDeckLinkAttributeID_c10_6; 38 | enum _BMDDeckLinkAttributeID_v10_6 { 39 | 40 | /* Flags */ 41 | 42 | BMDDeckLinkSupportsDesktopDisplay_v10_6 = /* 'extd' */ 0x65787464, 43 | }; 44 | 45 | typedef uint32_t BMDIdleVideoOutputOperation_v10_6; 46 | enum _BMDIdleVideoOutputOperation_v10_6 { 47 | bmdIdleVideoOutputDesktop_v10_6 = /* 'desk' */ 0x6465736B 48 | }; 49 | 50 | #endif /* defined(BMD_DECKLINKAPI_v10_6_H) */ 51 | -------------------------------------------------------------------------------- /sdk/Linux/include/DeckLinkAPI_v10_9.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2017 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPI_v10_9_H 29 | #define BMD_DECKLINKAPI_v10_9_H 30 | 31 | #include "DeckLinkAPI.h" 32 | 33 | // Type Declarations 34 | 35 | /* Enum BMDDeckLinkAttributeID - DeckLink Attribute ID */ 36 | 37 | typedef uint32_t BMDDeckLinkConfigurationID_v10_9; 38 | enum _BMDDeckLinkConfigurationID_v10_9 { 39 | 40 | /* Flags */ 41 | 42 | bmdDeckLinkConfig1080pNotPsF_v10_9 = 'fpro', 43 | }; 44 | 45 | #endif /* defined(BMD_DECKLINKAPI_v10_9_H) */ 46 | -------------------------------------------------------------------------------- /sdk/Linux/include/DeckLinkAPI_v8_0.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2011 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPI_v8_0_H 29 | #define BMD_DECKLINKAPI_v8_0_H 30 | 31 | #include "DeckLinkAPI.h" 32 | 33 | // Interface ID Declarations 34 | 35 | #define IID_IDeckLink_v8_0 /* 62BFF75D-6569-4E55-8D4D-66AA03829ABC */ (REFIID){0x62,0xBF,0xF7,0x5D,0x65,0x69,0x4E,0x55,0x8D,0x4D,0x66,0xAA,0x03,0x82,0x9A,0xBC} 36 | #define IID_IDeckLinkIterator_v8_0 /* 74E936FC-CC28-4A67-81A0-1E94E52D4E69 */ (REFIID){0x74,0xE9,0x36,0xFC,0xCC,0x28,0x4A,0x67,0x81,0xA0,0x1E,0x94,0xE5,0x2D,0x4E,0x69} 37 | 38 | #if defined (__cplusplus) 39 | 40 | /* Interface IDeckLink_v8_0 - represents a DeckLink device */ 41 | 42 | class BMD_PUBLIC IDeckLink_v8_0 : public IUnknown 43 | { 44 | public: 45 | virtual HRESULT GetModelName (/* out */ const char **modelName) = 0; 46 | }; 47 | 48 | /* Interface IDeckLinkIterator_v8_0 - enumerates installed DeckLink hardware */ 49 | 50 | class BMD_PUBLIC IDeckLinkIterator_v8_0 : public IUnknown 51 | { 52 | public: 53 | virtual HRESULT Next (/* out */ IDeckLink_v8_0 **deckLinkInstance) = 0; 54 | }; 55 | 56 | extern "C" { 57 | IDeckLinkIterator_v8_0* BMD_PUBLIC CreateDeckLinkIteratorInstance_v8_0 (void); 58 | }; 59 | 60 | #endif // defined __cplusplus 61 | 62 | #endif /* defined(BMD_DECKLINKAPI_v8_0_H) */ 63 | 64 | -------------------------------------------------------------------------------- /sdk/Linux/include/DeckLinkAPI_v9_2.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2012 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPI_v9_2_H 29 | #define BMD_DECKLINKAPI_v9_2_H 30 | 31 | #include "DeckLinkAPI.h" 32 | #include "DeckLinkAPI_v10_11.h" 33 | 34 | 35 | // Interface ID Declarations 36 | 37 | #define IID_IDeckLinkInput_v9_2 /* 6D40EF78-28B9-4E21-990D-95BB7750A04F */ (REFIID){0x6D,0x40,0xEF,0x78,0x28,0xB9,0x4E,0x21,0x99,0x0D,0x95,0xBB,0x77,0x50,0xA0,0x4F} 38 | 39 | 40 | #if defined(__cplusplus) 41 | 42 | /* Interface IDeckLinkInput - Created by QueryInterface from IDeckLink. */ 43 | 44 | class BMD_PUBLIC IDeckLinkInput_v9_2 : public IUnknown 45 | { 46 | public: 47 | virtual HRESULT DoesSupportVideoMode (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags, /* out */ BMDDisplayModeSupport_v10_11 *result, /* out */ IDeckLinkDisplayMode **resultDisplayMode) = 0; 48 | virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator **iterator) = 0; 49 | 50 | virtual HRESULT SetScreenPreviewCallback (/* in */ IDeckLinkScreenPreviewCallback *previewCallback) = 0; 51 | 52 | /* Video Input */ 53 | 54 | virtual HRESULT EnableVideoInput (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags) = 0; 55 | virtual HRESULT DisableVideoInput (void) = 0; 56 | virtual HRESULT GetAvailableVideoFrameCount (/* out */ uint32_t *availableFrameCount) = 0; 57 | 58 | /* Audio Input */ 59 | 60 | virtual HRESULT EnableAudioInput (/* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount) = 0; 61 | virtual HRESULT DisableAudioInput (void) = 0; 62 | virtual HRESULT GetAvailableAudioSampleFrameCount (/* out */ uint32_t *availableSampleFrameCount) = 0; 63 | 64 | /* Input Control */ 65 | 66 | virtual HRESULT StartStreams (void) = 0; 67 | virtual HRESULT StopStreams (void) = 0; 68 | virtual HRESULT PauseStreams (void) = 0; 69 | virtual HRESULT FlushStreams (void) = 0; 70 | virtual HRESULT SetCallback (/* in */ IDeckLinkInputCallback *theCallback) = 0; 71 | 72 | /* Hardware Timing */ 73 | 74 | virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *hardwareTime, /* out */ BMDTimeValue *timeInFrame, /* out */ BMDTimeValue *ticksPerFrame) = 0; 75 | 76 | protected: 77 | virtual ~IDeckLinkInput_v9_2 () {}; // call Release method to drop reference count 78 | }; 79 | 80 | 81 | #endif // defined(__cplusplus) 82 | #endif // BMD_DECKLINKAPI_v9_2_H 83 | -------------------------------------------------------------------------------- /sdk/Linux/include/LinuxCOM.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2009 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef __LINUX_COM_H_ 29 | #define __LINUX_COM_H_ 30 | 31 | struct REFIID 32 | { 33 | unsigned char byte0; 34 | unsigned char byte1; 35 | unsigned char byte2; 36 | unsigned char byte3; 37 | unsigned char byte4; 38 | unsigned char byte5; 39 | unsigned char byte6; 40 | unsigned char byte7; 41 | unsigned char byte8; 42 | unsigned char byte9; 43 | unsigned char byte10; 44 | unsigned char byte11; 45 | unsigned char byte12; 46 | unsigned char byte13; 47 | unsigned char byte14; 48 | unsigned char byte15; 49 | }; 50 | 51 | typedef REFIID CFUUIDBytes; 52 | #define CFUUIDGetUUIDBytes(x) x 53 | 54 | typedef int HRESULT; 55 | typedef unsigned long ULONG; 56 | typedef void *LPVOID; 57 | 58 | #define SUCCEEDED(Status) ((HRESULT)(Status) >= 0) 59 | #define FAILED(Status) ((HRESULT)(Status)<0) 60 | 61 | #define IS_ERROR(Status) ((unsigned long)(Status) >> 31 == SEVERITY_ERROR) 62 | #define HRESULT_CODE(hr) ((hr) & 0xFFFF) 63 | #define HRESULT_FACILITY(hr) (((hr) >> 16) & 0x1fff) 64 | #define HRESULT_SEVERITY(hr) (((hr) >> 31) & 0x1) 65 | #define SEVERITY_SUCCESS 0 66 | #define SEVERITY_ERROR 1 67 | 68 | #define MAKE_HRESULT(sev,fac,code) ((HRESULT) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))) ) 69 | 70 | #define S_OK ((HRESULT)0x00000000L) 71 | #define S_FALSE ((HRESULT)0x00000001L) 72 | #define E_UNEXPECTED ((HRESULT)0x8000FFFFL) 73 | #define E_NOTIMPL ((HRESULT)0x80000001L) 74 | #define E_OUTOFMEMORY ((HRESULT)0x80000002L) 75 | #define E_INVALIDARG ((HRESULT)0x80000003L) 76 | #define E_NOINTERFACE ((HRESULT)0x80000004L) 77 | #define E_POINTER ((HRESULT)0x80000005L) 78 | #define E_HANDLE ((HRESULT)0x80000006L) 79 | #define E_ABORT ((HRESULT)0x80000007L) 80 | #define E_FAIL ((HRESULT)0x80000008L) 81 | #define E_ACCESSDENIED ((HRESULT)0x80000009L) 82 | 83 | #define STDMETHODCALLTYPE 84 | 85 | #define IID_IUnknown (REFIID){0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} 86 | #define IUnknownUUID IID_IUnknown 87 | 88 | #ifndef BMD_PUBLIC 89 | #define BMD_PUBLIC 90 | #endif 91 | 92 | #ifdef __cplusplus 93 | class BMD_PUBLIC IUnknown 94 | { 95 | public: 96 | virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID *ppv) = 0; 97 | virtual ULONG STDMETHODCALLTYPE AddRef(void) = 0; 98 | virtual ULONG STDMETHODCALLTYPE Release(void) = 0; 99 | }; 100 | #endif 101 | 102 | #endif 103 | 104 | -------------------------------------------------------------------------------- /sdk/Mac/include/DeckLinkAPIConfiguration_v10_11.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2017 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPICONFIGURATION_v10_11_H 29 | #define BMD_DECKLINKAPICONFIGURATION_v10_11_H 30 | 31 | #include "DeckLinkAPIConfiguration.h" 32 | 33 | // Interface ID Declarations 34 | 35 | BMD_CONST REFIID IID_IDeckLinkConfiguration_v10_11 = /* EF90380B-4AE5-4346-9077-E288E149F129 */ {0xEF,0x90,0x38,0x0B,0x4A,0xE5,0x43,0x46,0x90,0x77,0xE2,0x88,0xE1,0x49,0xF1,0x29}; 36 | 37 | /* Enum BMDDeckLinkConfigurationID_v10_11 - DeckLink Configuration ID */ 38 | 39 | typedef uint32_t BMDDeckLinkConfigurationID_v10_11; 40 | enum _BMDDeckLinkConfigurationID_v10_11 { 41 | 42 | /* Video Input/Output Integers */ 43 | 44 | bmdDeckLinkConfigDuplexMode_v10_11 = 'dupx', 45 | }; 46 | 47 | // Forward Declarations 48 | 49 | class IDeckLinkConfiguration_v10_11; 50 | 51 | /* Interface IDeckLinkConfiguration_v10_11 - DeckLink Configuration interface */ 52 | 53 | class IDeckLinkConfiguration_v10_11 : public IUnknown 54 | { 55 | public: 56 | virtual HRESULT SetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ bool value) = 0; 57 | virtual HRESULT GetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ bool *value) = 0; 58 | virtual HRESULT SetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ int64_t value) = 0; 59 | virtual HRESULT GetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ int64_t *value) = 0; 60 | virtual HRESULT SetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ double value) = 0; 61 | virtual HRESULT GetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ double *value) = 0; 62 | virtual HRESULT SetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ CFStringRef value) = 0; 63 | virtual HRESULT GetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ CFStringRef *value) = 0; 64 | virtual HRESULT WriteConfigurationToPreferences (void) = 0; 65 | 66 | protected: 67 | virtual ~IDeckLinkConfiguration_v10_11 () {} // call Release method to drop reference count 68 | }; 69 | 70 | 71 | #endif /* defined(BMD_DECKLINKAPICONFIGURATION_v10_11_H) */ 72 | -------------------------------------------------------------------------------- /sdk/Mac/include/DeckLinkAPIConfiguration_v10_2.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2014 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPICONFIGURATION_v10_2_H 29 | #define BMD_DECKLINKAPICONFIGURATION_v10_2_H 30 | 31 | #include "DeckLinkAPIConfiguration.h" 32 | 33 | // Interface ID Declarations 34 | 35 | BMD_CONST REFIID IID_IDeckLinkConfiguration_v10_2 = /* C679A35B-610C-4D09-B748-1D0478100FC0 */ {0xC6,0x79,0xA3,0x5B,0x61,0x0C,0x4D,0x09,0xB7,0x48,0x1D,0x04,0x78,0x10,0x0F,0xC0}; 36 | 37 | // Forward Declarations 38 | 39 | class IDeckLinkConfiguration_v10_2; 40 | 41 | /* Interface IDeckLinkConfiguration_v10_2 - DeckLink Configuration interface */ 42 | 43 | class IDeckLinkConfiguration_v10_2 : public IUnknown 44 | { 45 | public: 46 | virtual HRESULT SetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ bool value) = 0; 47 | virtual HRESULT GetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ bool *value) = 0; 48 | virtual HRESULT SetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ int64_t value) = 0; 49 | virtual HRESULT GetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ int64_t *value) = 0; 50 | virtual HRESULT SetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ double value) = 0; 51 | virtual HRESULT GetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ double *value) = 0; 52 | virtual HRESULT SetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ CFStringRef value) = 0; 53 | virtual HRESULT GetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ CFStringRef *value) = 0; 54 | virtual HRESULT WriteConfigurationToPreferences (void) = 0; 55 | 56 | protected: 57 | virtual ~IDeckLinkConfiguration_v10_2 () {} // call Release method to drop reference count 58 | }; 59 | 60 | #endif /* defined(BMD_DECKLINKAPICONFIGURATION_v10_2_H) */ 61 | -------------------------------------------------------------------------------- /sdk/Mac/include/DeckLinkAPIConfiguration_v10_4.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2015 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPICONFIGURATION_v10_4_H 29 | #define BMD_DECKLINKAPICONFIGURATION_v10_4_H 30 | 31 | #include "DeckLinkAPIConfiguration.h" 32 | 33 | // Interface ID Declarations 34 | 35 | BMD_CONST REFIID IID_IDeckLinkConfiguration_v10_4 = /* 1E69FCF6-4203-4936-8076-2A9F4CFD50CB */ {0x1E,0x69,0xFC,0xF6,0x42,0x03,0x49,0x36,0x80,0x76,0x2A,0x9F,0x4C,0xFD,0x50,0xCB}; 36 | 37 | // 38 | // Forward Declarations 39 | 40 | class IDeckLinkConfiguration_v10_4; 41 | 42 | /* Interface IDeckLinkConfiguration_v10_4 - DeckLink Configuration interface */ 43 | 44 | class IDeckLinkConfiguration_v10_4 : public IUnknown 45 | { 46 | public: 47 | virtual HRESULT SetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ bool value) = 0; 48 | virtual HRESULT GetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ bool *value) = 0; 49 | virtual HRESULT SetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ int64_t value) = 0; 50 | virtual HRESULT GetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ int64_t *value) = 0; 51 | virtual HRESULT SetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ double value) = 0; 52 | virtual HRESULT GetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ double *value) = 0; 53 | virtual HRESULT SetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ CFStringRef value) = 0; 54 | virtual HRESULT GetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ CFStringRef *value) = 0; 55 | virtual HRESULT WriteConfigurationToPreferences (void) = 0; 56 | 57 | protected: 58 | virtual ~IDeckLinkConfiguration_v10_4 () {} // call Release method to drop reference count 59 | }; 60 | 61 | 62 | #endif /* defined(BMD_DECKLINKAPICONFIGURATION_v10_4_H) */ 63 | -------------------------------------------------------------------------------- /sdk/Mac/include/DeckLinkAPIConfiguration_v10_5.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2015 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPICONFIGURATION_v10_5_H 29 | #define BMD_DECKLINKAPICONFIGURATION_v10_5_H 30 | 31 | #include "DeckLinkAPIConfiguration.h" 32 | 33 | // Interface ID Declarations 34 | 35 | BMD_CONST REFIID IID_IDeckLinkEncoderConfiguration_v10_5 = /* 67455668-0848-45DF-8D8E-350A77C9A028 */ {0x67,0x45,0x56,0x68,0x08,0x48,0x45,0xDF,0x8D,0x8E,0x35,0x0A,0x77,0xC9,0xA0,0x28}; 36 | 37 | // Forward Declarations 38 | 39 | class IDeckLinkConfiguration_v10_5; 40 | 41 | /* Interface IDeckLinkEncoderConfiguration_v10_5 - DeckLink Encoder Configuration interface. Obtained from IDeckLinkEncoderInput */ 42 | 43 | class IDeckLinkEncoderConfiguration_v10_5 : public IUnknown 44 | { 45 | public: 46 | virtual HRESULT SetFlag (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* in */ bool value) = 0; 47 | virtual HRESULT GetFlag (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ bool *value) = 0; 48 | virtual HRESULT SetInt (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* in */ int64_t value) = 0; 49 | virtual HRESULT GetInt (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ int64_t *value) = 0; 50 | virtual HRESULT SetFloat (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* in */ double value) = 0; 51 | virtual HRESULT GetFloat (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ double *value) = 0; 52 | virtual HRESULT SetString (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* in */ CFStringRef value) = 0; 53 | virtual HRESULT GetString (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ CFStringRef *value) = 0; 54 | virtual HRESULT GetDecoderConfigurationInfo (/* out */ void *buffer, /* in */ long bufferSize, /* out */ long *returnedSize) = 0; 55 | 56 | protected: 57 | virtual ~IDeckLinkEncoderConfiguration_v10_5 () {} // call Release method to drop reference count 58 | }; 59 | 60 | #endif /* defined(BMD_DECKLINKAPICONFIGURATION_v10_5_H) */ 61 | -------------------------------------------------------------------------------- /sdk/Mac/include/DeckLinkAPIConfiguration_v10_9.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2017 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPICONFIGURATION_v10_9_H 29 | #define BMD_DECKLINKAPICONFIGURATION_v10_9_H 30 | 31 | #include "DeckLinkAPIConfiguration.h" 32 | 33 | // Interface ID Declarations 34 | 35 | BMD_CONST REFIID IID_IDeckLinkConfiguration_v10_9 = /* CB71734A-FE37-4E8D-8E13-802133A1C3F2 */ {0xCB,0x71,0x73,0x4A,0xFE,0x37,0x4E,0x8D,0x8E,0x13,0x80,0x21,0x33,0xA1,0xC3,0xF2}; 36 | 37 | // 38 | // Forward Declarations 39 | 40 | class IDeckLinkConfiguration_v10_9; 41 | 42 | /* Interface IDeckLinkConfiguration_v10_9 - DeckLink Configuration interface */ 43 | 44 | class IDeckLinkConfiguration_v10_9 : public IUnknown 45 | { 46 | public: 47 | virtual HRESULT SetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ bool value) = 0; 48 | virtual HRESULT GetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ bool *value) = 0; 49 | virtual HRESULT SetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ int64_t value) = 0; 50 | virtual HRESULT GetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ int64_t *value) = 0; 51 | virtual HRESULT SetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ double value) = 0; 52 | virtual HRESULT GetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ double *value) = 0; 53 | virtual HRESULT SetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ CFStringRef value) = 0; 54 | virtual HRESULT GetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ CFStringRef *value) = 0; 55 | virtual HRESULT WriteConfigurationToPreferences (void) = 0; 56 | 57 | protected: 58 | virtual ~IDeckLinkConfiguration_v10_9 () {} // call Release method to drop reference count 59 | }; 60 | 61 | 62 | #endif /* defined(BMD_DECKLINKAPICONFIGURATION_v10_9_H) */ 63 | -------------------------------------------------------------------------------- /sdk/Mac/include/DeckLinkAPIDiscovery.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2020 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPIDISCOVERY_H 29 | #define BMD_DECKLINKAPIDISCOVERY_H 30 | 31 | 32 | #ifndef BMD_CONST 33 | #if defined(_MSC_VER) 34 | #define BMD_CONST __declspec(selectany) static const 35 | #else 36 | #define BMD_CONST static const 37 | #endif 38 | #endif 39 | 40 | #ifndef BMD_PUBLIC 41 | #define BMD_PUBLIC 42 | #endif 43 | 44 | // Type Declarations 45 | 46 | 47 | // Interface ID Declarations 48 | 49 | BMD_CONST REFIID IID_IDeckLink = /* C418FBDD-0587-48ED-8FE5-640F0A14AF91 */ { 0xC4,0x18,0xFB,0xDD,0x05,0x87,0x48,0xED,0x8F,0xE5,0x64,0x0F,0x0A,0x14,0xAF,0x91 }; 50 | 51 | #if defined(__cplusplus) 52 | 53 | // Forward Declarations 54 | 55 | class IDeckLink; 56 | 57 | /* Interface IDeckLink - Represents a DeckLink device */ 58 | 59 | class BMD_PUBLIC IDeckLink : public IUnknown 60 | { 61 | public: 62 | virtual HRESULT GetModelName (/* out */ CFStringRef* modelName) = 0; 63 | virtual HRESULT GetDisplayName (/* out */ CFStringRef* displayName) = 0; 64 | 65 | protected: 66 | virtual ~IDeckLink () {} // call Release method to drop reference count 67 | }; 68 | 69 | /* Functions */ 70 | 71 | extern "C" { 72 | 73 | 74 | } 75 | 76 | #endif /* defined(__cplusplus) */ 77 | #endif /* defined(BMD_DECKLINKAPIDISCOVERY_H) */ 78 | -------------------------------------------------------------------------------- /sdk/Mac/include/DeckLinkAPIStreaming_v10_11.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2018 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPISTREAMING_H 29 | #define BMD_DECKLINKAPISTREAMING_H 30 | 31 | #ifndef BMD_PUBLIC 32 | #define BMD_PUBLIC 33 | #endif 34 | 35 | 36 | /* Functions */ 37 | 38 | extern "C" { 39 | 40 | IBMDStreamingDiscovery* BMD_PUBLIC CreateBMDStreamingDiscoveryInstance_v10_11 (void); 41 | IBMDStreamingH264NALParser* BMD_PUBLIC CreateBMDStreamingH264NALParser_v10_11 (void); 42 | 43 | } 44 | 45 | 46 | #endif /* defined(BMD_DECKLINKAPISTREAMING_H) */ 47 | -------------------------------------------------------------------------------- /sdk/Mac/include/DeckLinkAPIVersion.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | * ** Copyright (c) 2014 Blackmagic Design 3 | * ** 4 | * ** Permission is hereby granted, free of charge, to any person or organization 5 | * ** obtaining a copy of the software and accompanying documentation covered by 6 | * ** this license (the "Software") to use, reproduce, display, distribute, 7 | * ** execute, and transmit the Software, and to prepare derivative works of the 8 | * ** Software, and to permit third-parties to whom the Software is furnished to 9 | * ** do so, all subject to the following: 10 | * ** 11 | * ** The copyright notices in the Software and this entire statement, including 12 | * ** the above license grant, this restriction and the following disclaimer, 13 | * ** must be included in all copies of the Software, in whole or in part, and 14 | * ** all derivative works of the Software, unless such copies or derivative 15 | * ** works are solely in the form of machine-executable object code generated by 16 | * ** a source language processor. 17 | * ** 18 | * ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | * ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | * ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | * ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | * ** DEALINGS IN THE SOFTWARE. 25 | * ** -LICENSE-END- 26 | * */ 27 | 28 | /* DeckLinkAPIVersion.h */ 29 | 30 | #ifndef __DeckLink_API_Version_h__ 31 | #define __DeckLink_API_Version_h__ 32 | 33 | #define BLACKMAGIC_DECKLINK_API_VERSION 0x0b050100 34 | #define BLACKMAGIC_DECKLINK_API_VERSION_STRING "11.5.1" 35 | 36 | #endif // __DeckLink_API_Version_h__ 37 | 38 | -------------------------------------------------------------------------------- /sdk/Mac/include/DeckLinkAPIVideoEncoderInput_v10_11.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2017 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPIVIDEOENCODERINPUT_v10_11_H 29 | #define BMD_DECKLINKAPIVIDEOENCODERINPUT_v10_11_H 30 | 31 | #include "DeckLinkAPI.h" 32 | #include "DeckLinkAPI_v10_11.h" 33 | 34 | // Type Declarations 35 | 36 | BMD_CONST REFIID IID_IDeckLinkEncoderInput_v10_11 = /* 270587DA-6B7D-42E7-A1F0-6D853F581185 */ {0x27,0x05,0x87,0xDA,0x6B,0x7D,0x42,0xE7,0xA1,0xF0,0x6D,0x85,0x3F,0x58,0x11,0x85}; 37 | 38 | /* Interface IDeckLinkEncoderInput_v10_11 - Created by QueryInterface from IDeckLink. */ 39 | 40 | class IDeckLinkEncoderInput_v10_11 : public IUnknown 41 | { 42 | public: 43 | virtual HRESULT DoesSupportVideoMode (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags, /* out */ BMDDisplayModeSupport_v10_11 *result, /* out */ IDeckLinkDisplayMode **resultDisplayMode) = 0; 44 | virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator **iterator) = 0; 45 | 46 | /* Video Input */ 47 | 48 | virtual HRESULT EnableVideoInput (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags) = 0; 49 | virtual HRESULT DisableVideoInput (void) = 0; 50 | virtual HRESULT GetAvailablePacketsCount (/* out */ uint32_t *availablePacketsCount) = 0; 51 | virtual HRESULT SetMemoryAllocator (/* in */ IDeckLinkMemoryAllocator *theAllocator) = 0; 52 | 53 | /* Audio Input */ 54 | 55 | virtual HRESULT EnableAudioInput (/* in */ BMDAudioFormat audioFormat, /* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount) = 0; 56 | virtual HRESULT DisableAudioInput (void) = 0; 57 | virtual HRESULT GetAvailableAudioSampleFrameCount (/* out */ uint32_t *availableSampleFrameCount) = 0; 58 | 59 | /* Input Control */ 60 | 61 | virtual HRESULT StartStreams (void) = 0; 62 | virtual HRESULT StopStreams (void) = 0; 63 | virtual HRESULT PauseStreams (void) = 0; 64 | virtual HRESULT FlushStreams (void) = 0; 65 | virtual HRESULT SetCallback (/* in */ IDeckLinkEncoderInputCallback *theCallback) = 0; 66 | 67 | /* Hardware Timing */ 68 | 69 | virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *hardwareTime, /* out */ BMDTimeValue *timeInFrame, /* out */ BMDTimeValue *ticksPerFrame) = 0; 70 | 71 | protected: 72 | virtual ~IDeckLinkEncoderInput_v10_11 () {} // call Release method to drop reference count 73 | }; 74 | 75 | #endif /* defined(BMD_DECKLINKAPIVIDEOENCODERINPUT_v10_11_H) */ 76 | -------------------------------------------------------------------------------- /sdk/Mac/include/DeckLinkAPIVideoInput_v10_11.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2017 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPIVIDEOINPUT_v10_11_H 29 | #define BMD_DECKLINKAPIVIDEOINPUT_v10_11_H 30 | 31 | #include "DeckLinkAPI.h" 32 | #include "DeckLinkAPI_v10_11.h" 33 | 34 | // Type Declarations 35 | 36 | BMD_CONST REFIID IID_IDeckLinkInput_v10_11 = /* AF22762B-DFAC-4846-AA79-FA8883560995 */ {0xAF,0x22,0x76,0x2B,0xDF,0xAC,0x48,0x46,0xAA,0x79,0xFA,0x88,0x83,0x56,0x09,0x95}; 37 | 38 | /* Interface IDeckLinkInput_v10_11 - DeckLink input interface. */ 39 | 40 | class IDeckLinkInput_v10_11 : public IUnknown 41 | { 42 | public: 43 | virtual HRESULT DoesSupportVideoMode (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags, /* out */ BMDDisplayModeSupport_v10_11 *result, /* out */ IDeckLinkDisplayMode **resultDisplayMode) = 0; 44 | virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator **iterator) = 0; 45 | 46 | virtual HRESULT SetScreenPreviewCallback (/* in */ IDeckLinkScreenPreviewCallback *previewCallback) = 0; 47 | 48 | /* Video Input */ 49 | 50 | virtual HRESULT EnableVideoInput (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags) = 0; 51 | virtual HRESULT DisableVideoInput (void) = 0; 52 | virtual HRESULT GetAvailableVideoFrameCount (/* out */ uint32_t *availableFrameCount) = 0; 53 | virtual HRESULT SetVideoInputFrameMemoryAllocator (/* in */ IDeckLinkMemoryAllocator *theAllocator) = 0; 54 | 55 | /* Audio Input */ 56 | 57 | virtual HRESULT EnableAudioInput (/* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount) = 0; 58 | virtual HRESULT DisableAudioInput (void) = 0; 59 | virtual HRESULT GetAvailableAudioSampleFrameCount (/* out */ uint32_t *availableSampleFrameCount) = 0; 60 | 61 | /* Input Control */ 62 | 63 | virtual HRESULT StartStreams (void) = 0; 64 | virtual HRESULT StopStreams (void) = 0; 65 | virtual HRESULT PauseStreams (void) = 0; 66 | virtual HRESULT FlushStreams (void) = 0; 67 | virtual HRESULT SetCallback (/* in */ IDeckLinkInputCallback *theCallback) = 0; 68 | 69 | /* Hardware Timing */ 70 | 71 | virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *hardwareTime, /* out */ BMDTimeValue *timeInFrame, /* out */ BMDTimeValue *ticksPerFrame) = 0; 72 | 73 | protected: 74 | virtual ~IDeckLinkInput_v10_11 () {} // call Release method to drop reference count 75 | }; 76 | 77 | #endif /* defined(BMD_DECKLINKAPIVIDEOINPUT_v10_11_H) */ 78 | -------------------------------------------------------------------------------- /sdk/Mac/include/DeckLinkAPIVideoInput_v11_4.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2019 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPIVIDEOINPUT_v11_4_H 29 | #define BMD_DECKLINKAPIVIDEOINPUT_v11_4_H 30 | 31 | #include "DeckLinkAPI.h" 32 | 33 | // Type Declarations 34 | 35 | BMD_CONST REFIID IID_IDeckLinkInput_v11_4 = /* 2A88CF76-F494-4216-A7EF-DC74EEB83882 */ { 0x2A,0x88,0xCF,0x76,0xF4,0x94,0x42,0x16,0xA7,0xEF,0xDC,0x74,0xEE,0xB8,0x38,0x82 }; 36 | 37 | /* Interface IDeckLinkInput_v11_4 - Created by QueryInterface from IDeckLink. */ 38 | 39 | class BMD_PUBLIC IDeckLinkInput_v11_4 : public IUnknown 40 | { 41 | public: 42 | virtual HRESULT DoesSupportVideoMode (/* in */ BMDVideoConnection connection /* If a value of 0 is specified, the caller does not care about the connection */, /* in */ BMDDisplayMode requestedMode, /* in */ BMDPixelFormat requestedPixelFormat, /* in */ BMDSupportedVideoModeFlags flags, /* out */ bool* supported) = 0; 43 | virtual HRESULT GetDisplayMode (/* in */ BMDDisplayMode displayMode, /* out */ IDeckLinkDisplayMode** resultDisplayMode) = 0; 44 | virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator** iterator) = 0; 45 | virtual HRESULT SetScreenPreviewCallback (/* in */ IDeckLinkScreenPreviewCallback* previewCallback) = 0; 46 | 47 | /* Video Input */ 48 | 49 | virtual HRESULT EnableVideoInput (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags) = 0; 50 | virtual HRESULT DisableVideoInput (void) = 0; 51 | virtual HRESULT GetAvailableVideoFrameCount (/* out */ uint32_t* availableFrameCount) = 0; 52 | virtual HRESULT SetVideoInputFrameMemoryAllocator (/* in */ IDeckLinkMemoryAllocator* theAllocator) = 0; 53 | 54 | /* Audio Input */ 55 | 56 | virtual HRESULT EnableAudioInput (/* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount) = 0; 57 | virtual HRESULT DisableAudioInput (void) = 0; 58 | virtual HRESULT GetAvailableAudioSampleFrameCount (/* out */ uint32_t* availableSampleFrameCount) = 0; 59 | 60 | /* Input Control */ 61 | 62 | virtual HRESULT StartStreams (void) = 0; 63 | virtual HRESULT StopStreams (void) = 0; 64 | virtual HRESULT PauseStreams (void) = 0; 65 | virtual HRESULT FlushStreams (void) = 0; 66 | virtual HRESULT SetCallback (/* in */ IDeckLinkInputCallback* theCallback) = 0; 67 | 68 | /* Hardware Timing */ 69 | 70 | virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue* hardwareTime, /* out */ BMDTimeValue* timeInFrame, /* out */ BMDTimeValue* ticksPerFrame) = 0; 71 | 72 | protected: 73 | virtual ~IDeckLinkInput_v11_4 () {} // call Release method to drop reference count 74 | }; 75 | 76 | #endif /* defined(BMD_DECKLINKAPIVIDEOINPUT_v11_4_H) */ 77 | -------------------------------------------------------------------------------- /sdk/Mac/include/DeckLinkAPI_v10_2.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2014 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPI_v10_2_H 29 | #define BMD_DECKLINKAPI_v10_2_H 30 | 31 | #include "DeckLinkAPI.h" 32 | 33 | // Type Declarations 34 | 35 | /* Enum BMDDeckLinkConfigurationID - DeckLink Configuration ID */ 36 | 37 | typedef uint32_t BMDDeckLinkConfigurationID_v10_2; 38 | enum _BMDDeckLinkConfigurationID_v10_2 { 39 | /* Video output flags */ 40 | 41 | bmdDeckLinkConfig3GBpsVideoOutput_v10_2 = '3gbs', 42 | }; 43 | 44 | /* Enum BMDAudioConnection_v10_2 - Audio connection types */ 45 | 46 | typedef uint32_t BMDAudioConnection_v10_2; 47 | enum _BMDAudioConnection_v10_2 { 48 | bmdAudioConnectionEmbedded_v10_2 = 'embd', 49 | bmdAudioConnectionAESEBU_v10_2 = 'aes ', 50 | bmdAudioConnectionAnalog_v10_2 = 'anlg', 51 | bmdAudioConnectionAnalogXLR_v10_2 = 'axlr', 52 | bmdAudioConnectionAnalogRCA_v10_2 = 'arca' 53 | }; 54 | 55 | #endif /* defined(BMD_DECKLINKAPI_v10_2_H) */ 56 | -------------------------------------------------------------------------------- /sdk/Mac/include/DeckLinkAPI_v10_4.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2015 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPI_v10_4_H 29 | #define BMD_DECKLINKAPI_v10_4_H 30 | 31 | #include "DeckLinkAPI.h" 32 | 33 | // Type Declarations 34 | 35 | /* Enum BMDDeckLinkConfigurationID - DeckLink Configuration ID */ 36 | 37 | typedef uint32_t BMDDeckLinkConfigurationID_v10_4; 38 | enum _BMDDeckLinkConfigurationID_v10_4 { 39 | 40 | /* Video output flags */ 41 | 42 | bmdDeckLinkConfigSingleLinkVideoOutput_v10_4 = /* 'sglo' */ 0x73676C6F, 43 | }; 44 | 45 | #endif /* defined(BMD_DECKLINKAPI_v10_4_H) */ 46 | -------------------------------------------------------------------------------- /sdk/Mac/include/DeckLinkAPI_v10_5.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2015 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPI_v10_5_H 29 | #define BMD_DECKLINKAPI_v10_5_H 30 | 31 | #include "DeckLinkAPI.h" 32 | 33 | // Type Declarations 34 | 35 | /* Enum BMDDeckLinkAttributeID - DeckLink Attribute ID */ 36 | 37 | typedef uint32_t BMDDeckLinkAttributeID_v10_5; 38 | enum _BMDDeckLinkAttributeID_v10_5 { 39 | 40 | /* Integers */ 41 | 42 | BMDDeckLinkDeviceBusyState_v10_5 = /* 'dbst' */ 0x64627374, 43 | }; 44 | 45 | #endif /* defined(BMD_DECKLINKAPI_v10_5_H) */ 46 | 47 | -------------------------------------------------------------------------------- /sdk/Mac/include/DeckLinkAPI_v10_6.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2016 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPI_v10_6_H 29 | #define BMD_DECKLINKAPI_v10_6_H 30 | 31 | #include "DeckLinkAPI.h" 32 | 33 | // Type Declarations 34 | 35 | /* Enum BMDDeckLinkAttributeID - DeckLink Attribute ID */ 36 | 37 | typedef uint32_t BMDDeckLinkAttributeID_c10_6; 38 | enum _BMDDeckLinkAttributeID_v10_6 { 39 | 40 | /* Flags */ 41 | 42 | BMDDeckLinkSupportsDesktopDisplay_v10_6 = 'extd', 43 | }; 44 | 45 | typedef uint32_t BMDIdleVideoOutputOperation_v10_6; 46 | enum _BMDIdleVideoOutputOperation_v10_6 { 47 | bmdIdleVideoOutputDesktop_v10_6 = 'desk' 48 | }; 49 | 50 | 51 | #endif /* defined(BMD_DECKLINKAPI_v10_6_H) */ 52 | -------------------------------------------------------------------------------- /sdk/Mac/include/DeckLinkAPI_v10_9.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2017 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPI_v10_9_H 29 | #define BMD_DECKLINKAPI_v10_9_H 30 | 31 | #include "DeckLinkAPI.h" 32 | 33 | // Type Declarations 34 | 35 | /* Enum BMDDeckLinkAttributeID - DeckLink Attribute ID */ 36 | 37 | typedef uint32_t BMDDeckLinkConfigurationID_v10_9; 38 | enum _BMDDeckLinkConfigurationID_v10_9 { 39 | 40 | /* Flags */ 41 | 42 | bmdDeckLinkConfig1080pNotPsF_v10_9 = 'fpro', 43 | }; 44 | 45 | #endif /* defined(BMD_DECKLINKAPI_v10_9_H) */ 46 | -------------------------------------------------------------------------------- /sdk/Mac/include/DeckLinkAPI_v8_0.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2011 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPI_v8_0_H 29 | #define BMD_DECKLINKAPI_v8_0_H 30 | 31 | #include "DeckLinkAPI.h" 32 | 33 | // Interface ID Declarations 34 | 35 | #define IID_IDeckLink_v8_0 /* 62BFF75D-6569-4E55-8D4D-66AA03829ABC */ (REFIID){0x62,0xBF,0xF7,0x5D,0x65,0x69,0x4E,0x55,0x8D,0x4D,0x66,0xAA,0x03,0x82,0x9A,0xBC} 36 | #define IID_IDeckLinkIterator_v8_0 /* 74E936FC-CC28-4A67-81A0-1E94E52D4E69 */ (REFIID){0x74,0xE9,0x36,0xFC,0xCC,0x28,0x4A,0x67,0x81,0xA0,0x1E,0x94,0xE5,0x2D,0x4E,0x69} 37 | 38 | #if defined (__cplusplus) 39 | 40 | /* Interface IDeckLink_v8_0 - represents a DeckLink device */ 41 | 42 | class IDeckLink_v8_0 : public IUnknown 43 | { 44 | public: 45 | virtual HRESULT GetModelName (/* out */ CFStringRef *modelName) = 0; 46 | }; 47 | 48 | /* Interface IDeckLinkIterator_v8_0 - enumerates installed DeckLink hardware */ 49 | 50 | class IDeckLinkIterator_v8_0 : public IUnknown 51 | { 52 | public: 53 | virtual HRESULT Next (/* out */ IDeckLink_v8_0 **deckLinkInstance) = 0; 54 | }; 55 | 56 | extern "C" { 57 | IDeckLinkIterator_v8_0* CreateDeckLinkIteratorInstance_v8_0 (void); 58 | }; 59 | 60 | 61 | #endif // defined __cplusplus 62 | 63 | #endif /* defined(BMD_DECKLINKAPI_v8_0_H) */ 64 | -------------------------------------------------------------------------------- /sdk/Mac/include/DeckLinkAPI_v9_2.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2012 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | #ifndef BMD_DECKLINKAPI_v9_2_H 29 | #define BMD_DECKLINKAPI_v9_2_H 30 | 31 | #include "DeckLinkAPI.h" 32 | #include "DeckLinkAPI_v10_11.h" 33 | 34 | 35 | // Interface ID Declarations 36 | 37 | #define IID_IDeckLinkInput_v9_2 /* 6D40EF78-28B9-4E21-990D-95BB7750A04F */ (REFIID){0x6D,0x40,0xEF,0x78,0x28,0xB9,0x4E,0x21,0x99,0x0D,0x95,0xBB,0x77,0x50,0xA0,0x4F} 38 | 39 | 40 | #if defined(__cplusplus) 41 | 42 | /* Interface IDeckLinkInput - Created by QueryInterface from IDeckLink. */ 43 | 44 | class IDeckLinkInput_v9_2 : public IUnknown 45 | { 46 | public: 47 | virtual HRESULT DoesSupportVideoMode (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags, /* out */ BMDDisplayModeSupport_v10_11 *result, /* out */ IDeckLinkDisplayMode **resultDisplayMode) = 0; 48 | virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator **iterator) = 0; 49 | 50 | virtual HRESULT SetScreenPreviewCallback (/* in */ IDeckLinkScreenPreviewCallback *previewCallback) = 0; 51 | 52 | /* Video Input */ 53 | 54 | virtual HRESULT EnableVideoInput (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags) = 0; 55 | virtual HRESULT DisableVideoInput (void) = 0; 56 | virtual HRESULT GetAvailableVideoFrameCount (/* out */ uint32_t *availableFrameCount) = 0; 57 | 58 | /* Audio Input */ 59 | 60 | virtual HRESULT EnableAudioInput (/* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount) = 0; 61 | virtual HRESULT DisableAudioInput (void) = 0; 62 | virtual HRESULT GetAvailableAudioSampleFrameCount (/* out */ uint32_t *availableSampleFrameCount) = 0; 63 | 64 | /* Input Control */ 65 | 66 | virtual HRESULT StartStreams (void) = 0; 67 | virtual HRESULT StopStreams (void) = 0; 68 | virtual HRESULT PauseStreams (void) = 0; 69 | virtual HRESULT FlushStreams (void) = 0; 70 | virtual HRESULT SetCallback (/* in */ IDeckLinkInputCallback *theCallback) = 0; 71 | 72 | /* Hardware Timing */ 73 | 74 | virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *hardwareTime, /* out */ BMDTimeValue *timeInFrame, /* out */ BMDTimeValue *ticksPerFrame) = 0; 75 | 76 | protected: 77 | virtual ~IDeckLinkInput_v9_2 () {}; // call Release method to drop reference count 78 | }; 79 | 80 | 81 | #endif // defined(__cplusplus) 82 | #endif // BMD_DECKLINKAPI_v9_2_H 83 | -------------------------------------------------------------------------------- /sdk/Win/include/DeckLinkAPIDiscovery.idl: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2020 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | 29 | #ifndef BMD_CONST 30 | #if defined(_MSC_VER) 31 | #define BMD_CONST __declspec(selectany) static const 32 | #else 33 | #define BMD_CONST static const 34 | #endif 35 | #endif 36 | 37 | // Type Declarations 38 | 39 | 40 | // Enumeration Mapping 41 | 42 | cpp_quote("#if 0") 43 | cpp_quote("#endif") 44 | 45 | // Forward Declarations 46 | 47 | interface IDeckLink; 48 | 49 | /* Interface IDeckLink - Represents a DeckLink device */ 50 | 51 | [ 52 | object, 53 | uuid(C418FBDD-0587-48ED-8FE5-640F0A14AF91), 54 | helpstring("Represents a DeckLink device") 55 | ] interface IDeckLink : IUnknown 56 | { 57 | HRESULT GetModelName ([out] BSTR* modelName); 58 | HRESULT GetDisplayName ([out] BSTR* displayName); 59 | }; 60 | 61 | /* Coclasses */ 62 | 63 | importlib("stdole2.tlb"); 64 | 65 | -------------------------------------------------------------------------------- /sdk/Win/include/DeckLinkAPIStreaming_v10_8.idl: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2016 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | 29 | 30 | /* Coclasses */ 31 | 32 | importlib("stdole2.tlb"); 33 | 34 | [ 35 | uuid(0CAA31F6-8A26-40B0-86A4-BF58DCCA710C), 36 | helpstring("CBMDStreamingDiscovery Class") 37 | ] coclass CBMDStreamingDiscovery_v10_8 38 | { 39 | [default] interface IBMDStreamingDiscovery; 40 | }; 41 | -------------------------------------------------------------------------------- /sdk/Win/include/DeckLinkAPIVersion.h: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | * ** Copyright (c) 2014 Blackmagic Design 3 | * ** 4 | * ** Permission is hereby granted, free of charge, to any person or organization 5 | * ** obtaining a copy of the software and accompanying documentation covered by 6 | * ** this license (the "Software") to use, reproduce, display, distribute, 7 | * ** execute, and transmit the Software, and to prepare derivative works of the 8 | * ** Software, and to permit third-parties to whom the Software is furnished to 9 | * ** do so, all subject to the following: 10 | * ** 11 | * ** The copyright notices in the Software and this entire statement, including 12 | * ** the above license grant, this restriction and the following disclaimer, 13 | * ** must be included in all copies of the Software, in whole or in part, and 14 | * ** all derivative works of the Software, unless such copies or derivative 15 | * ** works are solely in the form of machine-executable object code generated by 16 | * ** a source language processor. 17 | * ** 18 | * ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | * ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | * ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | * ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | * ** DEALINGS IN THE SOFTWARE. 25 | * ** -LICENSE-END- 26 | * */ 27 | 28 | /* DeckLinkAPIVersion.h */ 29 | 30 | #ifndef __DeckLink_API_Version_h__ 31 | #define __DeckLink_API_Version_h__ 32 | 33 | #define BLACKMAGIC_DECKLINK_API_VERSION 0x0b050100 34 | #define BLACKMAGIC_DECKLINK_API_VERSION_STRING "11.5.1" 35 | 36 | #endif // __DeckLink_API_Version_h__ 37 | 38 | -------------------------------------------------------------------------------- /sdk/Win/include/DeckLinkAPI_v10_2.idl: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2014 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | /* DeckLinkAPI_v10_2.idl */ 28 | 29 | // Enumeration Mapping 30 | 31 | /* Enum BMDDeckLinkConfigurationID - DeckLink Configuration ID */ 32 | 33 | typedef [v1_enum] enum _BMDDeckLinkConfigurationID_v10_2 { 34 | 35 | /* Video output flags */ 36 | 37 | bmdDeckLinkConfig3GBpsVideoOutput_v10_2 = /* '3gbs' */ 0x33676273 38 | 39 | } BMDDeckLinkConfigurationID_v10_2; 40 | 41 | /* Enum BMDAudioConnection_v10_2 - Audio connection types */ 42 | 43 | typedef [v1_enum] enum _BMDAudioConnection_v10_2 { 44 | bmdAudioConnectionEmbedded_v10_2 = /* 'embd' */ 0x656D6264, 45 | bmdAudioConnectionAESEBU_v10_2 = /* 'aes ' */ 0x61657320, 46 | bmdAudioConnectionAnalog_v10_2 = /* 'anlg' */ 0x616E6C67, 47 | bmdAudioConnectionAnalogXLR_v10_2 = /* 'axlr' */ 0x61786C72, 48 | bmdAudioConnectionAnalogRCA_v10_2 = /* 'arca' */ 0x61726361 49 | } BMDAudioConnection_v10_2; 50 | 51 | // Forward Declarations 52 | 53 | interface IDeckLinkConfiguration_v10_2; 54 | 55 | /* Interface IDeckLinkConfiguration_v10_2 - DeckLink Configuration interface */ 56 | 57 | [ 58 | object, 59 | uuid(C679A35B-610C-4D09-B748-1D0478100FC0), 60 | local, 61 | helpstring("DeckLink Configuration interface") 62 | ] interface IDeckLinkConfiguration_v10_2 : IUnknown 63 | { 64 | HRESULT SetFlag([in] BMDDeckLinkConfigurationID cfgID, [in] BOOL value); 65 | HRESULT GetFlag([in] BMDDeckLinkConfigurationID cfgID, [out] BOOL *value); 66 | HRESULT SetInt([in] BMDDeckLinkConfigurationID cfgID, [in] LONGLONG value); 67 | HRESULT GetInt([in] BMDDeckLinkConfigurationID cfgID, [out] LONGLONG *value); 68 | HRESULT SetFloat([in] BMDDeckLinkConfigurationID cfgID, [in] double value); 69 | HRESULT GetFloat([in] BMDDeckLinkConfigurationID cfgID, [out] double *value); 70 | HRESULT SetString([in] BMDDeckLinkConfigurationID cfgID, [in] BSTR value); 71 | HRESULT GetString([in] BMDDeckLinkConfigurationID cfgID, [out] BSTR *value); 72 | HRESULT WriteConfigurationToPreferences(void); 73 | }; 74 | -------------------------------------------------------------------------------- /sdk/Win/include/DeckLinkAPI_v10_4.idl: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2015 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | /* DeckLinkAPI_v10_4.idl */ 28 | 29 | /* Enum BMDDeckLinkConfigurationID - DeckLink Configuration ID */ 30 | 31 | typedef [v1_enum] enum _BMDDeckLinkConfigurationID_v10_4 { 32 | 33 | /* Video output flags */ 34 | 35 | bmdDeckLinkConfigSingleLinkVideoOutput_v10_4 = /* 'sglo' */ 0x73676C6F, 36 | 37 | } BMDDeckLinkConfigurationID_v10_4; 38 | 39 | // Forward Declarations 40 | 41 | interface IDeckLinkConfiguration_v10_4; 42 | 43 | /* Interface IDeckLinkConfiguration_v10_4 - DeckLink Configuration interface */ 44 | 45 | [ 46 | object, 47 | uuid(1E69FCF6-4203-4936-8076-2A9F4CFD50CB), 48 | local, 49 | helpstring("DeckLink Configuration interface") 50 | ] interface IDeckLinkConfiguration_v10_4 : IUnknown 51 | { 52 | HRESULT SetFlag([in] BMDDeckLinkConfigurationID cfgID, [in] BOOL value); 53 | HRESULT GetFlag([in] BMDDeckLinkConfigurationID cfgID, [out] BOOL *value); 54 | HRESULT SetInt([in] BMDDeckLinkConfigurationID cfgID, [in] LONGLONG value); 55 | HRESULT GetInt([in] BMDDeckLinkConfigurationID cfgID, [out] LONGLONG *value); 56 | HRESULT SetFloat([in] BMDDeckLinkConfigurationID cfgID, [in] double value); 57 | HRESULT GetFloat([in] BMDDeckLinkConfigurationID cfgID, [out] double *value); 58 | HRESULT SetString([in] BMDDeckLinkConfigurationID cfgID, [in] BSTR value); 59 | HRESULT GetString([in] BMDDeckLinkConfigurationID cfgID, [out] BSTR *value); 60 | HRESULT WriteConfigurationToPreferences(void); 61 | }; 62 | -------------------------------------------------------------------------------- /sdk/Win/include/DeckLinkAPI_v10_5.idl: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2015 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | /* DeckLinkAPI_v10_5.idl */ 28 | 29 | /* Enum BMDDeckLinkConfigurationID - DeckLink Configuration ID */ 30 | 31 | typedef [v1_enum] enum _BMDDeckLinkAttributeID_v10_5 { 32 | 33 | /* Integers */ 34 | 35 | BMDDeckLinkDeviceBusyState_v10_5 = /* 'dbst' */ 0x64627374, 36 | 37 | } BMDDeckLinkAttributeID_v10_5; 38 | 39 | // Forward Declarations 40 | 41 | interface IDeckLinkEncoderConfiguration_v10_5; 42 | 43 | /* Interface IDeckLinkEncoderConfiguration_v10_5 - DeckLink Encoder Configuration interface. Obtained from IDeckLinkEncoderInput */ 44 | 45 | [ 46 | object, 47 | uuid(67455668-0848-45DF-8D8E-350A77C9A028), 48 | local, 49 | helpstring("DeckLink Encoder Configuration interface. Obtained from IDeckLinkEncoderInput") 50 | ] interface IDeckLinkEncoderConfiguration_v10_5 : IUnknown 51 | { 52 | HRESULT SetFlag([in] BMDDeckLinkEncoderConfigurationID cfgID, [in] BOOL value); 53 | HRESULT GetFlag([in] BMDDeckLinkEncoderConfigurationID cfgID, [out] BOOL *value); 54 | HRESULT SetInt([in] BMDDeckLinkEncoderConfigurationID cfgID, [in] LONGLONG value); 55 | HRESULT GetInt([in] BMDDeckLinkEncoderConfigurationID cfgID, [out] LONGLONG *value); 56 | HRESULT SetFloat([in] BMDDeckLinkEncoderConfigurationID cfgID, [in] double value); 57 | HRESULT GetFloat([in] BMDDeckLinkEncoderConfigurationID cfgID, [out] double *value); 58 | HRESULT SetString([in] BMDDeckLinkEncoderConfigurationID cfgID, [in] BSTR value); 59 | HRESULT GetString([in] BMDDeckLinkEncoderConfigurationID cfgID, [out] BSTR *value); 60 | HRESULT GetDecoderConfigurationInfo([out] void *buffer, [in] long bufferSize, [out] long *returnedSize); 61 | }; 62 | -------------------------------------------------------------------------------- /sdk/Win/include/DeckLinkAPI_v10_6.idl: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2016 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | /* DeckLinkAPI_v10_6.idl */ 28 | 29 | /* Enum BMDDeckLinkAttributeID - DeckLink Attribute ID */ 30 | 31 | typedef [v1_enum] enum _BMDDeckLinkAttributeID_v10_6 { 32 | 33 | /* Flags */ 34 | 35 | BMDDeckLinkSupportsDesktopDisplay_v10_6 = /* 'extd' */ 0x65787464, 36 | 37 | } BMDDeckLinkAttributeID_v10_6; 38 | 39 | typedef [v1_enum] enum _BMDIdleVideoOutputOperation_v10_6 { 40 | bmdIdleVideoOutputDesktop_v10_6 = /* 'desk' */ 0x6465736B 41 | } BMDIdleVideoOutputOperation_v10_6; 42 | -------------------------------------------------------------------------------- /sdk/Win/include/DeckLinkAPI_v10_8.idl: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2016 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | /* DeckLinkAPI_v10_8.idl */ 28 | 29 | 30 | importlib("stdole2.tlb"); 31 | 32 | [ 33 | uuid(1F2E109A-8F4F-49E4-9203-135595CB6FA5), 34 | helpstring("CDeckLinkIterator_v10_8 Class") 35 | ] coclass CDeckLinkIterator_v10_8 36 | { 37 | [default] interface IDeckLinkIterator; 38 | }; 39 | 40 | [ 41 | uuid(1073A05C-D885-47E9-B3C6-129B3F9F648B), 42 | helpstring("CDeckLinkDiscovery_v10_8 Class") 43 | ] coclass CDeckLinkDiscovery_v10_8 44 | { 45 | [default] interface IDeckLinkDiscovery; 46 | }; 47 | -------------------------------------------------------------------------------- /sdk/Win/include/DeckLinkAPI_v10_9.idl: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2017 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | /* DeckLinkAPI_v10_9.idl */ 28 | 29 | /* Enum BMDDeckLinkConfigurationID - DeckLink Configuration ID */ 30 | 31 | typedef [v1_enum] enum _BMDDeckLinkConfigurationID_v10_9 { 32 | 33 | /* Video output flags */ 34 | 35 | bmdDeckLinkConfig1080pNotPsF_v10_9 = /* 'fpro' */ 0x6670726F, 36 | 37 | } BMDDeckLinkConfigurationID_v10_9; 38 | 39 | // Forward Declarations 40 | 41 | interface IDeckLinkConfiguration_v10_9; 42 | 43 | /* Interface IDeckLinkConfiguration_v10_9 - DeckLink Configuration interface */ 44 | 45 | [ 46 | object, 47 | uuid(CB71734A-FE37-4E8D-8E13-802133A1C3F2), 48 | local, 49 | helpstring("DeckLink Configuration interface") 50 | ] interface IDeckLinkConfiguration_v10_9 : IUnknown 51 | { 52 | HRESULT SetFlag([in] BMDDeckLinkConfigurationID cfgID, [in] BOOL value); 53 | HRESULT GetFlag([in] BMDDeckLinkConfigurationID cfgID, [out] BOOL *value); 54 | HRESULT SetInt([in] BMDDeckLinkConfigurationID cfgID, [in] LONGLONG value); 55 | HRESULT GetInt([in] BMDDeckLinkConfigurationID cfgID, [out] LONGLONG *value); 56 | HRESULT SetFloat([in] BMDDeckLinkConfigurationID cfgID, [in] double value); 57 | HRESULT GetFloat([in] BMDDeckLinkConfigurationID cfgID, [out] double *value); 58 | HRESULT SetString([in] BMDDeckLinkConfigurationID cfgID, [in] BSTR value); 59 | HRESULT GetString([in] BMDDeckLinkConfigurationID cfgID, [out] BSTR *value); 60 | HRESULT WriteConfigurationToPreferences(void); 61 | }; 62 | -------------------------------------------------------------------------------- /sdk/Win/include/DeckLinkAPI_v7_9.idl: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2010 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | /* DeckLinkAPI_v7_9.idl */ 28 | 29 | /* Interface IDeckLinkDeckControl_v7_9 - Deck Control main interface */ 30 | 31 | [ 32 | object, 33 | uuid(A4D81043-0619-42B7-8ED6-602D29041DF7), 34 | helpstring("Deck Control main interface") 35 | ] interface IDeckLinkDeckControl_v7_9 : IUnknown 36 | { 37 | HRESULT Open([in] BMDTimeScale timeScale, [in] BMDTimeValue timeValue, [in] BOOL timecodeIsDropFrame, [out] BMDDeckControlError *error); 38 | HRESULT Close([in] BOOL standbyOn); 39 | HRESULT GetCurrentState([out] BMDDeckControlMode *mode, [out] BMDDeckControlVTRControlState *vtrControlState, [out] BMDDeckControlStatusFlags *flags); 40 | HRESULT SetStandby([in] BOOL standbyOn); 41 | HRESULT Play([out] BMDDeckControlError *error); 42 | HRESULT Stop([out] BMDDeckControlError *error); 43 | HRESULT TogglePlayStop([out] BMDDeckControlError *error); 44 | HRESULT Eject([out] BMDDeckControlError *error); 45 | HRESULT GoToTimecode([in] BMDTimecodeBCD timecode, [out] BMDDeckControlError *error); 46 | HRESULT FastForward([in] BOOL viewTape, [out] BMDDeckControlError *error); 47 | HRESULT Rewind([in] BOOL viewTape, [out] BMDDeckControlError *error); 48 | HRESULT StepForward([out] BMDDeckControlError *error); 49 | HRESULT StepBack([out] BMDDeckControlError *error); 50 | HRESULT Jog([in] double rate, [out] BMDDeckControlError *error); 51 | HRESULT Shuttle([in] double rate, [out] BMDDeckControlError *error); 52 | HRESULT GetTimecodeString([out] BSTR *currentTimeCode, [out] BMDDeckControlError *error); 53 | HRESULT GetTimecode([out] IDeckLinkTimecode **currentTimecode, [out] BMDDeckControlError *error); 54 | HRESULT GetTimecodeBCD([out] BMDTimecodeBCD *currentTimecode, [out] BMDDeckControlError *error); 55 | HRESULT SetPreroll([in] unsigned int prerollSeconds); 56 | HRESULT GetPreroll([out] unsigned int *prerollSeconds); 57 | HRESULT SetExportOffset([in] int exportOffsetFields); 58 | HRESULT GetExportOffset([out] int *exportOffsetFields); 59 | HRESULT GetManualExportOffset([out] int *deckManualExportOffsetFields); 60 | HRESULT SetCaptureOffset([in] int captureOffsetFields); 61 | HRESULT GetCaptureOffset([out] int *captureOffsetFields); 62 | HRESULT StartExport([in] BMDTimecodeBCD inTimecode, [in] BMDTimecodeBCD outTimecode, [in] BMDDeckControlExportModeOpsFlags exportModeOps, [out] BMDDeckControlError *error); 63 | HRESULT StartCapture([in] BOOL useVITC, [in] BMDTimecodeBCD inTimecode, [in] BMDTimecodeBCD outTimecode, [out] BMDDeckControlError *error); 64 | HRESULT GetDeviceID([out] unsigned short *deviceId, [out] BMDDeckControlError *error); 65 | HRESULT Abort(void); 66 | HRESULT CrashRecordStart([out] BMDDeckControlError *error); 67 | HRESULT CrashRecordStop([out] BMDDeckControlError *error); 68 | HRESULT SetCallback([in] IDeckLinkDeckControlStatusCallback *callback); 69 | }; 70 | -------------------------------------------------------------------------------- /sdk/Win/include/DeckLinkAPI_v8_0.idl: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2011 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | /* DeckLinkAPI_v8_0.idl */ 28 | 29 | /* Interface IDeckLink_v8_0 - represents a DeckLink device */ 30 | 31 | [ 32 | object, 33 | uuid(62BFF75D-6569-4E55-8D4D-66AA03829ABC), 34 | helpstring("represents a DeckLink device") 35 | ] interface IDeckLink_v8_0 : IUnknown 36 | { 37 | HRESULT GetModelName([out] BSTR *modelName); 38 | }; 39 | 40 | /* Interface IDeckLinkIterator_v8_0 - enumerates installed DeckLink hardware */ 41 | 42 | [ 43 | object, 44 | uuid(74E936FC-CC28-4A67-81A0-1E94E52D4E69), 45 | helpstring("enumerates installed DeckLink hardware") 46 | ] interface IDeckLinkIterator_v8_0 : IUnknown 47 | { 48 | HRESULT Next([out] IDeckLink_v8_0 **deckLinkInstance); 49 | }; 50 | 51 | 52 | /* Coclasses */ 53 | 54 | importlib("stdole2.tlb"); 55 | 56 | [ 57 | uuid(D9EDA3B3-2887-41FA-B724-017CF1EB1D37), 58 | helpstring("CDeckLinkIterator Class (DeckLink API v8.0)") 59 | ] coclass CDeckLinkIterator_v8_0 60 | { 61 | [default] interface IDeckLinkIterator_v8_0; 62 | }; 63 | -------------------------------------------------------------------------------- /sdk/Win/include/DeckLinkAPI_v9_2.idl: -------------------------------------------------------------------------------- 1 | /* -LICENSE-START- 2 | ** Copyright (c) 2012 Blackmagic Design 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person or organization 5 | ** obtaining a copy of the software and accompanying documentation covered by 6 | ** this license (the "Software") to use, reproduce, display, distribute, 7 | ** execute, and transmit the Software, and to prepare derivative works of the 8 | ** Software, and to permit third-parties to whom the Software is furnished to 9 | ** do so, all subject to the following: 10 | ** 11 | ** The copyright notices in the Software and this entire statement, including 12 | ** the above license grant, this restriction and the following disclaimer, 13 | ** must be included in all copies of the Software, in whole or in part, and 14 | ** all derivative works of the Software, unless such copies or derivative 15 | ** works are solely in the form of machine-executable object code generated by 16 | ** a source language processor. 17 | ** 18 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | ** DEALINGS IN THE SOFTWARE. 25 | ** -LICENSE-END- 26 | */ 27 | 28 | /* DeckLinkAPI_v9_2.idl */ 29 | 30 | 31 | /* Interface IDeckLinkInput_v9_2 - Created by QueryInterface from IDeckLink. */ 32 | 33 | [ 34 | object, 35 | uuid(6D40EF78-28B9-4E21-990D-95BB7750A04F), 36 | helpstring("Created by QueryInterface from IDeckLink.") 37 | ] interface IDeckLinkInput_v9_2 : IUnknown 38 | { 39 | HRESULT DoesSupportVideoMode([in] BMDDisplayMode displayMode, [in] BMDPixelFormat pixelFormat, [in] BMDVideoInputFlags flags, [out] BMDDisplayModeSupport_v10_11 *result, [out] IDeckLinkDisplayMode **resultDisplayMode); 40 | HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator **iterator); 41 | 42 | HRESULT SetScreenPreviewCallback([in] IDeckLinkScreenPreviewCallback *previewCallback); 43 | 44 | /* Video Input */ 45 | 46 | HRESULT EnableVideoInput([in] BMDDisplayMode displayMode, [in] BMDPixelFormat pixelFormat, [in] BMDVideoInputFlags flags); 47 | HRESULT DisableVideoInput(void); 48 | HRESULT GetAvailableVideoFrameCount([out] unsigned int *availableFrameCount); 49 | 50 | /* Audio Input */ 51 | 52 | HRESULT EnableAudioInput([in] BMDAudioSampleRate sampleRate, [in] BMDAudioSampleType sampleType, [in] unsigned int channelCount); 53 | HRESULT DisableAudioInput(void); 54 | HRESULT GetAvailableAudioSampleFrameCount([out] unsigned int *availableSampleFrameCount); 55 | 56 | /* Input Control */ 57 | 58 | HRESULT StartStreams(void); 59 | HRESULT StopStreams(void); 60 | HRESULT PauseStreams(void); 61 | HRESULT FlushStreams(void); 62 | HRESULT SetCallback([in] IDeckLinkInputCallback *theCallback); 63 | 64 | /* Hardware Timing */ 65 | 66 | HRESULT GetHardwareReferenceClock([in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue *hardwareTime, [out] BMDTimeValue *timeInFrame, [out] BMDTimeValue *ticksPerFrame); 67 | }; 68 | 69 | --------------------------------------------------------------------------------