1 /* -LICENSE-START-
2 ** Copyright (c) 2020 Blackmagic Design
3 **
4 ** Permission is hereby granted, free of charge, to any person or organization
5 ** obtaining a copy of the software and accompanying documentation covered by
6 ** this license (the "Software") to use, reproduce, display, distribute,
7 ** execute, and transmit the Software, and to prepare derivative works of the
8 ** Software, and to permit third-parties to whom the Software is furnished to
9 ** do so, all subject to the following:
10 **
11 ** The copyright notices in the Software and this entire statement, including
12 ** the above license grant, this restriction and the following disclaimer,
13 ** must be included in all copies of the Software, in whole or in part, and
14 ** all derivative works of the Software, unless such copies or derivative
15 ** works are solely in the form of machine-executable object code generated by
16 ** a source language processor.
17 **
18 ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
21 ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
22 ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
23 ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 ** DEALINGS IN THE SOFTWARE.
25 ** -LICENSE-END-
26 */
27 
28 #ifndef BMD_DECKLINKAPI_H
29 #define BMD_DECKLINKAPI_H
30 
31 
32 #ifndef BMD_CONST
33     #if defined(_MSC_VER)
34         #define BMD_CONST __declspec(selectany) static const
35     #else
36         #define BMD_CONST static const
37     #endif
38 #endif
39 
40 #ifndef BMD_PUBLIC
41 	#define BMD_PUBLIC
42 #endif
43 
44 /* DeckLink API */
45 
46 #include <CoreFoundation/CoreFoundation.h>
47 #include <CoreFoundation/CFPlugInCOM.h>
48 #include <stdint.h>
49 
50 #include "DeckLinkAPITypes.h"
51 #include "DeckLinkAPIModes.h"
52 #include "DeckLinkAPIDiscovery.h"
53 #include "DeckLinkAPIConfiguration.h"
54 #include "DeckLinkAPIDeckControl.h"
55 
56 #include "DeckLinkAPIStreaming.h"
57 
58 #define BLACKMAGIC_DECKLINK_API_MAGIC	1
59 
60 // Type Declarations
61 
62 
63 // Interface ID Declarations
64 
65 BMD_CONST REFIID IID_IDeckLinkVideoOutputCallback                 = /* 20AA5225-1958-47CB-820B-80A8D521A6EE */ { 0x20,0xAA,0x52,0x25,0x19,0x58,0x47,0xCB,0x82,0x0B,0x80,0xA8,0xD5,0x21,0xA6,0xEE };
66 BMD_CONST REFIID IID_IDeckLinkInputCallback                       = /* C6FCE4C9-C4E4-4047-82FB-5D238232A902 */ { 0xC6,0xFC,0xE4,0xC9,0xC4,0xE4,0x40,0x47,0x82,0xFB,0x5D,0x23,0x82,0x32,0xA9,0x02 };
67 BMD_CONST REFIID IID_IDeckLinkEncoderInputCallback                = /* ACF13E61-F4A0-4974-A6A7-59AFF6268B31 */ { 0xAC,0xF1,0x3E,0x61,0xF4,0xA0,0x49,0x74,0xA6,0xA7,0x59,0xAF,0xF6,0x26,0x8B,0x31 };
68 BMD_CONST REFIID IID_IDeckLinkMemoryAllocator                     = /* B36EB6E7-9D29-4AA8-92EF-843B87A289E8 */ { 0xB3,0x6E,0xB6,0xE7,0x9D,0x29,0x4A,0xA8,0x92,0xEF,0x84,0x3B,0x87,0xA2,0x89,0xE8 };
69 BMD_CONST REFIID IID_IDeckLinkAudioOutputCallback                 = /* 403C681B-7F46-4A12-B993-2BB127084EE6 */ { 0x40,0x3C,0x68,0x1B,0x7F,0x46,0x4A,0x12,0xB9,0x93,0x2B,0xB1,0x27,0x08,0x4E,0xE6 };
70 BMD_CONST REFIID IID_IDeckLinkIterator                            = /* 50FB36CD-3063-4B73-BDBB-958087F2D8BA */ { 0x50,0xFB,0x36,0xCD,0x30,0x63,0x4B,0x73,0xBD,0xBB,0x95,0x80,0x87,0xF2,0xD8,0xBA };
71 BMD_CONST REFIID IID_IDeckLinkAPIInformation                      = /* 7BEA3C68-730D-4322-AF34-8A7152B532A4 */ { 0x7B,0xEA,0x3C,0x68,0x73,0x0D,0x43,0x22,0xAF,0x34,0x8A,0x71,0x52,0xB5,0x32,0xA4 };
72 BMD_CONST REFIID IID_IDeckLinkOutput                              = /* BE2D9020-461E-442F-84B7-E949CB953B9D */ { 0xBE,0x2D,0x90,0x20,0x46,0x1E,0x44,0x2F,0x84,0xB7,0xE9,0x49,0xCB,0x95,0x3B,0x9D };
73 BMD_CONST REFIID IID_IDeckLinkInput                               = /* C21CDB6E-F414-46E4-A636-80A566E0ED37 */ { 0xC2,0x1C,0xDB,0x6E,0xF4,0x14,0x46,0xE4,0xA6,0x36,0x80,0xA5,0x66,0xE0,0xED,0x37 };
74 BMD_CONST REFIID IID_IDeckLinkHDMIInputEDID                       = /* ABBBACBC-45BC-4665-9D92-ACE6E5A97902 */ { 0xAB,0xBB,0xAC,0xBC,0x45,0xBC,0x46,0x65,0x9D,0x92,0xAC,0xE6,0xE5,0xA9,0x79,0x02 };
75 BMD_CONST REFIID IID_IDeckLinkEncoderInput                        = /* F222551D-13DF-4FD8-B587-9D4F19EC12C9 */ { 0xF2,0x22,0x55,0x1D,0x13,0xDF,0x4F,0xD8,0xB5,0x87,0x9D,0x4F,0x19,0xEC,0x12,0xC9 };
76 BMD_CONST REFIID IID_IDeckLinkVideoFrame                          = /* 3F716FE0-F023-4111-BE5D-EF4414C05B17 */ { 0x3F,0x71,0x6F,0xE0,0xF0,0x23,0x41,0x11,0xBE,0x5D,0xEF,0x44,0x14,0xC0,0x5B,0x17 };
77 BMD_CONST REFIID IID_IDeckLinkMutableVideoFrame                   = /* 69E2639F-40DA-4E19-B6F2-20ACE815C390 */ { 0x69,0xE2,0x63,0x9F,0x40,0xDA,0x4E,0x19,0xB6,0xF2,0x20,0xAC,0xE8,0x15,0xC3,0x90 };
78 BMD_CONST REFIID IID_IDeckLinkVideoFrame3DExtensions              = /* DA0F7E4A-EDC7-48A8-9CDD-2DB51C729CD7 */ { 0xDA,0x0F,0x7E,0x4A,0xED,0xC7,0x48,0xA8,0x9C,0xDD,0x2D,0xB5,0x1C,0x72,0x9C,0xD7 };
79 BMD_CONST REFIID IID_IDeckLinkVideoFrameMetadataExtensions        = /* E232A5B7-4DB4-44C9-9152-F47C12E5F051 */ { 0xE2,0x32,0xA5,0xB7,0x4D,0xB4,0x44,0xC9,0x91,0x52,0xF4,0x7C,0x12,0xE5,0xF0,0x51 };
80 BMD_CONST REFIID IID_IDeckLinkVideoInputFrame                     = /* 05CFE374-537C-4094-9A57-680525118F44 */ { 0x05,0xCF,0xE3,0x74,0x53,0x7C,0x40,0x94,0x9A,0x57,0x68,0x05,0x25,0x11,0x8F,0x44 };
81 BMD_CONST REFIID IID_IDeckLinkAncillaryPacket                     = /* CC5BBF7E-029C-4D3B-9158-6000EF5E3670 */ { 0xCC,0x5B,0xBF,0x7E,0x02,0x9C,0x4D,0x3B,0x91,0x58,0x60,0x00,0xEF,0x5E,0x36,0x70 };
82 BMD_CONST REFIID IID_IDeckLinkAncillaryPacketIterator             = /* 3FC8994B-88FB-4C17-968F-9AAB69D964A7 */ { 0x3F,0xC8,0x99,0x4B,0x88,0xFB,0x4C,0x17,0x96,0x8F,0x9A,0xAB,0x69,0xD9,0x64,0xA7 };
83 BMD_CONST REFIID IID_IDeckLinkVideoFrameAncillaryPackets          = /* 6C186C0F-459E-41D8-AEE2-4812D81AEE68 */ { 0x6C,0x18,0x6C,0x0F,0x45,0x9E,0x41,0xD8,0xAE,0xE2,0x48,0x12,0xD8,0x1A,0xEE,0x68 };
84 BMD_CONST REFIID IID_IDeckLinkVideoFrameAncillary                 = /* 732E723C-D1A4-4E29-9E8E-4A88797A0004 */ { 0x73,0x2E,0x72,0x3C,0xD1,0xA4,0x4E,0x29,0x9E,0x8E,0x4A,0x88,0x79,0x7A,0x00,0x04 };
85 BMD_CONST REFIID IID_IDeckLinkEncoderPacket                       = /* B693F36C-316E-4AF1-B6C2-F389A4BCA620 */ { 0xB6,0x93,0xF3,0x6C,0x31,0x6E,0x4A,0xF1,0xB6,0xC2,0xF3,0x89,0xA4,0xBC,0xA6,0x20 };
86 BMD_CONST REFIID IID_IDeckLinkEncoderVideoPacket                  = /* 4E7FD944-E8C7-4EAC-B8C0-7B77F80F5AE0 */ { 0x4E,0x7F,0xD9,0x44,0xE8,0xC7,0x4E,0xAC,0xB8,0xC0,0x7B,0x77,0xF8,0x0F,0x5A,0xE0 };
87 BMD_CONST REFIID IID_IDeckLinkEncoderAudioPacket                  = /* 49E8EDC8-693B-4E14-8EF6-12C658F5A07A */ { 0x49,0xE8,0xED,0xC8,0x69,0x3B,0x4E,0x14,0x8E,0xF6,0x12,0xC6,0x58,0xF5,0xA0,0x7A };
88 BMD_CONST REFIID IID_IDeckLinkH265NALPacket                       = /* 639C8E0B-68D5-4BDE-A6D4-95F3AEAFF2E7 */ { 0x63,0x9C,0x8E,0x0B,0x68,0xD5,0x4B,0xDE,0xA6,0xD4,0x95,0xF3,0xAE,0xAF,0xF2,0xE7 };
89 BMD_CONST REFIID IID_IDeckLinkAudioInputPacket                    = /* E43D5870-2894-11DE-8C30-0800200C9A66 */ { 0xE4,0x3D,0x58,0x70,0x28,0x94,0x11,0xDE,0x8C,0x30,0x08,0x00,0x20,0x0C,0x9A,0x66 };
90 BMD_CONST REFIID IID_IDeckLinkScreenPreviewCallback               = /* B1D3F49A-85FE-4C5D-95C8-0B5D5DCCD438 */ { 0xB1,0xD3,0xF4,0x9A,0x85,0xFE,0x4C,0x5D,0x95,0xC8,0x0B,0x5D,0x5D,0xCC,0xD4,0x38 };
91 BMD_CONST REFIID IID_IDeckLinkCocoaScreenPreviewCallback          = /* D174152F-8F96-4C07-83A5-DD5F5AF0A2AA */ { 0xD1,0x74,0x15,0x2F,0x8F,0x96,0x4C,0x07,0x83,0xA5,0xDD,0x5F,0x5A,0xF0,0xA2,0xAA };
92 BMD_CONST REFIID IID_IDeckLinkGLScreenPreviewHelper               = /* 504E2209-CAC7-4C1A-9FB4-C5BB6274D22F */ { 0x50,0x4E,0x22,0x09,0xCA,0xC7,0x4C,0x1A,0x9F,0xB4,0xC5,0xBB,0x62,0x74,0xD2,0x2F };
93 BMD_CONST REFIID IID_IDeckLinkNotificationCallback                = /* B002A1EC-070D-4288-8289-BD5D36E5FF0D */ { 0xB0,0x02,0xA1,0xEC,0x07,0x0D,0x42,0x88,0x82,0x89,0xBD,0x5D,0x36,0xE5,0xFF,0x0D };
94 BMD_CONST REFIID IID_IDeckLinkNotification                        = /* B85DF4C8-BDF5-47C1-8064-28162EBDD4EB */ { 0xB8,0x5D,0xF4,0xC8,0xBD,0xF5,0x47,0xC1,0x80,0x64,0x28,0x16,0x2E,0xBD,0xD4,0xEB };
95 BMD_CONST REFIID IID_IDeckLinkProfileAttributes                   = /* 17D4BF8E-4911-473A-80A0-731CF6FF345B */ { 0x17,0xD4,0xBF,0x8E,0x49,0x11,0x47,0x3A,0x80,0xA0,0x73,0x1C,0xF6,0xFF,0x34,0x5B };
96 BMD_CONST REFIID IID_IDeckLinkProfileIterator                     = /* 29E5A8C0-8BE4-46EB-93AC-31DAAB5B7BF2 */ { 0x29,0xE5,0xA8,0xC0,0x8B,0xE4,0x46,0xEB,0x93,0xAC,0x31,0xDA,0xAB,0x5B,0x7B,0xF2 };
97 BMD_CONST REFIID IID_IDeckLinkProfile                             = /* 16093466-674A-432B-9DA0-1AC2C5A8241C */ { 0x16,0x09,0x34,0x66,0x67,0x4A,0x43,0x2B,0x9D,0xA0,0x1A,0xC2,0xC5,0xA8,0x24,0x1C };
98 BMD_CONST REFIID IID_IDeckLinkProfileCallback                     = /* A4F9341E-97AA-4E04-8935-15F809898CEA */ { 0xA4,0xF9,0x34,0x1E,0x97,0xAA,0x4E,0x04,0x89,0x35,0x15,0xF8,0x09,0x89,0x8C,0xEA };
99 BMD_CONST REFIID IID_IDeckLinkProfileManager                      = /* 30D41429-3998-4B6D-84F8-78C94A797C6E */ { 0x30,0xD4,0x14,0x29,0x39,0x98,0x4B,0x6D,0x84,0xF8,0x78,0xC9,0x4A,0x79,0x7C,0x6E };
100 BMD_CONST REFIID IID_IDeckLinkStatus                              = /* 5F558200-4028-49BC-BEAC-DB3FA4A96E46 */ { 0x5F,0x55,0x82,0x00,0x40,0x28,0x49,0xBC,0xBE,0xAC,0xDB,0x3F,0xA4,0xA9,0x6E,0x46 };
101 BMD_CONST REFIID IID_IDeckLinkKeyer                               = /* 89AFCAF5-65F8-421E-98F7-96FE5F5BFBA3 */ { 0x89,0xAF,0xCA,0xF5,0x65,0xF8,0x42,0x1E,0x98,0xF7,0x96,0xFE,0x5F,0x5B,0xFB,0xA3 };
102 BMD_CONST REFIID IID_IDeckLinkVideoConversion                     = /* 3BBCB8A2-DA2C-42D9-B5D8-88083644E99A */ { 0x3B,0xBC,0xB8,0xA2,0xDA,0x2C,0x42,0xD9,0xB5,0xD8,0x88,0x08,0x36,0x44,0xE9,0x9A };
103 BMD_CONST REFIID IID_IDeckLinkDeviceNotificationCallback          = /* 4997053B-0ADF-4CC8-AC70-7A50C4BE728F */ { 0x49,0x97,0x05,0x3B,0x0A,0xDF,0x4C,0xC8,0xAC,0x70,0x7A,0x50,0xC4,0xBE,0x72,0x8F };
104 BMD_CONST REFIID IID_IDeckLinkDiscovery                           = /* CDBF631C-BC76-45FA-B44D-C55059BC6101 */ { 0xCD,0xBF,0x63,0x1C,0xBC,0x76,0x45,0xFA,0xB4,0x4D,0xC5,0x50,0x59,0xBC,0x61,0x01 };
105 
106 /* Enum BMDVideoOutputFlags - Flags to control the output of ancillary data along with video. */
107 
108 typedef uint32_t BMDVideoOutputFlags;
109 enum _BMDVideoOutputFlags {
110     bmdVideoOutputFlagDefault                                    = 0,
111     bmdVideoOutputVANC                                           = 1 << 0,
112     bmdVideoOutputVITC                                           = 1 << 1,
113     bmdVideoOutputRP188                                          = 1 << 2,
114     bmdVideoOutputDualStream3D                                   = 1 << 4,
115     bmdVideoOutputSynchronizeToPlaybackGroup                     = 1 << 6
116 };
117 
118 /* Enum BMDSupportedVideoModeFlags - Flags to describe supported video modes */
119 
120 typedef uint32_t BMDSupportedVideoModeFlags;
121 enum _BMDSupportedVideoModeFlags {
122     bmdSupportedVideoModeDefault                                 = 0,
123     bmdSupportedVideoModeKeying                                  = 1 << 0,
124     bmdSupportedVideoModeDualStream3D                            = 1 << 1,
125     bmdSupportedVideoModeSDISingleLink                           = 1 << 2,
126     bmdSupportedVideoModeSDIDualLink                             = 1 << 3,
127     bmdSupportedVideoModeSDIQuadLink                             = 1 << 4,
128     bmdSupportedVideoModeInAnyProfile                            = 1 << 5
129 };
130 
131 /* Enum BMDPacketType - Type of packet */
132 
133 typedef uint32_t BMDPacketType;
134 enum _BMDPacketType {
135     bmdPacketTypeStreamInterruptedMarker                         = /* 'sint' */ 0x73696E74,	// A packet of this type marks the time when a video stream was interrupted, for example by a disconnected cable
136     bmdPacketTypeStreamData                                      = /* 'sdat' */ 0x73646174	// Regular stream data
137 };
138 
139 /* Enum BMDFrameFlags - Frame flags */
140 
141 typedef uint32_t BMDFrameFlags;
142 enum _BMDFrameFlags {
143     bmdFrameFlagDefault                                          = 0,
144     bmdFrameFlagFlipVertical                                     = 1 << 0,
145     bmdFrameContainsHDRMetadata                                  = 1 << 1,
146 
147     /* Flags that are applicable only to instances of IDeckLinkVideoInputFrame */
148 
149     bmdFrameCapturedAsPsF                                        = 1 << 30,
150     bmdFrameHasNoInputSource                                     = 1 << 31
151 };
152 
153 /* Enum BMDVideoInputFlags - Flags applicable to video input */
154 
155 typedef uint32_t BMDVideoInputFlags;
156 enum _BMDVideoInputFlags {
157     bmdVideoInputFlagDefault                                     = 0,
158     bmdVideoInputEnableFormatDetection                           = 1 << 0,
159     bmdVideoInputDualStream3D                                    = 1 << 1,
160     bmdVideoInputSynchronizeToCaptureGroup                       = 1 << 2
161 };
162 
163 /* Enum BMDVideoInputFormatChangedEvents - Bitmask passed to the VideoInputFormatChanged notification to identify the properties of the input signal that have changed */
164 
165 typedef uint32_t BMDVideoInputFormatChangedEvents;
166 enum _BMDVideoInputFormatChangedEvents {
167     bmdVideoInputDisplayModeChanged                              = 1 << 0,
168     bmdVideoInputFieldDominanceChanged                           = 1 << 1,
169     bmdVideoInputColorspaceChanged                               = 1 << 2
170 };
171 
172 /* Enum BMDDetectedVideoInputFormatFlags - Flags passed to the VideoInputFormatChanged notification to describe the detected video input signal */
173 
174 typedef uint32_t BMDDetectedVideoInputFormatFlags;
175 enum _BMDDetectedVideoInputFormatFlags {
176     bmdDetectedVideoInputYCbCr422                                = 1 << 0,
177     bmdDetectedVideoInputRGB444                                  = 1 << 1,
178     bmdDetectedVideoInputDualStream3D                            = 1 << 2,
179     bmdDetectedVideoInput12BitDepth                              = 1 << 3,
180     bmdDetectedVideoInput10BitDepth                              = 1 << 4,
181     bmdDetectedVideoInput8BitDepth                               = 1 << 5
182 };
183 
184 /* Enum BMDDeckLinkCapturePassthroughMode - Enumerates whether the video output is electrically connected to the video input or if the clean switching mode is enabled */
185 
186 typedef uint32_t BMDDeckLinkCapturePassthroughMode;
187 enum _BMDDeckLinkCapturePassthroughMode {
188     bmdDeckLinkCapturePassthroughModeDisabled                    = /* 'pdis' */ 0x70646973,
189     bmdDeckLinkCapturePassthroughModeDirect                      = /* 'pdir' */ 0x70646972,
190     bmdDeckLinkCapturePassthroughModeCleanSwitch                 = /* 'pcln' */ 0x70636C6E
191 };
192 
193 /* Enum BMDOutputFrameCompletionResult - Frame Completion Callback */
194 
195 typedef uint32_t BMDOutputFrameCompletionResult;
196 enum _BMDOutputFrameCompletionResult {
197     bmdOutputFrameCompleted,
198     bmdOutputFrameDisplayedLate,
199     bmdOutputFrameDropped,
200     bmdOutputFrameFlushed
201 };
202 
203 /* Enum BMDReferenceStatus - GenLock input status */
204 
205 typedef uint32_t BMDReferenceStatus;
206 enum _BMDReferenceStatus {
207     bmdReferenceNotSupportedByHardware                           = 1 << 0,
208     bmdReferenceLocked                                           = 1 << 1
209 };
210 
211 /* Enum BMDAudioFormat - Audio Format */
212 
213 typedef uint32_t BMDAudioFormat;
214 enum _BMDAudioFormat {
215     bmdAudioFormatPCM                                            = /* 'lpcm' */ 0x6C70636D	// Linear signed PCM samples
216 };
217 
218 /* Enum BMDAudioSampleRate - Audio sample rates supported for output/input */
219 
220 typedef uint32_t BMDAudioSampleRate;
221 enum _BMDAudioSampleRate {
222     bmdAudioSampleRate48kHz                                      = 48000
223 };
224 
225 /* Enum BMDAudioSampleType - Audio sample sizes supported for output/input */
226 
227 typedef uint32_t BMDAudioSampleType;
228 enum _BMDAudioSampleType {
229     bmdAudioSampleType16bitInteger                               = 16,
230     bmdAudioSampleType32bitInteger                               = 32
231 };
232 
233 /* Enum BMDAudioOutputStreamType - Audio output stream type */
234 
235 typedef uint32_t BMDAudioOutputStreamType;
236 enum _BMDAudioOutputStreamType {
237     bmdAudioOutputStreamContinuous,
238     bmdAudioOutputStreamContinuousDontResample,
239     bmdAudioOutputStreamTimestamped
240 };
241 
242 /* Enum BMDAncillaryPacketFormat - Ancillary packet format */
243 
244 typedef uint32_t BMDAncillaryPacketFormat;
245 enum _BMDAncillaryPacketFormat {
246     bmdAncillaryPacketFormatUInt8                                = /* 'ui08' */ 0x75693038,
247     bmdAncillaryPacketFormatUInt16                               = /* 'ui16' */ 0x75693136,
248     bmdAncillaryPacketFormatYCbCr10                              = /* 'v210' */ 0x76323130
249 };
250 
251 /* Enum BMDTimecodeFormat - Timecode formats for frame metadata */
252 
253 typedef uint32_t BMDTimecodeFormat;
254 enum _BMDTimecodeFormat {
255     bmdTimecodeRP188VITC1                                        = /* 'rpv1' */ 0x72707631,	// RP188 timecode where DBB1 equals VITC1 (line 9)
256     bmdTimecodeRP188VITC2                                        = /* 'rp12' */ 0x72703132,	// RP188 timecode where DBB1 equals VITC2 (line 9 for progressive or line 571 for interlaced/PsF)
257     bmdTimecodeRP188LTC                                          = /* 'rplt' */ 0x72706C74,	// RP188 timecode where DBB1 equals LTC (line 10)
258     bmdTimecodeRP188HighFrameRate                                = /* 'rphr' */ 0x72706872,	// RP188 timecode where DBB1 is an HFRTC (SMPTE ST 12-3), the only timecode allowing the frame value to go above 30
259     bmdTimecodeRP188Any                                          = /* 'rp18' */ 0x72703138,	// Convenience for capture, returning the first valid timecode in {HFRTC (if supported), VITC1, LTC, VITC2}
260     bmdTimecodeVITC                                              = /* 'vitc' */ 0x76697463,
261     bmdTimecodeVITCField2                                        = /* 'vit2' */ 0x76697432,
262     bmdTimecodeSerial                                            = /* 'seri' */ 0x73657269
263 };
264 
265 /* Enum BMDAnalogVideoFlags - Analog video display flags */
266 
267 typedef uint32_t BMDAnalogVideoFlags;
268 enum _BMDAnalogVideoFlags {
269     bmdAnalogVideoFlagCompositeSetup75                           = 1 << 0,
270     bmdAnalogVideoFlagComponentBetacamLevels                     = 1 << 1
271 };
272 
273 /* Enum BMDAudioOutputAnalogAESSwitch - Audio output Analog/AESEBU switch */
274 
275 typedef uint32_t BMDAudioOutputAnalogAESSwitch;
276 enum _BMDAudioOutputAnalogAESSwitch {
277     bmdAudioOutputSwitchAESEBU                                   = /* 'aes ' */ 0x61657320,
278     bmdAudioOutputSwitchAnalog                                   = /* 'anlg' */ 0x616E6C67
279 };
280 
281 /* Enum BMDVideoOutputConversionMode - Video/audio conversion mode */
282 
283 typedef uint32_t BMDVideoOutputConversionMode;
284 enum _BMDVideoOutputConversionMode {
285     bmdNoVideoOutputConversion                                   = /* 'none' */ 0x6E6F6E65,
286     bmdVideoOutputLetterboxDownconversion                        = /* 'ltbx' */ 0x6C746278,
287     bmdVideoOutputAnamorphicDownconversion                       = /* 'amph' */ 0x616D7068,
288     bmdVideoOutputHD720toHD1080Conversion                        = /* '720c' */ 0x37323063,
289     bmdVideoOutputHardwareLetterboxDownconversion                = /* 'HWlb' */ 0x48576C62,
290     bmdVideoOutputHardwareAnamorphicDownconversion               = /* 'HWam' */ 0x4857616D,
291     bmdVideoOutputHardwareCenterCutDownconversion                = /* 'HWcc' */ 0x48576363,
292     bmdVideoOutputHardware720p1080pCrossconversion               = /* 'xcap' */ 0x78636170,
293     bmdVideoOutputHardwareAnamorphic720pUpconversion             = /* 'ua7p' */ 0x75613770,
294     bmdVideoOutputHardwareAnamorphic1080iUpconversion            = /* 'ua1i' */ 0x75613169,
295     bmdVideoOutputHardwareAnamorphic149To720pUpconversion        = /* 'u47p' */ 0x75343770,
296     bmdVideoOutputHardwareAnamorphic149To1080iUpconversion       = /* 'u41i' */ 0x75343169,
297     bmdVideoOutputHardwarePillarbox720pUpconversion              = /* 'up7p' */ 0x75703770,
298     bmdVideoOutputHardwarePillarbox1080iUpconversion             = /* 'up1i' */ 0x75703169
299 };
300 
301 /* Enum BMDVideoInputConversionMode - Video input conversion mode */
302 
303 typedef uint32_t BMDVideoInputConversionMode;
304 enum _BMDVideoInputConversionMode {
305     bmdNoVideoInputConversion                                    = /* 'none' */ 0x6E6F6E65,
306     bmdVideoInputLetterboxDownconversionFromHD1080               = /* '10lb' */ 0x31306C62,
307     bmdVideoInputAnamorphicDownconversionFromHD1080              = /* '10am' */ 0x3130616D,
308     bmdVideoInputLetterboxDownconversionFromHD720                = /* '72lb' */ 0x37326C62,
309     bmdVideoInputAnamorphicDownconversionFromHD720               = /* '72am' */ 0x3732616D,
310     bmdVideoInputLetterboxUpconversion                           = /* 'lbup' */ 0x6C627570,
311     bmdVideoInputAnamorphicUpconversion                          = /* 'amup' */ 0x616D7570
312 };
313 
314 /* Enum BMDVideo3DPackingFormat - Video 3D packing format */
315 
316 typedef uint32_t BMDVideo3DPackingFormat;
317 enum _BMDVideo3DPackingFormat {
318     bmdVideo3DPackingSidebySideHalf                              = /* 'sbsh' */ 0x73627368,
319     bmdVideo3DPackingLinebyLine                                  = /* 'lbyl' */ 0x6C62796C,
320     bmdVideo3DPackingTopAndBottom                                = /* 'tabo' */ 0x7461626F,
321     bmdVideo3DPackingFramePacking                                = /* 'frpk' */ 0x6672706B,
322     bmdVideo3DPackingLeftOnly                                    = /* 'left' */ 0x6C656674,
323     bmdVideo3DPackingRightOnly                                   = /* 'righ' */ 0x72696768
324 };
325 
326 /* Enum BMDIdleVideoOutputOperation - Video output operation when not playing video */
327 
328 typedef uint32_t BMDIdleVideoOutputOperation;
329 enum _BMDIdleVideoOutputOperation {
330     bmdIdleVideoOutputBlack                                      = /* 'blac' */ 0x626C6163,
331     bmdIdleVideoOutputLastFrame                                  = /* 'lafa' */ 0x6C616661
332 };
333 
334 /* Enum BMDVideoEncoderFrameCodingMode - Video frame coding mode */
335 
336 typedef uint32_t BMDVideoEncoderFrameCodingMode;
337 enum _BMDVideoEncoderFrameCodingMode {
338     bmdVideoEncoderFrameCodingModeInter                          = /* 'inte' */ 0x696E7465,
339     bmdVideoEncoderFrameCodingModeIntra                          = /* 'intr' */ 0x696E7472
340 };
341 
342 /* Enum BMDDNxHRLevel - DNxHR Levels */
343 
344 typedef uint32_t BMDDNxHRLevel;
345 enum _BMDDNxHRLevel {
346     bmdDNxHRLevelSQ                                              = /* 'dnsq' */ 0x646E7371,
347     bmdDNxHRLevelLB                                              = /* 'dnlb' */ 0x646E6C62,
348     bmdDNxHRLevelHQ                                              = /* 'dnhq' */ 0x646E6871,
349     bmdDNxHRLevelHQX                                             = /* 'dhqx' */ 0x64687178,
350     bmdDNxHRLevel444                                             = /* 'd444' */ 0x64343434
351 };
352 
353 /* Enum BMDLinkConfiguration - Video link configuration */
354 
355 typedef uint32_t BMDLinkConfiguration;
356 enum _BMDLinkConfiguration {
357     bmdLinkConfigurationSingleLink                               = /* 'lcsl' */ 0x6C63736C,
358     bmdLinkConfigurationDualLink                                 = /* 'lcdl' */ 0x6C63646C,
359     bmdLinkConfigurationQuadLink                                 = /* 'lcql' */ 0x6C63716C
360 };
361 
362 /* Enum BMDDeviceInterface - Device interface type */
363 
364 typedef uint32_t BMDDeviceInterface;
365 enum _BMDDeviceInterface {
366     bmdDeviceInterfacePCI                                        = /* 'pci ' */ 0x70636920,
367     bmdDeviceInterfaceUSB                                        = /* 'usb ' */ 0x75736220,
368     bmdDeviceInterfaceThunderbolt                                = /* 'thun' */ 0x7468756E
369 };
370 
371 /* Enum BMDColorspace - Colorspace */
372 
373 typedef uint32_t BMDColorspace;
374 enum _BMDColorspace {
375     bmdColorspaceRec601                                          = /* 'r601' */ 0x72363031,
376     bmdColorspaceRec709                                          = /* 'r709' */ 0x72373039,
377     bmdColorspaceRec2020                                         = /* '2020' */ 0x32303230
378 };
379 
380 /* Enum BMDDynamicRange - SDR or HDR */
381 
382 typedef uint32_t BMDDynamicRange;
383 enum _BMDDynamicRange {
384     bmdDynamicRangeSDR                                           = 0,	// Standard Dynamic Range in accordance with SMPTE ST 2036-1
385     bmdDynamicRangeHDRStaticPQ                                   = 1 << 29,	// High Dynamic Range PQ in accordance with SMPTE ST 2084
386     bmdDynamicRangeHDRStaticHLG                                  = 1 << 30	// High Dynamic Range HLG in accordance with ITU-R BT.2100-0
387 };
388 
389 /* Enum BMDDeckLinkHDMIInputEDIDID - DeckLink HDMI Input EDID ID */
390 
391 typedef uint32_t BMDDeckLinkHDMIInputEDIDID;
392 enum _BMDDeckLinkHDMIInputEDIDID {
393 
394     /* Integers */
395 
396     bmdDeckLinkHDMIInputEDIDDynamicRange                         = /* 'HIDy' */ 0x48494479	// Parameter is of type BMDDynamicRange. Default is (bmdDynamicRangeSDR|bmdDynamicRangeHDRStaticPQ)
397 };
398 
399 /* Enum BMDDeckLinkFrameMetadataID - DeckLink Frame Metadata ID */
400 
401 typedef uint32_t BMDDeckLinkFrameMetadataID;
402 enum _BMDDeckLinkFrameMetadataID {
403 
404     /* Colorspace Metadata - Integers */
405 
406     bmdDeckLinkFrameMetadataColorspace                           = /* 'cspc' */ 0x63737063,	// Colorspace of video frame (see BMDColorspace)
407 
408     /* HDR Metadata - Integers */
409 
410     bmdDeckLinkFrameMetadataHDRElectroOpticalTransferFunc        = /* 'eotf' */ 0x656F7466,	// EOTF in range 0-7 as per CEA 861.3
411 
412     /* HDR Metadata - Floats */
413 
414     bmdDeckLinkFrameMetadataHDRDisplayPrimariesRedX              = /* 'hdrx' */ 0x68647278,	// Red display primaries in range 0.0 - 1.0
415     bmdDeckLinkFrameMetadataHDRDisplayPrimariesRedY              = /* 'hdry' */ 0x68647279,	// Red display primaries in range 0.0 - 1.0
416     bmdDeckLinkFrameMetadataHDRDisplayPrimariesGreenX            = /* 'hdgx' */ 0x68646778,	// Green display primaries in range 0.0 - 1.0
417     bmdDeckLinkFrameMetadataHDRDisplayPrimariesGreenY            = /* 'hdgy' */ 0x68646779,	// Green display primaries in range 0.0 - 1.0
418     bmdDeckLinkFrameMetadataHDRDisplayPrimariesBlueX             = /* 'hdbx' */ 0x68646278,	// Blue display primaries in range 0.0 - 1.0
419     bmdDeckLinkFrameMetadataHDRDisplayPrimariesBlueY             = /* 'hdby' */ 0x68646279,	// Blue display primaries in range 0.0 - 1.0
420     bmdDeckLinkFrameMetadataHDRWhitePointX                       = /* 'hdwx' */ 0x68647778,	// White point in range 0.0 - 1.0
421     bmdDeckLinkFrameMetadataHDRWhitePointY                       = /* 'hdwy' */ 0x68647779,	// White point in range 0.0 - 1.0
422     bmdDeckLinkFrameMetadataHDRMaxDisplayMasteringLuminance      = /* 'hdml' */ 0x68646D6C,	// Max display mastering luminance in range 1 cd/m2 - 65535 cd/m2
423     bmdDeckLinkFrameMetadataHDRMinDisplayMasteringLuminance      = /* 'hmil' */ 0x686D696C,	// Min display mastering luminance in range 0.0001 cd/m2 - 6.5535 cd/m2
424     bmdDeckLinkFrameMetadataHDRMaximumContentLightLevel          = /* 'mcll' */ 0x6D636C6C,	// Maximum Content Light Level in range 1 cd/m2 - 65535 cd/m2
425     bmdDeckLinkFrameMetadataHDRMaximumFrameAverageLightLevel     = /* 'fall' */ 0x66616C6C	// Maximum Frame Average Light Level in range 1 cd/m2 - 65535 cd/m2
426 };
427 
428 /* Enum BMDProfileID - Identifies a profile */
429 
430 typedef uint32_t BMDProfileID;
431 enum _BMDProfileID {
432     bmdProfileOneSubDeviceFullDuplex                             = /* '1dfd' */ 0x31646664,
433     bmdProfileOneSubDeviceHalfDuplex                             = /* '1dhd' */ 0x31646864,
434     bmdProfileTwoSubDevicesFullDuplex                            = /* '2dfd' */ 0x32646664,
435     bmdProfileTwoSubDevicesHalfDuplex                            = /* '2dhd' */ 0x32646864,
436     bmdProfileFourSubDevicesHalfDuplex                           = /* '4dhd' */ 0x34646864
437 };
438 
439 /* Enum BMDHDMITimecodePacking - Packing form of timecode on HDMI */
440 
441 typedef uint32_t BMDHDMITimecodePacking;
442 enum _BMDHDMITimecodePacking {
443     bmdHDMITimecodePackingIEEEOUI000085                          = 0x00008500,
444     bmdHDMITimecodePackingIEEEOUI080046                          = 0x08004601,
445     bmdHDMITimecodePackingIEEEOUI5CF9F0                          = 0x5CF9F003
446 };
447 
448 /* Enum BMDInternalKeyingAncillaryDataSource - Source for VANC and timecode data when performing internal keying */
449 
450 typedef uint32_t BMDInternalKeyingAncillaryDataSource;
451 enum _BMDInternalKeyingAncillaryDataSource {
452     bmdInternalKeyingUsesAncillaryDataFromInputSignal            = /* 'ikai' */ 0x696B6169,
453     bmdInternalKeyingUsesAncillaryDataFromKeyFrame               = /* 'ikak' */ 0x696B616B
454 };
455 
456 /* Enum BMDDeckLinkAttributeID - DeckLink Attribute ID */
457 
458 typedef uint32_t BMDDeckLinkAttributeID;
459 enum _BMDDeckLinkAttributeID {
460 
461     /* Flags */
462 
463     BMDDeckLinkSupportsInternalKeying                            = /* 'keyi' */ 0x6B657969,
464     BMDDeckLinkSupportsExternalKeying                            = /* 'keye' */ 0x6B657965,
465     BMDDeckLinkSupportsInputFormatDetection                      = /* 'infd' */ 0x696E6664,
466     BMDDeckLinkHasReferenceInput                                 = /* 'hrin' */ 0x6872696E,
467     BMDDeckLinkHasSerialPort                                     = /* 'hspt' */ 0x68737074,
468     BMDDeckLinkHasAnalogVideoOutputGain                          = /* 'avog' */ 0x61766F67,
469     BMDDeckLinkCanOnlyAdjustOverallVideoOutputGain               = /* 'ovog' */ 0x6F766F67,
470     BMDDeckLinkHasVideoInputAntiAliasingFilter                   = /* 'aafl' */ 0x6161666C,
471     BMDDeckLinkHasBypass                                         = /* 'byps' */ 0x62797073,
472     BMDDeckLinkSupportsClockTimingAdjustment                     = /* 'ctad' */ 0x63746164,
473     BMDDeckLinkSupportsFullFrameReferenceInputTimingOffset       = /* 'frin' */ 0x6672696E,
474     BMDDeckLinkSupportsSMPTELevelAOutput                         = /* 'lvla' */ 0x6C766C61,
475     BMDDeckLinkSupportsAutoSwitchingPPsFOnInput                  = /* 'apsf' */ 0x61707366,
476     BMDDeckLinkSupportsDualLinkSDI                               = /* 'sdls' */ 0x73646C73,
477     BMDDeckLinkSupportsQuadLinkSDI                               = /* 'sqls' */ 0x73716C73,
478     BMDDeckLinkSupportsIdleOutput                                = /* 'idou' */ 0x69646F75,
479     BMDDeckLinkVANCRequires10BitYUVVideoFrames                   = /* 'vioY' */ 0x76696F59,	// Legacy product requires v210 active picture for IDeckLinkVideoFrameAncillaryPackets or 10-bit VANC
480     BMDDeckLinkHasLTCTimecodeInput                               = /* 'hltc' */ 0x686C7463,
481     BMDDeckLinkSupportsHDRMetadata                               = /* 'hdrm' */ 0x6864726D,
482     BMDDeckLinkSupportsColorspaceMetadata                        = /* 'cmet' */ 0x636D6574,
483     BMDDeckLinkSupportsHDMITimecode                              = /* 'htim' */ 0x6874696D,
484     BMDDeckLinkSupportsHighFrameRateTimecode                     = /* 'HFRT' */ 0x48465254,
485     BMDDeckLinkSupportsSynchronizeToCaptureGroup                 = /* 'stcg' */ 0x73746367,
486     BMDDeckLinkSupportsSynchronizeToPlaybackGroup                = /* 'stpg' */ 0x73747067,
487 
488     /* Integers */
489 
490     BMDDeckLinkMaximumAudioChannels                              = /* 'mach' */ 0x6D616368,
491     BMDDeckLinkMaximumAnalogAudioInputChannels                   = /* 'iach' */ 0x69616368,
492     BMDDeckLinkMaximumAnalogAudioOutputChannels                  = /* 'aach' */ 0x61616368,
493     BMDDeckLinkNumberOfSubDevices                                = /* 'nsbd' */ 0x6E736264,
494     BMDDeckLinkSubDeviceIndex                                    = /* 'subi' */ 0x73756269,
495     BMDDeckLinkPersistentID                                      = /* 'peid' */ 0x70656964,
496     BMDDeckLinkDeviceGroupID                                     = /* 'dgid' */ 0x64676964,
497     BMDDeckLinkTopologicalID                                     = /* 'toid' */ 0x746F6964,
498     BMDDeckLinkVideoOutputConnections                            = /* 'vocn' */ 0x766F636E,	// Returns a BMDVideoConnection bit field
499     BMDDeckLinkVideoInputConnections                             = /* 'vicn' */ 0x7669636E,	// Returns a BMDVideoConnection bit field
500     BMDDeckLinkAudioOutputConnections                            = /* 'aocn' */ 0x616F636E,	// Returns a BMDAudioConnection bit field
501     BMDDeckLinkAudioInputConnections                             = /* 'aicn' */ 0x6169636E,	// Returns a BMDAudioConnection bit field
502     BMDDeckLinkVideoIOSupport                                    = /* 'vios' */ 0x76696F73,	// Returns a BMDVideoIOSupport bit field
503     BMDDeckLinkDeckControlConnections                            = /* 'dccn' */ 0x6463636E,	// Returns a BMDDeckControlConnection bit field
504     BMDDeckLinkDeviceInterface                                   = /* 'dbus' */ 0x64627573,	// Returns a BMDDeviceInterface
505     BMDDeckLinkAudioInputRCAChannelCount                         = /* 'airc' */ 0x61697263,
506     BMDDeckLinkAudioInputXLRChannelCount                         = /* 'aixc' */ 0x61697863,
507     BMDDeckLinkAudioOutputRCAChannelCount                        = /* 'aorc' */ 0x616F7263,
508     BMDDeckLinkAudioOutputXLRChannelCount                        = /* 'aoxc' */ 0x616F7863,
509     BMDDeckLinkProfileID                                         = /* 'prid' */ 0x70726964,	// Returns a BMDProfileID
510     BMDDeckLinkDuplex                                            = /* 'dupx' */ 0x64757078,
511     BMDDeckLinkMinimumPrerollFrames                              = /* 'mprf' */ 0x6D707266,
512     BMDDeckLinkSupportedDynamicRange                             = /* 'sudr' */ 0x73756472,
513 
514     /* Floats */
515 
516     BMDDeckLinkVideoInputGainMinimum                             = /* 'vigm' */ 0x7669676D,
517     BMDDeckLinkVideoInputGainMaximum                             = /* 'vigx' */ 0x76696778,
518     BMDDeckLinkVideoOutputGainMinimum                            = /* 'vogm' */ 0x766F676D,
519     BMDDeckLinkVideoOutputGainMaximum                            = /* 'vogx' */ 0x766F6778,
520     BMDDeckLinkMicrophoneInputGainMinimum                        = /* 'migm' */ 0x6D69676D,
521     BMDDeckLinkMicrophoneInputGainMaximum                        = /* 'migx' */ 0x6D696778,
522 
523     /* Strings */
524 
525     BMDDeckLinkSerialPortDeviceName                              = /* 'slpn' */ 0x736C706E,
526     BMDDeckLinkVendorName                                        = /* 'vndr' */ 0x766E6472,
527     BMDDeckLinkDisplayName                                       = /* 'dspn' */ 0x6473706E,
528     BMDDeckLinkModelName                                         = /* 'mdln' */ 0x6D646C6E,
529     BMDDeckLinkDeviceHandle                                      = /* 'devh' */ 0x64657668
530 };
531 
532 /* Enum BMDDeckLinkAPIInformationID - DeckLinkAPI information ID */
533 
534 typedef uint32_t BMDDeckLinkAPIInformationID;
535 enum _BMDDeckLinkAPIInformationID {
536 
537     /* Integer or String */
538 
539     BMDDeckLinkAPIVersion                                        = /* 'vers' */ 0x76657273
540 };
541 
542 /* Enum BMDDeckLinkStatusID - DeckLink Status ID */
543 
544 typedef uint32_t BMDDeckLinkStatusID;
545 enum _BMDDeckLinkStatusID {
546 
547     /* Integers */
548 
549     bmdDeckLinkStatusDetectedVideoInputMode                      = /* 'dvim' */ 0x6476696D,
550     bmdDeckLinkStatusDetectedVideoInputFormatFlags               = /* 'dvff' */ 0x64766666,
551     bmdDeckLinkStatusDetectedVideoInputFieldDominance            = /* 'dvfd' */ 0x64766664,
552     bmdDeckLinkStatusDetectedVideoInputColorspace                = /* 'dscl' */ 0x6473636C,
553     bmdDeckLinkStatusDetectedVideoInputDynamicRange              = /* 'dsdr' */ 0x64736472,
554     bmdDeckLinkStatusDetectedSDILinkConfiguration                = /* 'dslc' */ 0x64736C63,
555     bmdDeckLinkStatusCurrentVideoInputMode                       = /* 'cvim' */ 0x6376696D,
556     bmdDeckLinkStatusCurrentVideoInputPixelFormat                = /* 'cvip' */ 0x63766970,
557     bmdDeckLinkStatusCurrentVideoInputFlags                      = /* 'cvif' */ 0x63766966,
558     bmdDeckLinkStatusCurrentVideoOutputMode                      = /* 'cvom' */ 0x63766F6D,
559     bmdDeckLinkStatusCurrentVideoOutputFlags                     = /* 'cvof' */ 0x63766F66,
560     bmdDeckLinkStatusPCIExpressLinkWidth                         = /* 'pwid' */ 0x70776964,
561     bmdDeckLinkStatusPCIExpressLinkSpeed                         = /* 'plnk' */ 0x706C6E6B,
562     bmdDeckLinkStatusLastVideoOutputPixelFormat                  = /* 'opix' */ 0x6F706978,
563     bmdDeckLinkStatusReferenceSignalMode                         = /* 'refm' */ 0x7265666D,
564     bmdDeckLinkStatusReferenceSignalFlags                        = /* 'reff' */ 0x72656666,
565     bmdDeckLinkStatusBusy                                        = /* 'busy' */ 0x62757379,
566     bmdDeckLinkStatusInterchangeablePanelType                    = /* 'icpt' */ 0x69637074,
567     bmdDeckLinkStatusDeviceTemperature                           = /* 'dtmp' */ 0x64746D70,
568 
569     /* Flags */
570 
571     bmdDeckLinkStatusVideoInputSignalLocked                      = /* 'visl' */ 0x7669736C,
572     bmdDeckLinkStatusReferenceSignalLocked                       = /* 'refl' */ 0x7265666C,
573 
574     /* Bytes */
575 
576     bmdDeckLinkStatusReceivedEDID                                = /* 'edid' */ 0x65646964
577 };
578 
579 /* Enum BMDDeckLinkVideoStatusFlags -  */
580 
581 typedef uint32_t BMDDeckLinkVideoStatusFlags;
582 enum _BMDDeckLinkVideoStatusFlags {
583     bmdDeckLinkVideoStatusPsF                                    = 1 << 0,
584     bmdDeckLinkVideoStatusDualStream3D                           = 1 << 1
585 };
586 
587 /* Enum BMDDuplexMode - Duplex of the device */
588 
589 typedef uint32_t BMDDuplexMode;
590 enum _BMDDuplexMode {
591     bmdDuplexFull                                                = /* 'dxfu' */ 0x64786675,
592     bmdDuplexHalf                                                = /* 'dxha' */ 0x64786861,
593     bmdDuplexSimplex                                             = /* 'dxsp' */ 0x64787370,
594     bmdDuplexInactive                                            = /* 'dxin' */ 0x6478696E
595 };
596 
597 /* Enum BMDPanelType - The type of interchangeable panel */
598 
599 typedef uint32_t BMDPanelType;
600 enum _BMDPanelType {
601     bmdPanelNotDetected                                          = /* 'npnl' */ 0x6E706E6C,
602     bmdPanelTeranexMiniSmartPanel                                = /* 'tmsm' */ 0x746D736D
603 };
604 
605 /* Enum BMDDeviceBusyState - Current device busy state */
606 
607 typedef uint32_t BMDDeviceBusyState;
608 enum _BMDDeviceBusyState {
609     bmdDeviceCaptureBusy                                         = 1 << 0,
610     bmdDevicePlaybackBusy                                        = 1 << 1,
611     bmdDeviceSerialPortBusy                                      = 1 << 2
612 };
613 
614 /* Enum BMDVideoIOSupport - Device video input/output support */
615 
616 typedef uint32_t BMDVideoIOSupport;
617 enum _BMDVideoIOSupport {
618     bmdDeviceSupportsCapture                                     = 1 << 0,
619     bmdDeviceSupportsPlayback                                    = 1 << 1
620 };
621 
622 /* Enum BMD3DPreviewFormat - Linked Frame preview format */
623 
624 typedef uint32_t BMD3DPreviewFormat;
625 enum _BMD3DPreviewFormat {
626     bmd3DPreviewFormatDefault                                    = /* 'defa' */ 0x64656661,
627     bmd3DPreviewFormatLeftOnly                                   = /* 'left' */ 0x6C656674,
628     bmd3DPreviewFormatRightOnly                                  = /* 'righ' */ 0x72696768,
629     bmd3DPreviewFormatSideBySide                                 = /* 'side' */ 0x73696465,
630     bmd3DPreviewFormatTopBottom                                  = /* 'topb' */ 0x746F7062
631 };
632 
633 /* Enum BMDNotifications - Events that can be subscribed through IDeckLinkNotification */
634 
635 typedef uint32_t BMDNotifications;
636 enum _BMDNotifications {
637     bmdPreferencesChanged                                        = /* 'pref' */ 0x70726566,
638     bmdStatusChanged                                             = /* 'stat' */ 0x73746174
639 };
640 
641 #if defined(__cplusplus)
642 
643 // Forward Declarations
644 
645 class IDeckLinkVideoOutputCallback;
646 class IDeckLinkInputCallback;
647 class IDeckLinkEncoderInputCallback;
648 class IDeckLinkMemoryAllocator;
649 class IDeckLinkAudioOutputCallback;
650 class IDeckLinkIterator;
651 class IDeckLinkAPIInformation;
652 class IDeckLinkOutput;
653 class IDeckLinkInput;
654 class IDeckLinkHDMIInputEDID;
655 class IDeckLinkEncoderInput;
656 class IDeckLinkVideoFrame;
657 class IDeckLinkMutableVideoFrame;
658 class IDeckLinkVideoFrame3DExtensions;
659 class IDeckLinkVideoFrameMetadataExtensions;
660 class IDeckLinkVideoInputFrame;
661 class IDeckLinkAncillaryPacket;
662 class IDeckLinkAncillaryPacketIterator;
663 class IDeckLinkVideoFrameAncillaryPackets;
664 class IDeckLinkVideoFrameAncillary;
665 class IDeckLinkEncoderPacket;
666 class IDeckLinkEncoderVideoPacket;
667 class IDeckLinkEncoderAudioPacket;
668 class IDeckLinkH265NALPacket;
669 class IDeckLinkAudioInputPacket;
670 class IDeckLinkScreenPreviewCallback;
671 class IDeckLinkCocoaScreenPreviewCallback;
672 class IDeckLinkGLScreenPreviewHelper;
673 class IDeckLinkNotificationCallback;
674 class IDeckLinkNotification;
675 class IDeckLinkProfileAttributes;
676 class IDeckLinkProfileIterator;
677 class IDeckLinkProfile;
678 class IDeckLinkProfileCallback;
679 class IDeckLinkProfileManager;
680 class IDeckLinkStatus;
681 class IDeckLinkKeyer;
682 class IDeckLinkVideoConversion;
683 class IDeckLinkDeviceNotificationCallback;
684 class IDeckLinkDiscovery;
685 
686 /* Interface IDeckLinkVideoOutputCallback - Frame completion callback. */
687 
688 class BMD_PUBLIC IDeckLinkVideoOutputCallback : public IUnknown
689 {
690 public:
691     virtual HRESULT ScheduledFrameCompleted (/* in */ IDeckLinkVideoFrame* completedFrame, /* in */ BMDOutputFrameCompletionResult result) = 0;
692     virtual HRESULT ScheduledPlaybackHasStopped (void) = 0;
693 
694 protected:
~IDeckLinkVideoOutputCallback()695     virtual ~IDeckLinkVideoOutputCallback () {} // call Release method to drop reference count
696 };
697 
698 /* Interface IDeckLinkInputCallback - Frame arrival callback. */
699 
700 class BMD_PUBLIC IDeckLinkInputCallback : public IUnknown
701 {
702 public:
703     virtual HRESULT VideoInputFormatChanged (/* in */ BMDVideoInputFormatChangedEvents notificationEvents, /* in */ IDeckLinkDisplayMode* newDisplayMode, /* in */ BMDDetectedVideoInputFormatFlags detectedSignalFlags) = 0;
704     virtual HRESULT VideoInputFrameArrived (/* in */ IDeckLinkVideoInputFrame* videoFrame, /* in */ IDeckLinkAudioInputPacket* audioPacket) = 0;
705 
706 protected:
~IDeckLinkInputCallback()707     virtual ~IDeckLinkInputCallback () {} // call Release method to drop reference count
708 };
709 
710 /* Interface IDeckLinkEncoderInputCallback - Frame arrival callback. */
711 
712 class BMD_PUBLIC IDeckLinkEncoderInputCallback : public IUnknown
713 {
714 public:
715     virtual HRESULT VideoInputSignalChanged (/* in */ BMDVideoInputFormatChangedEvents notificationEvents, /* in */ IDeckLinkDisplayMode* newDisplayMode, /* in */ BMDDetectedVideoInputFormatFlags detectedSignalFlags) = 0;
716     virtual HRESULT VideoPacketArrived (/* in */ IDeckLinkEncoderVideoPacket* videoPacket) = 0;
717     virtual HRESULT AudioPacketArrived (/* in */ IDeckLinkEncoderAudioPacket* audioPacket) = 0;
718 
719 protected:
~IDeckLinkEncoderInputCallback()720     virtual ~IDeckLinkEncoderInputCallback () {} // call Release method to drop reference count
721 };
722 
723 /* Interface IDeckLinkMemoryAllocator - Memory allocator for video frames. */
724 
725 class BMD_PUBLIC IDeckLinkMemoryAllocator : public IUnknown
726 {
727 public:
728     virtual HRESULT AllocateBuffer (/* in */ uint32_t bufferSize, /* out */ void** allocatedBuffer) = 0;
729     virtual HRESULT ReleaseBuffer (/* in */ void* buffer) = 0;
730     virtual HRESULT Commit (void) = 0;
731     virtual HRESULT Decommit (void) = 0;
732 };
733 
734 /* Interface IDeckLinkAudioOutputCallback - Optional callback to allow audio samples to be pulled as required. */
735 
736 class BMD_PUBLIC IDeckLinkAudioOutputCallback : public IUnknown
737 {
738 public:
739     virtual HRESULT RenderAudioSamples (/* in */ bool preroll) = 0;
740 };
741 
742 /* Interface IDeckLinkIterator - Enumerates installed DeckLink hardware */
743 
744 class BMD_PUBLIC IDeckLinkIterator : public IUnknown
745 {
746 public:
747     virtual HRESULT Next (/* out */ IDeckLink** deckLinkInstance) = 0;
748 };
749 
750 /* Interface IDeckLinkAPIInformation - DeckLinkAPI attribute interface */
751 
752 class BMD_PUBLIC IDeckLinkAPIInformation : public IUnknown
753 {
754 public:
755     virtual HRESULT GetFlag (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ bool* value) = 0;
756     virtual HRESULT GetInt (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ int64_t* value) = 0;
757     virtual HRESULT GetFloat (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ double* value) = 0;
758     virtual HRESULT GetString (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ CFStringRef* value) = 0;
759 
760 protected:
~IDeckLinkAPIInformation()761     virtual ~IDeckLinkAPIInformation () {} // call Release method to drop reference count
762 };
763 
764 /* Interface IDeckLinkOutput - Created by QueryInterface from IDeckLink. */
765 
766 class BMD_PUBLIC IDeckLinkOutput : public IUnknown
767 {
768 public:
769     virtual HRESULT DoesSupportVideoMode (/* in */ BMDVideoConnection connection /* If a value of bmdVideoConnectionUnspecified is specified, the caller does not care about the connection */, /* in */ BMDDisplayMode requestedMode, /* in */ BMDPixelFormat requestedPixelFormat, /* in */ BMDVideoOutputConversionMode conversionMode, /* in */ BMDSupportedVideoModeFlags flags, /* out */ BMDDisplayMode* actualMode, /* out */ bool* supported) = 0;
770     virtual HRESULT GetDisplayMode (/* in */ BMDDisplayMode displayMode, /* out */ IDeckLinkDisplayMode** resultDisplayMode) = 0;
771     virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator** iterator) = 0;
772     virtual HRESULT SetScreenPreviewCallback (/* in */ IDeckLinkScreenPreviewCallback* previewCallback) = 0;
773 
774     /* Video Output */
775 
776     virtual HRESULT EnableVideoOutput (/* in */ BMDDisplayMode displayMode, /* in */ BMDVideoOutputFlags flags) = 0;
777     virtual HRESULT DisableVideoOutput (void) = 0;
778     virtual HRESULT SetVideoOutputFrameMemoryAllocator (/* in */ IDeckLinkMemoryAllocator* theAllocator) = 0;
779     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;
780     virtual HRESULT CreateAncillaryData (/* in */ BMDPixelFormat pixelFormat, /* out */ IDeckLinkVideoFrameAncillary** outBuffer) = 0;	// Use of IDeckLinkVideoFrameAncillaryPackets is preferred
781     virtual HRESULT DisplayVideoFrameSync (/* in */ IDeckLinkVideoFrame* theFrame) = 0;
782     virtual HRESULT ScheduleVideoFrame (/* in */ IDeckLinkVideoFrame* theFrame, /* in */ BMDTimeValue displayTime, /* in */ BMDTimeValue displayDuration, /* in */ BMDTimeScale timeScale) = 0;
783     virtual HRESULT SetScheduledFrameCompletionCallback (/* in */ IDeckLinkVideoOutputCallback* theCallback) = 0;
784     virtual HRESULT GetBufferedVideoFrameCount (/* out */ uint32_t* bufferedFrameCount) = 0;
785 
786     /* Audio Output */
787 
788     virtual HRESULT EnableAudioOutput (/* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount, /* in */ BMDAudioOutputStreamType streamType) = 0;
789     virtual HRESULT DisableAudioOutput (void) = 0;
790     virtual HRESULT WriteAudioSamplesSync (/* in */ void* buffer, /* in */ uint32_t sampleFrameCount, /* out */ uint32_t* sampleFramesWritten) = 0;
791     virtual HRESULT BeginAudioPreroll (void) = 0;
792     virtual HRESULT EndAudioPreroll (void) = 0;
793     virtual HRESULT ScheduleAudioSamples (/* in */ void* buffer, /* in */ uint32_t sampleFrameCount, /* in */ BMDTimeValue streamTime, /* in */ BMDTimeScale timeScale, /* out */ uint32_t* sampleFramesWritten) = 0;
794     virtual HRESULT GetBufferedAudioSampleFrameCount (/* out */ uint32_t* bufferedSampleFrameCount) = 0;
795     virtual HRESULT FlushBufferedAudioSamples (void) = 0;
796     virtual HRESULT SetAudioCallback (/* in */ IDeckLinkAudioOutputCallback* theCallback) = 0;
797 
798     /* Output Control */
799 
800     virtual HRESULT StartScheduledPlayback (/* in */ BMDTimeValue playbackStartTime, /* in */ BMDTimeScale timeScale, /* in */ double playbackSpeed) = 0;
801     virtual HRESULT StopScheduledPlayback (/* in */ BMDTimeValue stopPlaybackAtTime, /* out */ BMDTimeValue* actualStopTime, /* in */ BMDTimeScale timeScale) = 0;
802     virtual HRESULT IsScheduledPlaybackRunning (/* out */ bool* active) = 0;
803     virtual HRESULT GetScheduledStreamTime (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue* streamTime, /* out */ double* playbackSpeed) = 0;
804     virtual HRESULT GetReferenceStatus (/* out */ BMDReferenceStatus* referenceStatus) = 0;
805 
806     /* Hardware Timing */
807 
808     virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue* hardwareTime, /* out */ BMDTimeValue* timeInFrame, /* out */ BMDTimeValue* ticksPerFrame) = 0;
809     virtual HRESULT GetFrameCompletionReferenceTimestamp (/* in */ IDeckLinkVideoFrame* theFrame, /* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue* frameCompletionTimestamp) = 0;
810 
811 protected:
~IDeckLinkOutput()812     virtual ~IDeckLinkOutput () {} // call Release method to drop reference count
813 };
814 
815 /* Interface IDeckLinkInput - Created by QueryInterface from IDeckLink. */
816 
817 class BMD_PUBLIC IDeckLinkInput : public IUnknown
818 {
819 public:
820     virtual HRESULT DoesSupportVideoMode (/* in */ BMDVideoConnection connection /* If a value of bmdVideoConnectionUnspecified is specified, the caller does not care about the connection */, /* in */ BMDDisplayMode requestedMode, /* in */ BMDPixelFormat requestedPixelFormat, /* in */ BMDVideoInputConversionMode conversionMode, /* in */ BMDSupportedVideoModeFlags flags, /* out */ BMDDisplayMode* actualMode, /* out */ bool* supported) = 0;
821     virtual HRESULT GetDisplayMode (/* in */ BMDDisplayMode displayMode, /* out */ IDeckLinkDisplayMode** resultDisplayMode) = 0;
822     virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator** iterator) = 0;
823     virtual HRESULT SetScreenPreviewCallback (/* in */ IDeckLinkScreenPreviewCallback* previewCallback) = 0;
824 
825     /* Video Input */
826 
827     virtual HRESULT EnableVideoInput (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags) = 0;
828     virtual HRESULT DisableVideoInput (void) = 0;
829     virtual HRESULT GetAvailableVideoFrameCount (/* out */ uint32_t* availableFrameCount) = 0;
830     virtual HRESULT SetVideoInputFrameMemoryAllocator (/* in */ IDeckLinkMemoryAllocator* theAllocator) = 0;
831 
832     /* Audio Input */
833 
834     virtual HRESULT EnableAudioInput (/* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount) = 0;
835     virtual HRESULT DisableAudioInput (void) = 0;
836     virtual HRESULT GetAvailableAudioSampleFrameCount (/* out */ uint32_t* availableSampleFrameCount) = 0;
837 
838     /* Input Control */
839 
840     virtual HRESULT StartStreams (void) = 0;
841     virtual HRESULT StopStreams (void) = 0;
842     virtual HRESULT PauseStreams (void) = 0;
843     virtual HRESULT FlushStreams (void) = 0;
844     virtual HRESULT SetCallback (/* in */ IDeckLinkInputCallback* theCallback) = 0;
845 
846     /* Hardware Timing */
847 
848     virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue* hardwareTime, /* out */ BMDTimeValue* timeInFrame, /* out */ BMDTimeValue* ticksPerFrame) = 0;
849 
850 protected:
~IDeckLinkInput()851     virtual ~IDeckLinkInput () {} // call Release method to drop reference count
852 };
853 
854 /* Interface IDeckLinkHDMIInputEDID - Created by QueryInterface from IDeckLink. Releasing all references will restore EDID to default */
855 
856 class BMD_PUBLIC IDeckLinkHDMIInputEDID : public IUnknown
857 {
858 public:
859     virtual HRESULT SetInt (/* in */ BMDDeckLinkHDMIInputEDIDID cfgID, /* in */ int64_t value) = 0;
860     virtual HRESULT GetInt (/* in */ BMDDeckLinkHDMIInputEDIDID cfgID, /* out */ int64_t* value) = 0;
861     virtual HRESULT WriteToEDID (void) = 0;
862 
863 protected:
~IDeckLinkHDMIInputEDID()864     virtual ~IDeckLinkHDMIInputEDID () {} // call Release method to drop reference count
865 };
866 
867 /* Interface IDeckLinkEncoderInput - Created by QueryInterface from IDeckLink. */
868 
869 class BMD_PUBLIC IDeckLinkEncoderInput : public IUnknown
870 {
871 public:
872     virtual HRESULT DoesSupportVideoMode (/* in */ BMDVideoConnection connection /* If a value of bmdVideoConnectionUnspecified is specified, the caller does not care about the connection */, /* in */ BMDDisplayMode requestedMode, /* in */ BMDPixelFormat requestedCodec, /* in */ uint32_t requestedCodecProfile, /* in */ BMDSupportedVideoModeFlags flags, /* out */ bool* supported) = 0;
873     virtual HRESULT GetDisplayMode (/* in */ BMDDisplayMode displayMode, /* out */ IDeckLinkDisplayMode** resultDisplayMode) = 0;
874     virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator** iterator) = 0;
875 
876     /* Video Input */
877 
878     virtual HRESULT EnableVideoInput (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags) = 0;
879     virtual HRESULT DisableVideoInput (void) = 0;
880     virtual HRESULT GetAvailablePacketsCount (/* out */ uint32_t* availablePacketsCount) = 0;
881     virtual HRESULT SetMemoryAllocator (/* in */ IDeckLinkMemoryAllocator* theAllocator) = 0;
882 
883     /* Audio Input */
884 
885     virtual HRESULT EnableAudioInput (/* in */ BMDAudioFormat audioFormat, /* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount) = 0;
886     virtual HRESULT DisableAudioInput (void) = 0;
887     virtual HRESULT GetAvailableAudioSampleFrameCount (/* out */ uint32_t* availableSampleFrameCount) = 0;
888 
889     /* Input Control */
890 
891     virtual HRESULT StartStreams (void) = 0;
892     virtual HRESULT StopStreams (void) = 0;
893     virtual HRESULT PauseStreams (void) = 0;
894     virtual HRESULT FlushStreams (void) = 0;
895     virtual HRESULT SetCallback (/* in */ IDeckLinkEncoderInputCallback* theCallback) = 0;
896 
897     /* Hardware Timing */
898 
899     virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue* hardwareTime, /* out */ BMDTimeValue* timeInFrame, /* out */ BMDTimeValue* ticksPerFrame) = 0;
900 
901 protected:
~IDeckLinkEncoderInput()902     virtual ~IDeckLinkEncoderInput () {} // call Release method to drop reference count
903 };
904 
905 /* Interface IDeckLinkVideoFrame - Interface to encapsulate a video frame; can be caller-implemented. */
906 
907 class BMD_PUBLIC IDeckLinkVideoFrame : public IUnknown
908 {
909 public:
910     virtual long GetWidth (void) = 0;
911     virtual long GetHeight (void) = 0;
912     virtual long GetRowBytes (void) = 0;
913     virtual BMDPixelFormat GetPixelFormat (void) = 0;
914     virtual BMDFrameFlags GetFlags (void) = 0;
915     virtual HRESULT GetBytes (/* out */ void** buffer) = 0;
916     virtual HRESULT GetTimecode (/* in */ BMDTimecodeFormat format, /* out */ IDeckLinkTimecode** timecode) = 0;
917     virtual HRESULT GetAncillaryData (/* out */ IDeckLinkVideoFrameAncillary** ancillary) = 0;	// Use of IDeckLinkVideoFrameAncillaryPackets is preferred
918 
919 protected:
~IDeckLinkVideoFrame()920     virtual ~IDeckLinkVideoFrame () {} // call Release method to drop reference count
921 };
922 
923 /* Interface IDeckLinkMutableVideoFrame - Created by IDeckLinkOutput::CreateVideoFrame. */
924 
925 class BMD_PUBLIC IDeckLinkMutableVideoFrame : public IDeckLinkVideoFrame
926 {
927 public:
928     virtual HRESULT SetFlags (/* in */ BMDFrameFlags newFlags) = 0;
929     virtual HRESULT SetTimecode (/* in */ BMDTimecodeFormat format, /* in */ IDeckLinkTimecode* timecode) = 0;
930     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;
931     virtual HRESULT SetAncillaryData (/* in */ IDeckLinkVideoFrameAncillary* ancillary) = 0;
932     virtual HRESULT SetTimecodeUserBits (/* in */ BMDTimecodeFormat format, /* in */ BMDTimecodeUserBits userBits) = 0;
933 
934 protected:
~IDeckLinkMutableVideoFrame()935     virtual ~IDeckLinkMutableVideoFrame () {} // call Release method to drop reference count
936 };
937 
938 /* Interface IDeckLinkVideoFrame3DExtensions - Optional interface implemented on IDeckLinkVideoFrame to support 3D frames */
939 
940 class BMD_PUBLIC IDeckLinkVideoFrame3DExtensions : public IUnknown
941 {
942 public:
943     virtual BMDVideo3DPackingFormat Get3DPackingFormat (void) = 0;
944     virtual HRESULT GetFrameForRightEye (/* out */ IDeckLinkVideoFrame** rightEyeFrame) = 0;
945 
946 protected:
~IDeckLinkVideoFrame3DExtensions()947     virtual ~IDeckLinkVideoFrame3DExtensions () {} // call Release method to drop reference count
948 };
949 
950 /* Interface IDeckLinkVideoFrameMetadataExtensions - Optional interface implemented on IDeckLinkVideoFrame to support frame metadata such as HDR information */
951 
952 class BMD_PUBLIC IDeckLinkVideoFrameMetadataExtensions : public IUnknown
953 {
954 public:
955     virtual HRESULT GetInt (/* in */ BMDDeckLinkFrameMetadataID metadataID, /* out */ int64_t* value) = 0;
956     virtual HRESULT GetFloat (/* in */ BMDDeckLinkFrameMetadataID metadataID, /* out */ double* value) = 0;
957     virtual HRESULT GetFlag (/* in */ BMDDeckLinkFrameMetadataID metadataID, /* out */ bool* value) = 0;
958     virtual HRESULT GetString (/* in */ BMDDeckLinkFrameMetadataID metadataID, /* out */ CFStringRef* value) = 0;
959     virtual HRESULT GetBytes (/* in */ BMDDeckLinkFrameMetadataID metadataID, /* out */ void* buffer /* optional */, /* in, out */ uint32_t* bufferSize) = 0;
960 
961 protected:
~IDeckLinkVideoFrameMetadataExtensions()962     virtual ~IDeckLinkVideoFrameMetadataExtensions () {} // call Release method to drop reference count
963 };
964 
965 /* Interface IDeckLinkVideoInputFrame - Provided by the IDeckLinkVideoInput frame arrival callback. */
966 
967 class BMD_PUBLIC IDeckLinkVideoInputFrame : public IDeckLinkVideoFrame
968 {
969 public:
970     virtual HRESULT GetStreamTime (/* out */ BMDTimeValue* frameTime, /* out */ BMDTimeValue* frameDuration, /* in */ BMDTimeScale timeScale) = 0;
971     virtual HRESULT GetHardwareReferenceTimestamp (/* in */ BMDTimeScale timeScale, /* out */ BMDTimeValue* frameTime, /* out */ BMDTimeValue* frameDuration) = 0;
972 
973 protected:
~IDeckLinkVideoInputFrame()974     virtual ~IDeckLinkVideoInputFrame () {} // call Release method to drop reference count
975 };
976 
977 /* Interface IDeckLinkAncillaryPacket - On output, user needs to implement this interface */
978 
979 class BMD_PUBLIC IDeckLinkAncillaryPacket : public IUnknown
980 {
981 public:
982     virtual HRESULT GetBytes (/* in */ BMDAncillaryPacketFormat format /* For output, only one format need be offered */, /* out */ const void** data /* Optional */, /* out */ uint32_t* size /* Optional */) = 0;
983     virtual uint8_t GetDID (void) = 0;
984     virtual uint8_t GetSDID (void) = 0;
985     virtual uint32_t GetLineNumber (void) = 0;	// On output, zero is auto
986     virtual uint8_t GetDataStreamIndex (void) = 0;	// Usually zero. Can only be 1 if non-SD and the first data stream is completely full
987 
988 protected:
~IDeckLinkAncillaryPacket()989     virtual ~IDeckLinkAncillaryPacket () {} // call Release method to drop reference count
990 };
991 
992 /* Interface IDeckLinkAncillaryPacketIterator - Enumerates ancillary packets */
993 
994 class BMD_PUBLIC IDeckLinkAncillaryPacketIterator : public IUnknown
995 {
996 public:
997     virtual HRESULT Next (/* out */ IDeckLinkAncillaryPacket** packet) = 0;
998 
999 protected:
~IDeckLinkAncillaryPacketIterator()1000     virtual ~IDeckLinkAncillaryPacketIterator () {} // call Release method to drop reference count
1001 };
1002 
1003 /* Interface IDeckLinkVideoFrameAncillaryPackets - Obtained through QueryInterface on an IDeckLinkVideoFrame object. */
1004 
1005 class BMD_PUBLIC IDeckLinkVideoFrameAncillaryPackets : public IUnknown
1006 {
1007 public:
1008     virtual HRESULT GetPacketIterator (/* out */ IDeckLinkAncillaryPacketIterator** iterator) = 0;
1009     virtual HRESULT GetFirstPacketByID (/* in */ uint8_t DID, /* in */ uint8_t SDID, /* out */ IDeckLinkAncillaryPacket** packet) = 0;
1010     virtual HRESULT AttachPacket (/* in */ IDeckLinkAncillaryPacket* packet) = 0;	// Implement IDeckLinkAncillaryPacket to output your own
1011     virtual HRESULT DetachPacket (/* in */ IDeckLinkAncillaryPacket* packet) = 0;
1012     virtual HRESULT DetachAllPackets (void) = 0;
1013 
1014 protected:
~IDeckLinkVideoFrameAncillaryPackets()1015     virtual ~IDeckLinkVideoFrameAncillaryPackets () {} // call Release method to drop reference count
1016 };
1017 
1018 /* Interface IDeckLinkVideoFrameAncillary - Use of IDeckLinkVideoFrameAncillaryPackets is preferred. Obtained through QueryInterface on an IDeckLinkVideoFrame object. */
1019 
1020 class BMD_PUBLIC IDeckLinkVideoFrameAncillary : public IUnknown
1021 {
1022 public:
1023     virtual HRESULT GetBufferForVerticalBlankingLine (/* in */ uint32_t lineNumber, /* out */ void** buffer) = 0;	// Pixels/rowbytes is same as display mode, except for above HD where it's 1920 pixels for UHD modes and 2048 pixels for DCI modes
1024     virtual BMDPixelFormat GetPixelFormat (void) = 0;
1025     virtual BMDDisplayMode GetDisplayMode (void) = 0;
1026 
1027 protected:
~IDeckLinkVideoFrameAncillary()1028     virtual ~IDeckLinkVideoFrameAncillary () {} // call Release method to drop reference count
1029 };
1030 
1031 /* Interface IDeckLinkEncoderPacket - Interface to encapsulate an encoded packet. */
1032 
1033 class BMD_PUBLIC IDeckLinkEncoderPacket : public IUnknown
1034 {
1035 public:
1036     virtual HRESULT GetBytes (/* out */ void** buffer) = 0;
1037     virtual long GetSize (void) = 0;
1038     virtual HRESULT GetStreamTime (/* out */ BMDTimeValue* frameTime, /* in */ BMDTimeScale timeScale) = 0;
1039     virtual BMDPacketType GetPacketType (void) = 0;
1040 
1041 protected:
~IDeckLinkEncoderPacket()1042     virtual ~IDeckLinkEncoderPacket () {} // call Release method to drop reference count
1043 };
1044 
1045 /* Interface IDeckLinkEncoderVideoPacket - Provided by the IDeckLinkEncoderInput video packet arrival callback. */
1046 
1047 class BMD_PUBLIC IDeckLinkEncoderVideoPacket : public IDeckLinkEncoderPacket
1048 {
1049 public:
1050     virtual BMDPixelFormat GetPixelFormat (void) = 0;
1051     virtual HRESULT GetHardwareReferenceTimestamp (/* in */ BMDTimeScale timeScale, /* out */ BMDTimeValue* frameTime, /* out */ BMDTimeValue* frameDuration) = 0;
1052     virtual HRESULT GetTimecode (/* in */ BMDTimecodeFormat format, /* out */ IDeckLinkTimecode** timecode) = 0;
1053 
1054 protected:
~IDeckLinkEncoderVideoPacket()1055     virtual ~IDeckLinkEncoderVideoPacket () {} // call Release method to drop reference count
1056 };
1057 
1058 /* Interface IDeckLinkEncoderAudioPacket - Provided by the IDeckLinkEncoderInput audio packet arrival callback. */
1059 
1060 class BMD_PUBLIC IDeckLinkEncoderAudioPacket : public IDeckLinkEncoderPacket
1061 {
1062 public:
1063     virtual BMDAudioFormat GetAudioFormat (void) = 0;
1064 
1065 protected:
~IDeckLinkEncoderAudioPacket()1066     virtual ~IDeckLinkEncoderAudioPacket () {} // call Release method to drop reference count
1067 };
1068 
1069 /* Interface IDeckLinkH265NALPacket - Obtained through QueryInterface on an IDeckLinkEncoderVideoPacket object */
1070 
1071 class BMD_PUBLIC IDeckLinkH265NALPacket : public IDeckLinkEncoderVideoPacket
1072 {
1073 public:
1074     virtual HRESULT GetUnitType (/* out */ uint8_t* unitType) = 0;
1075     virtual HRESULT GetBytesNoPrefix (/* out */ void** buffer) = 0;
1076     virtual long GetSizeNoPrefix (void) = 0;
1077 
1078 protected:
~IDeckLinkH265NALPacket()1079     virtual ~IDeckLinkH265NALPacket () {} // call Release method to drop reference count
1080 };
1081 
1082 /* Interface IDeckLinkAudioInputPacket - Provided by the IDeckLinkInput callback. */
1083 
1084 class BMD_PUBLIC IDeckLinkAudioInputPacket : public IUnknown
1085 {
1086 public:
1087     virtual long GetSampleFrameCount (void) = 0;
1088     virtual HRESULT GetBytes (/* out */ void** buffer) = 0;
1089     virtual HRESULT GetPacketTime (/* out */ BMDTimeValue* packetTime, /* in */ BMDTimeScale timeScale) = 0;
1090 
1091 protected:
~IDeckLinkAudioInputPacket()1092     virtual ~IDeckLinkAudioInputPacket () {} // call Release method to drop reference count
1093 };
1094 
1095 /* Interface IDeckLinkScreenPreviewCallback - Screen preview callback */
1096 
1097 class BMD_PUBLIC IDeckLinkScreenPreviewCallback : public IUnknown
1098 {
1099 public:
1100     virtual HRESULT DrawFrame (/* in */ IDeckLinkVideoFrame* theFrame) = 0;
1101 
1102 protected:
~IDeckLinkScreenPreviewCallback()1103     virtual ~IDeckLinkScreenPreviewCallback () {} // call Release method to drop reference count
1104 };
1105 
1106 /* Interface IDeckLinkCocoaScreenPreviewCallback - Screen preview callback for Cocoa-based applications. Created with CreateCocoaScreenPreview */
1107 
1108 class BMD_PUBLIC IDeckLinkCocoaScreenPreviewCallback : public IDeckLinkScreenPreviewCallback
1109 {
1110 public:
1111 
1112 protected:
~IDeckLinkCocoaScreenPreviewCallback()1113     virtual ~IDeckLinkCocoaScreenPreviewCallback () {} // call Release method to drop reference count
1114 };
1115 
1116 /* Interface IDeckLinkGLScreenPreviewHelper - Created with CoCreateInstance on platforms with native COM support or from CreateOpenGLScreenPreviewHelper on other platforms. */
1117 
1118 class BMD_PUBLIC IDeckLinkGLScreenPreviewHelper : public IUnknown
1119 {
1120 public:
1121 
1122     /* Methods must be called with OpenGL context set */
1123 
1124     virtual HRESULT InitializeGL (void) = 0;
1125     virtual HRESULT PaintGL (void) = 0;
1126     virtual HRESULT SetFrame (/* in */ IDeckLinkVideoFrame* theFrame) = 0;
1127     virtual HRESULT Set3DPreviewFormat (/* in */ BMD3DPreviewFormat previewFormat) = 0;
1128 
1129 protected:
~IDeckLinkGLScreenPreviewHelper()1130     virtual ~IDeckLinkGLScreenPreviewHelper () {} // call Release method to drop reference count
1131 };
1132 
1133 /* Interface IDeckLinkNotificationCallback - DeckLink Notification Callback Interface */
1134 
1135 class BMD_PUBLIC IDeckLinkNotificationCallback : public IUnknown
1136 {
1137 public:
1138     virtual HRESULT Notify (/* in */ BMDNotifications topic, /* in */ uint64_t param1, /* in */ uint64_t param2) = 0;
1139 };
1140 
1141 /* Interface IDeckLinkNotification - DeckLink Notification interface */
1142 
1143 class BMD_PUBLIC IDeckLinkNotification : public IUnknown
1144 {
1145 public:
1146     virtual HRESULT Subscribe (/* in */ BMDNotifications topic, /* in */ IDeckLinkNotificationCallback* theCallback) = 0;
1147     virtual HRESULT Unsubscribe (/* in */ BMDNotifications topic, /* in */ IDeckLinkNotificationCallback* theCallback) = 0;
1148 
1149 protected:
~IDeckLinkNotification()1150     virtual ~IDeckLinkNotification () {} // call Release method to drop reference count
1151 };
1152 
1153 /* Interface IDeckLinkProfileAttributes - Created by QueryInterface from an IDeckLinkProfile, or from IDeckLink. When queried from IDeckLink, interrogates the active profile */
1154 
1155 class BMD_PUBLIC IDeckLinkProfileAttributes : public IUnknown
1156 {
1157 public:
1158     virtual HRESULT GetFlag (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ bool* value) = 0;
1159     virtual HRESULT GetInt (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ int64_t* value) = 0;
1160     virtual HRESULT GetFloat (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ double* value) = 0;
1161     virtual HRESULT GetString (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ CFStringRef* value) = 0;
1162 
1163 protected:
~IDeckLinkProfileAttributes()1164     virtual ~IDeckLinkProfileAttributes () {} // call Release method to drop reference count
1165 };
1166 
1167 /* Interface IDeckLinkProfileIterator - Enumerates IDeckLinkProfile interfaces */
1168 
1169 class BMD_PUBLIC IDeckLinkProfileIterator : public IUnknown
1170 {
1171 public:
1172     virtual HRESULT Next (/* out */ IDeckLinkProfile** profile) = 0;
1173 
1174 protected:
~IDeckLinkProfileIterator()1175     virtual ~IDeckLinkProfileIterator () {} // call Release method to drop reference count
1176 };
1177 
1178 /* Interface IDeckLinkProfile - Represents the active profile when queried from IDeckLink */
1179 
1180 class BMD_PUBLIC IDeckLinkProfile : public IUnknown
1181 {
1182 public:
1183     virtual HRESULT GetDevice (/* out */ IDeckLink** device) = 0;	// Device affected when this profile becomes active
1184     virtual HRESULT IsActive (/* out */ bool* isActive) = 0;
1185     virtual HRESULT SetActive (void) = 0;	// Activating a profile will also change the profile on all devices enumerated by GetPeers. Activation is not complete until IDeckLinkProfileCallback::ProfileActivated is called
1186     virtual HRESULT GetPeers (/* out */ IDeckLinkProfileIterator** profileIterator) = 0;	// Profiles of other devices activated with this profile
1187 
1188 protected:
~IDeckLinkProfile()1189     virtual ~IDeckLinkProfile () {} // call Release method to drop reference count
1190 };
1191 
1192 /* Interface IDeckLinkProfileCallback - Receive notifications about profiles related to this device */
1193 
1194 class BMD_PUBLIC IDeckLinkProfileCallback : public IUnknown
1195 {
1196 public:
1197     virtual HRESULT ProfileChanging (/* in */ IDeckLinkProfile* profileToBeActivated, /* in */ bool streamsWillBeForcedToStop) = 0;	// Called before this device changes profile. User has an opportunity for teardown if streamsWillBeForcedToStop
1198     virtual HRESULT ProfileActivated (/* in */ IDeckLinkProfile* activatedProfile) = 0;	// Called after this device has been activated with a new profile
1199 
1200 protected:
~IDeckLinkProfileCallback()1201     virtual ~IDeckLinkProfileCallback () {} // call Release method to drop reference count
1202 };
1203 
1204 /* Interface IDeckLinkProfileManager - Created by QueryInterface from IDeckLink when a device has multiple optional profiles */
1205 
1206 class BMD_PUBLIC IDeckLinkProfileManager : public IUnknown
1207 {
1208 public:
1209     virtual HRESULT GetProfiles (/* out */ IDeckLinkProfileIterator** profileIterator) = 0;	// All available profiles for this device
1210     virtual HRESULT GetProfile (/* in */ BMDProfileID profileID, /* out */ IDeckLinkProfile** profile) = 0;
1211     virtual HRESULT SetCallback (/* in */ IDeckLinkProfileCallback* callback) = 0;
1212 
1213 protected:
~IDeckLinkProfileManager()1214     virtual ~IDeckLinkProfileManager () {} // call Release method to drop reference count
1215 };
1216 
1217 /* Interface IDeckLinkStatus - DeckLink Status interface */
1218 
1219 class BMD_PUBLIC IDeckLinkStatus : public IUnknown
1220 {
1221 public:
1222     virtual HRESULT GetFlag (/* in */ BMDDeckLinkStatusID statusID, /* out */ bool* value) = 0;
1223     virtual HRESULT GetInt (/* in */ BMDDeckLinkStatusID statusID, /* out */ int64_t* value) = 0;
1224     virtual HRESULT GetFloat (/* in */ BMDDeckLinkStatusID statusID, /* out */ double* value) = 0;
1225     virtual HRESULT GetString (/* in */ BMDDeckLinkStatusID statusID, /* out */ CFStringRef* value) = 0;
1226     virtual HRESULT GetBytes (/* in */ BMDDeckLinkStatusID statusID, /* out */ void* buffer, /* in, out */ uint32_t* bufferSize) = 0;
1227 
1228 protected:
~IDeckLinkStatus()1229     virtual ~IDeckLinkStatus () {} // call Release method to drop reference count
1230 };
1231 
1232 /* Interface IDeckLinkKeyer - DeckLink Keyer interface */
1233 
1234 class BMD_PUBLIC IDeckLinkKeyer : public IUnknown
1235 {
1236 public:
1237     virtual HRESULT Enable (/* in */ bool isExternal) = 0;
1238     virtual HRESULT SetLevel (/* in */ uint8_t level) = 0;
1239     virtual HRESULT RampUp (/* in */ uint32_t numberOfFrames) = 0;
1240     virtual HRESULT RampDown (/* in */ uint32_t numberOfFrames) = 0;
1241     virtual HRESULT Disable (void) = 0;
1242 
1243 protected:
~IDeckLinkKeyer()1244     virtual ~IDeckLinkKeyer () {} // call Release method to drop reference count
1245 };
1246 
1247 /* Interface IDeckLinkVideoConversion - Created with CoCreateInstance. */
1248 
1249 class BMD_PUBLIC IDeckLinkVideoConversion : public IUnknown
1250 {
1251 public:
1252     virtual HRESULT ConvertFrame (/* in */ IDeckLinkVideoFrame* srcFrame, /* in */ IDeckLinkVideoFrame* dstFrame) = 0;
1253 
1254 protected:
~IDeckLinkVideoConversion()1255     virtual ~IDeckLinkVideoConversion () {} // call Release method to drop reference count
1256 };
1257 
1258 /* Interface IDeckLinkDeviceNotificationCallback - DeckLink device arrival/removal notification callbacks */
1259 
1260 class BMD_PUBLIC IDeckLinkDeviceNotificationCallback : public IUnknown
1261 {
1262 public:
1263     virtual HRESULT DeckLinkDeviceArrived (/* in */ IDeckLink* deckLinkDevice) = 0;
1264     virtual HRESULT DeckLinkDeviceRemoved (/* in */ IDeckLink* deckLinkDevice) = 0;
1265 
1266 protected:
~IDeckLinkDeviceNotificationCallback()1267     virtual ~IDeckLinkDeviceNotificationCallback () {} // call Release method to drop reference count
1268 };
1269 
1270 /* Interface IDeckLinkDiscovery - DeckLink device discovery */
1271 
1272 class BMD_PUBLIC IDeckLinkDiscovery : public IUnknown
1273 {
1274 public:
1275     virtual HRESULT InstallDeviceNotifications (/* in */ IDeckLinkDeviceNotificationCallback* deviceNotificationCallback) = 0;
1276     virtual HRESULT UninstallDeviceNotifications (void) = 0;
1277 
1278 protected:
~IDeckLinkDiscovery()1279     virtual ~IDeckLinkDiscovery () {} // call Release method to drop reference count
1280 };
1281 
1282 /* Functions */
1283 
1284 extern "C" {
1285 
1286     IDeckLinkIterator* BMD_PUBLIC CreateDeckLinkIteratorInstance(void);
1287     IDeckLinkDiscovery* BMD_PUBLIC CreateDeckLinkDiscoveryInstance(void);
1288     IDeckLinkAPIInformation* BMD_PUBLIC CreateDeckLinkAPIInformationInstance(void);
1289     IDeckLinkGLScreenPreviewHelper* BMD_PUBLIC CreateOpenGLScreenPreviewHelper(void);
1290     IDeckLinkCocoaScreenPreviewCallback* BMD_PUBLIC CreateCocoaScreenPreview(/* in */ void* /* (NSView*)*/ parentView);
1291     IDeckLinkVideoConversion* BMD_PUBLIC CreateVideoConversionInstance(void);
1292     IDeckLinkVideoFrameAncillaryPackets* BMD_PUBLIC CreateVideoFrameAncillaryPacketsInstance(void);	// For use when creating a custom IDeckLinkVideoFrame without wrapping IDeckLinkOutput::CreateVideoFrame
1293 
1294 }
1295 
1296 #endif /* defined(__cplusplus) */
1297 #endif /* defined(BMD_DECKLINKAPI_H) */
1298