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