2 ** Copyright (c) 2011 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.
30 #ifndef __DeckLink_API_h__
31 #define __DeckLink_API_h__
33 #include <CoreFoundation/CoreFoundation.h>
34 #include <CoreFoundation/CFPlugInCOM.h>
37 #define BLACKMAGIC_DECKLINK_API_MAGIC 1
41 typedef int64_t BMDTimeValue;
42 typedef int64_t BMDTimeScale;
43 typedef uint32_t BMDTimecodeBCD;
44 typedef uint32_t BMDTimecodeUserBits;
47 // Interface ID Declarations
49 #define IID_IDeckLinkVideoOutputCallback /* 20AA5225-1958-47CB-820B-80A8D521A6EE */ (REFIID){0x20,0xAA,0x52,0x25,0x19,0x58,0x47,0xCB,0x82,0x0B,0x80,0xA8,0xD5,0x21,0xA6,0xEE}
50 #define IID_IDeckLinkInputCallback /* DD04E5EC-7415-42AB-AE4A-E80C4DFC044A */ (REFIID){0xDD,0x04,0xE5,0xEC,0x74,0x15,0x42,0xAB,0xAE,0x4A,0xE8,0x0C,0x4D,0xFC,0x04,0x4A}
51 #define IID_IDeckLinkMemoryAllocator /* B36EB6E7-9D29-4AA8-92EF-843B87A289E8 */ (REFIID){0xB3,0x6E,0xB6,0xE7,0x9D,0x29,0x4A,0xA8,0x92,0xEF,0x84,0x3B,0x87,0xA2,0x89,0xE8}
52 #define IID_IDeckLinkAudioOutputCallback /* 403C681B-7F46-4A12-B993-2BB127084EE6 */ (REFIID){0x40,0x3C,0x68,0x1B,0x7F,0x46,0x4A,0x12,0xB9,0x93,0x2B,0xB1,0x27,0x08,0x4E,0xE6}
53 #define IID_IDeckLinkIterator /* 74E936FC-CC28-4A67-81A0-1E94E52D4E69 */ (REFIID){0x74,0xE9,0x36,0xFC,0xCC,0x28,0x4A,0x67,0x81,0xA0,0x1E,0x94,0xE5,0x2D,0x4E,0x69}
54 #define IID_IDeckLinkAPIInformation /* 7BEA3C68-730D-4322-AF34-8A7152B532A4 */ (REFIID){0x7B,0xEA,0x3C,0x68,0x73,0x0D,0x43,0x22,0xAF,0x34,0x8A,0x71,0x52,0xB5,0x32,0xA4}
55 #define IID_IDeckLinkDisplayModeIterator /* 9C88499F-F601-4021-B80B-032E4EB41C35 */ (REFIID){0x9C,0x88,0x49,0x9F,0xF6,0x01,0x40,0x21,0xB8,0x0B,0x03,0x2E,0x4E,0xB4,0x1C,0x35}
56 #define IID_IDeckLinkDisplayMode /* 3EB2C1AB-0A3D-4523-A3AD-F40D7FB14E78 */ (REFIID){0x3E,0xB2,0xC1,0xAB,0x0A,0x3D,0x45,0x23,0xA3,0xAD,0xF4,0x0D,0x7F,0xB1,0x4E,0x78}
57 #define IID_IDeckLink /* 62BFF75D-6569-4E55-8D4D-66AA03829ABC */ (REFIID){0x62,0xBF,0xF7,0x5D,0x65,0x69,0x4E,0x55,0x8D,0x4D,0x66,0xAA,0x03,0x82,0x9A,0xBC}
58 #define IID_IDeckLinkOutput /* A3EF0963-0862-44ED-92A9-EE89ABF431C7 */ (REFIID){0xA3,0xEF,0x09,0x63,0x08,0x62,0x44,0xED,0x92,0xA9,0xEE,0x89,0xAB,0xF4,0x31,0xC7}
59 #define IID_IDeckLinkInput /* 6D40EF78-28B9-4E21-990D-95BB7750A04F */ (REFIID){0x6D,0x40,0xEF,0x78,0x28,0xB9,0x4E,0x21,0x99,0x0D,0x95,0xBB,0x77,0x50,0xA0,0x4F}
60 #define IID_IDeckLinkTimecode /* BC6CFBD3-8317-4325-AC1C-1216391E9340 */ (REFIID){0xBC,0x6C,0xFB,0xD3,0x83,0x17,0x43,0x25,0xAC,0x1C,0x12,0x16,0x39,0x1E,0x93,0x40}
61 #define IID_IDeckLinkVideoFrame /* 3F716FE0-F023-4111-BE5D-EF4414C05B17 */ (REFIID){0x3F,0x71,0x6F,0xE0,0xF0,0x23,0x41,0x11,0xBE,0x5D,0xEF,0x44,0x14,0xC0,0x5B,0x17}
62 #define IID_IDeckLinkMutableVideoFrame /* 69E2639F-40DA-4E19-B6F2-20ACE815C390 */ (REFIID){0x69,0xE2,0x63,0x9F,0x40,0xDA,0x4E,0x19,0xB6,0xF2,0x20,0xAC,0xE8,0x15,0xC3,0x90}
63 #define IID_IDeckLinkVideoFrame3DExtensions /* DA0F7E4A-EDC7-48A8-9CDD-2DB51C729CD7 */ (REFIID){0xDA,0x0F,0x7E,0x4A,0xED,0xC7,0x48,0xA8,0x9C,0xDD,0x2D,0xB5,0x1C,0x72,0x9C,0xD7}
64 #define IID_IDeckLinkVideoInputFrame /* 05CFE374-537C-4094-9A57-680525118F44 */ (REFIID){0x05,0xCF,0xE3,0x74,0x53,0x7C,0x40,0x94,0x9A,0x57,0x68,0x05,0x25,0x11,0x8F,0x44}
65 #define IID_IDeckLinkVideoFrameAncillary /* 732E723C-D1A4-4E29-9E8E-4A88797A0004 */ (REFIID){0x73,0x2E,0x72,0x3C,0xD1,0xA4,0x4E,0x29,0x9E,0x8E,0x4A,0x88,0x79,0x7A,0x00,0x04}
66 #define IID_IDeckLinkAudioInputPacket /* E43D5870-2894-11DE-8C30-0800200C9A66 */ (REFIID){0xE4,0x3D,0x58,0x70,0x28,0x94,0x11,0xDE,0x8C,0x30,0x08,0x00,0x20,0x0C,0x9A,0x66}
67 #define IID_IDeckLinkScreenPreviewCallback /* B1D3F49A-85FE-4C5D-95C8-0B5D5DCCD438 */ (REFIID){0xB1,0xD3,0xF4,0x9A,0x85,0xFE,0x4C,0x5D,0x95,0xC8,0x0B,0x5D,0x5D,0xCC,0xD4,0x38}
68 #define IID_IDeckLinkCocoaScreenPreviewCallback /* D174152F-8F96-4C07-83A5-DD5F5AF0A2AA */ (REFIID){0xD1,0x74,0x15,0x2F,0x8F,0x96,0x4C,0x07,0x83,0xA5,0xDD,0x5F,0x5A,0xF0,0xA2,0xAA}
69 #define IID_IDeckLinkGLScreenPreviewHelper /* 504E2209-CAC7-4C1A-9FB4-C5BB6274D22F */ (REFIID){0x50,0x4E,0x22,0x09,0xCA,0xC7,0x4C,0x1A,0x9F,0xB4,0xC5,0xBB,0x62,0x74,0xD2,0x2F}
70 #define IID_IDeckLinkConfiguration /* C679A35B-610C-4D09-B748-1D0478100FC0 */ (REFIID){0xC6,0x79,0xA3,0x5B,0x61,0x0C,0x4D,0x09,0xB7,0x48,0x1D,0x04,0x78,0x10,0x0F,0xC0}
71 #define IID_IDeckLinkAttributes /* ABC11843-D966-44CB-96E2-A1CB5D3135C4 */ (REFIID){0xAB,0xC1,0x18,0x43,0xD9,0x66,0x44,0xCB,0x96,0xE2,0xA1,0xCB,0x5D,0x31,0x35,0xC4}
72 #define IID_IDeckLinkKeyer /* 89AFCAF5-65F8-421E-98F7-96FE5F5BFBA3 */ (REFIID){0x89,0xAF,0xCA,0xF5,0x65,0xF8,0x42,0x1E,0x98,0xF7,0x96,0xFE,0x5F,0x5B,0xFB,0xA3}
73 #define IID_IDeckLinkVideoConversion /* 3BBCB8A2-DA2C-42D9-B5D8-88083644E99A */ (REFIID){0x3B,0xBC,0xB8,0xA2,0xDA,0x2C,0x42,0xD9,0xB5,0xD8,0x88,0x08,0x36,0x44,0xE9,0x9A}
74 #define IID_IDeckLinkDeckControlStatusCallback /* E5F693C1-4283-4716-B18F-C1431521955B */ (REFIID){0xE5,0xF6,0x93,0xC1,0x42,0x83,0x47,0x16,0xB1,0x8F,0xC1,0x43,0x15,0x21,0x95,0x5B}
75 #define IID_IDeckLinkDeckControl /* 522A9E39-0F3C-4742-94EE-D80DE335DA1D */ (REFIID){0x52,0x2A,0x9E,0x39,0x0F,0x3C,0x47,0x42,0x94,0xEE,0xD8,0x0D,0xE3,0x35,0xDA,0x1D}
78 /* Enum BMDDisplayMode - Video display modes */
80 typedef uint32_t BMDDisplayMode;
81 enum _BMDDisplayMode {
86 bmdModeNTSC2398 = 'nt23', // 3:2 pulldown
88 bmdModeNTSCp = 'ntsp',
93 bmdModeHD1080p2398 = '23ps',
94 bmdModeHD1080p24 = '24ps',
95 bmdModeHD1080p25 = 'Hp25',
96 bmdModeHD1080p2997 = 'Hp29',
97 bmdModeHD1080p30 = 'Hp30',
98 bmdModeHD1080i50 = 'Hi50',
99 bmdModeHD1080i5994 = 'Hi59',
100 bmdModeHD1080i6000 = 'Hi60', // N.B. This _really_ is 60.00 Hz.
101 bmdModeHD1080p50 = 'Hp50',
102 bmdModeHD1080p5994 = 'Hp59',
103 bmdModeHD1080p6000 = 'Hp60', // N.B. This _really_ is 60.00 Hz.
107 bmdModeHD720p50 = 'hp50',
108 bmdModeHD720p5994 = 'hp59',
109 bmdModeHD720p60 = 'hp60',
113 bmdMode2k2398 = '2k23',
114 bmdMode2k24 = '2k24',
119 /* Enum BMDFieldDominance - Video field dominance */
121 typedef uint32_t BMDFieldDominance;
122 enum _BMDFieldDominance {
123 bmdUnknownFieldDominance = 0,
124 bmdLowerFieldFirst = 'lowr',
125 bmdUpperFieldFirst = 'uppr',
126 bmdProgressiveFrame = 'prog',
127 bmdProgressiveSegmentedFrame = 'psf '
131 /* Enum BMDPixelFormat - Video pixel formats supported for output/input */
133 typedef uint32_t BMDPixelFormat;
134 enum _BMDPixelFormat {
135 bmdFormat8BitYUV = '2vuy',
136 bmdFormat10BitYUV = 'v210',
137 bmdFormat8BitARGB = 32,
138 bmdFormat8BitBGRA = 'BGRA',
139 bmdFormat10BitRGB = 'r210' // Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10
143 /* Enum BMDDisplayModeFlags - Flags to describe the characteristics of an IDeckLinkDisplayMode. */
145 typedef uint32_t BMDDisplayModeFlags;
146 enum _BMDDisplayModeFlags {
147 bmdDisplayModeSupports3D = 1 << 0,
148 bmdDisplayModeColorspaceRec601 = 1 << 1,
149 bmdDisplayModeColorspaceRec709 = 1 << 2
153 /* Enum BMDVideoOutputFlags - Flags to control the output of ancillary data along with video. */
155 typedef uint32_t BMDVideoOutputFlags;
156 enum _BMDVideoOutputFlags {
157 bmdVideoOutputFlagDefault = 0,
158 bmdVideoOutputVANC = 1 << 0,
159 bmdVideoOutputVITC = 1 << 1,
160 bmdVideoOutputRP188 = 1 << 2,
161 bmdVideoOutputDualStream3D = 1 << 4
165 /* Enum BMDFrameFlags - Frame flags */
167 typedef uint32_t BMDFrameFlags;
168 enum _BMDFrameFlags {
169 bmdFrameFlagDefault = 0,
170 bmdFrameFlagFlipVertical = 1 << 0,
172 /* Flags that are applicable only to instances of IDeckLinkVideoInputFrame */
174 bmdFrameHasNoInputSource = 1 << 31
178 /* Enum BMDVideoInputFlags - Flags applicable to video input */
180 typedef uint32_t BMDVideoInputFlags;
181 enum _BMDVideoInputFlags {
182 bmdVideoInputFlagDefault = 0,
183 bmdVideoInputEnableFormatDetection = 1 << 0,
184 bmdVideoInputDualStream3D = 1 << 1
188 /* Enum BMDVideoInputFormatChangedEvents - Bitmask passed to the VideoInputFormatChanged notification to identify the properties of the input signal that have changed */
190 typedef uint32_t BMDVideoInputFormatChangedEvents;
191 enum _BMDVideoInputFormatChangedEvents {
192 bmdVideoInputDisplayModeChanged = 1 << 0,
193 bmdVideoInputFieldDominanceChanged = 1 << 1,
194 bmdVideoInputColorspaceChanged = 1 << 2
198 /* Enum BMDDetectedVideoInputFormatFlags - Flags passed to the VideoInputFormatChanged notification to describe the detected video input signal */
200 typedef uint32_t BMDDetectedVideoInputFormatFlags;
201 enum _BMDDetectedVideoInputFormatFlags {
202 bmdDetectedVideoInputYCbCr422 = 1 << 0,
203 bmdDetectedVideoInputRGB444 = 1 << 1
207 /* Enum BMDOutputFrameCompletionResult - Frame Completion Callback */
209 typedef uint32_t BMDOutputFrameCompletionResult;
210 enum _BMDOutputFrameCompletionResult {
211 bmdOutputFrameCompleted,
212 bmdOutputFrameDisplayedLate,
213 bmdOutputFrameDropped,
214 bmdOutputFrameFlushed
218 /* Enum BMDReferenceStatus - GenLock input status */
220 typedef uint32_t BMDReferenceStatus;
221 enum _BMDReferenceStatus {
222 bmdReferenceNotSupportedByHardware = 1 << 0,
223 bmdReferenceLocked = 1 << 1
227 /* Enum BMDAudioSampleRate - Audio sample rates supported for output/input */
229 typedef uint32_t BMDAudioSampleRate;
230 enum _BMDAudioSampleRate {
231 bmdAudioSampleRate48kHz = 48000
235 /* Enum BMDAudioSampleType - Audio sample sizes supported for output/input */
237 typedef uint32_t BMDAudioSampleType;
238 enum _BMDAudioSampleType {
239 bmdAudioSampleType16bitInteger = 16,
240 bmdAudioSampleType32bitInteger = 32
244 /* Enum BMDAudioOutputStreamType - Audio output stream type */
246 typedef uint32_t BMDAudioOutputStreamType;
247 enum _BMDAudioOutputStreamType {
248 bmdAudioOutputStreamContinuous,
249 bmdAudioOutputStreamContinuousDontResample,
250 bmdAudioOutputStreamTimestamped
254 /* Enum BMDDisplayModeSupport - Output mode supported flags */
256 typedef uint32_t BMDDisplayModeSupport;
257 enum _BMDDisplayModeSupport {
258 bmdDisplayModeNotSupported = 0,
259 bmdDisplayModeSupported,
260 bmdDisplayModeSupportedWithConversion
264 /* Enum BMDTimecodeFormat - Timecode formats for frame metadata */
266 typedef uint32_t BMDTimecodeFormat;
267 enum _BMDTimecodeFormat {
268 bmdTimecodeRP188 = 'rp18',
269 bmdTimecodeRP188Field2 = 'rp12',
270 bmdTimecodeVITC = 'vitc',
271 bmdTimecodeVITCField2 = 'vit2',
272 bmdTimecodeSerial = 'seri'
276 /* Enum BMDTimecodeFlags - Timecode flags */
278 typedef uint32_t BMDTimecodeFlags;
279 enum _BMDTimecodeFlags {
280 bmdTimecodeFlagDefault = 0,
281 bmdTimecodeIsDropFrame = 1 << 0
285 /* Enum BMDVideoConnection - Video connection types */
287 typedef uint32_t BMDVideoConnection;
288 enum _BMDVideoConnection {
289 bmdVideoConnectionSDI = 1 << 0,
290 bmdVideoConnectionHDMI = 1 << 1,
291 bmdVideoConnectionOpticalSDI = 1 << 2,
292 bmdVideoConnectionComponent = 1 << 3,
293 bmdVideoConnectionComposite = 1 << 4,
294 bmdVideoConnectionSVideo = 1 << 5
298 /* Enum BMDAnalogVideoFlags - Analog video display flags */
300 typedef uint32_t BMDAnalogVideoFlags;
301 enum _BMDAnalogVideoFlags {
302 bmdAnalogVideoFlagCompositeSetup75 = 1 << 0,
303 bmdAnalogVideoFlagComponentBetacamLevels = 1 << 1
307 /* Enum BMDAudioConnection - Audio connection types */
309 typedef uint32_t BMDAudioConnection;
310 enum _BMDAudioConnection {
311 bmdAudioConnectionEmbedded = 'embd',
312 bmdAudioConnectionAESEBU = 'aes ',
313 bmdAudioConnectionAnalog = 'anlg'
317 /* Enum BMDAudioOutputAnalogAESSwitch - Audio output Analog/AESEBU switch */
319 typedef uint32_t BMDAudioOutputAnalogAESSwitch;
320 enum _BMDAudioOutputAnalogAESSwitch {
321 bmdAudioOutputSwitchAESEBU = 'aes ',
322 bmdAudioOutputSwitchAnalog = 'anlg'
326 /* Enum BMDVideoOutputConversionMode - Video/audio conversion mode */
328 typedef uint32_t BMDVideoOutputConversionMode;
329 enum _BMDVideoOutputConversionMode {
330 bmdNoVideoOutputConversion = 'none',
331 bmdVideoOutputLetterboxDownconversion = 'ltbx',
332 bmdVideoOutputAnamorphicDownconversion = 'amph',
333 bmdVideoOutputHD720toHD1080Conversion = '720c',
334 bmdVideoOutputHardwareLetterboxDownconversion = 'HWlb',
335 bmdVideoOutputHardwareAnamorphicDownconversion = 'HWam',
336 bmdVideoOutputHardwareCenterCutDownconversion = 'HWcc',
337 bmdVideoOutputHardware720p1080pCrossconversion = 'xcap',
338 bmdVideoOutputHardwareAnamorphic720pUpconversion = 'ua7p',
339 bmdVideoOutputHardwareAnamorphic1080iUpconversion = 'ua1i',
340 bmdVideoOutputHardwareAnamorphic149To720pUpconversion = 'u47p',
341 bmdVideoOutputHardwareAnamorphic149To1080iUpconversion = 'u41i',
342 bmdVideoOutputHardwarePillarbox720pUpconversion = 'up7p',
343 bmdVideoOutputHardwarePillarbox1080iUpconversion = 'up1i'
347 /* Enum BMDVideoInputConversionMode - Video input conversion mode */
349 typedef uint32_t BMDVideoInputConversionMode;
350 enum _BMDVideoInputConversionMode {
351 bmdNoVideoInputConversion = 'none',
352 bmdVideoInputLetterboxDownconversionFromHD1080 = '10lb',
353 bmdVideoInputAnamorphicDownconversionFromHD1080 = '10am',
354 bmdVideoInputLetterboxDownconversionFromHD720 = '72lb',
355 bmdVideoInputAnamorphicDownconversionFromHD720 = '72am',
356 bmdVideoInputLetterboxUpconversion = 'lbup',
357 bmdVideoInputAnamorphicUpconversion = 'amup'
361 /* Enum BMDVideo3DPackingFormat - Video 3D packing format */
363 typedef uint32_t BMDVideo3DPackingFormat;
364 enum _BMDVideo3DPackingFormat {
365 bmdVideo3DPackingSidebySideHalf = 'sbsh',
366 bmdVideo3DPackingLinebyLine = 'lbyl',
367 bmdVideo3DPackingTopAndBottom = 'tabo',
368 bmdVideo3DPackingFramePacking = 'frpk',
369 bmdVideo3DPackingLeftOnly = 'left',
370 bmdVideo3DPackingRightOnly = 'righ'
374 /* Enum BMDIdleVideoOutputOperation - Video output operation when not playing video */
376 typedef uint32_t BMDIdleVideoOutputOperation;
377 enum _BMDIdleVideoOutputOperation {
378 bmdIdleVideoOutputBlack = 'blac',
379 bmdIdleVideoOutputLastFrame = 'lafa'
383 /* Enum BMDDeckLinkConfigurationID - DeckLink Configuration ID */
385 typedef uint32_t BMDDeckLinkConfigurationID;
386 enum _BMDDeckLinkConfigurationID {
388 /* Serial port Flags */
390 bmdDeckLinkConfigSwapSerialRxTx = 'ssrt',
392 /* Video Input/Output Flags */
394 bmdDeckLinkConfigUse1080pNotPsF = 'fpro',
396 /* Video Input/Output Integers */
398 bmdDeckLinkConfigHDMI3DPackingFormat = '3dpf',
399 bmdDeckLinkConfigBypass = 'byps',
401 /* Audio Input/Output Flags */
403 bmdDeckLinkConfigAnalogAudioConsumerLevels = 'aacl',
405 /* Video output flags */
407 bmdDeckLinkConfigFieldFlickerRemoval = 'fdfr',
408 bmdDeckLinkConfigHD1080p24ToHD1080i5994Conversion = 'to59',
409 bmdDeckLinkConfig444SDIVideoOutput = '444o',
410 bmdDeckLinkConfig3GBpsVideoOutput = '3gbs',
411 bmdDeckLinkConfigBlackVideoOutputDuringCapture = 'bvoc',
412 bmdDeckLinkConfigLowLatencyVideoOutput = 'llvo',
414 /* Video Output Integers */
416 bmdDeckLinkConfigVideoOutputConnection = 'vocn',
417 bmdDeckLinkConfigVideoOutputConversionMode = 'vocm',
418 bmdDeckLinkConfigAnalogVideoOutputFlags = 'avof',
419 bmdDeckLinkConfigReferenceInputTimingOffset = 'glot',
420 bmdDeckLinkConfigVideoOutputIdleOperation = 'voio',
422 /* Video Output Floats */
424 bmdDeckLinkConfigVideoOutputComponentLumaGain = 'oclg',
425 bmdDeckLinkConfigVideoOutputComponentChromaBlueGain = 'occb',
426 bmdDeckLinkConfigVideoOutputComponentChromaRedGain = 'occr',
427 bmdDeckLinkConfigVideoOutputCompositeLumaGain = 'oilg',
428 bmdDeckLinkConfigVideoOutputCompositeChromaGain = 'oicg',
429 bmdDeckLinkConfigVideoOutputSVideoLumaGain = 'oslg',
430 bmdDeckLinkConfigVideoOutputSVideoChromaGain = 'oscg',
432 /* Video Input Integers */
434 bmdDeckLinkConfigVideoInputConnection = 'vicn',
435 bmdDeckLinkConfigAnalogVideoInputFlags = 'avif',
436 bmdDeckLinkConfigVideoInputConversionMode = 'vicm',
437 bmdDeckLinkConfig32PulldownSequenceInitialTimecodeFrame = 'pdif',
438 bmdDeckLinkConfigVANCSourceLine1Mapping = 'vsl1',
439 bmdDeckLinkConfigVANCSourceLine2Mapping = 'vsl2',
440 bmdDeckLinkConfigVANCSourceLine3Mapping = 'vsl3',
442 /* Video Input Floats */
444 bmdDeckLinkConfigVideoInputComponentLumaGain = 'iclg',
445 bmdDeckLinkConfigVideoInputComponentChromaBlueGain = 'iccb',
446 bmdDeckLinkConfigVideoInputComponentChromaRedGain = 'iccr',
447 bmdDeckLinkConfigVideoInputCompositeLumaGain = 'iilg',
448 bmdDeckLinkConfigVideoInputCompositeChromaGain = 'iicg',
449 bmdDeckLinkConfigVideoInputSVideoLumaGain = 'islg',
450 bmdDeckLinkConfigVideoInputSVideoChromaGain = 'iscg',
452 /* Audio Input Integers */
454 bmdDeckLinkConfigAudioInputConnection = 'aicn',
456 /* Audio Input Floats */
458 bmdDeckLinkConfigAnalogAudioInputScaleChannel1 = 'ais1',
459 bmdDeckLinkConfigAnalogAudioInputScaleChannel2 = 'ais2',
460 bmdDeckLinkConfigAnalogAudioInputScaleChannel3 = 'ais3',
461 bmdDeckLinkConfigAnalogAudioInputScaleChannel4 = 'ais4',
462 bmdDeckLinkConfigDigitalAudioInputScale = 'dais',
464 /* Audio Output Integers */
466 bmdDeckLinkConfigAudioOutputAESAnalogSwitch = 'aoaa',
468 /* Audio Output Floats */
470 bmdDeckLinkConfigAnalogAudioOutputScaleChannel1 = 'aos1',
471 bmdDeckLinkConfigAnalogAudioOutputScaleChannel2 = 'aos2',
472 bmdDeckLinkConfigAnalogAudioOutputScaleChannel3 = 'aos3',
473 bmdDeckLinkConfigAnalogAudioOutputScaleChannel4 = 'aos4',
474 bmdDeckLinkConfigDigitalAudioOutputScale = 'daos'
478 /* Enum BMDDeckLinkAttributeID - DeckLink Attribute ID */
480 typedef uint32_t BMDDeckLinkAttributeID;
481 enum _BMDDeckLinkAttributeID {
485 BMDDeckLinkSupportsInternalKeying = 'keyi',
486 BMDDeckLinkSupportsExternalKeying = 'keye',
487 BMDDeckLinkSupportsHDKeying = 'keyh',
488 BMDDeckLinkSupportsInputFormatDetection = 'infd',
489 BMDDeckLinkHasReferenceInput = 'hrin',
490 BMDDeckLinkHasSerialPort = 'hspt',
491 BMDDeckLinkHasAnalogVideoOutputGain = 'avog',
492 BMDDeckLinkCanOnlyAdjustOverallVideoOutputGain = 'ovog',
493 BMDDeckLinkHasVideoInputAntiAliasingFilter = 'aafl',
494 BMDDeckLinkHasBypass = 'byps',
498 BMDDeckLinkMaximumAudioChannels = 'mach',
499 BMDDeckLinkNumberOfSubDevices = 'nsbd',
500 BMDDeckLinkSubDeviceIndex = 'subi',
501 BMDDeckLinkVideoOutputConnections = 'vocn',
502 BMDDeckLinkVideoInputConnections = 'vicn',
506 BMDDeckLinkVideoInputGainMinimum = 'vigm',
507 BMDDeckLinkVideoInputGainMaximum = 'vigx',
508 BMDDeckLinkVideoOutputGainMinimum = 'vogm',
509 BMDDeckLinkVideoOutputGainMaximum = 'vogx',
513 BMDDeckLinkSerialPortDeviceName = 'slpn'
517 /* Enum BMDDeckLinkAPIInformationID - DeckLinkAPI information ID */
519 typedef uint32_t BMDDeckLinkAPIInformationID;
520 enum _BMDDeckLinkAPIInformationID {
521 BMDDeckLinkAPIVersion = 'vers'
525 /* Enum BMDDeckControlMode - DeckControl mode */
527 typedef uint32_t BMDDeckControlMode;
528 enum _BMDDeckControlMode {
529 bmdDeckControlNotOpened = 'ntop',
530 bmdDeckControlVTRControlMode = 'vtrc',
531 bmdDeckControlExportMode = 'expm',
532 bmdDeckControlCaptureMode = 'capm'
536 /* Enum BMDDeckControlEvent - DeckControl event */
538 typedef uint32_t BMDDeckControlEvent;
539 enum _BMDDeckControlEvent {
540 bmdDeckControlAbortedEvent = 'abte', // This event is triggered when a capture or edit-to-tape operation is aborted.
542 /* Export-To-Tape events */
544 bmdDeckControlPrepareForExportEvent = 'pfee', // This event is triggered a few frames before reaching the in-point. IDeckLinkInput::StartScheduledPlayback() should be called at this point.
545 bmdDeckControlExportCompleteEvent = 'exce', // This event is triggered a few frames after reaching the out-point. At this point, it is safe to stop playback.
549 bmdDeckControlPrepareForCaptureEvent = 'pfce', // This event is triggered a few frames before reaching the in-point. The serial timecode attached to IDeckLinkVideoInputFrames is now valid.
550 bmdDeckControlCaptureCompleteEvent = 'ccev' // This event is triggered a few frames after reaching the out-point.
554 /* Enum BMDDeckControlVTRControlState - VTR Control state */
556 typedef uint32_t BMDDeckControlVTRControlState;
557 enum _BMDDeckControlVTRControlState {
558 bmdDeckControlNotInVTRControlMode = 'nvcm',
559 bmdDeckControlVTRControlPlaying = 'vtrp',
560 bmdDeckControlVTRControlRecording = 'vtrr',
561 bmdDeckControlVTRControlStill = 'vtra',
562 bmdDeckControlVTRControlSeeking = 'vtrs',
563 bmdDeckControlVTRControlStopped = 'vtro'
567 /* Enum BMDDeckControlStatusFlags - Deck Control status flags */
569 typedef uint32_t BMDDeckControlStatusFlags;
570 enum _BMDDeckControlStatusFlags {
571 bmdDeckControlStatusDeckConnected = 1 << 0,
572 bmdDeckControlStatusRemoteMode = 1 << 1,
573 bmdDeckControlStatusRecordInhibited = 1 << 2,
574 bmdDeckControlStatusCassetteOut = 1 << 3
578 /* Enum BMDDeckControlExportModeOpsFlags - Export mode flags */
580 typedef uint32_t BMDDeckControlExportModeOpsFlags;
581 enum _BMDDeckControlExportModeOpsFlags {
582 bmdDeckControlExportModeInsertVideo = 1 << 0,
583 bmdDeckControlExportModeInsertAudio1 = 1 << 1,
584 bmdDeckControlExportModeInsertAudio2 = 1 << 2,
585 bmdDeckControlExportModeInsertAudio3 = 1 << 3,
586 bmdDeckControlExportModeInsertAudio4 = 1 << 4,
587 bmdDeckControlExportModeInsertAudio5 = 1 << 5,
588 bmdDeckControlExportModeInsertAudio6 = 1 << 6,
589 bmdDeckControlExportModeInsertAudio7 = 1 << 7,
590 bmdDeckControlExportModeInsertAudio8 = 1 << 8,
591 bmdDeckControlExportModeInsertAudio9 = 1 << 9,
592 bmdDeckControlExportModeInsertAudio10 = 1 << 10,
593 bmdDeckControlExportModeInsertAudio11 = 1 << 11,
594 bmdDeckControlExportModeInsertAudio12 = 1 << 12,
595 bmdDeckControlExportModeInsertTimeCode = 1 << 13,
596 bmdDeckControlExportModeInsertAssemble = 1 << 14,
597 bmdDeckControlExportModeInsertPreview = 1 << 15,
598 bmdDeckControlUseManualExport = 1 << 16
602 /* Enum BMDDeckControlError - Deck Control error */
604 typedef uint32_t BMDDeckControlError;
605 enum _BMDDeckControlError {
606 bmdDeckControlNoError = 'noer',
607 bmdDeckControlModeError = 'moer',
608 bmdDeckControlMissedInPointError = 'mier',
609 bmdDeckControlDeckTimeoutError = 'dter',
610 bmdDeckControlCommandFailedError = 'cfer',
611 bmdDeckControlDeviceAlreadyOpenedError = 'dalo',
612 bmdDeckControlFailedToOpenDeviceError = 'fder',
613 bmdDeckControlInLocalModeError = 'lmer',
614 bmdDeckControlEndOfTapeError = 'eter',
615 bmdDeckControlUserAbortError = 'uaer',
616 bmdDeckControlNoTapeInDeckError = 'nter',
617 bmdDeckControlNoVideoFromCardError = 'nvfc',
618 bmdDeckControlNoCommunicationError = 'ncom',
619 bmdDeckControlBufferTooSmallError = 'btsm',
620 bmdDeckControlBadChecksumError = 'chks',
621 bmdDeckControlUnknownError = 'uner'
625 /* Enum BMD3DPreviewFormat - Linked Frame preview format */
627 typedef uint32_t BMD3DPreviewFormat;
628 enum _BMD3DPreviewFormat {
629 bmd3DPreviewFormatDefault = 'defa',
630 bmd3DPreviewFormatLeftOnly = 'left',
631 bmd3DPreviewFormatRightOnly = 'righ',
632 bmd3DPreviewFormatSideBySide = 'side',
633 bmd3DPreviewFormatTopBottom = 'topb'
637 #if defined(__cplusplus)
639 // Forward Declarations
641 class IDeckLinkVideoOutputCallback;
642 class IDeckLinkInputCallback;
643 class IDeckLinkMemoryAllocator;
644 class IDeckLinkAudioOutputCallback;
645 class IDeckLinkIterator;
646 class IDeckLinkAPIInformation;
647 class IDeckLinkDisplayModeIterator;
648 class IDeckLinkDisplayMode;
650 class IDeckLinkOutput;
651 class IDeckLinkInput;
652 class IDeckLinkTimecode;
653 class IDeckLinkVideoFrame;
654 class IDeckLinkMutableVideoFrame;
655 class IDeckLinkVideoFrame3DExtensions;
656 class IDeckLinkVideoInputFrame;
657 class IDeckLinkVideoFrameAncillary;
658 class IDeckLinkAudioInputPacket;
659 class IDeckLinkScreenPreviewCallback;
660 class IDeckLinkCocoaScreenPreviewCallback;
661 class IDeckLinkGLScreenPreviewHelper;
662 class IDeckLinkConfiguration;
663 class IDeckLinkAttributes;
664 class IDeckLinkKeyer;
665 class IDeckLinkVideoConversion;
666 class IDeckLinkDeckControlStatusCallback;
667 class IDeckLinkDeckControl;
670 /* Interface IDeckLinkVideoOutputCallback - Frame completion callback. */
672 class IDeckLinkVideoOutputCallback : public IUnknown
675 virtual HRESULT ScheduledFrameCompleted (/* in */ IDeckLinkVideoFrame *completedFrame, /* in */ BMDOutputFrameCompletionResult result) = 0;
676 virtual HRESULT ScheduledPlaybackHasStopped (void) = 0;
679 virtual ~IDeckLinkVideoOutputCallback () {}; // call Release method to drop reference count
683 /* Interface IDeckLinkInputCallback - Frame arrival callback. */
685 class IDeckLinkInputCallback : public IUnknown
688 virtual HRESULT VideoInputFormatChanged (/* in */ BMDVideoInputFormatChangedEvents notificationEvents, /* in */ IDeckLinkDisplayMode *newDisplayMode, /* in */ BMDDetectedVideoInputFormatFlags detectedSignalFlags) = 0;
689 virtual HRESULT VideoInputFrameArrived (/* in */ IDeckLinkVideoInputFrame* videoFrame, /* in */ IDeckLinkAudioInputPacket* audioPacket) = 0;
692 virtual ~IDeckLinkInputCallback () {}; // call Release method to drop reference count
696 /* Interface IDeckLinkMemoryAllocator - Memory allocator for video frames. */
698 class IDeckLinkMemoryAllocator : public IUnknown
701 virtual HRESULT AllocateBuffer (/* in */ uint32_t bufferSize, /* out */ void **allocatedBuffer) = 0;
702 virtual HRESULT ReleaseBuffer (/* in */ void *buffer) = 0;
704 virtual HRESULT Commit (void) = 0;
705 virtual HRESULT Decommit (void) = 0;
709 /* Interface IDeckLinkAudioOutputCallback - Optional callback to allow audio samples to be pulled as required. */
711 class IDeckLinkAudioOutputCallback : public IUnknown
714 virtual HRESULT RenderAudioSamples (/* in */ bool preroll) = 0;
718 /* Interface IDeckLinkIterator - enumerates installed DeckLink hardware */
720 class IDeckLinkIterator : public IUnknown
723 virtual HRESULT Next (/* out */ IDeckLink **deckLinkInstance) = 0;
727 /* Interface IDeckLinkAPIInformation - DeckLinkAPI attribute interface */
729 class IDeckLinkAPIInformation : public IUnknown
732 virtual HRESULT GetFlag (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ bool *value) = 0;
733 virtual HRESULT GetInt (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ int64_t *value) = 0;
734 virtual HRESULT GetFloat (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ double *value) = 0;
735 virtual HRESULT GetString (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ CFStringRef *value) = 0;
738 virtual ~IDeckLinkAPIInformation () {}; // call Release method to drop reference count
742 /* Interface IDeckLinkDisplayModeIterator - enumerates over supported input/output display modes. */
744 class IDeckLinkDisplayModeIterator : public IUnknown
747 virtual HRESULT Next (/* out */ IDeckLinkDisplayMode **deckLinkDisplayMode) = 0;
750 virtual ~IDeckLinkDisplayModeIterator () {}; // call Release method to drop reference count
754 /* Interface IDeckLinkDisplayMode - represents a display mode */
756 class IDeckLinkDisplayMode : public IUnknown
759 virtual HRESULT GetName (/* out */ CFStringRef *name) = 0;
760 virtual BMDDisplayMode GetDisplayMode (void) = 0;
761 virtual long GetWidth (void) = 0;
762 virtual long GetHeight (void) = 0;
763 virtual HRESULT GetFrameRate (/* out */ BMDTimeValue *frameDuration, /* out */ BMDTimeScale *timeScale) = 0;
764 virtual BMDFieldDominance GetFieldDominance (void) = 0;
765 virtual BMDDisplayModeFlags GetFlags (void) = 0;
768 virtual ~IDeckLinkDisplayMode () {}; // call Release method to drop reference count
772 /* Interface IDeckLink - represents a DeckLink device */
774 class IDeckLink : public IUnknown
777 virtual HRESULT GetModelName (/* out */ CFStringRef *modelName) = 0;
781 /* Interface IDeckLinkOutput - Created by QueryInterface from IDeckLink. */
783 class IDeckLinkOutput : public IUnknown
786 virtual HRESULT DoesSupportVideoMode (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoOutputFlags flags, /* out */ BMDDisplayModeSupport *result, /* out */ IDeckLinkDisplayMode **resultDisplayMode) = 0;
787 virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator **iterator) = 0;
789 virtual HRESULT SetScreenPreviewCallback (/* in */ IDeckLinkScreenPreviewCallback *previewCallback) = 0;
793 virtual HRESULT EnableVideoOutput (/* in */ BMDDisplayMode displayMode, /* in */ BMDVideoOutputFlags flags) = 0;
794 virtual HRESULT DisableVideoOutput (void) = 0;
796 virtual HRESULT SetVideoOutputFrameMemoryAllocator (/* in */ IDeckLinkMemoryAllocator *theAllocator) = 0;
797 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;
798 virtual HRESULT CreateAncillaryData (/* in */ BMDPixelFormat pixelFormat, /* out */ IDeckLinkVideoFrameAncillary **outBuffer) = 0;
800 virtual HRESULT DisplayVideoFrameSync (/* in */ IDeckLinkVideoFrame *theFrame) = 0;
801 virtual HRESULT ScheduleVideoFrame (/* in */ IDeckLinkVideoFrame *theFrame, /* in */ BMDTimeValue displayTime, /* in */ BMDTimeValue displayDuration, /* in */ BMDTimeScale timeScale) = 0;
802 virtual HRESULT SetScheduledFrameCompletionCallback (/* in */ IDeckLinkVideoOutputCallback *theCallback) = 0;
803 virtual HRESULT GetBufferedVideoFrameCount (/* out */ uint32_t *bufferedFrameCount) = 0;
807 virtual HRESULT EnableAudioOutput (/* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount, /* in */ BMDAudioOutputStreamType streamType) = 0;
808 virtual HRESULT DisableAudioOutput (void) = 0;
810 virtual HRESULT WriteAudioSamplesSync (/* in */ void *buffer, /* in */ uint32_t sampleFrameCount, /* out */ uint32_t *sampleFramesWritten) = 0;
812 virtual HRESULT BeginAudioPreroll (void) = 0;
813 virtual HRESULT EndAudioPreroll (void) = 0;
814 virtual HRESULT ScheduleAudioSamples (/* in */ void *buffer, /* in */ uint32_t sampleFrameCount, /* in */ BMDTimeValue streamTime, /* in */ BMDTimeScale timeScale, /* out */ uint32_t *sampleFramesWritten) = 0;
816 virtual HRESULT GetBufferedAudioSampleFrameCount (/* out */ uint32_t *bufferedSampleFrameCount) = 0;
817 virtual HRESULT FlushBufferedAudioSamples (void) = 0;
819 virtual HRESULT SetAudioCallback (/* in */ IDeckLinkAudioOutputCallback *theCallback) = 0;
823 virtual HRESULT StartScheduledPlayback (/* in */ BMDTimeValue playbackStartTime, /* in */ BMDTimeScale timeScale, /* in */ double playbackSpeed) = 0;
824 virtual HRESULT StopScheduledPlayback (/* in */ BMDTimeValue stopPlaybackAtTime, /* out */ BMDTimeValue *actualStopTime, /* in */ BMDTimeScale timeScale) = 0;
825 virtual HRESULT IsScheduledPlaybackRunning (/* out */ bool *active) = 0;
826 virtual HRESULT GetScheduledStreamTime (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *streamTime, /* out */ double *playbackSpeed) = 0;
827 virtual HRESULT GetReferenceStatus (/* out */ BMDReferenceStatus *referenceStatus) = 0;
829 /* Hardware Timing */
831 virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *hardwareTime, /* out */ BMDTimeValue *timeInFrame, /* out */ BMDTimeValue *ticksPerFrame) = 0;
834 virtual ~IDeckLinkOutput () {}; // call Release method to drop reference count
838 /* Interface IDeckLinkInput - Created by QueryInterface from IDeckLink. */
840 class IDeckLinkInput : public IUnknown
843 virtual HRESULT DoesSupportVideoMode (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags, /* out */ BMDDisplayModeSupport *result, /* out */ IDeckLinkDisplayMode **resultDisplayMode) = 0;
844 virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator **iterator) = 0;
846 virtual HRESULT SetScreenPreviewCallback (/* in */ IDeckLinkScreenPreviewCallback *previewCallback) = 0;
850 virtual HRESULT EnableVideoInput (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags) = 0;
851 virtual HRESULT DisableVideoInput (void) = 0;
852 virtual HRESULT GetAvailableVideoFrameCount (/* out */ uint32_t *availableFrameCount) = 0;
856 virtual HRESULT EnableAudioInput (/* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount) = 0;
857 virtual HRESULT DisableAudioInput (void) = 0;
858 virtual HRESULT GetAvailableAudioSampleFrameCount (/* out */ uint32_t *availableSampleFrameCount) = 0;
862 virtual HRESULT StartStreams (void) = 0;
863 virtual HRESULT StopStreams (void) = 0;
864 virtual HRESULT PauseStreams (void) = 0;
865 virtual HRESULT FlushStreams (void) = 0;
866 virtual HRESULT SetCallback (/* in */ IDeckLinkInputCallback *theCallback) = 0;
868 /* Hardware Timing */
870 virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *hardwareTime, /* out */ BMDTimeValue *timeInFrame, /* out */ BMDTimeValue *ticksPerFrame) = 0;
873 virtual ~IDeckLinkInput () {}; // call Release method to drop reference count
877 /* Interface IDeckLinkTimecode - Used for video frame timecode representation. */
879 class IDeckLinkTimecode : public IUnknown
882 virtual BMDTimecodeBCD GetBCD (void) = 0;
883 virtual HRESULT GetComponents (/* out */ uint8_t *hours, /* out */ uint8_t *minutes, /* out */ uint8_t *seconds, /* out */ uint8_t *frames) = 0;
884 virtual HRESULT GetString (/* out */ CFStringRef *timecode) = 0;
885 virtual BMDTimecodeFlags GetFlags (void) = 0;
886 virtual HRESULT GetTimecodeUserBits (/* out */ BMDTimecodeUserBits *userBits) = 0;
889 virtual ~IDeckLinkTimecode () {}; // call Release method to drop reference count
893 /* Interface IDeckLinkVideoFrame - Interface to encapsulate a video frame; can be caller-implemented. */
895 class IDeckLinkVideoFrame : public IUnknown
898 virtual long GetWidth (void) = 0;
899 virtual long GetHeight (void) = 0;
900 virtual long GetRowBytes (void) = 0;
901 virtual BMDPixelFormat GetPixelFormat (void) = 0;
902 virtual BMDFrameFlags GetFlags (void) = 0;
903 virtual HRESULT GetBytes (/* out */ void **buffer) = 0;
905 virtual HRESULT GetTimecode (/* in */ BMDTimecodeFormat format, /* out */ IDeckLinkTimecode **timecode) = 0;
906 virtual HRESULT GetAncillaryData (/* out */ IDeckLinkVideoFrameAncillary **ancillary) = 0;
909 virtual ~IDeckLinkVideoFrame () {}; // call Release method to drop reference count
913 /* Interface IDeckLinkMutableVideoFrame - Created by IDeckLinkOutput::CreateVideoFrame. */
915 class IDeckLinkMutableVideoFrame : public IDeckLinkVideoFrame
918 virtual HRESULT SetFlags (/* in */ BMDFrameFlags newFlags) = 0;
920 virtual HRESULT SetTimecode (/* in */ BMDTimecodeFormat format, /* in */ IDeckLinkTimecode *timecode) = 0;
921 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;
922 virtual HRESULT SetAncillaryData (/* in */ IDeckLinkVideoFrameAncillary *ancillary) = 0;
923 virtual HRESULT SetTimecodeUserBits (/* in */ BMDTimecodeFormat format, /* in */ BMDTimecodeUserBits userBits) = 0;
926 virtual ~IDeckLinkMutableVideoFrame () {}; // call Release method to drop reference count
930 /* Interface IDeckLinkVideoFrame3DExtensions - Optional interface implemented on IDeckLinkVideoFrame to support 3D frames */
932 class IDeckLinkVideoFrame3DExtensions : public IUnknown
935 virtual BMDVideo3DPackingFormat Get3DPackingFormat (void) = 0;
936 virtual HRESULT GetFrameForRightEye (/* out */ IDeckLinkVideoFrame* *rightEyeFrame) = 0;
939 virtual ~IDeckLinkVideoFrame3DExtensions () {}; // call Release method to drop reference count
943 /* Interface IDeckLinkVideoInputFrame - Provided by the IDeckLinkVideoInput frame arrival callback. */
945 class IDeckLinkVideoInputFrame : public IDeckLinkVideoFrame
948 virtual HRESULT GetStreamTime (/* out */ BMDTimeValue *frameTime, /* out */ BMDTimeValue *frameDuration, /* in */ BMDTimeScale timeScale) = 0;
949 virtual HRESULT GetHardwareReferenceTimestamp (/* in */ BMDTimeScale timeScale, /* out */ BMDTimeValue *frameTime, /* out */ BMDTimeValue *frameDuration) = 0;
952 virtual ~IDeckLinkVideoInputFrame () {}; // call Release method to drop reference count
956 /* Interface IDeckLinkVideoFrameAncillary - Obtained through QueryInterface() on an IDeckLinkVideoFrame object. */
958 class IDeckLinkVideoFrameAncillary : public IUnknown
962 virtual HRESULT GetBufferForVerticalBlankingLine (/* in */ uint32_t lineNumber, /* out */ void **buffer) = 0;
963 virtual BMDPixelFormat GetPixelFormat (void) = 0;
964 virtual BMDDisplayMode GetDisplayMode (void) = 0;
967 virtual ~IDeckLinkVideoFrameAncillary () {}; // call Release method to drop reference count
971 /* Interface IDeckLinkAudioInputPacket - Provided by the IDeckLinkInput callback. */
973 class IDeckLinkAudioInputPacket : public IUnknown
976 virtual long GetSampleFrameCount (void) = 0;
977 virtual HRESULT GetBytes (/* out */ void **buffer) = 0;
978 virtual HRESULT GetPacketTime (/* out */ BMDTimeValue *packetTime, /* in */ BMDTimeScale timeScale) = 0;
981 virtual ~IDeckLinkAudioInputPacket () {}; // call Release method to drop reference count
985 /* Interface IDeckLinkScreenPreviewCallback - Screen preview callback */
987 class IDeckLinkScreenPreviewCallback : public IUnknown
990 virtual HRESULT DrawFrame (/* in */ IDeckLinkVideoFrame *theFrame) = 0;
993 virtual ~IDeckLinkScreenPreviewCallback () {}; // call Release method to drop reference count
997 /* Interface IDeckLinkCocoaScreenPreviewCallback - Screen preview callback for Cocoa-based applications */
999 class IDeckLinkCocoaScreenPreviewCallback : public IDeckLinkScreenPreviewCallback
1004 virtual ~IDeckLinkCocoaScreenPreviewCallback () {}; // call Release method to drop reference count
1008 /* Interface IDeckLinkGLScreenPreviewHelper - Created with CoCreateInstance(). */
1010 class IDeckLinkGLScreenPreviewHelper : public IUnknown
1014 /* Methods must be called with OpenGL context set */
1016 virtual HRESULT InitializeGL (void) = 0;
1017 virtual HRESULT PaintGL (void) = 0;
1018 virtual HRESULT SetFrame (/* in */ IDeckLinkVideoFrame *theFrame) = 0;
1019 virtual HRESULT Set3DPreviewFormat (/* in */ BMD3DPreviewFormat previewFormat) = 0;
1022 virtual ~IDeckLinkGLScreenPreviewHelper () {}; // call Release method to drop reference count
1026 /* Interface IDeckLinkConfiguration - DeckLink Configuration interface */
1028 class IDeckLinkConfiguration : public IUnknown
1031 virtual HRESULT SetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ bool value) = 0;
1032 virtual HRESULT GetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ bool *value) = 0;
1033 virtual HRESULT SetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ int64_t value) = 0;
1034 virtual HRESULT GetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ int64_t *value) = 0;
1035 virtual HRESULT SetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ double value) = 0;
1036 virtual HRESULT GetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ double *value) = 0;
1037 virtual HRESULT SetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ CFStringRef value) = 0;
1038 virtual HRESULT GetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ CFStringRef *value) = 0;
1039 virtual HRESULT WriteConfigurationToPreferences (void) = 0;
1042 virtual ~IDeckLinkConfiguration () {}; // call Release method to drop reference count
1046 /* Interface IDeckLinkAttributes - DeckLink Attribute interface */
1048 class IDeckLinkAttributes : public IUnknown
1051 virtual HRESULT GetFlag (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ bool *value) = 0;
1052 virtual HRESULT GetInt (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ int64_t *value) = 0;
1053 virtual HRESULT GetFloat (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ double *value) = 0;
1054 virtual HRESULT GetString (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ CFStringRef *value) = 0;
1057 virtual ~IDeckLinkAttributes () {}; // call Release method to drop reference count
1061 /* Interface IDeckLinkKeyer - DeckLink Keyer interface */
1063 class IDeckLinkKeyer : public IUnknown
1066 virtual HRESULT Enable (/* in */ bool isExternal) = 0;
1067 virtual HRESULT SetLevel (/* in */ uint8_t level) = 0;
1068 virtual HRESULT RampUp (/* in */ uint32_t numberOfFrames) = 0;
1069 virtual HRESULT RampDown (/* in */ uint32_t numberOfFrames) = 0;
1070 virtual HRESULT Disable (void) = 0;
1073 virtual ~IDeckLinkKeyer () {}; // call Release method to drop reference count
1077 /* Interface IDeckLinkVideoConversion - Created with CoCreateInstance(). */
1079 class IDeckLinkVideoConversion : public IUnknown
1082 virtual HRESULT ConvertFrame (/* in */ IDeckLinkVideoFrame* srcFrame, /* in */ IDeckLinkVideoFrame* dstFrame) = 0;
1085 virtual ~IDeckLinkVideoConversion () {}; // call Release method to drop reference count
1089 /* Interface IDeckLinkDeckControlStatusCallback - Deck control state change callback. */
1091 class IDeckLinkDeckControlStatusCallback : public IUnknown
1094 virtual HRESULT TimecodeUpdate (/* in */ BMDTimecodeBCD currentTimecode) = 0;
1095 virtual HRESULT VTRControlStateChanged (/* in */ BMDDeckControlVTRControlState newState, /* in */ BMDDeckControlError error) = 0;
1096 virtual HRESULT DeckControlEventReceived (/* in */ BMDDeckControlEvent event, /* in */ BMDDeckControlError error) = 0;
1097 virtual HRESULT DeckControlStatusChanged (/* in */ BMDDeckControlStatusFlags flags, /* in */ uint32_t mask) = 0;
1100 virtual ~IDeckLinkDeckControlStatusCallback () {}; // call Release method to drop reference count
1104 /* Interface IDeckLinkDeckControl - Deck Control main interface */
1106 class IDeckLinkDeckControl : public IUnknown
1109 virtual HRESULT Open (/* in */ BMDTimeScale timeScale, /* in */ BMDTimeValue timeValue, /* in */ bool timecodeIsDropFrame, /* out */ BMDDeckControlError *error) = 0;
1110 virtual HRESULT Close (/* in */ bool standbyOn) = 0;
1111 virtual HRESULT GetCurrentState (/* out */ BMDDeckControlMode *mode, /* out */ BMDDeckControlVTRControlState *vtrControlState, /* out */ BMDDeckControlStatusFlags *flags) = 0;
1112 virtual HRESULT SetStandby (/* in */ bool standbyOn) = 0;
1113 virtual HRESULT SendCommand (/* in */ uint8_t *inBuffer, /* in */ uint32_t inBufferSize, /* out */ uint8_t *outBuffer, /* out */ uint32_t *outDataSize, /* in */ uint32_t outBufferSize, /* out */ BMDDeckControlError *error) = 0;
1114 virtual HRESULT Play (/* out */ BMDDeckControlError *error) = 0;
1115 virtual HRESULT Stop (/* out */ BMDDeckControlError *error) = 0;
1116 virtual HRESULT TogglePlayStop (/* out */ BMDDeckControlError *error) = 0;
1117 virtual HRESULT Eject (/* out */ BMDDeckControlError *error) = 0;
1118 virtual HRESULT GoToTimecode (/* in */ BMDTimecodeBCD timecode, /* out */ BMDDeckControlError *error) = 0;
1119 virtual HRESULT FastForward (/* in */ bool viewTape, /* out */ BMDDeckControlError *error) = 0;
1120 virtual HRESULT Rewind (/* in */ bool viewTape, /* out */ BMDDeckControlError *error) = 0;
1121 virtual HRESULT StepForward (/* out */ BMDDeckControlError *error) = 0;
1122 virtual HRESULT StepBack (/* out */ BMDDeckControlError *error) = 0;
1123 virtual HRESULT Jog (/* in */ double rate, /* out */ BMDDeckControlError *error) = 0;
1124 virtual HRESULT Shuttle (/* in */ double rate, /* out */ BMDDeckControlError *error) = 0;
1125 virtual HRESULT GetTimecodeString (/* out */ CFStringRef *currentTimeCode, /* out */ BMDDeckControlError *error) = 0;
1126 virtual HRESULT GetTimecode (/* out */ IDeckLinkTimecode **currentTimecode, /* out */ BMDDeckControlError *error) = 0;
1127 virtual HRESULT GetTimecodeBCD (/* out */ BMDTimecodeBCD *currentTimecode, /* out */ BMDDeckControlError *error) = 0;
1128 virtual HRESULT SetPreroll (/* in */ uint32_t prerollSeconds) = 0;
1129 virtual HRESULT GetPreroll (/* out */ uint32_t *prerollSeconds) = 0;
1130 virtual HRESULT SetExportOffset (/* in */ int32_t exportOffsetFields) = 0;
1131 virtual HRESULT GetExportOffset (/* out */ int32_t *exportOffsetFields) = 0;
1132 virtual HRESULT GetManualExportOffset (/* out */ int32_t *deckManualExportOffsetFields) = 0;
1133 virtual HRESULT SetCaptureOffset (/* in */ int32_t captureOffsetFields) = 0;
1134 virtual HRESULT GetCaptureOffset (/* out */ int32_t *captureOffsetFields) = 0;
1135 virtual HRESULT StartExport (/* in */ BMDTimecodeBCD inTimecode, /* in */ BMDTimecodeBCD outTimecode, /* in */ BMDDeckControlExportModeOpsFlags exportModeOps, /* out */ BMDDeckControlError *error) = 0;
1136 virtual HRESULT StartCapture (/* in */ bool useVITC, /* in */ BMDTimecodeBCD inTimecode, /* in */ BMDTimecodeBCD outTimecode, /* out */ BMDDeckControlError *error) = 0;
1137 virtual HRESULT GetDeviceID (/* out */ uint16_t *deviceId, /* out */ BMDDeckControlError *error) = 0;
1138 virtual HRESULT Abort (void) = 0;
1139 virtual HRESULT CrashRecordStart (/* out */ BMDDeckControlError *error) = 0;
1140 virtual HRESULT CrashRecordStop (/* out */ BMDDeckControlError *error) = 0;
1141 virtual HRESULT SetCallback (/* in */ IDeckLinkDeckControlStatusCallback *callback) = 0;
1144 virtual ~IDeckLinkDeckControl () {}; // call Release method to drop reference count
1152 IDeckLinkIterator* CreateDeckLinkIteratorInstance (void);
1153 IDeckLinkAPIInformation* CreateDeckLinkAPIInformationInstance (void);
1154 IDeckLinkGLScreenPreviewHelper* CreateOpenGLScreenPreviewHelper (void);
1155 IDeckLinkCocoaScreenPreviewCallback* CreateCocoaScreenPreview (void* /* (NSView*) */ parentView);
1156 IDeckLinkVideoConversion* CreateVideoConversionInstance (void);
1161 #endif // defined(__cplusplus)
1162 #endif // __DeckLink_API_h__