]> git.sesse.net Git - nageru/blob - nageru/decklink/DeckLinkAPIConfiguration.h
Upgrade DeckLink SDK to 10.11.4.
[nageru] / nageru / decklink / DeckLinkAPIConfiguration.h
1 /* -LICENSE-START-
2 ** Copyright (c) 2018 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_DECKLINKAPICONFIGURATION_H
29 #define BMD_DECKLINKAPICONFIGURATION_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 // Type Declarations
45
46
47 // Interface ID Declarations
48
49 BMD_CONST REFIID IID_IDeckLinkConfiguration                       = /* EF90380B-4AE5-4346-9077-E288E149F129 */ {0xEF,0x90,0x38,0x0B,0x4A,0xE5,0x43,0x46,0x90,0x77,0xE2,0x88,0xE1,0x49,0xF1,0x29};
50 BMD_CONST REFIID IID_IDeckLinkEncoderConfiguration                = /* 138050E5-C60A-4552-BF3F-0F358049327E */ {0x13,0x80,0x50,0xE5,0xC6,0x0A,0x45,0x52,0xBF,0x3F,0x0F,0x35,0x80,0x49,0x32,0x7E};
51
52 /* Enum BMDDeckLinkConfigurationID - DeckLink Configuration ID */
53
54 typedef uint32_t BMDDeckLinkConfigurationID;
55 enum _BMDDeckLinkConfigurationID {
56
57     /* Serial port Flags */
58
59     bmdDeckLinkConfigSwapSerialRxTx                              = /* 'ssrt' */ 0x73737274,
60
61     /* Video Input/Output Integers */
62
63     bmdDeckLinkConfigHDMI3DPackingFormat                         = /* '3dpf' */ 0x33647066,
64     bmdDeckLinkConfigBypass                                      = /* 'byps' */ 0x62797073,
65     bmdDeckLinkConfigClockTimingAdjustment                       = /* 'ctad' */ 0x63746164,
66     bmdDeckLinkConfigDuplexMode                                  = /* 'dupx' */ 0x64757078,
67
68     /* Audio Input/Output Flags */
69
70     bmdDeckLinkConfigAnalogAudioConsumerLevels                   = /* 'aacl' */ 0x6161636C,
71
72     /* Video output flags */
73
74     bmdDeckLinkConfigFieldFlickerRemoval                         = /* 'fdfr' */ 0x66646672,
75     bmdDeckLinkConfigHD1080p24ToHD1080i5994Conversion            = /* 'to59' */ 0x746F3539,
76     bmdDeckLinkConfig444SDIVideoOutput                           = /* '444o' */ 0x3434346F,
77     bmdDeckLinkConfigBlackVideoOutputDuringCapture               = /* 'bvoc' */ 0x62766F63,
78     bmdDeckLinkConfigLowLatencyVideoOutput                       = /* 'llvo' */ 0x6C6C766F,
79     bmdDeckLinkConfigDownConversionOnAllAnalogOutput             = /* 'caao' */ 0x6361616F,
80     bmdDeckLinkConfigSMPTELevelAOutput                           = /* 'smta' */ 0x736D7461,
81     bmdDeckLinkConfigRec2020Output                               = /* 'rec2' */ 0x72656332,     // Ensure output is Rec.2020 colorspace
82     bmdDeckLinkConfigQuadLinkSDIVideoOutputSquareDivisionSplit   = /* 'SDQS' */ 0x53445153,
83
84     /* Video Output Flags */
85
86     bmdDeckLinkConfigOutput1080pAsPsF                            = /* 'pfpr' */ 0x70667072,
87
88     /* Video Output Integers */
89
90     bmdDeckLinkConfigVideoOutputConnection                       = /* 'vocn' */ 0x766F636E,
91     bmdDeckLinkConfigVideoOutputConversionMode                   = /* 'vocm' */ 0x766F636D,
92     bmdDeckLinkConfigAnalogVideoOutputFlags                      = /* 'avof' */ 0x61766F66,
93     bmdDeckLinkConfigReferenceInputTimingOffset                  = /* 'glot' */ 0x676C6F74,
94     bmdDeckLinkConfigVideoOutputIdleOperation                    = /* 'voio' */ 0x766F696F,
95     bmdDeckLinkConfigDefaultVideoOutputMode                      = /* 'dvom' */ 0x64766F6D,
96     bmdDeckLinkConfigDefaultVideoOutputModeFlags                 = /* 'dvof' */ 0x64766F66,
97     bmdDeckLinkConfigSDIOutputLinkConfiguration                  = /* 'solc' */ 0x736F6C63,
98
99     /* Video Output Floats */
100
101     bmdDeckLinkConfigVideoOutputComponentLumaGain                = /* 'oclg' */ 0x6F636C67,
102     bmdDeckLinkConfigVideoOutputComponentChromaBlueGain          = /* 'occb' */ 0x6F636362,
103     bmdDeckLinkConfigVideoOutputComponentChromaRedGain           = /* 'occr' */ 0x6F636372,
104     bmdDeckLinkConfigVideoOutputCompositeLumaGain                = /* 'oilg' */ 0x6F696C67,
105     bmdDeckLinkConfigVideoOutputCompositeChromaGain              = /* 'oicg' */ 0x6F696367,
106     bmdDeckLinkConfigVideoOutputSVideoLumaGain                   = /* 'oslg' */ 0x6F736C67,
107     bmdDeckLinkConfigVideoOutputSVideoChromaGain                 = /* 'oscg' */ 0x6F736367,
108
109     /* Video Input Flags */
110
111     bmdDeckLinkConfigVideoInputScanning                          = /* 'visc' */ 0x76697363,     // Applicable to H264 Pro Recorder only
112     bmdDeckLinkConfigUseDedicatedLTCInput                        = /* 'dltc' */ 0x646C7463,     // Use timecode from LTC input instead of SDI stream
113     bmdDeckLinkConfigSDIInput3DPayloadOverride                   = /* '3dds' */ 0x33646473,
114
115     /* Video Input Flags */
116
117     bmdDeckLinkConfigCapture1080pAsPsF                           = /* 'cfpr' */ 0x63667072,
118
119     /* Video Input Integers */
120
121     bmdDeckLinkConfigVideoInputConnection                        = /* 'vicn' */ 0x7669636E,
122     bmdDeckLinkConfigAnalogVideoInputFlags                       = /* 'avif' */ 0x61766966,
123     bmdDeckLinkConfigVideoInputConversionMode                    = /* 'vicm' */ 0x7669636D,
124     bmdDeckLinkConfig32PulldownSequenceInitialTimecodeFrame      = /* 'pdif' */ 0x70646966,
125     bmdDeckLinkConfigVANCSourceLine1Mapping                      = /* 'vsl1' */ 0x76736C31,
126     bmdDeckLinkConfigVANCSourceLine2Mapping                      = /* 'vsl2' */ 0x76736C32,
127     bmdDeckLinkConfigVANCSourceLine3Mapping                      = /* 'vsl3' */ 0x76736C33,
128     bmdDeckLinkConfigCapturePassThroughMode                      = /* 'cptm' */ 0x6370746D,
129
130     /* Video Input Floats */
131
132     bmdDeckLinkConfigVideoInputComponentLumaGain                 = /* 'iclg' */ 0x69636C67,
133     bmdDeckLinkConfigVideoInputComponentChromaBlueGain           = /* 'iccb' */ 0x69636362,
134     bmdDeckLinkConfigVideoInputComponentChromaRedGain            = /* 'iccr' */ 0x69636372,
135     bmdDeckLinkConfigVideoInputCompositeLumaGain                 = /* 'iilg' */ 0x69696C67,
136     bmdDeckLinkConfigVideoInputCompositeChromaGain               = /* 'iicg' */ 0x69696367,
137     bmdDeckLinkConfigVideoInputSVideoLumaGain                    = /* 'islg' */ 0x69736C67,
138     bmdDeckLinkConfigVideoInputSVideoChromaGain                  = /* 'iscg' */ 0x69736367,
139
140     /* Audio Input Flags */
141
142     bmdDeckLinkConfigMicrophonePhantomPower                      = /* 'mphp' */ 0x6D706870,
143
144     /* Audio Input Integers */
145
146     bmdDeckLinkConfigAudioInputConnection                        = /* 'aicn' */ 0x6169636E,
147
148     /* Audio Input Floats */
149
150     bmdDeckLinkConfigAnalogAudioInputScaleChannel1               = /* 'ais1' */ 0x61697331,
151     bmdDeckLinkConfigAnalogAudioInputScaleChannel2               = /* 'ais2' */ 0x61697332,
152     bmdDeckLinkConfigAnalogAudioInputScaleChannel3               = /* 'ais3' */ 0x61697333,
153     bmdDeckLinkConfigAnalogAudioInputScaleChannel4               = /* 'ais4' */ 0x61697334,
154     bmdDeckLinkConfigDigitalAudioInputScale                      = /* 'dais' */ 0x64616973,
155     bmdDeckLinkConfigMicrophoneInputGain                         = /* 'micg' */ 0x6D696367,
156
157     /* Audio Output Integers */
158
159     bmdDeckLinkConfigAudioOutputAESAnalogSwitch                  = /* 'aoaa' */ 0x616F6161,
160
161     /* Audio Output Floats */
162
163     bmdDeckLinkConfigAnalogAudioOutputScaleChannel1              = /* 'aos1' */ 0x616F7331,
164     bmdDeckLinkConfigAnalogAudioOutputScaleChannel2              = /* 'aos2' */ 0x616F7332,
165     bmdDeckLinkConfigAnalogAudioOutputScaleChannel3              = /* 'aos3' */ 0x616F7333,
166     bmdDeckLinkConfigAnalogAudioOutputScaleChannel4              = /* 'aos4' */ 0x616F7334,
167     bmdDeckLinkConfigDigitalAudioOutputScale                     = /* 'daos' */ 0x64616F73,
168     bmdDeckLinkConfigHeadphoneVolume                             = /* 'hvol' */ 0x68766F6C,
169
170     /* Device Information Strings */
171
172     bmdDeckLinkConfigDeviceInformationLabel                      = /* 'dila' */ 0x64696C61,
173     bmdDeckLinkConfigDeviceInformationSerialNumber               = /* 'disn' */ 0x6469736E,
174     bmdDeckLinkConfigDeviceInformationCompany                    = /* 'dico' */ 0x6469636F,
175     bmdDeckLinkConfigDeviceInformationPhone                      = /* 'diph' */ 0x64697068,
176     bmdDeckLinkConfigDeviceInformationEmail                      = /* 'diem' */ 0x6469656D,
177     bmdDeckLinkConfigDeviceInformationDate                       = /* 'dida' */ 0x64696461,
178
179     /* Deck Control Integers */
180
181     bmdDeckLinkConfigDeckControlConnection                       = /* 'dcco' */ 0x6463636F
182 };
183
184 /* Enum BMDDeckLinkEncoderConfigurationID - DeckLink Encoder Configuration ID */
185
186 typedef uint32_t BMDDeckLinkEncoderConfigurationID;
187 enum _BMDDeckLinkEncoderConfigurationID {
188
189     /* Video Encoder Integers */
190
191     bmdDeckLinkEncoderConfigPreferredBitDepth                    = /* 'epbr' */ 0x65706272,
192     bmdDeckLinkEncoderConfigFrameCodingMode                      = /* 'efcm' */ 0x6566636D,
193
194     /* HEVC/H.265 Encoder Integers */
195
196     bmdDeckLinkEncoderConfigH265TargetBitrate                    = /* 'htbr' */ 0x68746272,
197
198     /* DNxHR/DNxHD Compression ID */
199
200     bmdDeckLinkEncoderConfigDNxHRCompressionID                   = /* 'dcid' */ 0x64636964,
201
202     /* DNxHR/DNxHD Level */
203
204     bmdDeckLinkEncoderConfigDNxHRLevel                           = /* 'dlev' */ 0x646C6576,
205
206     /* Encoded Sample Decriptions */
207
208     bmdDeckLinkEncoderConfigMPEG4SampleDescription               = /* 'stsE' */ 0x73747345,     // Full MPEG4 sample description (aka SampleEntry of an 'stsd' atom-box). Useful for MediaFoundation, QuickTime, MKV and more
209     bmdDeckLinkEncoderConfigMPEG4CodecSpecificDesc               = /* 'esds' */ 0x65736473      // Sample description extensions only (atom stream, each with size and fourCC header). Useful for AVFoundation, VideoToolbox, MKV and more
210 };
211
212 // Forward Declarations
213
214 class IDeckLinkConfiguration;
215 class IDeckLinkEncoderConfiguration;
216
217 /* Interface IDeckLinkConfiguration - DeckLink Configuration interface */
218
219 class BMD_PUBLIC IDeckLinkConfiguration : public IUnknown
220 {
221 public:
222     virtual HRESULT SetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ bool value) = 0;
223     virtual HRESULT GetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ bool *value) = 0;
224     virtual HRESULT SetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ int64_t value) = 0;
225     virtual HRESULT GetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ int64_t *value) = 0;
226     virtual HRESULT SetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ double value) = 0;
227     virtual HRESULT GetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ double *value) = 0;
228     virtual HRESULT SetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ const char *value) = 0;
229     virtual HRESULT GetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ const char **value) = 0;
230     virtual HRESULT WriteConfigurationToPreferences (void) = 0;
231
232 protected:
233     virtual ~IDeckLinkConfiguration () {} // call Release method to drop reference count
234 };
235
236 /* Interface IDeckLinkEncoderConfiguration - DeckLink Encoder Configuration interface. Obtained from IDeckLinkEncoderInput */
237
238 class BMD_PUBLIC IDeckLinkEncoderConfiguration : public IUnknown
239 {
240 public:
241     virtual HRESULT SetFlag (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* in */ bool value) = 0;
242     virtual HRESULT GetFlag (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ bool *value) = 0;
243     virtual HRESULT SetInt (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* in */ int64_t value) = 0;
244     virtual HRESULT GetInt (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ int64_t *value) = 0;
245     virtual HRESULT SetFloat (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* in */ double value) = 0;
246     virtual HRESULT GetFloat (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ double *value) = 0;
247     virtual HRESULT SetString (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* in */ const char *value) = 0;
248     virtual HRESULT GetString (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ const char **value) = 0;
249     virtual HRESULT GetBytes (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ void *buffer /* optional */, /* in, out */ uint32_t *bufferSize) = 0;
250
251 protected:
252     virtual ~IDeckLinkEncoderConfiguration () {} // call Release method to drop reference count
253 };
254
255 /* Functions */
256
257 extern "C" {
258
259
260 }
261
262
263 #endif /* defined(BMD_DECKLINKAPICONFIGURATION_H) */