2 ** Copyright (c) 2014 Blackmagic Design
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:
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.
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.
28 #ifndef BMD_DECKLINKAPI_H
29 #define BMD_DECKLINKAPI_H
34 #define BMD_CONST __declspec(selectany) static const
36 #define BMD_CONST static const
42 #include <CoreFoundation/CoreFoundation.h>
43 #include <CoreFoundation/CFPlugInCOM.h>
46 #include "DeckLinkAPITypes.h"
47 #include "DeckLinkAPIModes.h"
48 #include "DeckLinkAPIDiscovery.h"
49 #include "DeckLinkAPIConfiguration.h"
50 #include "DeckLinkAPIDeckControl.h"
52 #include "DeckLinkAPIStreaming.h"
54 #define BLACKMAGIC_DECKLINK_API_MAGIC 1
59 // Interface ID Declarations
61 BMD_CONST REFIID IID_IDeckLinkVideoOutputCallback
= /* 20AA5225-1958-47CB-820B-80A8D521A6EE */ {0x20,0xAA,0x52,0x25,0x19,0x58,0x47,0xCB,0x82,0x0B,0x80,0xA8,0xD5,0x21,0xA6,0xEE};
62 BMD_CONST REFIID IID_IDeckLinkInputCallback
= /* DD04E5EC-7415-42AB-AE4A-E80C4DFC044A */ {0xDD,0x04,0xE5,0xEC,0x74,0x15,0x42,0xAB,0xAE,0x4A,0xE8,0x0C,0x4D,0xFC,0x04,0x4A};
63 BMD_CONST REFIID IID_IDeckLinkMemoryAllocator
= /* B36EB6E7-9D29-4AA8-92EF-843B87A289E8 */ {0xB3,0x6E,0xB6,0xE7,0x9D,0x29,0x4A,0xA8,0x92,0xEF,0x84,0x3B,0x87,0xA2,0x89,0xE8};
64 BMD_CONST REFIID IID_IDeckLinkAudioOutputCallback
= /* 403C681B-7F46-4A12-B993-2BB127084EE6 */ {0x40,0x3C,0x68,0x1B,0x7F,0x46,0x4A,0x12,0xB9,0x93,0x2B,0xB1,0x27,0x08,0x4E,0xE6};
65 BMD_CONST REFIID IID_IDeckLinkIterator
= /* 50FB36CD-3063-4B73-BDBB-958087F2D8BA */ {0x50,0xFB,0x36,0xCD,0x30,0x63,0x4B,0x73,0xBD,0xBB,0x95,0x80,0x87,0xF2,0xD8,0xBA};
66 BMD_CONST REFIID IID_IDeckLinkAPIInformation
= /* 7BEA3C68-730D-4322-AF34-8A7152B532A4 */ {0x7B,0xEA,0x3C,0x68,0x73,0x0D,0x43,0x22,0xAF,0x34,0x8A,0x71,0x52,0xB5,0x32,0xA4};
67 BMD_CONST REFIID IID_IDeckLinkOutput
= /* CC5C8A6E-3F2F-4B3A-87EA-FD78AF300564 */ {0xCC,0x5C,0x8A,0x6E,0x3F,0x2F,0x4B,0x3A,0x87,0xEA,0xFD,0x78,0xAF,0x30,0x05,0x64};
68 BMD_CONST REFIID IID_IDeckLinkInput
= /* AF22762B-DFAC-4846-AA79-FA8883560995 */ {0xAF,0x22,0x76,0x2B,0xDF,0xAC,0x48,0x46,0xAA,0x79,0xFA,0x88,0x83,0x56,0x09,0x95};
69 BMD_CONST REFIID IID_IDeckLinkVideoFrame
= /* 3F716FE0-F023-4111-BE5D-EF4414C05B17 */ {0x3F,0x71,0x6F,0xE0,0xF0,0x23,0x41,0x11,0xBE,0x5D,0xEF,0x44,0x14,0xC0,0x5B,0x17};
70 BMD_CONST REFIID IID_IDeckLinkMutableVideoFrame
= /* 69E2639F-40DA-4E19-B6F2-20ACE815C390 */ {0x69,0xE2,0x63,0x9F,0x40,0xDA,0x4E,0x19,0xB6,0xF2,0x20,0xAC,0xE8,0x15,0xC3,0x90};
71 BMD_CONST REFIID IID_IDeckLinkVideoFrame3DExtensions
= /* DA0F7E4A-EDC7-48A8-9CDD-2DB51C729CD7 */ {0xDA,0x0F,0x7E,0x4A,0xED,0xC7,0x48,0xA8,0x9C,0xDD,0x2D,0xB5,0x1C,0x72,0x9C,0xD7};
72 BMD_CONST REFIID IID_IDeckLinkVideoInputFrame
= /* 05CFE374-537C-4094-9A57-680525118F44 */ {0x05,0xCF,0xE3,0x74,0x53,0x7C,0x40,0x94,0x9A,0x57,0x68,0x05,0x25,0x11,0x8F,0x44};
73 BMD_CONST REFIID IID_IDeckLinkVideoFrameAncillary
= /* 732E723C-D1A4-4E29-9E8E-4A88797A0004 */ {0x73,0x2E,0x72,0x3C,0xD1,0xA4,0x4E,0x29,0x9E,0x8E,0x4A,0x88,0x79,0x7A,0x00,0x04};
74 BMD_CONST REFIID IID_IDeckLinkAudioInputPacket
= /* E43D5870-2894-11DE-8C30-0800200C9A66 */ {0xE4,0x3D,0x58,0x70,0x28,0x94,0x11,0xDE,0x8C,0x30,0x08,0x00,0x20,0x0C,0x9A,0x66};
75 BMD_CONST REFIID IID_IDeckLinkScreenPreviewCallback
= /* B1D3F49A-85FE-4C5D-95C8-0B5D5DCCD438 */ {0xB1,0xD3,0xF4,0x9A,0x85,0xFE,0x4C,0x5D,0x95,0xC8,0x0B,0x5D,0x5D,0xCC,0xD4,0x38};
76 BMD_CONST REFIID IID_IDeckLinkCocoaScreenPreviewCallback
= /* D174152F-8F96-4C07-83A5-DD5F5AF0A2AA */ {0xD1,0x74,0x15,0x2F,0x8F,0x96,0x4C,0x07,0x83,0xA5,0xDD,0x5F,0x5A,0xF0,0xA2,0xAA};
77 BMD_CONST REFIID IID_IDeckLinkGLScreenPreviewHelper
= /* 504E2209-CAC7-4C1A-9FB4-C5BB6274D22F */ {0x50,0x4E,0x22,0x09,0xCA,0xC7,0x4C,0x1A,0x9F,0xB4,0xC5,0xBB,0x62,0x74,0xD2,0x2F};
78 BMD_CONST REFIID IID_IDeckLinkNotificationCallback
= /* B002A1EC-070D-4288-8289-BD5D36E5FF0D */ {0xB0,0x02,0xA1,0xEC,0x07,0x0D,0x42,0x88,0x82,0x89,0xBD,0x5D,0x36,0xE5,0xFF,0x0D};
79 BMD_CONST REFIID IID_IDeckLinkNotification
= /* 0A1FB207-E215-441B-9B19-6FA1575946C5 */ {0x0A,0x1F,0xB2,0x07,0xE2,0x15,0x44,0x1B,0x9B,0x19,0x6F,0xA1,0x57,0x59,0x46,0xC5};
80 BMD_CONST REFIID IID_IDeckLinkAttributes
= /* ABC11843-D966-44CB-96E2-A1CB5D3135C4 */ {0xAB,0xC1,0x18,0x43,0xD9,0x66,0x44,0xCB,0x96,0xE2,0xA1,0xCB,0x5D,0x31,0x35,0xC4};
81 BMD_CONST REFIID IID_IDeckLinkKeyer
= /* 89AFCAF5-65F8-421E-98F7-96FE5F5BFBA3 */ {0x89,0xAF,0xCA,0xF5,0x65,0xF8,0x42,0x1E,0x98,0xF7,0x96,0xFE,0x5F,0x5B,0xFB,0xA3};
82 BMD_CONST REFIID IID_IDeckLinkVideoConversion
= /* 3BBCB8A2-DA2C-42D9-B5D8-88083644E99A */ {0x3B,0xBC,0xB8,0xA2,0xDA,0x2C,0x42,0xD9,0xB5,0xD8,0x88,0x08,0x36,0x44,0xE9,0x9A};
83 BMD_CONST REFIID IID_IDeckLinkDeviceNotificationCallback
= /* 4997053B-0ADF-4CC8-AC70-7A50C4BE728F */ {0x49,0x97,0x05,0x3B,0x0A,0xDF,0x4C,0xC8,0xAC,0x70,0x7A,0x50,0xC4,0xBE,0x72,0x8F};
84 BMD_CONST REFIID IID_IDeckLinkDiscovery
= /* CDBF631C-BC76-45FA-B44D-C55059BC6101 */ {0xCD,0xBF,0x63,0x1C,0xBC,0x76,0x45,0xFA,0xB4,0x4D,0xC5,0x50,0x59,0xBC,0x61,0x01};
86 /* Enum BMDVideoOutputFlags - Flags to control the output of ancillary data along with video. */
88 typedef uint32_t BMDVideoOutputFlags
;
89 enum _BMDVideoOutputFlags
{
90 bmdVideoOutputFlagDefault
= 0,
91 bmdVideoOutputVANC
= 1 << 0,
92 bmdVideoOutputVITC
= 1 << 1,
93 bmdVideoOutputRP188
= 1 << 2,
94 bmdVideoOutputDualStream3D
= 1 << 4
97 /* Enum BMDFrameFlags - Frame flags */
99 typedef uint32_t BMDFrameFlags
;
100 enum _BMDFrameFlags
{
101 bmdFrameFlagDefault
= 0,
102 bmdFrameFlagFlipVertical
= 1 << 0,
104 /* Flags that are applicable only to instances of IDeckLinkVideoInputFrame */
106 bmdFrameHasNoInputSource
= 1 << 31
109 /* Enum BMDVideoInputFlags - Flags applicable to video input */
111 typedef uint32_t BMDVideoInputFlags
;
112 enum _BMDVideoInputFlags
{
113 bmdVideoInputFlagDefault
= 0,
114 bmdVideoInputEnableFormatDetection
= 1 << 0,
115 bmdVideoInputDualStream3D
= 1 << 1
118 /* Enum BMDVideoInputFormatChangedEvents - Bitmask passed to the VideoInputFormatChanged notification to identify the properties of the input signal that have changed */
120 typedef uint32_t BMDVideoInputFormatChangedEvents
;
121 enum _BMDVideoInputFormatChangedEvents
{
122 bmdVideoInputDisplayModeChanged
= 1 << 0,
123 bmdVideoInputFieldDominanceChanged
= 1 << 1,
124 bmdVideoInputColorspaceChanged
= 1 << 2
127 /* Enum BMDDetectedVideoInputFormatFlags - Flags passed to the VideoInputFormatChanged notification to describe the detected video input signal */
129 typedef uint32_t BMDDetectedVideoInputFormatFlags
;
130 enum _BMDDetectedVideoInputFormatFlags
{
131 bmdDetectedVideoInputYCbCr422
= 1 << 0,
132 bmdDetectedVideoInputRGB444
= 1 << 1,
133 bmdDetectedVideoInputDualStream3D
= 1 << 2
136 /* Enum BMDDeckLinkCapturePassthroughMode - Enumerates whether the video output is electrically connected to the video input or if the clean switching mode is enabled */
138 typedef uint32_t BMDDeckLinkCapturePassthroughMode
;
139 enum _BMDDeckLinkCapturePassthroughMode
{
140 bmdDeckLinkCapturePassthroughModeDirect
= 'pdir',
141 bmdDeckLinkCapturePassthroughModeCleanSwitch
= 'pcln'
144 /* Enum BMDOutputFrameCompletionResult - Frame Completion Callback */
146 typedef uint32_t BMDOutputFrameCompletionResult
;
147 enum _BMDOutputFrameCompletionResult
{
148 bmdOutputFrameCompleted
,
149 bmdOutputFrameDisplayedLate
,
150 bmdOutputFrameDropped
,
151 bmdOutputFrameFlushed
154 /* Enum BMDReferenceStatus - GenLock input status */
156 typedef uint32_t BMDReferenceStatus
;
157 enum _BMDReferenceStatus
{
158 bmdReferenceNotSupportedByHardware
= 1 << 0,
159 bmdReferenceLocked
= 1 << 1
162 /* Enum BMDAudioSampleRate - Audio sample rates supported for output/input */
164 typedef uint32_t BMDAudioSampleRate
;
165 enum _BMDAudioSampleRate
{
166 bmdAudioSampleRate48kHz
= 48000
169 /* Enum BMDAudioSampleType - Audio sample sizes supported for output/input */
171 typedef uint32_t BMDAudioSampleType
;
172 enum _BMDAudioSampleType
{
173 bmdAudioSampleType16bitInteger
= 16,
174 bmdAudioSampleType32bitInteger
= 32
177 /* Enum BMDAudioOutputStreamType - Audio output stream type */
179 typedef uint32_t BMDAudioOutputStreamType
;
180 enum _BMDAudioOutputStreamType
{
181 bmdAudioOutputStreamContinuous
,
182 bmdAudioOutputStreamContinuousDontResample
,
183 bmdAudioOutputStreamTimestamped
186 /* Enum BMDDisplayModeSupport - Output mode supported flags */
188 typedef uint32_t BMDDisplayModeSupport
;
189 enum _BMDDisplayModeSupport
{
190 bmdDisplayModeNotSupported
= 0,
191 bmdDisplayModeSupported
,
192 bmdDisplayModeSupportedWithConversion
195 /* Enum BMDTimecodeFormat - Timecode formats for frame metadata */
197 typedef uint32_t BMDTimecodeFormat
;
198 enum _BMDTimecodeFormat
{
199 bmdTimecodeRP188VITC1
= 'rpv1', // RP188 timecode where DBB1 equals VITC1 (line 9)
200 bmdTimecodeRP188VITC2
= 'rp12', // RP188 timecode where DBB1 equals VITC2 (line 9 for progressive or line 571 for interlaced/PsF)
201 bmdTimecodeRP188LTC
= 'rplt', // RP188 timecode where DBB1 equals LTC (line 10)
202 bmdTimecodeRP188Any
= 'rp18', // For capture: return the first valid timecode in {VITC1, LTC ,VITC2} - For playback: set the timecode as VITC1
203 bmdTimecodeVITC
= 'vitc',
204 bmdTimecodeVITCField2
= 'vit2',
205 bmdTimecodeSerial
= 'seri'
208 /* Enum BMDAnalogVideoFlags - Analog video display flags */
210 typedef uint32_t BMDAnalogVideoFlags
;
211 enum _BMDAnalogVideoFlags
{
212 bmdAnalogVideoFlagCompositeSetup75
= 1 << 0,
213 bmdAnalogVideoFlagComponentBetacamLevels
= 1 << 1
216 /* Enum BMDAudioOutputAnalogAESSwitch - Audio output Analog/AESEBU switch */
218 typedef uint32_t BMDAudioOutputAnalogAESSwitch
;
219 enum _BMDAudioOutputAnalogAESSwitch
{
220 bmdAudioOutputSwitchAESEBU
= 'aes ',
221 bmdAudioOutputSwitchAnalog
= 'anlg'
224 /* Enum BMDVideoOutputConversionMode - Video/audio conversion mode */
226 typedef uint32_t BMDVideoOutputConversionMode
;
227 enum _BMDVideoOutputConversionMode
{
228 bmdNoVideoOutputConversion
= 'none',
229 bmdVideoOutputLetterboxDownconversion
= 'ltbx',
230 bmdVideoOutputAnamorphicDownconversion
= 'amph',
231 bmdVideoOutputHD720toHD1080Conversion
= '720c',
232 bmdVideoOutputHardwareLetterboxDownconversion
= 'HWlb',
233 bmdVideoOutputHardwareAnamorphicDownconversion
= 'HWam',
234 bmdVideoOutputHardwareCenterCutDownconversion
= 'HWcc',
235 bmdVideoOutputHardware720p1080pCrossconversion
= 'xcap',
236 bmdVideoOutputHardwareAnamorphic720pUpconversion
= 'ua7p',
237 bmdVideoOutputHardwareAnamorphic1080iUpconversion
= 'ua1i',
238 bmdVideoOutputHardwareAnamorphic149To720pUpconversion
= 'u47p',
239 bmdVideoOutputHardwareAnamorphic149To1080iUpconversion
= 'u41i',
240 bmdVideoOutputHardwarePillarbox720pUpconversion
= 'up7p',
241 bmdVideoOutputHardwarePillarbox1080iUpconversion
= 'up1i'
244 /* Enum BMDVideoInputConversionMode - Video input conversion mode */
246 typedef uint32_t BMDVideoInputConversionMode
;
247 enum _BMDVideoInputConversionMode
{
248 bmdNoVideoInputConversion
= 'none',
249 bmdVideoInputLetterboxDownconversionFromHD1080
= '10lb',
250 bmdVideoInputAnamorphicDownconversionFromHD1080
= '10am',
251 bmdVideoInputLetterboxDownconversionFromHD720
= '72lb',
252 bmdVideoInputAnamorphicDownconversionFromHD720
= '72am',
253 bmdVideoInputLetterboxUpconversion
= 'lbup',
254 bmdVideoInputAnamorphicUpconversion
= 'amup'
257 /* Enum BMDVideo3DPackingFormat - Video 3D packing format */
259 typedef uint32_t BMDVideo3DPackingFormat
;
260 enum _BMDVideo3DPackingFormat
{
261 bmdVideo3DPackingSidebySideHalf
= 'sbsh',
262 bmdVideo3DPackingLinebyLine
= 'lbyl',
263 bmdVideo3DPackingTopAndBottom
= 'tabo',
264 bmdVideo3DPackingFramePacking
= 'frpk',
265 bmdVideo3DPackingLeftOnly
= 'left',
266 bmdVideo3DPackingRightOnly
= 'righ'
269 /* Enum BMDIdleVideoOutputOperation - Video output operation when not playing video */
271 typedef uint32_t BMDIdleVideoOutputOperation
;
272 enum _BMDIdleVideoOutputOperation
{
273 bmdIdleVideoOutputBlack
= 'blac',
274 bmdIdleVideoOutputLastFrame
= 'lafa',
275 bmdIdleVideoOutputDesktop
= 'desk'
278 /* Enum BMDLinkConfiguration - Video link configuration */
280 typedef uint32_t BMDLinkConfiguration
;
281 enum _BMDLinkConfiguration
{
282 bmdLinkConfigurationSingleLink
= 'lcsl',
283 bmdLinkConfigurationDualLink
= 'lcdl',
284 bmdLinkConfigurationQuadLink
= 'lcql'
287 /* Enum BMDDeckLinkAttributeID - DeckLink Attribute ID */
289 typedef uint32_t BMDDeckLinkAttributeID
;
290 enum _BMDDeckLinkAttributeID
{
294 BMDDeckLinkSupportsInternalKeying
= 'keyi',
295 BMDDeckLinkSupportsExternalKeying
= 'keye',
296 BMDDeckLinkSupportsHDKeying
= 'keyh',
297 BMDDeckLinkSupportsInputFormatDetection
= 'infd',
298 BMDDeckLinkHasReferenceInput
= 'hrin',
299 BMDDeckLinkHasSerialPort
= 'hspt',
300 BMDDeckLinkHasAnalogVideoOutputGain
= 'avog',
301 BMDDeckLinkCanOnlyAdjustOverallVideoOutputGain
= 'ovog',
302 BMDDeckLinkHasVideoInputAntiAliasingFilter
= 'aafl',
303 BMDDeckLinkHasBypass
= 'byps',
304 BMDDeckLinkSupportsDesktopDisplay
= 'extd',
305 BMDDeckLinkSupportsClockTimingAdjustment
= 'ctad',
306 BMDDeckLinkSupportsFullDuplex
= 'fdup',
307 BMDDeckLinkSupportsFullFrameReferenceInputTimingOffset
= 'frin',
308 BMDDeckLinkSupportsSMPTELevelAOutput
= 'lvla',
309 BMDDeckLinkSupportsDualLinkSDI
= 'sdls',
310 BMDDeckLinkSupportsQuadLinkSDI
= 'sqls',
311 BMDDeckLinkSupportsIdleOutput
= 'idou',
315 BMDDeckLinkMaximumAudioChannels
= 'mach',
316 BMDDeckLinkMaximumAnalogAudioChannels
= 'aach',
317 BMDDeckLinkNumberOfSubDevices
= 'nsbd',
318 BMDDeckLinkSubDeviceIndex
= 'subi',
319 BMDDeckLinkPersistentID
= 'peid',
320 BMDDeckLinkTopologicalID
= 'toid',
321 BMDDeckLinkVideoOutputConnections
= 'vocn',
322 BMDDeckLinkVideoInputConnections
= 'vicn',
323 BMDDeckLinkAudioOutputConnections
= 'aocn',
324 BMDDeckLinkAudioInputConnections
= 'aicn',
325 BMDDeckLinkDeviceBusyState
= 'dbst',
326 BMDDeckLinkVideoIOSupport
= 'vios', // Returns a BMDVideoIOSupport bit field
330 BMDDeckLinkVideoInputGainMinimum
= 'vigm',
331 BMDDeckLinkVideoInputGainMaximum
= 'vigx',
332 BMDDeckLinkVideoOutputGainMinimum
= 'vogm',
333 BMDDeckLinkVideoOutputGainMaximum
= 'vogx',
337 BMDDeckLinkSerialPortDeviceName
= 'slpn'
340 /* Enum BMDDeckLinkAPIInformationID - DeckLinkAPI information ID */
342 typedef uint32_t BMDDeckLinkAPIInformationID
;
343 enum _BMDDeckLinkAPIInformationID
{
344 BMDDeckLinkAPIVersion
= 'vers'
347 /* Enum BMDDeviceBusyState - Current device busy state */
349 typedef uint32_t BMDDeviceBusyState
;
350 enum _BMDDeviceBusyState
{
351 bmdDeviceCaptureBusy
= 1 << 0,
352 bmdDevicePlaybackBusy
= 1 << 1,
353 bmdDeviceSerialPortBusy
= 1 << 2
356 /* Enum BMDVideoIOSupport - Device video input/output support */
358 typedef uint32_t BMDVideoIOSupport
;
359 enum _BMDVideoIOSupport
{
360 bmdDeviceSupportsCapture
= 1 << 0,
361 bmdDeviceSupportsPlayback
= 1 << 1
364 /* Enum BMD3DPreviewFormat - Linked Frame preview format */
366 typedef uint32_t BMD3DPreviewFormat
;
367 enum _BMD3DPreviewFormat
{
368 bmd3DPreviewFormatDefault
= 'defa',
369 bmd3DPreviewFormatLeftOnly
= 'left',
370 bmd3DPreviewFormatRightOnly
= 'righ',
371 bmd3DPreviewFormatSideBySide
= 'side',
372 bmd3DPreviewFormatTopBottom
= 'topb'
375 /* Enum BMDNotifications - Events that can be subscribed through IDeckLinkNotification */
377 typedef uint32_t BMDNotifications
;
378 enum _BMDNotifications
{
379 bmdPreferencesChanged
= 'pref'
382 #if defined(__cplusplus)
384 // Forward Declarations
386 class IDeckLinkVideoOutputCallback
;
387 class IDeckLinkInputCallback
;
388 class IDeckLinkMemoryAllocator
;
389 class IDeckLinkAudioOutputCallback
;
390 class IDeckLinkIterator
;
391 class IDeckLinkAPIInformation
;
392 class IDeckLinkOutput
;
393 class IDeckLinkInput
;
394 class IDeckLinkVideoFrame
;
395 class IDeckLinkMutableVideoFrame
;
396 class IDeckLinkVideoFrame3DExtensions
;
397 class IDeckLinkVideoInputFrame
;
398 class IDeckLinkVideoFrameAncillary
;
399 class IDeckLinkAudioInputPacket
;
400 class IDeckLinkScreenPreviewCallback
;
401 class IDeckLinkCocoaScreenPreviewCallback
;
402 class IDeckLinkGLScreenPreviewHelper
;
403 class IDeckLinkNotificationCallback
;
404 class IDeckLinkNotification
;
405 class IDeckLinkAttributes
;
406 class IDeckLinkKeyer
;
407 class IDeckLinkVideoConversion
;
408 class IDeckLinkDeviceNotificationCallback
;
409 class IDeckLinkDiscovery
;
411 /* Interface IDeckLinkVideoOutputCallback - Frame completion callback. */
413 class IDeckLinkVideoOutputCallback
: public IUnknown
416 virtual HRESULT
ScheduledFrameCompleted (/* in */ IDeckLinkVideoFrame
*completedFrame
, /* in */ BMDOutputFrameCompletionResult result
) = 0;
417 virtual HRESULT
ScheduledPlaybackHasStopped (void) = 0;
420 virtual ~IDeckLinkVideoOutputCallback () {} // call Release method to drop reference count
423 /* Interface IDeckLinkInputCallback - Frame arrival callback. */
425 class IDeckLinkInputCallback
: public IUnknown
428 virtual HRESULT
VideoInputFormatChanged (/* in */ BMDVideoInputFormatChangedEvents notificationEvents
, /* in */ IDeckLinkDisplayMode
*newDisplayMode
, /* in */ BMDDetectedVideoInputFormatFlags detectedSignalFlags
) = 0;
429 virtual HRESULT
VideoInputFrameArrived (/* in */ IDeckLinkVideoInputFrame
* videoFrame
, /* in */ IDeckLinkAudioInputPacket
* audioPacket
) = 0;
432 virtual ~IDeckLinkInputCallback () {} // call Release method to drop reference count
435 /* Interface IDeckLinkMemoryAllocator - Memory allocator for video frames. */
437 class IDeckLinkMemoryAllocator
: public IUnknown
440 virtual HRESULT
AllocateBuffer (/* in */ uint32_t bufferSize
, /* out */ void **allocatedBuffer
) = 0;
441 virtual HRESULT
ReleaseBuffer (/* in */ void *buffer
) = 0;
443 virtual HRESULT
Commit (void) = 0;
444 virtual HRESULT
Decommit (void) = 0;
447 /* Interface IDeckLinkAudioOutputCallback - Optional callback to allow audio samples to be pulled as required. */
449 class IDeckLinkAudioOutputCallback
: public IUnknown
452 virtual HRESULT
RenderAudioSamples (/* in */ bool preroll
) = 0;
455 /* Interface IDeckLinkIterator - enumerates installed DeckLink hardware */
457 class IDeckLinkIterator
: public IUnknown
460 virtual HRESULT
Next (/* out */ IDeckLink
**deckLinkInstance
) = 0;
463 /* Interface IDeckLinkAPIInformation - DeckLinkAPI attribute interface */
465 class IDeckLinkAPIInformation
: public IUnknown
468 virtual HRESULT
GetFlag (/* in */ BMDDeckLinkAPIInformationID cfgID
, /* out */ bool *value
) = 0;
469 virtual HRESULT
GetInt (/* in */ BMDDeckLinkAPIInformationID cfgID
, /* out */ int64_t *value
) = 0;
470 virtual HRESULT
GetFloat (/* in */ BMDDeckLinkAPIInformationID cfgID
, /* out */ double *value
) = 0;
471 virtual HRESULT
GetString (/* in */ BMDDeckLinkAPIInformationID cfgID
, /* out */ CFStringRef
*value
) = 0;
474 virtual ~IDeckLinkAPIInformation () {} // call Release method to drop reference count
477 /* Interface IDeckLinkOutput - Created by QueryInterface from IDeckLink. */
479 class IDeckLinkOutput
: public IUnknown
482 virtual HRESULT
DoesSupportVideoMode (/* in */ BMDDisplayMode displayMode
, /* in */ BMDPixelFormat pixelFormat
, /* in */ BMDVideoOutputFlags flags
, /* out */ BMDDisplayModeSupport
*result
, /* out */ IDeckLinkDisplayMode
**resultDisplayMode
) = 0;
483 virtual HRESULT
GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator
**iterator
) = 0;
485 virtual HRESULT
SetScreenPreviewCallback (/* in */ IDeckLinkScreenPreviewCallback
*previewCallback
) = 0;
489 virtual HRESULT
EnableVideoOutput (/* in */ BMDDisplayMode displayMode
, /* in */ BMDVideoOutputFlags flags
) = 0;
490 virtual HRESULT
DisableVideoOutput (void) = 0;
492 virtual HRESULT
SetVideoOutputFrameMemoryAllocator (/* in */ IDeckLinkMemoryAllocator
*theAllocator
) = 0;
493 virtual HRESULT
CreateVideoFrame (/* in */ int32_t width
, /* in */ int32_t height
, /* in */ int32_t rowBytes
, /* in */ BMDPixelFormat pixelFormat
, /* in */ BMDFrameFlags flags
, /* out */ IDeckLinkMutableVideoFrame
**outFrame
) = 0;
494 virtual HRESULT
CreateAncillaryData (/* in */ BMDPixelFormat pixelFormat
, /* out */ IDeckLinkVideoFrameAncillary
**outBuffer
) = 0;
496 virtual HRESULT
DisplayVideoFrameSync (/* in */ IDeckLinkVideoFrame
*theFrame
) = 0;
497 virtual HRESULT
ScheduleVideoFrame (/* in */ IDeckLinkVideoFrame
*theFrame
, /* in */ BMDTimeValue displayTime
, /* in */ BMDTimeValue displayDuration
, /* in */ BMDTimeScale timeScale
) = 0;
498 virtual HRESULT
SetScheduledFrameCompletionCallback (/* in */ IDeckLinkVideoOutputCallback
*theCallback
) = 0;
499 virtual HRESULT
GetBufferedVideoFrameCount (/* out */ uint32_t *bufferedFrameCount
) = 0;
503 virtual HRESULT
EnableAudioOutput (/* in */ BMDAudioSampleRate sampleRate
, /* in */ BMDAudioSampleType sampleType
, /* in */ uint32_t channelCount
, /* in */ BMDAudioOutputStreamType streamType
) = 0;
504 virtual HRESULT
DisableAudioOutput (void) = 0;
506 virtual HRESULT
WriteAudioSamplesSync (/* in */ void *buffer
, /* in */ uint32_t sampleFrameCount
, /* out */ uint32_t *sampleFramesWritten
) = 0;
508 virtual HRESULT
BeginAudioPreroll (void) = 0;
509 virtual HRESULT
EndAudioPreroll (void) = 0;
510 virtual HRESULT
ScheduleAudioSamples (/* in */ void *buffer
, /* in */ uint32_t sampleFrameCount
, /* in */ BMDTimeValue streamTime
, /* in */ BMDTimeScale timeScale
, /* out */ uint32_t *sampleFramesWritten
) = 0;
512 virtual HRESULT
GetBufferedAudioSampleFrameCount (/* out */ uint32_t *bufferedSampleFrameCount
) = 0;
513 virtual HRESULT
FlushBufferedAudioSamples (void) = 0;
515 virtual HRESULT
SetAudioCallback (/* in */ IDeckLinkAudioOutputCallback
*theCallback
) = 0;
519 virtual HRESULT
StartScheduledPlayback (/* in */ BMDTimeValue playbackStartTime
, /* in */ BMDTimeScale timeScale
, /* in */ double playbackSpeed
) = 0;
520 virtual HRESULT
StopScheduledPlayback (/* in */ BMDTimeValue stopPlaybackAtTime
, /* out */ BMDTimeValue
*actualStopTime
, /* in */ BMDTimeScale timeScale
) = 0;
521 virtual HRESULT
IsScheduledPlaybackRunning (/* out */ bool *active
) = 0;
522 virtual HRESULT
GetScheduledStreamTime (/* in */ BMDTimeScale desiredTimeScale
, /* out */ BMDTimeValue
*streamTime
, /* out */ double *playbackSpeed
) = 0;
523 virtual HRESULT
GetReferenceStatus (/* out */ BMDReferenceStatus
*referenceStatus
) = 0;
525 /* Hardware Timing */
527 virtual HRESULT
GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale
, /* out */ BMDTimeValue
*hardwareTime
, /* out */ BMDTimeValue
*timeInFrame
, /* out */ BMDTimeValue
*ticksPerFrame
) = 0;
528 virtual HRESULT
GetFrameCompletionReferenceTimestamp (/* in */ IDeckLinkVideoFrame
*theFrame
, /* in */ BMDTimeScale desiredTimeScale
, /* out */ BMDTimeValue
*frameCompletionTimestamp
) = 0;
531 virtual ~IDeckLinkOutput () {} // call Release method to drop reference count
534 /* Interface IDeckLinkInput - Created by QueryInterface from IDeckLink. */
536 class IDeckLinkInput
: public IUnknown
539 virtual HRESULT
DoesSupportVideoMode (/* in */ BMDDisplayMode displayMode
, /* in */ BMDPixelFormat pixelFormat
, /* in */ BMDVideoInputFlags flags
, /* out */ BMDDisplayModeSupport
*result
, /* out */ IDeckLinkDisplayMode
**resultDisplayMode
) = 0;
540 virtual HRESULT
GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator
**iterator
) = 0;
542 virtual HRESULT
SetScreenPreviewCallback (/* in */ IDeckLinkScreenPreviewCallback
*previewCallback
) = 0;
546 virtual HRESULT
EnableVideoInput (/* in */ BMDDisplayMode displayMode
, /* in */ BMDPixelFormat pixelFormat
, /* in */ BMDVideoInputFlags flags
) = 0;
547 virtual HRESULT
DisableVideoInput (void) = 0;
548 virtual HRESULT
GetAvailableVideoFrameCount (/* out */ uint32_t *availableFrameCount
) = 0;
549 virtual HRESULT
SetVideoInputFrameMemoryAllocator (/* in */ IDeckLinkMemoryAllocator
*theAllocator
) = 0;
553 virtual HRESULT
EnableAudioInput (/* in */ BMDAudioSampleRate sampleRate
, /* in */ BMDAudioSampleType sampleType
, /* in */ uint32_t channelCount
) = 0;
554 virtual HRESULT
DisableAudioInput (void) = 0;
555 virtual HRESULT
GetAvailableAudioSampleFrameCount (/* out */ uint32_t *availableSampleFrameCount
) = 0;
559 virtual HRESULT
StartStreams (void) = 0;
560 virtual HRESULT
StopStreams (void) = 0;
561 virtual HRESULT
PauseStreams (void) = 0;
562 virtual HRESULT
FlushStreams (void) = 0;
563 virtual HRESULT
SetCallback (/* in */ IDeckLinkInputCallback
*theCallback
) = 0;
565 /* Hardware Timing */
567 virtual HRESULT
GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale
, /* out */ BMDTimeValue
*hardwareTime
, /* out */ BMDTimeValue
*timeInFrame
, /* out */ BMDTimeValue
*ticksPerFrame
) = 0;
570 virtual ~IDeckLinkInput () {} // call Release method to drop reference count
573 /* Interface IDeckLinkVideoFrame - Interface to encapsulate a video frame; can be caller-implemented. */
575 class IDeckLinkVideoFrame
: public IUnknown
578 virtual long GetWidth (void) = 0;
579 virtual long GetHeight (void) = 0;
580 virtual long GetRowBytes (void) = 0;
581 virtual BMDPixelFormat
GetPixelFormat (void) = 0;
582 virtual BMDFrameFlags
GetFlags (void) = 0;
583 virtual HRESULT
GetBytes (/* out */ void **buffer
) = 0;
585 virtual HRESULT
GetTimecode (/* in */ BMDTimecodeFormat format
, /* out */ IDeckLinkTimecode
**timecode
) = 0;
586 virtual HRESULT
GetAncillaryData (/* out */ IDeckLinkVideoFrameAncillary
**ancillary
) = 0;
589 virtual ~IDeckLinkVideoFrame () {} // call Release method to drop reference count
592 /* Interface IDeckLinkMutableVideoFrame - Created by IDeckLinkOutput::CreateVideoFrame. */
594 class IDeckLinkMutableVideoFrame
: public IDeckLinkVideoFrame
597 virtual HRESULT
SetFlags (/* in */ BMDFrameFlags newFlags
) = 0;
599 virtual HRESULT
SetTimecode (/* in */ BMDTimecodeFormat format
, /* in */ IDeckLinkTimecode
*timecode
) = 0;
600 virtual HRESULT
SetTimecodeFromComponents (/* in */ BMDTimecodeFormat format
, /* in */ uint8_t hours
, /* in */ uint8_t minutes
, /* in */ uint8_t seconds
, /* in */ uint8_t frames
, /* in */ BMDTimecodeFlags flags
) = 0;
601 virtual HRESULT
SetAncillaryData (/* in */ IDeckLinkVideoFrameAncillary
*ancillary
) = 0;
602 virtual HRESULT
SetTimecodeUserBits (/* in */ BMDTimecodeFormat format
, /* in */ BMDTimecodeUserBits userBits
) = 0;
605 virtual ~IDeckLinkMutableVideoFrame () {} // call Release method to drop reference count
608 /* Interface IDeckLinkVideoFrame3DExtensions - Optional interface implemented on IDeckLinkVideoFrame to support 3D frames */
610 class IDeckLinkVideoFrame3DExtensions
: public IUnknown
613 virtual BMDVideo3DPackingFormat
Get3DPackingFormat (void) = 0;
614 virtual HRESULT
GetFrameForRightEye (/* out */ IDeckLinkVideoFrame
* *rightEyeFrame
) = 0;
617 virtual ~IDeckLinkVideoFrame3DExtensions () {} // call Release method to drop reference count
620 /* Interface IDeckLinkVideoInputFrame - Provided by the IDeckLinkVideoInput frame arrival callback. */
622 class IDeckLinkVideoInputFrame
: public IDeckLinkVideoFrame
625 virtual HRESULT
GetStreamTime (/* out */ BMDTimeValue
*frameTime
, /* out */ BMDTimeValue
*frameDuration
, /* in */ BMDTimeScale timeScale
) = 0;
626 virtual HRESULT
GetHardwareReferenceTimestamp (/* in */ BMDTimeScale timeScale
, /* out */ BMDTimeValue
*frameTime
, /* out */ BMDTimeValue
*frameDuration
) = 0;
629 virtual ~IDeckLinkVideoInputFrame () {} // call Release method to drop reference count
632 /* Interface IDeckLinkVideoFrameAncillary - Obtained through QueryInterface() on an IDeckLinkVideoFrame object. */
634 class IDeckLinkVideoFrameAncillary
: public IUnknown
638 virtual HRESULT
GetBufferForVerticalBlankingLine (/* in */ uint32_t lineNumber
, /* out */ void **buffer
) = 0;
639 virtual BMDPixelFormat
GetPixelFormat (void) = 0;
640 virtual BMDDisplayMode
GetDisplayMode (void) = 0;
643 virtual ~IDeckLinkVideoFrameAncillary () {} // call Release method to drop reference count
646 /* Interface IDeckLinkAudioInputPacket - Provided by the IDeckLinkInput callback. */
648 class IDeckLinkAudioInputPacket
: public IUnknown
651 virtual long GetSampleFrameCount (void) = 0;
652 virtual HRESULT
GetBytes (/* out */ void **buffer
) = 0;
653 virtual HRESULT
GetPacketTime (/* out */ BMDTimeValue
*packetTime
, /* in */ BMDTimeScale timeScale
) = 0;
656 virtual ~IDeckLinkAudioInputPacket () {} // call Release method to drop reference count
659 /* Interface IDeckLinkScreenPreviewCallback - Screen preview callback */
661 class IDeckLinkScreenPreviewCallback
: public IUnknown
664 virtual HRESULT
DrawFrame (/* in */ IDeckLinkVideoFrame
*theFrame
) = 0;
667 virtual ~IDeckLinkScreenPreviewCallback () {} // call Release method to drop reference count
670 /* Interface IDeckLinkCocoaScreenPreviewCallback - Screen preview callback for Cocoa-based applications */
672 class IDeckLinkCocoaScreenPreviewCallback
: public IDeckLinkScreenPreviewCallback
677 virtual ~IDeckLinkCocoaScreenPreviewCallback () {} // call Release method to drop reference count
680 /* Interface IDeckLinkGLScreenPreviewHelper - Created with CoCreateInstance(). */
682 class IDeckLinkGLScreenPreviewHelper
: public IUnknown
686 /* Methods must be called with OpenGL context set */
688 virtual HRESULT
InitializeGL (void) = 0;
689 virtual HRESULT
PaintGL (void) = 0;
690 virtual HRESULT
SetFrame (/* in */ IDeckLinkVideoFrame
*theFrame
) = 0;
691 virtual HRESULT
Set3DPreviewFormat (/* in */ BMD3DPreviewFormat previewFormat
) = 0;
694 virtual ~IDeckLinkGLScreenPreviewHelper () {} // call Release method to drop reference count
697 /* Interface IDeckLinkNotificationCallback - DeckLink Notification Callback Interface */
699 class IDeckLinkNotificationCallback
: public IUnknown
702 virtual HRESULT
Notify (/* in */ BMDNotifications topic
, /* in */ uint64_t param1
, /* in */ uint64_t param2
) = 0;
705 /* Interface IDeckLinkNotification - DeckLink Notification interface */
707 class IDeckLinkNotification
: public IUnknown
710 virtual HRESULT
Subscribe (/* in */ BMDNotifications topic
, /* in */ IDeckLinkNotificationCallback
*theCallback
) = 0;
711 virtual HRESULT
Unsubscribe (/* in */ BMDNotifications topic
, /* in */ IDeckLinkNotificationCallback
*theCallback
) = 0;
714 /* Interface IDeckLinkAttributes - DeckLink Attribute interface */
716 class IDeckLinkAttributes
: public IUnknown
719 virtual HRESULT
GetFlag (/* in */ BMDDeckLinkAttributeID cfgID
, /* out */ bool *value
) = 0;
720 virtual HRESULT
GetInt (/* in */ BMDDeckLinkAttributeID cfgID
, /* out */ int64_t *value
) = 0;
721 virtual HRESULT
GetFloat (/* in */ BMDDeckLinkAttributeID cfgID
, /* out */ double *value
) = 0;
722 virtual HRESULT
GetString (/* in */ BMDDeckLinkAttributeID cfgID
, /* out */ CFStringRef
*value
) = 0;
725 virtual ~IDeckLinkAttributes () {} // call Release method to drop reference count
728 /* Interface IDeckLinkKeyer - DeckLink Keyer interface */
730 class IDeckLinkKeyer
: public IUnknown
733 virtual HRESULT
Enable (/* in */ bool isExternal
) = 0;
734 virtual HRESULT
SetLevel (/* in */ uint8_t level
) = 0;
735 virtual HRESULT
RampUp (/* in */ uint32_t numberOfFrames
) = 0;
736 virtual HRESULT
RampDown (/* in */ uint32_t numberOfFrames
) = 0;
737 virtual HRESULT
Disable (void) = 0;
740 virtual ~IDeckLinkKeyer () {} // call Release method to drop reference count
743 /* Interface IDeckLinkVideoConversion - Created with CoCreateInstance(). */
745 class IDeckLinkVideoConversion
: public IUnknown
748 virtual HRESULT
ConvertFrame (/* in */ IDeckLinkVideoFrame
* srcFrame
, /* in */ IDeckLinkVideoFrame
* dstFrame
) = 0;
751 virtual ~IDeckLinkVideoConversion () {} // call Release method to drop reference count
754 /* Interface IDeckLinkDeviceNotificationCallback - DeckLink device arrival/removal notification callbacks */
756 class IDeckLinkDeviceNotificationCallback
: public IUnknown
759 virtual HRESULT
DeckLinkDeviceArrived (/* in */ IDeckLink
* deckLinkDevice
) = 0;
760 virtual HRESULT
DeckLinkDeviceRemoved (/* in */ IDeckLink
* deckLinkDevice
) = 0;
763 virtual ~IDeckLinkDeviceNotificationCallback () {} // call Release method to drop reference count
766 /* Interface IDeckLinkDiscovery - DeckLink device discovery */
768 class IDeckLinkDiscovery
: public IUnknown
771 virtual HRESULT
InstallDeviceNotifications (/* in */ IDeckLinkDeviceNotificationCallback
* deviceNotificationCallback
) = 0;
772 virtual HRESULT
UninstallDeviceNotifications (void) = 0;
775 virtual ~IDeckLinkDiscovery () {} // call Release method to drop reference count
782 IDeckLinkIterator
* CreateDeckLinkIteratorInstance (void);
783 IDeckLinkDiscovery
* CreateDeckLinkDiscoveryInstance (void);
784 IDeckLinkAPIInformation
* CreateDeckLinkAPIInformationInstance (void);
785 IDeckLinkGLScreenPreviewHelper
* CreateOpenGLScreenPreviewHelper (void);
786 IDeckLinkCocoaScreenPreviewCallback
* CreateCocoaScreenPreview (void* /* (NSView*) */ parentView
);
787 IDeckLinkVideoConversion
* CreateVideoConversionInstance (void);
792 #endif // defined(__cplusplus)
793 #endif /* defined(BMD_DECKLINKAPI_H) */