** Copyright (c) 2016 Blackmagic Design
**
** Permission is hereby granted, free of charge, to any person or organization
** obtaining a copy of the software and accompanying documentation covered by
** this license (the "Software") to use, reproduce, display, distribute,
** execute, and transmit the Software, and to prepare derivative works of the
** Software, and to permit third-parties to whom the Software is furnished to
** do so, all subject to the following:
**
** The copyright notices in the Software and this entire statement, including
** the above license grant, this restriction and the following disclaimer,
** must be included in all copies of the Software, in whole or in part, and
** all derivative works of the Software, unless such copies or derivative
** works are solely in the form of machine-executable object code generated by
** a source language processor.
**
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
** DEALINGS IN THE SOFTWARE.
** -LICENSE-END-
*/
#ifndef BMD_DECKLINKAPI_H
#define BMD_DECKLINKAPI_H
#ifndef BMD_CONST
#if defined(_MSC_VER)
#define BMD_CONST __declspec(selectany) static const
#else
#define BMD_CONST static const
#endif
#endif
#include <CoreFoundation/CoreFoundation.h>
#include <CoreFoundation/CFPlugInCOM.h>
#include <stdint.h>
#include "DeckLinkAPITypes.h"
#include "DeckLinkAPIModes.h"
#include "DeckLinkAPIDiscovery.h"
#include "DeckLinkAPIConfiguration.h"
#include "DeckLinkAPIDeckControl.h"
#include "DeckLinkAPIStreaming.h"
#define BLACKMAGIC_DECKLINK_API_MAGIC 1
BMD_CONST REFIID IID_IDeckLinkVideoOutputCallback = {0x20,0xAA,0x52,0x25,0x19,0x58,0x47,0xCB,0x82,0x0B,0x80,0xA8,0xD5,0x21,0xA6,0xEE};
BMD_CONST REFIID IID_IDeckLinkInputCallback = {0xDD,0x04,0xE5,0xEC,0x74,0x15,0x42,0xAB,0xAE,0x4A,0xE8,0x0C,0x4D,0xFC,0x04,0x4A};
BMD_CONST REFIID IID_IDeckLinkEncoderInputCallback = {0xAC,0xF1,0x3E,0x61,0xF4,0xA0,0x49,0x74,0xA6,0xA7,0x59,0xAF,0xF6,0x26,0x8B,0x31};
BMD_CONST REFIID IID_IDeckLinkMemoryAllocator = {0xB3,0x6E,0xB6,0xE7,0x9D,0x29,0x4A,0xA8,0x92,0xEF,0x84,0x3B,0x87,0xA2,0x89,0xE8};
BMD_CONST REFIID IID_IDeckLinkAudioOutputCallback = {0x40,0x3C,0x68,0x1B,0x7F,0x46,0x4A,0x12,0xB9,0x93,0x2B,0xB1,0x27,0x08,0x4E,0xE6};
BMD_CONST REFIID IID_IDeckLinkIterator = {0x50,0xFB,0x36,0xCD,0x30,0x63,0x4B,0x73,0xBD,0xBB,0x95,0x80,0x87,0xF2,0xD8,0xBA};
BMD_CONST REFIID IID_IDeckLinkAPIInformation = {0x7B,0xEA,0x3C,0x68,0x73,0x0D,0x43,0x22,0xAF,0x34,0x8A,0x71,0x52,0xB5,0x32,0xA4};
BMD_CONST REFIID IID_IDeckLinkOutput = {0xCC,0x5C,0x8A,0x6E,0x3F,0x2F,0x4B,0x3A,0x87,0xEA,0xFD,0x78,0xAF,0x30,0x05,0x64};
BMD_CONST REFIID IID_IDeckLinkInput = {0xAF,0x22,0x76,0x2B,0xDF,0xAC,0x48,0x46,0xAA,0x79,0xFA,0x88,0x83,0x56,0x09,0x95};
BMD_CONST REFIID IID_IDeckLinkEncoderInput = {0x27,0x05,0x87,0xDA,0x6B,0x7D,0x42,0xE7,0xA1,0xF0,0x6D,0x85,0x3F,0x58,0x11,0x85};
BMD_CONST REFIID IID_IDeckLinkVideoFrame = {0x3F,0x71,0x6F,0xE0,0xF0,0x23,0x41,0x11,0xBE,0x5D,0xEF,0x44,0x14,0xC0,0x5B,0x17};
BMD_CONST REFIID IID_IDeckLinkMutableVideoFrame = {0x69,0xE2,0x63,0x9F,0x40,0xDA,0x4E,0x19,0xB6,0xF2,0x20,0xAC,0xE8,0x15,0xC3,0x90};
BMD_CONST REFIID IID_IDeckLinkVideoFrame3DExtensions = {0xDA,0x0F,0x7E,0x4A,0xED,0xC7,0x48,0xA8,0x9C,0xDD,0x2D,0xB5,0x1C,0x72,0x9C,0xD7};
BMD_CONST REFIID IID_IDeckLinkVideoFrameMetadataExtensions = {0xD5,0x97,0x3D,0xC9,0x64,0x32,0x46,0xD0,0x8F,0x0B,0x24,0x96,0xF8,0xA1,0x23,0x8F};
BMD_CONST REFIID IID_IDeckLinkVideoInputFrame = {0x05,0xCF,0xE3,0x74,0x53,0x7C,0x40,0x94,0x9A,0x57,0x68,0x05,0x25,0x11,0x8F,0x44};
BMD_CONST REFIID IID_IDeckLinkVideoFrameAncillary = {0x73,0x2E,0x72,0x3C,0xD1,0xA4,0x4E,0x29,0x9E,0x8E,0x4A,0x88,0x79,0x7A,0x00,0x04};
BMD_CONST REFIID IID_IDeckLinkEncoderPacket = {0xB6,0x93,0xF3,0x6C,0x31,0x6E,0x4A,0xF1,0xB6,0xC2,0xF3,0x89,0xA4,0xBC,0xA6,0x20};
BMD_CONST REFIID IID_IDeckLinkEncoderVideoPacket = {0x4E,0x7F,0xD9,0x44,0xE8,0xC7,0x4E,0xAC,0xB8,0xC0,0x7B,0x77,0xF8,0x0F,0x5A,0xE0};
BMD_CONST REFIID IID_IDeckLinkEncoderAudioPacket = {0x49,0xE8,0xED,0xC8,0x69,0x3B,0x4E,0x14,0x8E,0xF6,0x12,0xC6,0x58,0xF5,0xA0,0x7A};
BMD_CONST REFIID IID_IDeckLinkH265NALPacket = {0x63,0x9C,0x8E,0x0B,0x68,0xD5,0x4B,0xDE,0xA6,0xD4,0x95,0xF3,0xAE,0xAF,0xF2,0xE7};
BMD_CONST REFIID IID_IDeckLinkAudioInputPacket = {0xE4,0x3D,0x58,0x70,0x28,0x94,0x11,0xDE,0x8C,0x30,0x08,0x00,0x20,0x0C,0x9A,0x66};
BMD_CONST REFIID IID_IDeckLinkScreenPreviewCallback = {0xB1,0xD3,0xF4,0x9A,0x85,0xFE,0x4C,0x5D,0x95,0xC8,0x0B,0x5D,0x5D,0xCC,0xD4,0x38};
BMD_CONST REFIID IID_IDeckLinkCocoaScreenPreviewCallback = {0xD1,0x74,0x15,0x2F,0x8F,0x96,0x4C,0x07,0x83,0xA5,0xDD,0x5F,0x5A,0xF0,0xA2,0xAA};
BMD_CONST REFIID IID_IDeckLinkGLScreenPreviewHelper = {0x50,0x4E,0x22,0x09,0xCA,0xC7,0x4C,0x1A,0x9F,0xB4,0xC5,0xBB,0x62,0x74,0xD2,0x2F};
BMD_CONST REFIID IID_IDeckLinkNotificationCallback = {0xB0,0x02,0xA1,0xEC,0x07,0x0D,0x42,0x88,0x82,0x89,0xBD,0x5D,0x36,0xE5,0xFF,0x0D};
BMD_CONST REFIID IID_IDeckLinkNotification = {0x0A,0x1F,0xB2,0x07,0xE2,0x15,0x44,0x1B,0x9B,0x19,0x6F,0xA1,0x57,0x59,0x46,0xC5};
BMD_CONST REFIID IID_IDeckLinkAttributes = {0xAB,0xC1,0x18,0x43,0xD9,0x66,0x44,0xCB,0x96,0xE2,0xA1,0xCB,0x5D,0x31,0x35,0xC4};
BMD_CONST REFIID IID_IDeckLinkStatus = {0x5F,0x55,0x82,0x00,0x40,0x28,0x49,0xBC,0xBE,0xAC,0xDB,0x3F,0xA4,0xA9,0x6E,0x46};
BMD_CONST REFIID IID_IDeckLinkKeyer = {0x89,0xAF,0xCA,0xF5,0x65,0xF8,0x42,0x1E,0x98,0xF7,0x96,0xFE,0x5F,0x5B,0xFB,0xA3};
BMD_CONST REFIID IID_IDeckLinkVideoConversion = {0x3B,0xBC,0xB8,0xA2,0xDA,0x2C,0x42,0xD9,0xB5,0xD8,0x88,0x08,0x36,0x44,0xE9,0x9A};
BMD_CONST REFIID IID_IDeckLinkDeviceNotificationCallback = {0x49,0x97,0x05,0x3B,0x0A,0xDF,0x4C,0xC8,0xAC,0x70,0x7A,0x50,0xC4,0xBE,0x72,0x8F};
BMD_CONST REFIID IID_IDeckLinkDiscovery = {0xCD,0xBF,0x63,0x1C,0xBC,0x76,0x45,0xFA,0xB4,0x4D,0xC5,0x50,0x59,0xBC,0x61,0x01};
typedef uint32_t BMDVideoOutputFlags;
enum _BMDVideoOutputFlags {
bmdVideoOutputFlagDefault = 0,
bmdVideoOutputVANC = 1 << 0,
bmdVideoOutputVITC = 1 << 1,
bmdVideoOutputRP188 = 1 << 2,
bmdVideoOutputDualStream3D = 1 << 4
};
typedef uint32_t BMDPacketType;
enum _BMDPacketType {
bmdPacketTypeStreamInterruptedMarker = 'sint',
bmdPacketTypeStreamData = 'sdat'
};
typedef uint32_t BMDFrameFlags;
enum _BMDFrameFlags {
bmdFrameFlagDefault = 0,
bmdFrameFlagFlipVertical = 1 << 0,
bmdFrameContainsHDRMetadata = 1 << 1,
bmdFrameHasNoInputSource = 1 << 31
};
typedef uint32_t BMDVideoInputFlags;
enum _BMDVideoInputFlags {
bmdVideoInputFlagDefault = 0,
bmdVideoInputEnableFormatDetection = 1 << 0,
bmdVideoInputDualStream3D = 1 << 1
};
typedef uint32_t BMDVideoInputFormatChangedEvents;
enum _BMDVideoInputFormatChangedEvents {
bmdVideoInputDisplayModeChanged = 1 << 0,
bmdVideoInputFieldDominanceChanged = 1 << 1,
bmdVideoInputColorspaceChanged = 1 << 2
};
typedef uint32_t BMDDetectedVideoInputFormatFlags;
enum _BMDDetectedVideoInputFormatFlags {
bmdDetectedVideoInputYCbCr422 = 1 << 0,
bmdDetectedVideoInputRGB444 = 1 << 1,
bmdDetectedVideoInputDualStream3D = 1 << 2
};
typedef uint32_t BMDDeckLinkCapturePassthroughMode;
enum _BMDDeckLinkCapturePassthroughMode {
bmdDeckLinkCapturePassthroughModeDirect = 'pdir',
bmdDeckLinkCapturePassthroughModeCleanSwitch = 'pcln'
};
typedef uint32_t BMDOutputFrameCompletionResult;
enum _BMDOutputFrameCompletionResult {
bmdOutputFrameCompleted,
bmdOutputFrameDisplayedLate,
bmdOutputFrameDropped,
bmdOutputFrameFlushed
};
typedef uint32_t BMDReferenceStatus;
enum _BMDReferenceStatus {
bmdReferenceNotSupportedByHardware = 1 << 0,
bmdReferenceLocked = 1 << 1
};
typedef uint32_t BMDAudioFormat;
enum _BMDAudioFormat {
bmdAudioFormatPCM = 'lpcm'
};
typedef uint32_t BMDAudioSampleRate;
enum _BMDAudioSampleRate {
bmdAudioSampleRate48kHz = 48000
};
typedef uint32_t BMDAudioSampleType;
enum _BMDAudioSampleType {
bmdAudioSampleType16bitInteger = 16,
bmdAudioSampleType32bitInteger = 32
};
typedef uint32_t BMDAudioOutputStreamType;
enum _BMDAudioOutputStreamType {
bmdAudioOutputStreamContinuous,
bmdAudioOutputStreamContinuousDontResample,
bmdAudioOutputStreamTimestamped
};
typedef uint32_t BMDDisplayModeSupport;
enum _BMDDisplayModeSupport {
bmdDisplayModeNotSupported = 0,
bmdDisplayModeSupported,
bmdDisplayModeSupportedWithConversion
};
typedef uint32_t BMDTimecodeFormat;
enum _BMDTimecodeFormat {
bmdTimecodeRP188VITC1 = 'rpv1',
bmdTimecodeRP188VITC2 = 'rp12',
bmdTimecodeRP188LTC = 'rplt',
bmdTimecodeRP188Any = 'rp18',
bmdTimecodeVITC = 'vitc',
bmdTimecodeVITCField2 = 'vit2',
bmdTimecodeSerial = 'seri'
};
typedef uint32_t BMDAnalogVideoFlags;
enum _BMDAnalogVideoFlags {
bmdAnalogVideoFlagCompositeSetup75 = 1 << 0,
bmdAnalogVideoFlagComponentBetacamLevels = 1 << 1
};
typedef uint32_t BMDAudioOutputAnalogAESSwitch;
enum _BMDAudioOutputAnalogAESSwitch {
bmdAudioOutputSwitchAESEBU = 'aes ',
bmdAudioOutputSwitchAnalog = 'anlg'
};
typedef uint32_t BMDVideoOutputConversionMode;
enum _BMDVideoOutputConversionMode {
bmdNoVideoOutputConversion = 'none',
bmdVideoOutputLetterboxDownconversion = 'ltbx',
bmdVideoOutputAnamorphicDownconversion = 'amph',
bmdVideoOutputHD720toHD1080Conversion = '720c',
bmdVideoOutputHardwareLetterboxDownconversion = 'HWlb',
bmdVideoOutputHardwareAnamorphicDownconversion = 'HWam',
bmdVideoOutputHardwareCenterCutDownconversion = 'HWcc',
bmdVideoOutputHardware720p1080pCrossconversion = 'xcap',
bmdVideoOutputHardwareAnamorphic720pUpconversion = 'ua7p',
bmdVideoOutputHardwareAnamorphic1080iUpconversion = 'ua1i',
bmdVideoOutputHardwareAnamorphic149To720pUpconversion = 'u47p',
bmdVideoOutputHardwareAnamorphic149To1080iUpconversion = 'u41i',
bmdVideoOutputHardwarePillarbox720pUpconversion = 'up7p',
bmdVideoOutputHardwarePillarbox1080iUpconversion = 'up1i'
};
typedef uint32_t BMDVideoInputConversionMode;
enum _BMDVideoInputConversionMode {
bmdNoVideoInputConversion = 'none',
bmdVideoInputLetterboxDownconversionFromHD1080 = '10lb',
bmdVideoInputAnamorphicDownconversionFromHD1080 = '10am',
bmdVideoInputLetterboxDownconversionFromHD720 = '72lb',
bmdVideoInputAnamorphicDownconversionFromHD720 = '72am',
bmdVideoInputLetterboxUpconversion = 'lbup',
bmdVideoInputAnamorphicUpconversion = 'amup'
};
typedef uint32_t BMDVideo3DPackingFormat;
enum _BMDVideo3DPackingFormat {
bmdVideo3DPackingSidebySideHalf = 'sbsh',
bmdVideo3DPackingLinebyLine = 'lbyl',
bmdVideo3DPackingTopAndBottom = 'tabo',
bmdVideo3DPackingFramePacking = 'frpk',
bmdVideo3DPackingLeftOnly = 'left',
bmdVideo3DPackingRightOnly = 'righ'
};
typedef uint32_t BMDIdleVideoOutputOperation;
enum _BMDIdleVideoOutputOperation {
bmdIdleVideoOutputBlack = 'blac',
bmdIdleVideoOutputLastFrame = 'lafa'
};
typedef uint32_t BMDVideoEncoderFrameCodingMode;
enum _BMDVideoEncoderFrameCodingMode {
bmdVideoEncoderFrameCodingModeInter = 'inte',
bmdVideoEncoderFrameCodingModeIntra = 'intr'
};
typedef uint32_t BMDDNxHRLevel;
enum _BMDDNxHRLevel {
bmdDNxHRLevelSQ = 'dnsq',
bmdDNxHRLevelLB = 'dnlb',
bmdDNxHRLevelHQ = 'dnhq',
bmdDNxHRLevelHQX = 'dhqx',
bmdDNxHRLevel444 = 'd444'
};
typedef uint32_t BMDLinkConfiguration;
enum _BMDLinkConfiguration {
bmdLinkConfigurationSingleLink = 'lcsl',
bmdLinkConfigurationDualLink = 'lcdl',
bmdLinkConfigurationQuadLink = 'lcql'
};
typedef uint32_t BMDDeviceInterface;
enum _BMDDeviceInterface {
bmdDeviceInterfacePCI = 'pci ',
bmdDeviceInterfaceUSB = 'usb ',
bmdDeviceInterfaceThunderbolt = 'thun'
};
typedef uint32_t BMDDeckLinkFrameMetadataID;
enum _BMDDeckLinkFrameMetadataID {
bmdDeckLinkFrameMetadataHDRElectroOpticalTransferFunc = 'eotf',
bmdDeckLinkFrameMetadataHDRDisplayPrimariesRedX = 'hdrx',
bmdDeckLinkFrameMetadataHDRDisplayPrimariesRedY = 'hdry',
bmdDeckLinkFrameMetadataHDRDisplayPrimariesGreenX = 'hdgx',
bmdDeckLinkFrameMetadataHDRDisplayPrimariesGreenY = 'hdgy',
bmdDeckLinkFrameMetadataHDRDisplayPrimariesBlueX = 'hdbx',
bmdDeckLinkFrameMetadataHDRDisplayPrimariesBlueY = 'hdby',
bmdDeckLinkFrameMetadataHDRWhitePointX = 'hdwx',
bmdDeckLinkFrameMetadataHDRWhitePointY = 'hdwy',
bmdDeckLinkFrameMetadataHDRMaxDisplayMasteringLuminance = 'hdml',
bmdDeckLinkFrameMetadataHDRMinDisplayMasteringLuminance = 'hmil',
bmdDeckLinkFrameMetadataHDRMaximumContentLightLevel = 'mcll',
bmdDeckLinkFrameMetadataHDRMaximumFrameAverageLightLevel = 'fall'
};
typedef uint32_t BMDDuplexMode;
enum _BMDDuplexMode {
bmdDuplexModeFull = 'fdup',
bmdDuplexModeHalf = 'hdup'
};
typedef uint32_t BMDDeckLinkAttributeID;
enum _BMDDeckLinkAttributeID {
BMDDeckLinkSupportsInternalKeying = 'keyi',
BMDDeckLinkSupportsExternalKeying = 'keye',
BMDDeckLinkSupportsHDKeying = 'keyh',
BMDDeckLinkSupportsInputFormatDetection = 'infd',
BMDDeckLinkHasReferenceInput = 'hrin',
BMDDeckLinkHasSerialPort = 'hspt',
BMDDeckLinkHasAnalogVideoOutputGain = 'avog',
BMDDeckLinkCanOnlyAdjustOverallVideoOutputGain = 'ovog',
BMDDeckLinkHasVideoInputAntiAliasingFilter = 'aafl',
BMDDeckLinkHasBypass = 'byps',
BMDDeckLinkSupportsClockTimingAdjustment = 'ctad',
BMDDeckLinkSupportsFullDuplex = 'fdup',
BMDDeckLinkSupportsFullFrameReferenceInputTimingOffset = 'frin',
BMDDeckLinkSupportsSMPTELevelAOutput = 'lvla',
BMDDeckLinkSupportsDualLinkSDI = 'sdls',
BMDDeckLinkSupportsQuadLinkSDI = 'sqls',
BMDDeckLinkSupportsIdleOutput = 'idou',
BMDDeckLinkHasLTCTimecodeInput = 'hltc',
BMDDeckLinkSupportsDuplexModeConfiguration = 'dupx',
BMDDeckLinkSupportsHDRMetadata = 'hdrm',
BMDDeckLinkMaximumAudioChannels = 'mach',
BMDDeckLinkMaximumAnalogAudioChannels = 'aach',
BMDDeckLinkNumberOfSubDevices = 'nsbd',
BMDDeckLinkSubDeviceIndex = 'subi',
BMDDeckLinkPersistentID = 'peid',
BMDDeckLinkDeviceGroupID = 'dgid',
BMDDeckLinkTopologicalID = 'toid',
BMDDeckLinkVideoOutputConnections = 'vocn',
BMDDeckLinkVideoInputConnections = 'vicn',
BMDDeckLinkAudioOutputConnections = 'aocn',
BMDDeckLinkAudioInputConnections = 'aicn',
BMDDeckLinkVideoIOSupport = 'vios',
BMDDeckLinkDeckControlConnections = 'dccn',
BMDDeckLinkDeviceInterface = 'dbus',
BMDDeckLinkAudioInputRCAChannelCount = 'airc',
BMDDeckLinkAudioInputXLRChannelCount = 'aixc',
BMDDeckLinkAudioOutputRCAChannelCount = 'aorc',
BMDDeckLinkAudioOutputXLRChannelCount = 'aoxc',
BMDDeckLinkPairedDevicePersistentID = 'ppid',
BMDDeckLinkVideoInputGainMinimum = 'vigm',
BMDDeckLinkVideoInputGainMaximum = 'vigx',
BMDDeckLinkVideoOutputGainMinimum = 'vogm',
BMDDeckLinkVideoOutputGainMaximum = 'vogx',
BMDDeckLinkMicrophoneInputGainMinimum = 'migm',
BMDDeckLinkMicrophoneInputGainMaximum = 'migx',
BMDDeckLinkSerialPortDeviceName = 'slpn',
BMDDeckLinkVendorName = 'vndr',
BMDDeckLinkDisplayName = 'dspn',
BMDDeckLinkModelName = 'mdln',
BMDDeckLinkDeviceHandle = 'devh'
};
typedef uint32_t BMDDeckLinkAPIInformationID;
enum _BMDDeckLinkAPIInformationID {
BMDDeckLinkAPIVersion = 'vers'
};
typedef uint32_t BMDDeckLinkStatusID;
enum _BMDDeckLinkStatusID {
bmdDeckLinkStatusDetectedVideoInputMode = 'dvim',
bmdDeckLinkStatusDetectedVideoInputFlags = 'dvif',
bmdDeckLinkStatusCurrentVideoInputMode = 'cvim',
bmdDeckLinkStatusCurrentVideoInputPixelFormat = 'cvip',
bmdDeckLinkStatusCurrentVideoInputFlags = 'cvif',
bmdDeckLinkStatusCurrentVideoOutputMode = 'cvom',
bmdDeckLinkStatusCurrentVideoOutputFlags = 'cvof',
bmdDeckLinkStatusPCIExpressLinkWidth = 'pwid',
bmdDeckLinkStatusPCIExpressLinkSpeed = 'plnk',
bmdDeckLinkStatusLastVideoOutputPixelFormat = 'opix',
bmdDeckLinkStatusReferenceSignalMode = 'refm',
bmdDeckLinkStatusReferenceSignalFlags = 'reff',
bmdDeckLinkStatusDuplexMode = 'dupx',
bmdDeckLinkStatusBusy = 'busy',
bmdDeckLinkStatusVideoInputSignalLocked = 'visl',
bmdDeckLinkStatusReferenceSignalLocked = 'refl'
};
typedef uint32_t BMDDeckLinkVideoStatusFlags;
enum _BMDDeckLinkVideoStatusFlags {
bmdDeckLinkVideoStatusPsF = 1 << 0,
bmdDeckLinkVideoStatusDualStream3D = 1 << 1
};
typedef uint32_t BMDDuplexStatus;
enum _BMDDuplexStatus {
bmdDuplexStatusFullDuplex = 'fdup',
bmdDuplexStatusHalfDuplex = 'hdup',
bmdDuplexStatusSimplex = 'splx',
bmdDuplexStatusInactive = 'inac'
};
typedef uint32_t BMDDeviceBusyState;
enum _BMDDeviceBusyState {
bmdDeviceCaptureBusy = 1 << 0,
bmdDevicePlaybackBusy = 1 << 1,
bmdDeviceSerialPortBusy = 1 << 2
};
typedef uint32_t BMDVideoIOSupport;
enum _BMDVideoIOSupport {
bmdDeviceSupportsCapture = 1 << 0,
bmdDeviceSupportsPlayback = 1 << 1
};
typedef uint32_t BMD3DPreviewFormat;
enum _BMD3DPreviewFormat {
bmd3DPreviewFormatDefault = 'defa',
bmd3DPreviewFormatLeftOnly = 'left',
bmd3DPreviewFormatRightOnly = 'righ',
bmd3DPreviewFormatSideBySide = 'side',
bmd3DPreviewFormatTopBottom = 'topb'
};
typedef uint32_t BMDNotifications;
enum _BMDNotifications {
bmdPreferencesChanged = 'pref',
bmdStatusChanged = 'stat'
};
#if defined(__cplusplus)
class IDeckLinkVideoOutputCallback;
class IDeckLinkInputCallback;
class IDeckLinkEncoderInputCallback;
class IDeckLinkMemoryAllocator;
class IDeckLinkAudioOutputCallback;
class IDeckLinkIterator;
class IDeckLinkAPIInformation;
class IDeckLinkOutput;
class IDeckLinkInput;
class IDeckLinkEncoderInput;
class IDeckLinkVideoFrame;
class IDeckLinkMutableVideoFrame;
class IDeckLinkVideoFrame3DExtensions;
class IDeckLinkVideoFrameMetadataExtensions;
class IDeckLinkVideoInputFrame;
class IDeckLinkVideoFrameAncillary;
class IDeckLinkEncoderPacket;
class IDeckLinkEncoderVideoPacket;
class IDeckLinkEncoderAudioPacket;
class IDeckLinkH265NALPacket;
class IDeckLinkAudioInputPacket;
class IDeckLinkScreenPreviewCallback;
class IDeckLinkCocoaScreenPreviewCallback;
class IDeckLinkGLScreenPreviewHelper;
class IDeckLinkNotificationCallback;
class IDeckLinkNotification;
class IDeckLinkAttributes;
class IDeckLinkStatus;
class IDeckLinkKeyer;
class IDeckLinkVideoConversion;
class IDeckLinkDeviceNotificationCallback;
class IDeckLinkDiscovery;
class IDeckLinkVideoOutputCallback : public IUnknown
{
public:
virtual HRESULT ScheduledFrameCompleted ( IDeckLinkVideoFrame *completedFrame, BMDOutputFrameCompletionResult result) = 0;
virtual HRESULT ScheduledPlaybackHasStopped (void) = 0;
protected:
virtual ~IDeckLinkVideoOutputCallback () {}
};
class IDeckLinkInputCallback : public IUnknown
{
public:
virtual HRESULT VideoInputFormatChanged ( BMDVideoInputFormatChangedEvents notificationEvents, IDeckLinkDisplayMode *newDisplayMode, BMDDetectedVideoInputFormatFlags detectedSignalFlags) = 0;
virtual HRESULT VideoInputFrameArrived ( IDeckLinkVideoInputFrame* videoFrame, IDeckLinkAudioInputPacket* audioPacket) = 0;
protected:
virtual ~IDeckLinkInputCallback () {}
};
class IDeckLinkEncoderInputCallback : public IUnknown
{
public:
virtual HRESULT VideoInputSignalChanged ( BMDVideoInputFormatChangedEvents notificationEvents, IDeckLinkDisplayMode *newDisplayMode, BMDDetectedVideoInputFormatFlags detectedSignalFlags) = 0;
virtual HRESULT VideoPacketArrived ( IDeckLinkEncoderVideoPacket* videoPacket) = 0;
virtual HRESULT AudioPacketArrived ( IDeckLinkEncoderAudioPacket* audioPacket) = 0;
protected:
virtual ~IDeckLinkEncoderInputCallback () {}
};
class IDeckLinkMemoryAllocator : public IUnknown
{
public:
virtual HRESULT AllocateBuffer ( uint32_t bufferSize, void **allocatedBuffer) = 0;
virtual HRESULT ReleaseBuffer ( void *buffer) = 0;
virtual HRESULT Commit (void) = 0;
virtual HRESULT Decommit (void) = 0;
};
class IDeckLinkAudioOutputCallback : public IUnknown
{
public:
virtual HRESULT RenderAudioSamples ( bool preroll) = 0;
};
class IDeckLinkIterator : public IUnknown
{
public:
virtual HRESULT Next ( IDeckLink **deckLinkInstance) = 0;
};
class IDeckLinkAPIInformation : public IUnknown
{
public:
virtual HRESULT GetFlag ( BMDDeckLinkAPIInformationID cfgID, bool *value) = 0;
virtual HRESULT GetInt ( BMDDeckLinkAPIInformationID cfgID, int64_t *value) = 0;
virtual HRESULT GetFloat ( BMDDeckLinkAPIInformationID cfgID, double *value) = 0;
virtual HRESULT GetString ( BMDDeckLinkAPIInformationID cfgID, CFStringRef *value) = 0;
protected:
virtual ~IDeckLinkAPIInformation () {}
};
class IDeckLinkOutput : public IUnknown
{
public:
virtual HRESULT DoesSupportVideoMode ( BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, BMDVideoOutputFlags flags, BMDDisplayModeSupport *result, IDeckLinkDisplayMode **resultDisplayMode) = 0;
virtual HRESULT GetDisplayModeIterator ( IDeckLinkDisplayModeIterator **iterator) = 0;
virtual HRESULT SetScreenPreviewCallback ( IDeckLinkScreenPreviewCallback *previewCallback) = 0;
virtual HRESULT EnableVideoOutput ( BMDDisplayMode displayMode, BMDVideoOutputFlags flags) = 0;
virtual HRESULT DisableVideoOutput (void) = 0;
virtual HRESULT SetVideoOutputFrameMemoryAllocator ( IDeckLinkMemoryAllocator *theAllocator) = 0;
virtual HRESULT CreateVideoFrame ( int32_t width, int32_t height, int32_t rowBytes, BMDPixelFormat pixelFormat, BMDFrameFlags flags, IDeckLinkMutableVideoFrame **outFrame) = 0;
virtual HRESULT CreateAncillaryData ( BMDPixelFormat pixelFormat, IDeckLinkVideoFrameAncillary **outBuffer) = 0;
virtual HRESULT DisplayVideoFrameSync ( IDeckLinkVideoFrame *theFrame) = 0;
virtual HRESULT ScheduleVideoFrame ( IDeckLinkVideoFrame *theFrame, BMDTimeValue displayTime, BMDTimeValue displayDuration, BMDTimeScale timeScale) = 0;
virtual HRESULT SetScheduledFrameCompletionCallback ( IDeckLinkVideoOutputCallback *theCallback) = 0;
virtual HRESULT GetBufferedVideoFrameCount ( uint32_t *bufferedFrameCount) = 0;
virtual HRESULT EnableAudioOutput ( BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, uint32_t channelCount, BMDAudioOutputStreamType streamType) = 0;
virtual HRESULT DisableAudioOutput (void) = 0;
virtual HRESULT WriteAudioSamplesSync ( void *buffer, uint32_t sampleFrameCount, uint32_t *sampleFramesWritten) = 0;
virtual HRESULT BeginAudioPreroll (void) = 0;
virtual HRESULT EndAudioPreroll (void) = 0;
virtual HRESULT ScheduleAudioSamples ( void *buffer, uint32_t sampleFrameCount, BMDTimeValue streamTime, BMDTimeScale timeScale, uint32_t *sampleFramesWritten) = 0;
virtual HRESULT GetBufferedAudioSampleFrameCount ( uint32_t *bufferedSampleFrameCount) = 0;
virtual HRESULT FlushBufferedAudioSamples (void) = 0;
virtual HRESULT SetAudioCallback ( IDeckLinkAudioOutputCallback *theCallback) = 0;
virtual HRESULT StartScheduledPlayback ( BMDTimeValue playbackStartTime, BMDTimeScale timeScale, double playbackSpeed) = 0;
virtual HRESULT StopScheduledPlayback ( BMDTimeValue stopPlaybackAtTime, BMDTimeValue *actualStopTime, BMDTimeScale timeScale) = 0;
virtual HRESULT IsScheduledPlaybackRunning ( bool *active) = 0;
virtual HRESULT GetScheduledStreamTime ( BMDTimeScale desiredTimeScale, BMDTimeValue *streamTime, double *playbackSpeed) = 0;
virtual HRESULT GetReferenceStatus ( BMDReferenceStatus *referenceStatus) = 0;
virtual HRESULT GetHardwareReferenceClock ( BMDTimeScale desiredTimeScale, BMDTimeValue *hardwareTime, BMDTimeValue *timeInFrame, BMDTimeValue *ticksPerFrame) = 0;
virtual HRESULT GetFrameCompletionReferenceTimestamp ( IDeckLinkVideoFrame *theFrame, BMDTimeScale desiredTimeScale, BMDTimeValue *frameCompletionTimestamp) = 0;
protected:
virtual ~IDeckLinkOutput () {}
};
class IDeckLinkInput : public IUnknown
{
public:
virtual HRESULT DoesSupportVideoMode ( BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, BMDVideoInputFlags flags, BMDDisplayModeSupport *result, IDeckLinkDisplayMode **resultDisplayMode) = 0;
virtual HRESULT GetDisplayModeIterator ( IDeckLinkDisplayModeIterator **iterator) = 0;
virtual HRESULT SetScreenPreviewCallback ( IDeckLinkScreenPreviewCallback *previewCallback) = 0;
virtual HRESULT EnableVideoInput ( BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, BMDVideoInputFlags flags) = 0;
virtual HRESULT DisableVideoInput (void) = 0;
virtual HRESULT GetAvailableVideoFrameCount ( uint32_t *availableFrameCount) = 0;
virtual HRESULT SetVideoInputFrameMemoryAllocator ( IDeckLinkMemoryAllocator *theAllocator) = 0;
virtual HRESULT EnableAudioInput ( BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, uint32_t channelCount) = 0;
virtual HRESULT DisableAudioInput (void) = 0;
virtual HRESULT GetAvailableAudioSampleFrameCount ( uint32_t *availableSampleFrameCount) = 0;
virtual HRESULT StartStreams (void) = 0;
virtual HRESULT StopStreams (void) = 0;
virtual HRESULT PauseStreams (void) = 0;
virtual HRESULT FlushStreams (void) = 0;
virtual HRESULT SetCallback ( IDeckLinkInputCallback *theCallback) = 0;
virtual HRESULT GetHardwareReferenceClock ( BMDTimeScale desiredTimeScale, BMDTimeValue *hardwareTime, BMDTimeValue *timeInFrame, BMDTimeValue *ticksPerFrame) = 0;
protected:
virtual ~IDeckLinkInput () {}
};
class IDeckLinkEncoderInput : public IUnknown
{
public:
virtual HRESULT DoesSupportVideoMode ( BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, BMDVideoInputFlags flags, BMDDisplayModeSupport *result, IDeckLinkDisplayMode **resultDisplayMode) = 0;
virtual HRESULT GetDisplayModeIterator ( IDeckLinkDisplayModeIterator **iterator) = 0;
virtual HRESULT EnableVideoInput ( BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, BMDVideoInputFlags flags) = 0;
virtual HRESULT DisableVideoInput (void) = 0;
virtual HRESULT GetAvailablePacketsCount ( uint32_t *availablePacketsCount) = 0;
virtual HRESULT SetMemoryAllocator ( IDeckLinkMemoryAllocator *theAllocator) = 0;
virtual HRESULT EnableAudioInput ( BMDAudioFormat audioFormat, BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, uint32_t channelCount) = 0;
virtual HRESULT DisableAudioInput (void) = 0;
virtual HRESULT GetAvailableAudioSampleFrameCount ( uint32_t *availableSampleFrameCount) = 0;
virtual HRESULT StartStreams (void) = 0;
virtual HRESULT StopStreams (void) = 0;
virtual HRESULT PauseStreams (void) = 0;
virtual HRESULT FlushStreams (void) = 0;
virtual HRESULT SetCallback ( IDeckLinkEncoderInputCallback *theCallback) = 0;
virtual HRESULT GetHardwareReferenceClock ( BMDTimeScale desiredTimeScale, BMDTimeValue *hardwareTime, BMDTimeValue *timeInFrame, BMDTimeValue *ticksPerFrame) = 0;
protected:
virtual ~IDeckLinkEncoderInput () {}
};
class IDeckLinkVideoFrame : public IUnknown
{
public:
virtual long GetWidth (void) = 0;
virtual long GetHeight (void) = 0;
virtual long GetRowBytes (void) = 0;
virtual BMDPixelFormat GetPixelFormat (void) = 0;
virtual BMDFrameFlags GetFlags (void) = 0;
virtual HRESULT GetBytes ( void **buffer) = 0;
virtual HRESULT GetTimecode ( BMDTimecodeFormat format, IDeckLinkTimecode **timecode) = 0;
virtual HRESULT GetAncillaryData ( IDeckLinkVideoFrameAncillary **ancillary) = 0;
protected:
virtual ~IDeckLinkVideoFrame () {}
};
class IDeckLinkMutableVideoFrame : public IDeckLinkVideoFrame
{
public:
virtual HRESULT SetFlags ( BMDFrameFlags newFlags) = 0;
virtual HRESULT SetTimecode ( BMDTimecodeFormat format, IDeckLinkTimecode *timecode) = 0;
virtual HRESULT SetTimecodeFromComponents ( BMDTimecodeFormat format, uint8_t hours, uint8_t minutes, uint8_t seconds, uint8_t frames, BMDTimecodeFlags flags) = 0;
virtual HRESULT SetAncillaryData ( IDeckLinkVideoFrameAncillary *ancillary) = 0;
virtual HRESULT SetTimecodeUserBits ( BMDTimecodeFormat format, BMDTimecodeUserBits userBits) = 0;
protected:
virtual ~IDeckLinkMutableVideoFrame () {}
};
class IDeckLinkVideoFrame3DExtensions : public IUnknown
{
public:
virtual BMDVideo3DPackingFormat Get3DPackingFormat (void) = 0;
virtual HRESULT GetFrameForRightEye ( IDeckLinkVideoFrame* *rightEyeFrame) = 0;
protected:
virtual ~IDeckLinkVideoFrame3DExtensions () {}
};
class IDeckLinkVideoFrameMetadataExtensions : public IUnknown
{
public:
virtual HRESULT GetInt ( BMDDeckLinkFrameMetadataID metadataID, int64_t *value) = 0;
virtual HRESULT GetFloat ( BMDDeckLinkFrameMetadataID metadataID, double *value) = 0;
virtual HRESULT GetFlag ( BMDDeckLinkFrameMetadataID metadataID, bool* value) = 0;
virtual HRESULT GetString ( BMDDeckLinkFrameMetadataID metadataID, CFStringRef *value) = 0;
protected:
virtual ~IDeckLinkVideoFrameMetadataExtensions () {}
};
class IDeckLinkVideoInputFrame : public IDeckLinkVideoFrame
{
public:
virtual HRESULT GetStreamTime ( BMDTimeValue *frameTime, BMDTimeValue *frameDuration, BMDTimeScale timeScale) = 0;
virtual HRESULT GetHardwareReferenceTimestamp ( BMDTimeScale timeScale, BMDTimeValue *frameTime, BMDTimeValue *frameDuration) = 0;
protected:
virtual ~IDeckLinkVideoInputFrame () {}
};
class IDeckLinkVideoFrameAncillary : public IUnknown
{
public:
virtual HRESULT GetBufferForVerticalBlankingLine ( uint32_t lineNumber, void **buffer) = 0;
virtual BMDPixelFormat GetPixelFormat (void) = 0;
virtual BMDDisplayMode GetDisplayMode (void) = 0;
protected:
virtual ~IDeckLinkVideoFrameAncillary () {}
};
class IDeckLinkEncoderPacket : public IUnknown
{
public:
virtual HRESULT GetBytes ( void **buffer) = 0;
virtual long GetSize (void) = 0;
virtual HRESULT GetStreamTime ( BMDTimeValue *frameTime, BMDTimeScale timeScale) = 0;
virtual BMDPacketType GetPacketType (void) = 0;
protected:
virtual ~IDeckLinkEncoderPacket () {}
};
class IDeckLinkEncoderVideoPacket : public IDeckLinkEncoderPacket
{
public:
virtual BMDPixelFormat GetPixelFormat (void) = 0;
virtual HRESULT GetHardwareReferenceTimestamp ( BMDTimeScale timeScale, BMDTimeValue *frameTime, BMDTimeValue *frameDuration) = 0;
virtual HRESULT GetTimecode ( BMDTimecodeFormat format, IDeckLinkTimecode **timecode) = 0;
protected:
virtual ~IDeckLinkEncoderVideoPacket () {}
};
class IDeckLinkEncoderAudioPacket : public IDeckLinkEncoderPacket
{
public:
virtual BMDAudioFormat GetAudioFormat (void) = 0;
protected:
virtual ~IDeckLinkEncoderAudioPacket () {}
};
class IDeckLinkH265NALPacket : public IDeckLinkEncoderVideoPacket
{
public:
virtual HRESULT GetUnitType ( uint8_t *unitType) = 0;
virtual HRESULT GetBytesNoPrefix ( void **buffer) = 0;
virtual long GetSizeNoPrefix (void) = 0;
protected:
virtual ~IDeckLinkH265NALPacket () {}
};
class IDeckLinkAudioInputPacket : public IUnknown
{
public:
virtual long GetSampleFrameCount (void) = 0;
virtual HRESULT GetBytes ( void **buffer) = 0;
virtual HRESULT GetPacketTime ( BMDTimeValue *packetTime, BMDTimeScale timeScale) = 0;
protected:
virtual ~IDeckLinkAudioInputPacket () {}
};
class IDeckLinkScreenPreviewCallback : public IUnknown
{
public:
virtual HRESULT DrawFrame ( IDeckLinkVideoFrame *theFrame) = 0;
protected:
virtual ~IDeckLinkScreenPreviewCallback () {}
};
class IDeckLinkCocoaScreenPreviewCallback : public IDeckLinkScreenPreviewCallback
{
public:
protected:
virtual ~IDeckLinkCocoaScreenPreviewCallback () {}
};
class IDeckLinkGLScreenPreviewHelper : public IUnknown
{
public:
virtual HRESULT InitializeGL (void) = 0;
virtual HRESULT PaintGL (void) = 0;
virtual HRESULT SetFrame ( IDeckLinkVideoFrame *theFrame) = 0;
virtual HRESULT Set3DPreviewFormat ( BMD3DPreviewFormat previewFormat) = 0;
protected:
virtual ~IDeckLinkGLScreenPreviewHelper () {}
};
class IDeckLinkNotificationCallback : public IUnknown
{
public:
virtual HRESULT Notify ( BMDNotifications topic, uint64_t param1, uint64_t param2) = 0;
};
class IDeckLinkNotification : public IUnknown
{
public:
virtual HRESULT Subscribe ( BMDNotifications topic, IDeckLinkNotificationCallback *theCallback) = 0;
virtual HRESULT Unsubscribe ( BMDNotifications topic, IDeckLinkNotificationCallback *theCallback) = 0;
};
class IDeckLinkAttributes : public IUnknown
{
public:
virtual HRESULT GetFlag ( BMDDeckLinkAttributeID cfgID, bool *value) = 0;
virtual HRESULT GetInt ( BMDDeckLinkAttributeID cfgID, int64_t *value) = 0;
virtual HRESULT GetFloat ( BMDDeckLinkAttributeID cfgID, double *value) = 0;
virtual HRESULT GetString ( BMDDeckLinkAttributeID cfgID, CFStringRef *value) = 0;
protected:
virtual ~IDeckLinkAttributes () {}
};
class IDeckLinkStatus : public IUnknown
{
public:
virtual HRESULT GetFlag ( BMDDeckLinkStatusID statusID, bool *value) = 0;
virtual HRESULT GetInt ( BMDDeckLinkStatusID statusID, int64_t *value) = 0;
virtual HRESULT GetFloat ( BMDDeckLinkStatusID statusID, double *value) = 0;
virtual HRESULT GetString ( BMDDeckLinkStatusID statusID, CFStringRef *value) = 0;
virtual HRESULT GetBytes ( BMDDeckLinkStatusID statusID, void *buffer, uint32_t *bufferSize) = 0;
protected:
virtual ~IDeckLinkStatus () {}
};
class IDeckLinkKeyer : public IUnknown
{
public:
virtual HRESULT Enable ( bool isExternal) = 0;
virtual HRESULT SetLevel ( uint8_t level) = 0;
virtual HRESULT RampUp ( uint32_t numberOfFrames) = 0;
virtual HRESULT RampDown ( uint32_t numberOfFrames) = 0;
virtual HRESULT Disable (void) = 0;
protected:
virtual ~IDeckLinkKeyer () {}
};
class IDeckLinkVideoConversion : public IUnknown
{
public:
virtual HRESULT ConvertFrame ( IDeckLinkVideoFrame* srcFrame, IDeckLinkVideoFrame* dstFrame) = 0;
protected:
virtual ~IDeckLinkVideoConversion () {}
};
class IDeckLinkDeviceNotificationCallback : public IUnknown
{
public:
virtual HRESULT DeckLinkDeviceArrived ( IDeckLink* deckLinkDevice) = 0;
virtual HRESULT DeckLinkDeviceRemoved ( IDeckLink* deckLinkDevice) = 0;
protected:
virtual ~IDeckLinkDeviceNotificationCallback () {}
};
class IDeckLinkDiscovery : public IUnknown
{
public:
virtual HRESULT InstallDeviceNotifications ( IDeckLinkDeviceNotificationCallback* deviceNotificationCallback) = 0;
virtual HRESULT UninstallDeviceNotifications (void) = 0;
protected:
virtual ~IDeckLinkDiscovery () {}
};
extern "C" {
IDeckLinkIterator* CreateDeckLinkIteratorInstance (void);
IDeckLinkDiscovery* CreateDeckLinkDiscoveryInstance (void);
IDeckLinkAPIInformation* CreateDeckLinkAPIInformationInstance (void);
IDeckLinkGLScreenPreviewHelper* CreateOpenGLScreenPreviewHelper (void);
IDeckLinkCocoaScreenPreviewCallback* CreateCocoaScreenPreview (void* parentView);
IDeckLinkVideoConversion* CreateVideoConversionInstance (void);
}
#endif
#endif