1 /* -LICENSE-START- 2 ** Copyright (c) 2019 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 = /* 912F634B-2D4E-40A4-8AAB-8D80B73F1289 */ {0x91,0x2F,0x63,0x4B,0x2D,0x4E,0x40,0xA4,0x8A,0xAB,0x8D,0x80,0xB7,0x3F,0x12,0x89}; 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 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 bmdDeckLinkConfigRec2020Output = /* 'rec2' */ 0x72656332, // Ensure output is Rec.2020 colorspace 81 bmdDeckLinkConfigQuadLinkSDIVideoOutputSquareDivisionSplit = /* 'SDQS' */ 0x53445153, 82 83 /* Video Output Flags */ 84 85 bmdDeckLinkConfigOutput1080pAsPsF = /* 'pfpr' */ 0x70667072, 86 87 /* Video Output Integers */ 88 89 bmdDeckLinkConfigVideoOutputConnection = /* 'vocn' */ 0x766F636E, 90 bmdDeckLinkConfigVideoOutputConversionMode = /* 'vocm' */ 0x766F636D, 91 bmdDeckLinkConfigAnalogVideoOutputFlags = /* 'avof' */ 0x61766F66, 92 bmdDeckLinkConfigReferenceInputTimingOffset = /* 'glot' */ 0x676C6F74, 93 bmdDeckLinkConfigVideoOutputIdleOperation = /* 'voio' */ 0x766F696F, 94 bmdDeckLinkConfigDefaultVideoOutputMode = /* 'dvom' */ 0x64766F6D, 95 bmdDeckLinkConfigDefaultVideoOutputModeFlags = /* 'dvof' */ 0x64766F66, 96 bmdDeckLinkConfigSDIOutputLinkConfiguration = /* 'solc' */ 0x736F6C63, 97 bmdDeckLinkConfigHDMITimecodePacking = /* 'htpk' */ 0x6874706B, 98 bmdDeckLinkConfigPlaybackGroup = /* 'plgr' */ 0x706C6772, 99 100 /* Video Output Floats */ 101 102 bmdDeckLinkConfigVideoOutputComponentLumaGain = /* 'oclg' */ 0x6F636C67, 103 bmdDeckLinkConfigVideoOutputComponentChromaBlueGain = /* 'occb' */ 0x6F636362, 104 bmdDeckLinkConfigVideoOutputComponentChromaRedGain = /* 'occr' */ 0x6F636372, 105 bmdDeckLinkConfigVideoOutputCompositeLumaGain = /* 'oilg' */ 0x6F696C67, 106 bmdDeckLinkConfigVideoOutputCompositeChromaGain = /* 'oicg' */ 0x6F696367, 107 bmdDeckLinkConfigVideoOutputSVideoLumaGain = /* 'oslg' */ 0x6F736C67, 108 bmdDeckLinkConfigVideoOutputSVideoChromaGain = /* 'oscg' */ 0x6F736367, 109 110 /* Video Input Flags */ 111 112 bmdDeckLinkConfigVideoInputScanning = /* 'visc' */ 0x76697363, // Applicable to H264 Pro Recorder only 113 bmdDeckLinkConfigUseDedicatedLTCInput = /* 'dltc' */ 0x646C7463, // Use timecode from LTC input instead of SDI stream 114 bmdDeckLinkConfigSDIInput3DPayloadOverride = /* '3dds' */ 0x33646473, 115 116 /* Video Input Flags */ 117 118 bmdDeckLinkConfigCapture1080pAsPsF = /* 'cfpr' */ 0x63667072, 119 120 /* Video Input Integers */ 121 122 bmdDeckLinkConfigVideoInputConnection = /* 'vicn' */ 0x7669636E, 123 bmdDeckLinkConfigAnalogVideoInputFlags = /* 'avif' */ 0x61766966, 124 bmdDeckLinkConfigVideoInputConversionMode = /* 'vicm' */ 0x7669636D, 125 bmdDeckLinkConfig32PulldownSequenceInitialTimecodeFrame = /* 'pdif' */ 0x70646966, 126 bmdDeckLinkConfigVANCSourceLine1Mapping = /* 'vsl1' */ 0x76736C31, 127 bmdDeckLinkConfigVANCSourceLine2Mapping = /* 'vsl2' */ 0x76736C32, 128 bmdDeckLinkConfigVANCSourceLine3Mapping = /* 'vsl3' */ 0x76736C33, 129 bmdDeckLinkConfigCapturePassThroughMode = /* 'cptm' */ 0x6370746D, 130 bmdDeckLinkConfigCaptureGroup = /* 'cpgr' */ 0x63706772, 131 132 /* Video Input Floats */ 133 134 bmdDeckLinkConfigVideoInputComponentLumaGain = /* 'iclg' */ 0x69636C67, 135 bmdDeckLinkConfigVideoInputComponentChromaBlueGain = /* 'iccb' */ 0x69636362, 136 bmdDeckLinkConfigVideoInputComponentChromaRedGain = /* 'iccr' */ 0x69636372, 137 bmdDeckLinkConfigVideoInputCompositeLumaGain = /* 'iilg' */ 0x69696C67, 138 bmdDeckLinkConfigVideoInputCompositeChromaGain = /* 'iicg' */ 0x69696367, 139 bmdDeckLinkConfigVideoInputSVideoLumaGain = /* 'islg' */ 0x69736C67, 140 bmdDeckLinkConfigVideoInputSVideoChromaGain = /* 'iscg' */ 0x69736367, 141 142 /* Audio Input Flags */ 143 144 bmdDeckLinkConfigMicrophonePhantomPower = /* 'mphp' */ 0x6D706870, 145 146 /* Audio Input Integers */ 147 148 bmdDeckLinkConfigAudioInputConnection = /* 'aicn' */ 0x6169636E, 149 150 /* Audio Input Floats */ 151 152 bmdDeckLinkConfigAnalogAudioInputScaleChannel1 = /* 'ais1' */ 0x61697331, 153 bmdDeckLinkConfigAnalogAudioInputScaleChannel2 = /* 'ais2' */ 0x61697332, 154 bmdDeckLinkConfigAnalogAudioInputScaleChannel3 = /* 'ais3' */ 0x61697333, 155 bmdDeckLinkConfigAnalogAudioInputScaleChannel4 = /* 'ais4' */ 0x61697334, 156 bmdDeckLinkConfigDigitalAudioInputScale = /* 'dais' */ 0x64616973, 157 bmdDeckLinkConfigMicrophoneInputGain = /* 'micg' */ 0x6D696367, 158 159 /* Audio Output Integers */ 160 161 bmdDeckLinkConfigAudioOutputAESAnalogSwitch = /* 'aoaa' */ 0x616F6161, 162 163 /* Audio Output Floats */ 164 165 bmdDeckLinkConfigAnalogAudioOutputScaleChannel1 = /* 'aos1' */ 0x616F7331, 166 bmdDeckLinkConfigAnalogAudioOutputScaleChannel2 = /* 'aos2' */ 0x616F7332, 167 bmdDeckLinkConfigAnalogAudioOutputScaleChannel3 = /* 'aos3' */ 0x616F7333, 168 bmdDeckLinkConfigAnalogAudioOutputScaleChannel4 = /* 'aos4' */ 0x616F7334, 169 bmdDeckLinkConfigDigitalAudioOutputScale = /* 'daos' */ 0x64616F73, 170 bmdDeckLinkConfigHeadphoneVolume = /* 'hvol' */ 0x68766F6C, 171 172 /* Device Information Strings */ 173 174 bmdDeckLinkConfigDeviceInformationLabel = /* 'dila' */ 0x64696C61, 175 bmdDeckLinkConfigDeviceInformationSerialNumber = /* 'disn' */ 0x6469736E, 176 bmdDeckLinkConfigDeviceInformationCompany = /* 'dico' */ 0x6469636F, 177 bmdDeckLinkConfigDeviceInformationPhone = /* 'diph' */ 0x64697068, 178 bmdDeckLinkConfigDeviceInformationEmail = /* 'diem' */ 0x6469656D, 179 bmdDeckLinkConfigDeviceInformationDate = /* 'dida' */ 0x64696461, 180 181 /* Deck Control Integers */ 182 183 bmdDeckLinkConfigDeckControlConnection = /* 'dcco' */ 0x6463636F 184 }; 185 186 /* Enum BMDDeckLinkEncoderConfigurationID - DeckLink Encoder Configuration ID */ 187 188 typedef uint32_t BMDDeckLinkEncoderConfigurationID; 189 enum _BMDDeckLinkEncoderConfigurationID { 190 191 /* Video Encoder Integers */ 192 193 bmdDeckLinkEncoderConfigPreferredBitDepth = /* 'epbr' */ 0x65706272, 194 bmdDeckLinkEncoderConfigFrameCodingMode = /* 'efcm' */ 0x6566636D, 195 196 /* HEVC/H.265 Encoder Integers */ 197 198 bmdDeckLinkEncoderConfigH265TargetBitrate = /* 'htbr' */ 0x68746272, 199 200 /* DNxHR/DNxHD Compression ID */ 201 202 bmdDeckLinkEncoderConfigDNxHRCompressionID = /* 'dcid' */ 0x64636964, 203 204 /* DNxHR/DNxHD Level */ 205 206 bmdDeckLinkEncoderConfigDNxHRLevel = /* 'dlev' */ 0x646C6576, 207 208 /* Encoded Sample Decriptions */ 209 210 bmdDeckLinkEncoderConfigMPEG4SampleDescription = /* 'stsE' */ 0x73747345, // Full MPEG4 sample description (aka SampleEntry of an 'stsd' atom-box). Useful for MediaFoundation, QuickTime, MKV and more 211 bmdDeckLinkEncoderConfigMPEG4CodecSpecificDesc = /* 'esds' */ 0x65736473 // Sample description extensions only (atom stream, each with size and fourCC header). Useful for AVFoundation, VideoToolbox, MKV and more 212 }; 213 214 // Forward Declarations 215 216 class IDeckLinkConfiguration; 217 class IDeckLinkEncoderConfiguration; 218 219 /* Interface IDeckLinkConfiguration - DeckLink Configuration interface */ 220 221 class BMD_PUBLIC IDeckLinkConfiguration : public IUnknown 222 { 223 public: 224 virtual HRESULT SetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ bool value) = 0; 225 virtual HRESULT GetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ bool *value) = 0; 226 virtual HRESULT SetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ int64_t value) = 0; 227 virtual HRESULT GetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ int64_t *value) = 0; 228 virtual HRESULT SetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ double value) = 0; 229 virtual HRESULT GetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ double *value) = 0; 230 virtual HRESULT SetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ const char *value) = 0; 231 virtual HRESULT GetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ const char **value) = 0; 232 virtual HRESULT WriteConfigurationToPreferences (void) = 0; 233 234 protected: ~IDeckLinkConfiguration()235 virtual ~IDeckLinkConfiguration () {} // call Release method to drop reference count 236 }; 237 238 /* Interface IDeckLinkEncoderConfiguration - DeckLink Encoder Configuration interface. Obtained from IDeckLinkEncoderInput */ 239 240 class BMD_PUBLIC IDeckLinkEncoderConfiguration : public IUnknown 241 { 242 public: 243 virtual HRESULT SetFlag (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* in */ bool value) = 0; 244 virtual HRESULT GetFlag (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ bool *value) = 0; 245 virtual HRESULT SetInt (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* in */ int64_t value) = 0; 246 virtual HRESULT GetInt (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ int64_t *value) = 0; 247 virtual HRESULT SetFloat (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* in */ double value) = 0; 248 virtual HRESULT GetFloat (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ double *value) = 0; 249 virtual HRESULT SetString (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* in */ const char *value) = 0; 250 virtual HRESULT GetString (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ const char **value) = 0; 251 virtual HRESULT GetBytes (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ void *buffer /* optional */, /* in, out */ uint32_t *bufferSize) = 0; 252 253 protected: ~IDeckLinkEncoderConfiguration()254 virtual ~IDeckLinkEncoderConfiguration () {} // call Release method to drop reference count 255 }; 256 257 /* Functions */ 258 259 extern "C" { 260 261 262 } 263 264 265 #endif /* defined(BMD_DECKLINKAPICONFIGURATION_H) */ 266