2 ** Copyright (c) 2018 Blackmagic Design
4 ** Permission is hereby granted, free of charge, to any person or organization
5 ** obtaining a copy of the software and accompanying documentation covered by
6 ** this license (the "Software") to use, reproduce, display, distribute,
7 ** execute, and transmit the Software, and to prepare derivative works of the
8 ** Software, and to permit third-parties to whom the Software is furnished to
9 ** do so, all subject to the following:
11 ** The copyright notices in the Software and this entire statement, including
12 ** the above license grant, this restriction and the following disclaimer,
13 ** must be included in all copies of the Software, in whole or in part, and
14 ** all derivative works of the Software, unless such copies or derivative
15 ** works are solely in the form of machine-executable object code generated by
16 ** a source language processor.
18 ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
21 ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
22 ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
23 ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 ** DEALINGS IN THE SOFTWARE.
28 #ifndef BMD_DECKLINKAPICONFIGURATION_H
29 #define BMD_DECKLINKAPICONFIGURATION_H
34 #define BMD_CONST __declspec(selectany) static const
36 #define BMD_CONST static const
47 // Interface ID Declarations
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};
52 /* Enum BMDDeckLinkConfigurationID - DeckLink Configuration ID */
54 typedef uint32_t BMDDeckLinkConfigurationID;
55 enum _BMDDeckLinkConfigurationID {
57 /* Serial port Flags */
59 bmdDeckLinkConfigSwapSerialRxTx = /* 'ssrt' */ 0x73737274,
61 /* Video Input/Output Integers */
63 bmdDeckLinkConfigHDMI3DPackingFormat = /* '3dpf' */ 0x33647066,
64 bmdDeckLinkConfigBypass = /* 'byps' */ 0x62797073,
65 bmdDeckLinkConfigClockTimingAdjustment = /* 'ctad' */ 0x63746164,
66 bmdDeckLinkConfigDuplexMode = /* 'dupx' */ 0x64757078,
68 /* Audio Input/Output Flags */
70 bmdDeckLinkConfigAnalogAudioConsumerLevels = /* 'aacl' */ 0x6161636C,
72 /* Video output flags */
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,
84 /* Video Output Flags */
86 bmdDeckLinkConfigOutput1080pAsPsF = /* 'pfpr' */ 0x70667072,
88 /* Video Output Integers */
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,
99 /* Video Output Floats */
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,
109 /* Video Input Flags */
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,
115 /* Video Input Flags */
117 bmdDeckLinkConfigCapture1080pAsPsF = /* 'cfpr' */ 0x63667072,
119 /* Video Input Integers */
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,
130 /* Video Input Floats */
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,
140 /* Audio Input Flags */
142 bmdDeckLinkConfigMicrophonePhantomPower = /* 'mphp' */ 0x6D706870,
144 /* Audio Input Integers */
146 bmdDeckLinkConfigAudioInputConnection = /* 'aicn' */ 0x6169636E,
148 /* Audio Input Floats */
150 bmdDeckLinkConfigAnalogAudioInputScaleChannel1 = /* 'ais1' */ 0x61697331,
151 bmdDeckLinkConfigAnalogAudioInputScaleChannel2 = /* 'ais2' */ 0x61697332,
152 bmdDeckLinkConfigAnalogAudioInputScaleChannel3 = /* 'ais3' */ 0x61697333,
153 bmdDeckLinkConfigAnalogAudioInputScaleChannel4 = /* 'ais4' */ 0x61697334,
154 bmdDeckLinkConfigDigitalAudioInputScale = /* 'dais' */ 0x64616973,
155 bmdDeckLinkConfigMicrophoneInputGain = /* 'micg' */ 0x6D696367,
157 /* Audio Output Integers */
159 bmdDeckLinkConfigAudioOutputAESAnalogSwitch = /* 'aoaa' */ 0x616F6161,
161 /* Audio Output Floats */
163 bmdDeckLinkConfigAnalogAudioOutputScaleChannel1 = /* 'aos1' */ 0x616F7331,
164 bmdDeckLinkConfigAnalogAudioOutputScaleChannel2 = /* 'aos2' */ 0x616F7332,
165 bmdDeckLinkConfigAnalogAudioOutputScaleChannel3 = /* 'aos3' */ 0x616F7333,
166 bmdDeckLinkConfigAnalogAudioOutputScaleChannel4 = /* 'aos4' */ 0x616F7334,
167 bmdDeckLinkConfigDigitalAudioOutputScale = /* 'daos' */ 0x64616F73,
168 bmdDeckLinkConfigHeadphoneVolume = /* 'hvol' */ 0x68766F6C,
170 /* Device Information Strings */
172 bmdDeckLinkConfigDeviceInformationLabel = /* 'dila' */ 0x64696C61,
173 bmdDeckLinkConfigDeviceInformationSerialNumber = /* 'disn' */ 0x6469736E,
174 bmdDeckLinkConfigDeviceInformationCompany = /* 'dico' */ 0x6469636F,
175 bmdDeckLinkConfigDeviceInformationPhone = /* 'diph' */ 0x64697068,
176 bmdDeckLinkConfigDeviceInformationEmail = /* 'diem' */ 0x6469656D,
177 bmdDeckLinkConfigDeviceInformationDate = /* 'dida' */ 0x64696461,
179 /* Deck Control Integers */
181 bmdDeckLinkConfigDeckControlConnection = /* 'dcco' */ 0x6463636F
184 /* Enum BMDDeckLinkEncoderConfigurationID - DeckLink Encoder Configuration ID */
186 typedef uint32_t BMDDeckLinkEncoderConfigurationID;
187 enum _BMDDeckLinkEncoderConfigurationID {
189 /* Video Encoder Integers */
191 bmdDeckLinkEncoderConfigPreferredBitDepth = /* 'epbr' */ 0x65706272,
192 bmdDeckLinkEncoderConfigFrameCodingMode = /* 'efcm' */ 0x6566636D,
194 /* HEVC/H.265 Encoder Integers */
196 bmdDeckLinkEncoderConfigH265TargetBitrate = /* 'htbr' */ 0x68746272,
198 /* DNxHR/DNxHD Compression ID */
200 bmdDeckLinkEncoderConfigDNxHRCompressionID = /* 'dcid' */ 0x64636964,
202 /* DNxHR/DNxHD Level */
204 bmdDeckLinkEncoderConfigDNxHRLevel = /* 'dlev' */ 0x646C6576,
206 /* Encoded Sample Decriptions */
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
212 // Forward Declarations
214 class IDeckLinkConfiguration;
215 class IDeckLinkEncoderConfiguration;
217 /* Interface IDeckLinkConfiguration - DeckLink Configuration interface */
219 class BMD_PUBLIC IDeckLinkConfiguration : public IUnknown
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;
233 virtual ~IDeckLinkConfiguration () {} // call Release method to drop reference count
236 /* Interface IDeckLinkEncoderConfiguration - DeckLink Encoder Configuration interface. Obtained from IDeckLinkEncoderInput */
238 class BMD_PUBLIC IDeckLinkEncoderConfiguration : public IUnknown
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;
252 virtual ~IDeckLinkEncoderConfiguration () {} // call Release method to drop reference count
263 #endif /* defined(BMD_DECKLINKAPICONFIGURATION_H) */