2 ** Copyright (c) 2009 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__
36 #define BLACKMAGIC_DECKLINK_API_MAGIC 1
40 typedef int64_t BMDTimeValue;
41 typedef int64_t BMDTimeScale;
42 typedef uint32_t BMDTimecodeBCD;
43 typedef uint32_t BMDTimecodeUserBits;
46 // Interface ID Declarations
48 #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}
49 #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}
50 #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}
51 #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}
52 #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}
53 #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}
54 #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}
55 #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}
56 #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}
57 #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}
58 #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}
59 #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}
60 #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}
61 #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}
62 #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}
63 #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}
64 #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}
65 #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}
66 #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}
67 #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}
68 #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}
69 #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}
70 #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}
71 #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}
72 #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}
73 #define IID_IDeckLinkDeckControl /* A4D81043-0619-42B7-8ED6-602D29041DF7 */ (REFIID){0xA4,0xD8,0x10,0x43,0x06,0x19,0x42,0xB7,0x8E,0xD6,0x60,0x2D,0x29,0x04,0x1D,0xF7}
76 /* Enum BMDDisplayMode - Video display modes */
78 typedef uint32_t BMDDisplayMode;
79 enum _BMDDisplayMode {
83 bmdModeNTSC = /* 'ntsc' */ 0x6E747363,
84 bmdModeNTSC2398 = /* 'nt23' */ 0x6E743233, // 3:2 pulldown
85 bmdModePAL = /* 'pal ' */ 0x70616C20,
89 bmdModeHD1080p2398 = /* '23ps' */ 0x32337073,
90 bmdModeHD1080p24 = /* '24ps' */ 0x32347073,
91 bmdModeHD1080p25 = /* 'Hp25' */ 0x48703235,
92 bmdModeHD1080p2997 = /* 'Hp29' */ 0x48703239,
93 bmdModeHD1080p30 = /* 'Hp30' */ 0x48703330,
94 bmdModeHD1080i50 = /* 'Hi50' */ 0x48693530,
95 bmdModeHD1080i5994 = /* 'Hi59' */ 0x48693539,
96 bmdModeHD1080i6000 = /* 'Hi60' */ 0x48693630, // N.B. This _really_ is 60.00 Hz.
97 bmdModeHD1080p50 = /* 'Hp50' */ 0x48703530,
98 bmdModeHD1080p5994 = /* 'Hp59' */ 0x48703539,
99 bmdModeHD1080p6000 = /* 'Hp60' */ 0x48703630, // N.B. This _really_ is 60.00 Hz.
103 bmdModeHD720p50 = /* 'hp50' */ 0x68703530,
104 bmdModeHD720p5994 = /* 'hp59' */ 0x68703539,
105 bmdModeHD720p60 = /* 'hp60' */ 0x68703630,
109 bmdMode2k2398 = /* '2k23' */ 0x326B3233,
110 bmdMode2k24 = /* '2k24' */ 0x326B3234,
111 bmdMode2k25 = /* '2k25' */ 0x326B3235
115 /* Enum BMDFieldDominance - Video field dominance */
117 typedef uint32_t BMDFieldDominance;
118 enum _BMDFieldDominance {
119 bmdUnknownFieldDominance = 0,
120 bmdLowerFieldFirst = /* 'lowr' */ 0x6C6F7772,
121 bmdUpperFieldFirst = /* 'uppr' */ 0x75707072,
122 bmdProgressiveFrame = /* 'prog' */ 0x70726F67,
123 bmdProgressiveSegmentedFrame = /* 'psf ' */ 0x70736620
127 /* Enum BMDPixelFormat - Video pixel formats supported for output/input */
129 typedef uint32_t BMDPixelFormat;
130 enum _BMDPixelFormat {
131 bmdFormat8BitYUV = /* '2vuy' */ 0x32767579,
132 bmdFormat10BitYUV = /* 'v210' */ 0x76323130,
133 bmdFormat8BitARGB = 32,
134 bmdFormat8BitBGRA = /* 'BGRA' */ 0x42475241,
135 bmdFormat10BitRGB = /* 'r210' */ 0x72323130 // Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10
139 /* Enum BMDDisplayModeFlags - Flags to describe the characteristics of an IDeckLinkDisplayMode. */
141 typedef uint32_t BMDDisplayModeFlags;
142 enum _BMDDisplayModeFlags {
143 bmdDisplayModeSupports3D = 1 << 0,
144 bmdDisplayModeColorspaceRec601 = 1 << 1,
145 bmdDisplayModeColorspaceRec709 = 1 << 2
149 /* Enum BMDVideoOutputFlags - Flags to control the output of ancillary data along with video. */
151 typedef uint32_t BMDVideoOutputFlags;
152 enum _BMDVideoOutputFlags {
153 bmdVideoOutputFlagDefault = 0,
154 bmdVideoOutputVANC = 1 << 0,
155 bmdVideoOutputVITC = 1 << 1,
156 bmdVideoOutputRP188 = 1 << 2,
157 bmdVideoOutputDualStream3D = 1 << 4
161 /* Enum BMDFrameFlags - Frame flags */
163 typedef uint32_t BMDFrameFlags;
164 enum _BMDFrameFlags {
165 bmdFrameFlagDefault = 0,
166 bmdFrameFlagFlipVertical = 1 << 0,
168 /* Flags that are applicable only to instances of IDeckLinkVideoInputFrame */
170 bmdFrameHasNoInputSource = 1 << 31
174 /* Enum BMDVideoInputFlags - Flags applicable to video input */
176 typedef uint32_t BMDVideoInputFlags;
177 enum _BMDVideoInputFlags {
178 bmdVideoInputFlagDefault = 0,
179 bmdVideoInputEnableFormatDetection = 1 << 0,
180 bmdVideoInputDualStream3D = 1 << 1
184 /* Enum BMDVideoInputFormatChangedEvents - Bitmask passed to the VideoInputFormatChanged notification to identify the properties of the input signal that have changed */
186 typedef uint32_t BMDVideoInputFormatChangedEvents;
187 enum _BMDVideoInputFormatChangedEvents {
188 bmdVideoInputDisplayModeChanged = 1 << 0,
189 bmdVideoInputFieldDominanceChanged = 1 << 1,
190 bmdVideoInputColorspaceChanged = 1 << 2
194 /* Enum BMDDetectedVideoInputFormatFlags - Flags passed to the VideoInputFormatChanged notification to describe the detected video input signal */
196 typedef uint32_t BMDDetectedVideoInputFormatFlags;
197 enum _BMDDetectedVideoInputFormatFlags {
198 bmdDetectedVideoInputYCbCr422 = 1 << 0,
199 bmdDetectedVideoInputRGB444 = 1 << 1
203 /* Enum BMDOutputFrameCompletionResult - Frame Completion Callback */
205 typedef uint32_t BMDOutputFrameCompletionResult;
206 enum _BMDOutputFrameCompletionResult {
207 bmdOutputFrameCompleted,
208 bmdOutputFrameDisplayedLate,
209 bmdOutputFrameDropped,
210 bmdOutputFrameFlushed
214 /* Enum BMDReferenceStatus - GenLock input status */
216 typedef uint32_t BMDReferenceStatus;
217 enum _BMDReferenceStatus {
218 bmdReferenceNotSupportedByHardware = 1 << 0,
219 bmdReferenceLocked = 1 << 1
223 /* Enum BMDAudioSampleRate - Audio sample rates supported for output/input */
225 typedef uint32_t BMDAudioSampleRate;
226 enum _BMDAudioSampleRate {
227 bmdAudioSampleRate48kHz = 48000
231 /* Enum BMDAudioSampleType - Audio sample sizes supported for output/input */
233 typedef uint32_t BMDAudioSampleType;
234 enum _BMDAudioSampleType {
235 bmdAudioSampleType16bitInteger = 16,
236 bmdAudioSampleType32bitInteger = 32
240 /* Enum BMDAudioOutputStreamType - Audio output stream type */
242 typedef uint32_t BMDAudioOutputStreamType;
243 enum _BMDAudioOutputStreamType {
244 bmdAudioOutputStreamContinuous,
245 bmdAudioOutputStreamContinuousDontResample,
246 bmdAudioOutputStreamTimestamped
250 /* Enum BMDDisplayModeSupport - Output mode supported flags */
252 typedef uint32_t BMDDisplayModeSupport;
253 enum _BMDDisplayModeSupport {
254 bmdDisplayModeNotSupported = 0,
255 bmdDisplayModeSupported,
256 bmdDisplayModeSupportedWithConversion
260 /* Enum BMDTimecodeFormat - Timecode formats for frame metadata */
262 typedef uint32_t BMDTimecodeFormat;
263 enum _BMDTimecodeFormat {
264 bmdTimecodeRP188 = /* 'rp18' */ 0x72703138,
265 bmdTimecodeVITC = /* 'vitc' */ 0x76697463,
266 bmdTimecodeSerial = /* 'seri' */ 0x73657269
270 /* Enum BMDTimecodeFlags - Timecode flags */
272 typedef uint32_t BMDTimecodeFlags;
273 enum _BMDTimecodeFlags {
274 bmdTimecodeFlagDefault = 0,
275 bmdTimecodeIsDropFrame = 1 << 0
279 /* Enum BMDVideoConnection - Video connection types */
281 typedef uint32_t BMDVideoConnection;
282 enum _BMDVideoConnection {
283 bmdVideoConnectionSDI = 1 << 0,
284 bmdVideoConnectionHDMI = 1 << 1,
285 bmdVideoConnectionOpticalSDI = 1 << 2,
286 bmdVideoConnectionComponent = 1 << 3,
287 bmdVideoConnectionComposite = 1 << 4,
288 bmdVideoConnectionSVideo = 1 << 5
292 /* Enum BMDAnalogVideoFlags - Analog video display flags */
294 typedef uint32_t BMDAnalogVideoFlags;
295 enum _BMDAnalogVideoFlags {
296 bmdAnalogVideoFlagCompositeSetup75 = 1 << 0,
297 bmdAnalogVideoFlagComponentBetacamLevels = 1 << 1
301 /* Enum BMDAudioConnection - Audio connection types */
303 typedef uint32_t BMDAudioConnection;
304 enum _BMDAudioConnection {
305 bmdAudioConnectionEmbedded = /* 'embd' */ 0x656D6264,
306 bmdAudioConnectionAESEBU = /* 'aes ' */ 0x61657320,
307 bmdAudioConnectionAnalog = /* 'anlg' */ 0x616E6C67
311 /* Enum BMDAudioOutputAnalogAESSwitch - Audio output Analog/AESEBU switch */
313 typedef uint32_t BMDAudioOutputAnalogAESSwitch;
314 enum _BMDAudioOutputAnalogAESSwitch {
315 bmdAudioOutputSwitchAESEBU = /* 'aes ' */ 0x61657320,
316 bmdAudioOutputSwitchAnalog = /* 'anlg' */ 0x616E6C67
320 /* Enum BMDVideoOutputConversionMode - Video/audio conversion mode */
322 typedef uint32_t BMDVideoOutputConversionMode;
323 enum _BMDVideoOutputConversionMode {
324 bmdNoVideoOutputConversion = /* 'none' */ 0x6E6F6E65,
325 bmdVideoOutputLetterboxDownconversion = /* 'ltbx' */ 0x6C746278,
326 bmdVideoOutputAnamorphicDownconversion = /* 'amph' */ 0x616D7068,
327 bmdVideoOutputHD720toHD1080Conversion = /* '720c' */ 0x37323063,
328 bmdVideoOutputHardwareLetterboxDownconversion = /* 'HWlb' */ 0x48576C62,
329 bmdVideoOutputHardwareAnamorphicDownconversion = /* 'HWam' */ 0x4857616D,
330 bmdVideoOutputHardwareCenterCutDownconversion = /* 'HWcc' */ 0x48576363,
331 bmdVideoOutputHardware720p1080pCrossconversion = /* 'xcap' */ 0x78636170,
332 bmdVideoOutputHardwareAnamorphic720pUpconversion = /* 'ua7p' */ 0x75613770,
333 bmdVideoOutputHardwareAnamorphic1080iUpconversion = /* 'ua1i' */ 0x75613169,
334 bmdVideoOutputHardwareAnamorphic149To720pUpconversion = /* 'u47p' */ 0x75343770,
335 bmdVideoOutputHardwareAnamorphic149To1080iUpconversion = /* 'u41i' */ 0x75343169,
336 bmdVideoOutputHardwarePillarbox720pUpconversion = /* 'up7p' */ 0x75703770,
337 bmdVideoOutputHardwarePillarbox1080iUpconversion = /* 'up1i' */ 0x75703169
341 /* Enum BMDVideoInputConversionMode - Video input conversion mode */
343 typedef uint32_t BMDVideoInputConversionMode;
344 enum _BMDVideoInputConversionMode {
345 bmdNoVideoInputConversion = /* 'none' */ 0x6E6F6E65,
346 bmdVideoInputLetterboxDownconversionFromHD1080 = /* '10lb' */ 0x31306C62,
347 bmdVideoInputAnamorphicDownconversionFromHD1080 = /* '10am' */ 0x3130616D,
348 bmdVideoInputLetterboxDownconversionFromHD720 = /* '72lb' */ 0x37326C62,
349 bmdVideoInputAnamorphicDownconversionFromHD720 = /* '72am' */ 0x3732616D,
350 bmdVideoInputLetterboxUpconversion = /* 'lbup' */ 0x6C627570,
351 bmdVideoInputAnamorphicUpconversion = /* 'amup' */ 0x616D7570
355 /* Enum BMDVideo3DPackingFormat - Video 3D packing format */
357 typedef uint32_t BMDVideo3DPackingFormat;
358 enum _BMDVideo3DPackingFormat {
359 bmdVideo3DPackingSidebySideHalf = /* 'sbsh' */ 0x73627368,
360 bmdVideo3DPackingLinebyLine = /* 'lbyl' */ 0x6C62796C,
361 bmdVideo3DPackingTopAndBottom = /* 'tabo' */ 0x7461626F,
362 bmdVideo3DPackingLeftOnly = /* 'left' */ 0x6C656674,
363 bmdVideo3DPackingRightOnly = /* 'righ' */ 0x72696768
367 /* Enum BMDDeckLinkConfigurationID - DeckLink Configuration ID */
369 typedef uint32_t BMDDeckLinkConfigurationID;
370 enum _BMDDeckLinkConfigurationID {
372 /* Video Input/Output Flags */
374 bmdDeckLinkConfigUse1080pNotPsF = /* 'fpro' */ 0x6670726F,
376 /* Video Input/Output Integers */
378 bmdDeckLinkConfigHDMI3DPackingFormat = /* '3dpf' */ 0x33647066,
380 /* Audio Input/Output Flags */
382 bmdDeckLinkConfigAnalogAudioConsumerLevels = /* 'aacl' */ 0x6161636C,
384 /* Video output flags */
386 bmdDeckLinkConfigFieldFlickerRemoval = /* 'fdfr' */ 0x66646672,
387 bmdDeckLinkConfigHD1080p24ToHD1080i5994Conversion = /* 'to59' */ 0x746F3539,
388 bmdDeckLinkConfig444SDIVideoOutput = /* '444o' */ 0x3434346F,
389 bmdDeckLinkConfig3GBpsVideoOutput = /* '3gbs' */ 0x33676273,
390 bmdDeckLinkConfigBlackVideoOutputDuringCapture = /* 'bvoc' */ 0x62766F63,
391 bmdDeckLinkConfigLowLatencyVideoOutput = /* 'llvo' */ 0x6C6C766F,
393 /* Video Output Integers */
395 bmdDeckLinkConfigVideoOutputConnection = /* 'vocn' */ 0x766F636E,
396 bmdDeckLinkConfigVideoOutputConversionMode = /* 'vocm' */ 0x766F636D,
397 bmdDeckLinkConfigAnalogVideoOutputFlags = /* 'avof' */ 0x61766F66,
398 bmdDeckLinkConfigReferenceInputTimingOffset = /* 'glot' */ 0x676C6F74,
400 /* Video Input Integers */
402 bmdDeckLinkConfigVideoInputConnection = /* 'vicn' */ 0x7669636E,
403 bmdDeckLinkConfigAnalogVideoInputFlags = /* 'avif' */ 0x61766966,
404 bmdDeckLinkConfigVideoInputConversionMode = /* 'vicm' */ 0x7669636D,
405 bmdDeckLinkConfig32PulldownSequenceInitialTimecodeFrame = /* 'pdif' */ 0x70646966,
406 bmdDeckLinkConfigVANCSourceLine1Mapping = /* 'vsl1' */ 0x76736C31,
407 bmdDeckLinkConfigVANCSourceLine2Mapping = /* 'vsl2' */ 0x76736C32,
408 bmdDeckLinkConfigVANCSourceLine3Mapping = /* 'vsl3' */ 0x76736C33,
410 /* Audio Input Integers */
412 bmdDeckLinkConfigAudioInputConnection = /* 'aicn' */ 0x6169636E,
414 /* Audio Input Floats */
416 bmdDeckLinkConfigAnalogAudioInputScaleChannel1 = /* 'ais1' */ 0x61697331,
417 bmdDeckLinkConfigAnalogAudioInputScaleChannel2 = /* 'ais2' */ 0x61697332,
418 bmdDeckLinkConfigAnalogAudioInputScaleChannel3 = /* 'ais3' */ 0x61697333,
419 bmdDeckLinkConfigAnalogAudioInputScaleChannel4 = /* 'ais4' */ 0x61697334,
420 bmdDeckLinkConfigDigitalAudioInputScale = /* 'dais' */ 0x64616973,
422 /* Audio Output Integers */
424 bmdDeckLinkConfigAudioOutputAESAnalogSwitch = /* 'aoaa' */ 0x616F6161,
426 /* Audio Output Floats */
428 bmdDeckLinkConfigAnalogAudioOutputScaleChannel1 = /* 'aos1' */ 0x616F7331,
429 bmdDeckLinkConfigAnalogAudioOutputScaleChannel2 = /* 'aos2' */ 0x616F7332,
430 bmdDeckLinkConfigAnalogAudioOutputScaleChannel3 = /* 'aos3' */ 0x616F7333,
431 bmdDeckLinkConfigAnalogAudioOutputScaleChannel4 = /* 'aos4' */ 0x616F7334,
432 bmdDeckLinkConfigDigitalAudioOutputScale = /* 'daos' */ 0x64616F73
436 /* Enum BMDDeckLinkAttributeID - DeckLink Attribute ID */
438 typedef uint32_t BMDDeckLinkAttributeID;
439 enum _BMDDeckLinkAttributeID {
443 BMDDeckLinkSupportsInternalKeying = /* 'keyi' */ 0x6B657969,
444 BMDDeckLinkSupportsExternalKeying = /* 'keye' */ 0x6B657965,
445 BMDDeckLinkSupportsHDKeying = /* 'keyh' */ 0x6B657968,
446 BMDDeckLinkSupportsInputFormatDetection = /* 'infd' */ 0x696E6664,
447 BMDDeckLinkHasReferenceInput = /* 'hrin' */ 0x6872696E,
448 BMDDeckLinkHasSerialPort = /* 'hspt' */ 0x68737074,
452 BMDDeckLinkMaximumAudioChannels = /* 'mach' */ 0x6D616368,
453 BMDDeckLinkNumberOfSubDevices = /* 'nsbd' */ 0x6E736264,
454 BMDDeckLinkSubDeviceIndex = /* 'subi' */ 0x73756269,
455 BMDDeckLinkVideoOutputConnections = /* 'vocn' */ 0x766F636E,
456 BMDDeckLinkVideoInputConnections = /* 'vicn' */ 0x7669636E,
460 BMDDeckLinkSerialPortDeviceName = /* 'slpn' */ 0x736C706E
464 /* Enum BMDDeckLinkAPIInformationID - DeckLinkAPI information ID */
466 typedef uint32_t BMDDeckLinkAPIInformationID;
467 enum _BMDDeckLinkAPIInformationID {
468 BMDDeckLinkAPIVersion = /* 'vers' */ 0x76657273
472 /* Enum BMDDeckControlMode - DeckControl mode */
474 typedef uint32_t BMDDeckControlMode;
475 enum _BMDDeckControlMode {
476 bmdDeckControlNotOpened = /* 'ntop' */ 0x6E746F70,
477 bmdDeckControlVTRControlMode = /* 'vtrc' */ 0x76747263,
478 bmdDeckControlExportMode = /* 'expm' */ 0x6578706D,
479 bmdDeckControlCaptureMode = /* 'capm' */ 0x6361706D
483 /* Enum BMDDeckControlEvent - DeckControl event */
485 typedef uint32_t BMDDeckControlEvent;
486 enum _BMDDeckControlEvent {
487 bmdDeckControlAbortedEvent = /* 'abte' */ 0x61627465, // This event is triggered when a capture or edit-to-tape operation is aborted.
489 /* Export-To-Tape events */
491 bmdDeckControlPrepareForExportEvent = /* 'pfee' */ 0x70666565, // This event is triggered a few frames before reaching the in-point. IDeckLinkInput::StartScheduledPlayback() should be called at this point.
492 bmdDeckControlExportCompleteEvent = /* 'exce' */ 0x65786365, // This event is triggered a few frames after reaching the out-point. At this point, it is safe to stop playback.
496 bmdDeckControlPrepareForCaptureEvent = /* 'pfce' */ 0x70666365, // This event is triggered a few frames before reaching the in-point. The serial timecode attached to IDeckLinkVideoInputFrames is now valid.
497 bmdDeckControlCaptureCompleteEvent = /* 'ccev' */ 0x63636576 // This event is triggered a few frames after reaching the out-point.
501 /* Enum BMDDeckControlVTRControlState - VTR Control state */
503 typedef uint32_t BMDDeckControlVTRControlState;
504 enum _BMDDeckControlVTRControlState {
505 bmdDeckControlNotInVTRControlMode = /* 'nvcm' */ 0x6E76636D,
506 bmdDeckControlVTRControlPlaying = /* 'vtrp' */ 0x76747270,
507 bmdDeckControlVTRControlRecording = /* 'vtrr' */ 0x76747272,
508 bmdDeckControlVTRControlStill = /* 'vtra' */ 0x76747261,
509 bmdDeckControlVTRControlSeeking = /* 'vtrs' */ 0x76747273,
510 bmdDeckControlVTRControlStopped = /* 'vtro' */ 0x7674726F
514 /* Enum BMDDeckControlStatusFlags - Deck Control status flags */
516 typedef uint32_t BMDDeckControlStatusFlags;
517 enum _BMDDeckControlStatusFlags {
518 bmdDeckControlStatusDeckConnected = 1 << 0,
519 bmdDeckControlStatusRemoteMode = 1 << 1,
520 bmdDeckControlStatusRecordInhibited = 1 << 2,
521 bmdDeckControlStatusCassetteOut = 1 << 3
525 /* Enum BMDDeckControlExportModeOpsFlags - Export mode flags */
527 typedef uint32_t BMDDeckControlExportModeOpsFlags;
528 enum _BMDDeckControlExportModeOpsFlags {
529 bmdDeckControlExportModeInsertVideo = 1 << 0,
530 bmdDeckControlExportModeInsertAudio1 = 1 << 1,
531 bmdDeckControlExportModeInsertAudio2 = 1 << 2,
532 bmdDeckControlExportModeInsertAudio3 = 1 << 3,
533 bmdDeckControlExportModeInsertAudio4 = 1 << 4,
534 bmdDeckControlExportModeInsertAudio5 = 1 << 5,
535 bmdDeckControlExportModeInsertAudio6 = 1 << 6,
536 bmdDeckControlExportModeInsertAudio7 = 1 << 7,
537 bmdDeckControlExportModeInsertAudio8 = 1 << 8,
538 bmdDeckControlExportModeInsertAudio9 = 1 << 9,
539 bmdDeckControlExportModeInsertAudio10 = 1 << 10,
540 bmdDeckControlExportModeInsertAudio11 = 1 << 11,
541 bmdDeckControlExportModeInsertAudio12 = 1 << 12,
542 bmdDeckControlExportModeInsertTimeCode = 1 << 13,
543 bmdDeckControlExportModeInsertAssemble = 1 << 14,
544 bmdDeckControlExportModeInsertPreview = 1 << 15,
545 bmdDeckControlUseManualExport = 1 << 16
549 /* Enum BMDDeckControlError - Deck Control error */
551 typedef uint32_t BMDDeckControlError;
552 enum _BMDDeckControlError {
553 bmdDeckControlNoError = /* 'noer' */ 0x6E6F6572,
554 bmdDeckControlModeError = /* 'moer' */ 0x6D6F6572,
555 bmdDeckControlMissedInPointError = /* 'mier' */ 0x6D696572,
556 bmdDeckControlDeckTimeoutError = /* 'dter' */ 0x64746572,
557 bmdDeckControlCommandFailedError = /* 'cfer' */ 0x63666572,
558 bmdDeckControlDeviceAlreadyOpenedError = /* 'dalo' */ 0x64616C6F,
559 bmdDeckControlFailedToOpenDeviceError = /* 'fder' */ 0x66646572,
560 bmdDeckControlInLocalModeError = /* 'lmer' */ 0x6C6D6572,
561 bmdDeckControlEndOfTapeError = /* 'eter' */ 0x65746572,
562 bmdDeckControlUserAbortError = /* 'uaer' */ 0x75616572,
563 bmdDeckControlNoTapeInDeckError = /* 'nter' */ 0x6E746572,
564 bmdDeckControlNoVideoFromCardError = /* 'nvfc' */ 0x6E766663,
565 bmdDeckControlNoCommunicationError = /* 'ncom' */ 0x6E636F6D,
566 bmdDeckControlUnknownError = /* 'uner' */ 0x756E6572
570 /* Enum BMD3DPreviewFormat - Linked Frame preview format */
572 typedef uint32_t BMD3DPreviewFormat;
573 enum _BMD3DPreviewFormat {
574 bmd3DPreviewFormatDefault = /* 'defa' */ 0x64656661,
575 bmd3DPreviewFormatLeftOnly = /* 'left' */ 0x6C656674,
576 bmd3DPreviewFormatRightOnly = /* 'righ' */ 0x72696768,
577 bmd3DPreviewFormatSideBySide = /* 'side' */ 0x73696465,
578 bmd3DPreviewFormatTopBottom = /* 'topb' */ 0x746F7062
582 #if defined(__cplusplus)
584 // Forward Declarations
586 class IDeckLinkVideoOutputCallback;
587 class IDeckLinkInputCallback;
588 class IDeckLinkMemoryAllocator;
589 class IDeckLinkAudioOutputCallback;
590 class IDeckLinkIterator;
591 class IDeckLinkAPIInformation;
592 class IDeckLinkDisplayModeIterator;
593 class IDeckLinkDisplayMode;
595 class IDeckLinkOutput;
596 class IDeckLinkInput;
597 class IDeckLinkTimecode;
598 class IDeckLinkVideoFrame;
599 class IDeckLinkMutableVideoFrame;
600 class IDeckLinkVideoFrame3DExtensions;
601 class IDeckLinkVideoInputFrame;
602 class IDeckLinkVideoFrameAncillary;
603 class IDeckLinkAudioInputPacket;
604 class IDeckLinkScreenPreviewCallback;
605 class IDeckLinkGLScreenPreviewHelper;
606 class IDeckLinkConfiguration;
607 class IDeckLinkAttributes;
608 class IDeckLinkKeyer;
609 class IDeckLinkVideoConversion;
610 class IDeckLinkDeckControlStatusCallback;
611 class IDeckLinkDeckControl;
614 /* Interface IDeckLinkVideoOutputCallback - Frame completion callback. */
616 class IDeckLinkVideoOutputCallback : public IUnknown
619 virtual HRESULT ScheduledFrameCompleted (/* in */ IDeckLinkVideoFrame *completedFrame, /* in */ BMDOutputFrameCompletionResult result) = 0;
620 virtual HRESULT ScheduledPlaybackHasStopped (void) = 0;
623 virtual ~IDeckLinkVideoOutputCallback () {}; // call Release method to drop reference count
627 /* Interface IDeckLinkInputCallback - Frame arrival callback. */
629 class IDeckLinkInputCallback : public IUnknown
632 virtual HRESULT VideoInputFormatChanged (/* in */ BMDVideoInputFormatChangedEvents notificationEvents, /* in */ IDeckLinkDisplayMode *newDisplayMode, /* in */ BMDDetectedVideoInputFormatFlags detectedSignalFlags) = 0;
633 virtual HRESULT VideoInputFrameArrived (/* in */ IDeckLinkVideoInputFrame* videoFrame, /* in */ IDeckLinkAudioInputPacket* audioPacket) = 0;
636 virtual ~IDeckLinkInputCallback () {}; // call Release method to drop reference count
640 /* Interface IDeckLinkMemoryAllocator - Memory allocator for video frames. */
642 class IDeckLinkMemoryAllocator : public IUnknown
645 virtual HRESULT AllocateBuffer (/* in */ uint32_t bufferSize, /* out */ void **allocatedBuffer) = 0;
646 virtual HRESULT ReleaseBuffer (/* in */ void *buffer) = 0;
648 virtual HRESULT Commit (void) = 0;
649 virtual HRESULT Decommit (void) = 0;
653 /* Interface IDeckLinkAudioOutputCallback - Optional callback to allow audio samples to be pulled as required. */
655 class IDeckLinkAudioOutputCallback : public IUnknown
658 virtual HRESULT RenderAudioSamples (/* in */ bool preroll) = 0;
662 /* Interface IDeckLinkIterator - enumerates installed DeckLink hardware */
664 class IDeckLinkIterator : public IUnknown
667 virtual HRESULT Next (/* out */ IDeckLink **deckLinkInstance) = 0;
671 /* Interface IDeckLinkAPIInformation - DeckLinkAPI attribute interface */
673 class IDeckLinkAPIInformation : public IUnknown
676 virtual HRESULT GetFlag (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ bool *value) = 0;
677 virtual HRESULT GetInt (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ int64_t *value) = 0;
678 virtual HRESULT GetFloat (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ double *value) = 0;
679 virtual HRESULT GetString (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ const char **value) = 0;
682 virtual ~IDeckLinkAPIInformation () {}; // call Release method to drop reference count
686 /* Interface IDeckLinkDisplayModeIterator - enumerates over supported input/output display modes. */
688 class IDeckLinkDisplayModeIterator : public IUnknown
691 virtual HRESULT Next (/* out */ IDeckLinkDisplayMode **deckLinkDisplayMode) = 0;
694 virtual ~IDeckLinkDisplayModeIterator () {}; // call Release method to drop reference count
698 /* Interface IDeckLinkDisplayMode - represents a display mode */
700 class IDeckLinkDisplayMode : public IUnknown
703 virtual HRESULT GetName (/* out */ const char **name) = 0;
704 virtual BMDDisplayMode GetDisplayMode (void) = 0;
705 virtual long GetWidth (void) = 0;
706 virtual long GetHeight (void) = 0;
707 virtual HRESULT GetFrameRate (/* out */ BMDTimeValue *frameDuration, /* out */ BMDTimeScale *timeScale) = 0;
708 virtual BMDFieldDominance GetFieldDominance (void) = 0;
709 virtual BMDDisplayModeFlags GetFlags (void) = 0;
712 virtual ~IDeckLinkDisplayMode () {}; // call Release method to drop reference count
716 /* Interface IDeckLink - represents a DeckLink device */
718 class IDeckLink : public IUnknown
721 virtual HRESULT GetModelName (/* out */ const char **modelName) = 0;
725 /* Interface IDeckLinkOutput - Created by QueryInterface from IDeckLink. */
727 class IDeckLinkOutput : public IUnknown
730 virtual HRESULT DoesSupportVideoMode (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoOutputFlags flags, /* out */ BMDDisplayModeSupport *result, /* out */ IDeckLinkDisplayMode **resultDisplayMode) = 0;
731 virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator **iterator) = 0;
733 virtual HRESULT SetScreenPreviewCallback (/* in */ IDeckLinkScreenPreviewCallback *previewCallback) = 0;
737 virtual HRESULT EnableVideoOutput (/* in */ BMDDisplayMode displayMode, /* in */ BMDVideoOutputFlags flags) = 0;
738 virtual HRESULT DisableVideoOutput (void) = 0;
740 virtual HRESULT SetVideoOutputFrameMemoryAllocator (/* in */ IDeckLinkMemoryAllocator *theAllocator) = 0;
741 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;
742 virtual HRESULT CreateAncillaryData (/* in */ BMDPixelFormat pixelFormat, /* out */ IDeckLinkVideoFrameAncillary **outBuffer) = 0;
744 virtual HRESULT DisplayVideoFrameSync (/* in */ IDeckLinkVideoFrame *theFrame) = 0;
745 virtual HRESULT ScheduleVideoFrame (/* in */ IDeckLinkVideoFrame *theFrame, /* in */ BMDTimeValue displayTime, /* in */ BMDTimeValue displayDuration, /* in */ BMDTimeScale timeScale) = 0;
746 virtual HRESULT SetScheduledFrameCompletionCallback (/* in */ IDeckLinkVideoOutputCallback *theCallback) = 0;
747 virtual HRESULT GetBufferedVideoFrameCount (/* out */ uint32_t *bufferedFrameCount) = 0;
751 virtual HRESULT EnableAudioOutput (/* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount, /* in */ BMDAudioOutputStreamType streamType) = 0;
752 virtual HRESULT DisableAudioOutput (void) = 0;
754 virtual HRESULT WriteAudioSamplesSync (/* in */ void *buffer, /* in */ uint32_t sampleFrameCount, /* out */ uint32_t *sampleFramesWritten) = 0;
756 virtual HRESULT BeginAudioPreroll (void) = 0;
757 virtual HRESULT EndAudioPreroll (void) = 0;
758 virtual HRESULT ScheduleAudioSamples (/* in */ void *buffer, /* in */ uint32_t sampleFrameCount, /* in */ BMDTimeValue streamTime, /* in */ BMDTimeScale timeScale, /* out */ uint32_t *sampleFramesWritten) = 0;
760 virtual HRESULT GetBufferedAudioSampleFrameCount (/* out */ uint32_t *bufferedSampleFrameCount) = 0;
761 virtual HRESULT FlushBufferedAudioSamples (void) = 0;
763 virtual HRESULT SetAudioCallback (/* in */ IDeckLinkAudioOutputCallback *theCallback) = 0;
767 virtual HRESULT StartScheduledPlayback (/* in */ BMDTimeValue playbackStartTime, /* in */ BMDTimeScale timeScale, /* in */ double playbackSpeed) = 0;
768 virtual HRESULT StopScheduledPlayback (/* in */ BMDTimeValue stopPlaybackAtTime, /* out */ BMDTimeValue *actualStopTime, /* in */ BMDTimeScale timeScale) = 0;
769 virtual HRESULT IsScheduledPlaybackRunning (/* out */ bool *active) = 0;
770 virtual HRESULT GetScheduledStreamTime (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *streamTime, /* out */ double *playbackSpeed) = 0;
771 virtual HRESULT GetReferenceStatus (/* out */ BMDReferenceStatus *referenceStatus) = 0;
773 /* Hardware Timing */
775 virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *hardwareTime, /* out */ BMDTimeValue *timeInFrame, /* out */ BMDTimeValue *ticksPerFrame) = 0;
778 virtual ~IDeckLinkOutput () {}; // call Release method to drop reference count
782 /* Interface IDeckLinkInput - Created by QueryInterface from IDeckLink. */
784 class IDeckLinkInput : public IUnknown
787 virtual HRESULT DoesSupportVideoMode (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags, /* out */ BMDDisplayModeSupport *result, /* out */ IDeckLinkDisplayMode **resultDisplayMode) = 0;
788 virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator **iterator) = 0;
790 virtual HRESULT SetScreenPreviewCallback (/* in */ IDeckLinkScreenPreviewCallback *previewCallback) = 0;
794 virtual HRESULT EnableVideoInput (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags) = 0;
795 virtual HRESULT DisableVideoInput (void) = 0;
796 virtual HRESULT GetAvailableVideoFrameCount (/* out */ uint32_t *availableFrameCount) = 0;
800 virtual HRESULT EnableAudioInput (/* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount) = 0;
801 virtual HRESULT DisableAudioInput (void) = 0;
802 virtual HRESULT GetAvailableAudioSampleFrameCount (/* out */ uint32_t *availableSampleFrameCount) = 0;
806 virtual HRESULT StartStreams (void) = 0;
807 virtual HRESULT StopStreams (void) = 0;
808 virtual HRESULT PauseStreams (void) = 0;
809 virtual HRESULT FlushStreams (void) = 0;
810 virtual HRESULT SetCallback (/* in */ IDeckLinkInputCallback *theCallback) = 0;
812 /* Hardware Timing */
814 virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *hardwareTime, /* out */ BMDTimeValue *timeInFrame, /* out */ BMDTimeValue *ticksPerFrame) = 0;
817 virtual ~IDeckLinkInput () {}; // call Release method to drop reference count
821 /* Interface IDeckLinkTimecode - Used for video frame timecode representation. */
823 class IDeckLinkTimecode : public IUnknown
826 virtual BMDTimecodeBCD GetBCD (void) = 0;
827 virtual HRESULT GetComponents (/* out */ uint8_t *hours, /* out */ uint8_t *minutes, /* out */ uint8_t *seconds, /* out */ uint8_t *frames) = 0;
828 virtual HRESULT GetString (/* out */ const char **timecode) = 0;
829 virtual BMDTimecodeFlags GetFlags (void) = 0;
830 virtual HRESULT GetTimecodeUserBits (/* out */ BMDTimecodeUserBits *userBits) = 0;
833 virtual ~IDeckLinkTimecode () {}; // call Release method to drop reference count
837 /* Interface IDeckLinkVideoFrame - Interface to encapsulate a video frame; can be caller-implemented. */
839 class IDeckLinkVideoFrame : public IUnknown
842 virtual long GetWidth (void) = 0;
843 virtual long GetHeight (void) = 0;
844 virtual long GetRowBytes (void) = 0;
845 virtual BMDPixelFormat GetPixelFormat (void) = 0;
846 virtual BMDFrameFlags GetFlags (void) = 0;
847 virtual HRESULT GetBytes (/* out */ void **buffer) = 0;
849 virtual HRESULT GetTimecode (/* in */ BMDTimecodeFormat format, /* out */ IDeckLinkTimecode **timecode) = 0;
850 virtual HRESULT GetAncillaryData (/* out */ IDeckLinkVideoFrameAncillary **ancillary) = 0;
853 virtual ~IDeckLinkVideoFrame () {}; // call Release method to drop reference count
857 /* Interface IDeckLinkMutableVideoFrame - Created by IDeckLinkOutput::CreateVideoFrame. */
859 class IDeckLinkMutableVideoFrame : public IDeckLinkVideoFrame
862 virtual HRESULT SetFlags (/* in */ BMDFrameFlags newFlags) = 0;
864 virtual HRESULT SetTimecode (/* in */ BMDTimecodeFormat format, /* in */ IDeckLinkTimecode *timecode) = 0;
865 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;
866 virtual HRESULT SetAncillaryData (/* in */ IDeckLinkVideoFrameAncillary *ancillary) = 0;
867 virtual HRESULT SetTimecodeUserBits (/* in */ BMDTimecodeFormat format, /* in */ BMDTimecodeUserBits userBits) = 0;
870 virtual ~IDeckLinkMutableVideoFrame () {}; // call Release method to drop reference count
874 /* Interface IDeckLinkVideoFrame3DExtensions - Optional interface implemented on IDeckLinkVideoFrame to support 3D frames */
876 class IDeckLinkVideoFrame3DExtensions : public IUnknown
879 virtual BMDVideo3DPackingFormat Get3DPackingFormat (void) = 0;
880 virtual HRESULT GetFrameForRightEye (/* in */ IDeckLinkVideoFrame* *rightEyeFrame) = 0;
883 virtual ~IDeckLinkVideoFrame3DExtensions () {}; // call Release method to drop reference count
887 /* Interface IDeckLinkVideoInputFrame - Provided by the IDeckLinkVideoInput frame arrival callback. */
889 class IDeckLinkVideoInputFrame : public IDeckLinkVideoFrame
892 virtual HRESULT GetStreamTime (/* out */ BMDTimeValue *frameTime, /* out */ BMDTimeValue *frameDuration, /* in */ BMDTimeScale timeScale) = 0;
893 virtual HRESULT GetHardwareReferenceTimestamp (/* in */ BMDTimeScale timeScale, /* out */ BMDTimeValue *frameTime, /* out */ BMDTimeValue *frameDuration) = 0;
896 virtual ~IDeckLinkVideoInputFrame () {}; // call Release method to drop reference count
900 /* Interface IDeckLinkVideoFrameAncillary - Obtained through QueryInterface() on an IDeckLinkVideoFrame object. */
902 class IDeckLinkVideoFrameAncillary : public IUnknown
906 virtual HRESULT GetBufferForVerticalBlankingLine (/* in */ uint32_t lineNumber, /* out */ void **buffer) = 0;
907 virtual BMDPixelFormat GetPixelFormat (void) = 0;
908 virtual BMDDisplayMode GetDisplayMode (void) = 0;
911 virtual ~IDeckLinkVideoFrameAncillary () {}; // call Release method to drop reference count
915 /* Interface IDeckLinkAudioInputPacket - Provided by the IDeckLinkInput callback. */
917 class IDeckLinkAudioInputPacket : public IUnknown
920 virtual long GetSampleFrameCount (void) = 0;
921 virtual HRESULT GetBytes (/* out */ void **buffer) = 0;
922 virtual HRESULT GetPacketTime (/* out */ BMDTimeValue *packetTime, /* in */ BMDTimeScale timeScale) = 0;
925 virtual ~IDeckLinkAudioInputPacket () {}; // call Release method to drop reference count
929 /* Interface IDeckLinkScreenPreviewCallback - Screen preview callback */
931 class IDeckLinkScreenPreviewCallback : public IUnknown
934 virtual HRESULT DrawFrame (/* in */ IDeckLinkVideoFrame *theFrame) = 0;
937 virtual ~IDeckLinkScreenPreviewCallback () {}; // call Release method to drop reference count
941 /* Interface IDeckLinkGLScreenPreviewHelper - Created with CoCreateInstance(). */
943 class IDeckLinkGLScreenPreviewHelper : public IUnknown
947 /* Methods must be called with OpenGL context set */
949 virtual HRESULT InitializeGL (void) = 0;
950 virtual HRESULT PaintGL (void) = 0;
951 virtual HRESULT SetFrame (/* in */ IDeckLinkVideoFrame *theFrame) = 0;
952 virtual HRESULT Set3DPreviewFormat (/* in */ BMD3DPreviewFormat previewFormat) = 0;
955 virtual ~IDeckLinkGLScreenPreviewHelper () {}; // call Release method to drop reference count
959 /* Interface IDeckLinkConfiguration - DeckLink Configuration interface */
961 class IDeckLinkConfiguration : public IUnknown
964 virtual HRESULT SetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ bool value) = 0;
965 virtual HRESULT GetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ bool *value) = 0;
966 virtual HRESULT SetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ int64_t value) = 0;
967 virtual HRESULT GetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ int64_t *value) = 0;
968 virtual HRESULT SetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ double value) = 0;
969 virtual HRESULT GetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ double *value) = 0;
970 virtual HRESULT SetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ const char *value) = 0;
971 virtual HRESULT GetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ const char **value) = 0;
972 virtual HRESULT WriteConfigurationToPreferences (void) = 0;
975 virtual ~IDeckLinkConfiguration () {}; // call Release method to drop reference count
979 /* Interface IDeckLinkAttributes - DeckLink Attribute interface */
981 class IDeckLinkAttributes : public IUnknown
984 virtual HRESULT GetFlag (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ bool *value) = 0;
985 virtual HRESULT GetInt (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ int64_t *value) = 0;
986 virtual HRESULT GetFloat (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ double *value) = 0;
987 virtual HRESULT GetString (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ const char **value) = 0;
990 virtual ~IDeckLinkAttributes () {}; // call Release method to drop reference count
994 /* Interface IDeckLinkKeyer - DeckLink Keyer interface */
996 class IDeckLinkKeyer : public IUnknown
999 virtual HRESULT Enable (/* in */ bool isExternal) = 0;
1000 virtual HRESULT SetLevel (/* in */ uint8_t level) = 0;
1001 virtual HRESULT RampUp (/* in */ uint32_t numberOfFrames) = 0;
1002 virtual HRESULT RampDown (/* in */ uint32_t numberOfFrames) = 0;
1003 virtual HRESULT Disable (void) = 0;
1006 virtual ~IDeckLinkKeyer () {}; // call Release method to drop reference count
1010 /* Interface IDeckLinkVideoConversion - Created with CoCreateInstance(). */
1012 class IDeckLinkVideoConversion : public IUnknown
1015 virtual HRESULT ConvertFrame (/* in */ IDeckLinkVideoFrame* srcFrame, /* in */ IDeckLinkVideoFrame* dstFrame) = 0;
1018 virtual ~IDeckLinkVideoConversion () {}; // call Release method to drop reference count
1022 /* Interface IDeckLinkDeckControlStatusCallback - Deck control state change callback. */
1024 class IDeckLinkDeckControlStatusCallback : public IUnknown
1027 virtual HRESULT TimecodeUpdate (/* in */ BMDTimecodeBCD currentTimecode) = 0;
1028 virtual HRESULT VTRControlStateChanged (/* in */ BMDDeckControlVTRControlState newState, /* in */ BMDDeckControlError error) = 0;
1029 virtual HRESULT DeckControlEventReceived (/* in */ BMDDeckControlEvent event, /* in */ BMDDeckControlError error) = 0;
1030 virtual HRESULT DeckControlStatusChanged (/* in */ BMDDeckControlStatusFlags flags, /* in */ uint32_t mask) = 0;
1033 virtual ~IDeckLinkDeckControlStatusCallback () {}; // call Release method to drop reference count
1037 /* Interface IDeckLinkDeckControl - Deck Control main interface */
1039 class IDeckLinkDeckControl : public IUnknown
1042 virtual HRESULT Open (/* in */ BMDTimeScale timeScale, /* in */ BMDTimeValue timeValue, /* in */ bool timecodeIsDropFrame, /* out */ BMDDeckControlError *error) = 0;
1043 virtual HRESULT Close (/* in */ bool standbyOn) = 0;
1044 virtual HRESULT GetCurrentState (/* out */ BMDDeckControlMode *mode, /* out */ BMDDeckControlVTRControlState *vtrControlState, /* out */ BMDDeckControlStatusFlags *flags) = 0;
1045 virtual HRESULT SetStandby (/* in */ bool standbyOn) = 0;
1046 virtual HRESULT Play (/* out */ BMDDeckControlError *error) = 0;
1047 virtual HRESULT Stop (/* out */ BMDDeckControlError *error) = 0;
1048 virtual HRESULT TogglePlayStop (/* out */ BMDDeckControlError *error) = 0;
1049 virtual HRESULT Eject (/* out */ BMDDeckControlError *error) = 0;
1050 virtual HRESULT GoToTimecode (/* in */ BMDTimecodeBCD timecode, /* out */ BMDDeckControlError *error) = 0;
1051 virtual HRESULT FastForward (/* in */ bool viewTape, /* out */ BMDDeckControlError *error) = 0;
1052 virtual HRESULT Rewind (/* in */ bool viewTape, /* out */ BMDDeckControlError *error) = 0;
1053 virtual HRESULT StepForward (/* out */ BMDDeckControlError *error) = 0;
1054 virtual HRESULT StepBack (/* out */ BMDDeckControlError *error) = 0;
1055 virtual HRESULT Jog (/* in */ double rate, /* out */ BMDDeckControlError *error) = 0;
1056 virtual HRESULT Shuttle (/* in */ double rate, /* out */ BMDDeckControlError *error) = 0;
1057 virtual HRESULT GetTimecodeString (/* out */ const char **currentTimeCode, /* out */ BMDDeckControlError *error) = 0;
1058 virtual HRESULT GetTimecode (/* out */ IDeckLinkTimecode **currentTimecode, /* out */ BMDDeckControlError *error) = 0;
1059 virtual HRESULT GetTimecodeBCD (/* out */ BMDTimecodeBCD *currentTimecode, /* out */ BMDDeckControlError *error) = 0;
1060 virtual HRESULT SetPreroll (/* in */ uint32_t prerollSeconds) = 0;
1061 virtual HRESULT GetPreroll (/* out */ uint32_t *prerollSeconds) = 0;
1062 virtual HRESULT SetExportOffset (/* in */ int32_t exportOffsetFields) = 0;
1063 virtual HRESULT GetExportOffset (/* out */ int32_t *exportOffsetFields) = 0;
1064 virtual HRESULT GetManualExportOffset (/* out */ int32_t *deckManualExportOffsetFields) = 0;
1065 virtual HRESULT SetCaptureOffset (/* in */ int32_t captureOffsetFields) = 0;
1066 virtual HRESULT GetCaptureOffset (/* out */ int32_t *captureOffsetFields) = 0;
1067 virtual HRESULT StartExport (/* in */ BMDTimecodeBCD inTimecode, /* in */ BMDTimecodeBCD outTimecode, /* in */ BMDDeckControlExportModeOpsFlags exportModeOps, /* out */ BMDDeckControlError *error) = 0;
1068 virtual HRESULT StartCapture (/* in */ bool useVITC, /* in */ BMDTimecodeBCD inTimecode, /* in */ BMDTimecodeBCD outTimecode, /* out */ BMDDeckControlError *error) = 0;
1069 virtual HRESULT GetDeviceID (/* out */ uint16_t *deviceId, /* out */ BMDDeckControlError *error) = 0;
1070 virtual HRESULT Abort (void) = 0;
1071 virtual HRESULT CrashRecordStart (/* out */ BMDDeckControlError *error) = 0;
1072 virtual HRESULT CrashRecordStop (/* out */ BMDDeckControlError *error) = 0;
1073 virtual HRESULT SetCallback (/* in */ IDeckLinkDeckControlStatusCallback *callback) = 0;
1076 virtual ~IDeckLinkDeckControl () {}; // call Release method to drop reference count
1084 IDeckLinkIterator* CreateDeckLinkIteratorInstance (void);
1085 IDeckLinkGLScreenPreviewHelper* CreateOpenGLScreenPreviewHelper (void);
1086 IDeckLinkVideoConversion* CreateVideoConversionInstance (void);
1091 #endif // defined(__cplusplus)
1092 #endif // __DeckLink_API_h__