DeckLinkAPIConfiguration.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. /* -LICENSE-START-
  2. ** Copyright (c) 2016 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. #ifndef BMD_DECKLINKAPICONFIGURATION_H
  28. #define BMD_DECKLINKAPICONFIGURATION_H
  29. #ifndef BMD_CONST
  30. #if defined(_MSC_VER)
  31. #define BMD_CONST __declspec(selectany) static const
  32. #else
  33. #define BMD_CONST static const
  34. #endif
  35. #endif
  36. #ifndef BMD_PUBLIC
  37. #define BMD_PUBLIC
  38. #endif
  39. // Type Declarations
  40. // Interface ID Declarations
  41. 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};
  42. 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};
  43. /* Enum BMDDeckLinkConfigurationID - DeckLink Configuration ID */
  44. typedef uint32_t BMDDeckLinkConfigurationID;
  45. enum _BMDDeckLinkConfigurationID {
  46. /* Serial port Flags */
  47. bmdDeckLinkConfigSwapSerialRxTx = 'ssrt',
  48. /* Video Input/Output Integers */
  49. bmdDeckLinkConfigHDMI3DPackingFormat = '3dpf',
  50. bmdDeckLinkConfigBypass = 'byps',
  51. bmdDeckLinkConfigClockTimingAdjustment = 'ctad',
  52. bmdDeckLinkConfigDuplexMode = 'dupx',
  53. /* Audio Input/Output Flags */
  54. bmdDeckLinkConfigAnalogAudioConsumerLevels = 'aacl',
  55. /* Video output flags */
  56. bmdDeckLinkConfigFieldFlickerRemoval = 'fdfr',
  57. bmdDeckLinkConfigHD1080p24ToHD1080i5994Conversion = 'to59',
  58. bmdDeckLinkConfig444SDIVideoOutput = '444o',
  59. bmdDeckLinkConfigBlackVideoOutputDuringCapture = 'bvoc',
  60. bmdDeckLinkConfigLowLatencyVideoOutput = 'llvo',
  61. bmdDeckLinkConfigDownConversionOnAllAnalogOutput = 'caao',
  62. bmdDeckLinkConfigSMPTELevelAOutput = 'smta',
  63. bmdDeckLinkConfigRec2020Output = 'rec2', // Ensure output is Rec.2020 colorspace
  64. bmdDeckLinkConfigQuadLinkSDIVideoOutputSquareDivisionSplit = 'SDQS',
  65. /* Video Output Flags */
  66. bmdDeckLinkConfigOutput1080pAsPsF = 'pfpr',
  67. /* Video Output Integers */
  68. bmdDeckLinkConfigVideoOutputConnection = 'vocn',
  69. bmdDeckLinkConfigVideoOutputConversionMode = 'vocm',
  70. bmdDeckLinkConfigAnalogVideoOutputFlags = 'avof',
  71. bmdDeckLinkConfigReferenceInputTimingOffset = 'glot',
  72. bmdDeckLinkConfigVideoOutputIdleOperation = 'voio',
  73. bmdDeckLinkConfigDefaultVideoOutputMode = 'dvom',
  74. bmdDeckLinkConfigDefaultVideoOutputModeFlags = 'dvof',
  75. bmdDeckLinkConfigSDIOutputLinkConfiguration = 'solc',
  76. /* Video Output Floats */
  77. bmdDeckLinkConfigVideoOutputComponentLumaGain = 'oclg',
  78. bmdDeckLinkConfigVideoOutputComponentChromaBlueGain = 'occb',
  79. bmdDeckLinkConfigVideoOutputComponentChromaRedGain = 'occr',
  80. bmdDeckLinkConfigVideoOutputCompositeLumaGain = 'oilg',
  81. bmdDeckLinkConfigVideoOutputCompositeChromaGain = 'oicg',
  82. bmdDeckLinkConfigVideoOutputSVideoLumaGain = 'oslg',
  83. bmdDeckLinkConfigVideoOutputSVideoChromaGain = 'oscg',
  84. /* Video Input Flags */
  85. bmdDeckLinkConfigVideoInputScanning = 'visc', // Applicable to H264 Pro Recorder only
  86. bmdDeckLinkConfigUseDedicatedLTCInput = 'dltc', // Use timecode from LTC input instead of SDI stream
  87. bmdDeckLinkConfigSDIInput3DPayloadOverride = '3dds',
  88. /* Video Input Flags */
  89. bmdDeckLinkConfigCapture1080pAsPsF = 'cfpr',
  90. /* Video Input Integers */
  91. bmdDeckLinkConfigVideoInputConnection = 'vicn',
  92. bmdDeckLinkConfigAnalogVideoInputFlags = 'avif',
  93. bmdDeckLinkConfigVideoInputConversionMode = 'vicm',
  94. bmdDeckLinkConfig32PulldownSequenceInitialTimecodeFrame = 'pdif',
  95. bmdDeckLinkConfigVANCSourceLine1Mapping = 'vsl1',
  96. bmdDeckLinkConfigVANCSourceLine2Mapping = 'vsl2',
  97. bmdDeckLinkConfigVANCSourceLine3Mapping = 'vsl3',
  98. bmdDeckLinkConfigCapturePassThroughMode = 'cptm',
  99. /* Video Input Floats */
  100. bmdDeckLinkConfigVideoInputComponentLumaGain = 'iclg',
  101. bmdDeckLinkConfigVideoInputComponentChromaBlueGain = 'iccb',
  102. bmdDeckLinkConfigVideoInputComponentChromaRedGain = 'iccr',
  103. bmdDeckLinkConfigVideoInputCompositeLumaGain = 'iilg',
  104. bmdDeckLinkConfigVideoInputCompositeChromaGain = 'iicg',
  105. bmdDeckLinkConfigVideoInputSVideoLumaGain = 'islg',
  106. bmdDeckLinkConfigVideoInputSVideoChromaGain = 'iscg',
  107. /* Audio Input Flags */
  108. bmdDeckLinkConfigMicrophonePhantomPower = 'mphp',
  109. /* Audio Input Integers */
  110. bmdDeckLinkConfigAudioInputConnection = 'aicn',
  111. /* Audio Input Floats */
  112. bmdDeckLinkConfigAnalogAudioInputScaleChannel1 = 'ais1',
  113. bmdDeckLinkConfigAnalogAudioInputScaleChannel2 = 'ais2',
  114. bmdDeckLinkConfigAnalogAudioInputScaleChannel3 = 'ais3',
  115. bmdDeckLinkConfigAnalogAudioInputScaleChannel4 = 'ais4',
  116. bmdDeckLinkConfigDigitalAudioInputScale = 'dais',
  117. bmdDeckLinkConfigMicrophoneInputGain = 'micg',
  118. /* Audio Output Integers */
  119. bmdDeckLinkConfigAudioOutputAESAnalogSwitch = 'aoaa',
  120. /* Audio Output Floats */
  121. bmdDeckLinkConfigAnalogAudioOutputScaleChannel1 = 'aos1',
  122. bmdDeckLinkConfigAnalogAudioOutputScaleChannel2 = 'aos2',
  123. bmdDeckLinkConfigAnalogAudioOutputScaleChannel3 = 'aos3',
  124. bmdDeckLinkConfigAnalogAudioOutputScaleChannel4 = 'aos4',
  125. bmdDeckLinkConfigDigitalAudioOutputScale = 'daos',
  126. bmdDeckLinkConfigHeadphoneVolume = 'hvol',
  127. /* Device Information Strings */
  128. bmdDeckLinkConfigDeviceInformationLabel = 'dila',
  129. bmdDeckLinkConfigDeviceInformationSerialNumber = 'disn',
  130. bmdDeckLinkConfigDeviceInformationCompany = 'dico',
  131. bmdDeckLinkConfigDeviceInformationPhone = 'diph',
  132. bmdDeckLinkConfigDeviceInformationEmail = 'diem',
  133. bmdDeckLinkConfigDeviceInformationDate = 'dida',
  134. /* Deck Control Integers */
  135. bmdDeckLinkConfigDeckControlConnection = 'dcco'
  136. };
  137. /* Enum BMDDeckLinkEncoderConfigurationID - DeckLink Encoder Configuration ID */
  138. typedef uint32_t BMDDeckLinkEncoderConfigurationID;
  139. enum _BMDDeckLinkEncoderConfigurationID {
  140. /* Video Encoder Integers */
  141. bmdDeckLinkEncoderConfigPreferredBitDepth = 'epbr',
  142. bmdDeckLinkEncoderConfigFrameCodingMode = 'efcm',
  143. /* HEVC/H.265 Encoder Integers */
  144. bmdDeckLinkEncoderConfigH265TargetBitrate = 'htbr',
  145. /* DNxHR/DNxHD Compression ID */
  146. bmdDeckLinkEncoderConfigDNxHRCompressionID = 'dcid',
  147. /* DNxHR/DNxHD Level */
  148. bmdDeckLinkEncoderConfigDNxHRLevel = 'dlev',
  149. /* Encoded Sample Decriptions */
  150. bmdDeckLinkEncoderConfigMPEG4SampleDescription = 'stsE', // Full MPEG4 sample description (aka SampleEntry of an 'stsd' atom-box). Useful for MediaFoundation, QuickTime, MKV and more
  151. bmdDeckLinkEncoderConfigMPEG4CodecSpecificDesc = 'esds' // Sample description extensions only (atom stream, each with size and fourCC header). Useful for AVFoundation, VideoToolbox, MKV and more
  152. };
  153. // Forward Declarations
  154. class IDeckLinkConfiguration;
  155. class IDeckLinkEncoderConfiguration;
  156. /* Interface IDeckLinkConfiguration - DeckLink Configuration interface */
  157. class BMD_PUBLIC IDeckLinkConfiguration : public IUnknown
  158. {
  159. public:
  160. virtual HRESULT SetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ bool value) = 0;
  161. virtual HRESULT GetFlag (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ bool *value) = 0;
  162. virtual HRESULT SetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ int64_t value) = 0;
  163. virtual HRESULT GetInt (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ int64_t *value) = 0;
  164. virtual HRESULT SetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ double value) = 0;
  165. virtual HRESULT GetFloat (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ double *value) = 0;
  166. virtual HRESULT SetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* in */ CFStringRef value) = 0;
  167. virtual HRESULT GetString (/* in */ BMDDeckLinkConfigurationID cfgID, /* out */ CFStringRef *value) = 0;
  168. virtual HRESULT WriteConfigurationToPreferences (void) = 0;
  169. protected:
  170. virtual ~IDeckLinkConfiguration () {} // call Release method to drop reference count
  171. };
  172. /* Interface IDeckLinkEncoderConfiguration - DeckLink Encoder Configuration interface. Obtained from IDeckLinkEncoderInput */
  173. class BMD_PUBLIC IDeckLinkEncoderConfiguration : public IUnknown
  174. {
  175. public:
  176. virtual HRESULT SetFlag (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* in */ bool value) = 0;
  177. virtual HRESULT GetFlag (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ bool *value) = 0;
  178. virtual HRESULT SetInt (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* in */ int64_t value) = 0;
  179. virtual HRESULT GetInt (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ int64_t *value) = 0;
  180. virtual HRESULT SetFloat (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* in */ double value) = 0;
  181. virtual HRESULT GetFloat (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ double *value) = 0;
  182. virtual HRESULT SetString (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* in */ CFStringRef value) = 0;
  183. virtual HRESULT GetString (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ CFStringRef *value) = 0;
  184. virtual HRESULT GetBytes (/* in */ BMDDeckLinkEncoderConfigurationID cfgID, /* out */ void *buffer /* optional */, /* in, out */ uint32_t *bufferSize) = 0;
  185. protected:
  186. virtual ~IDeckLinkEncoderConfiguration () {} // call Release method to drop reference count
  187. };
  188. /* Functions */
  189. extern "C" {
  190. }
  191. #endif /* defined(BMD_DECKLINKAPICONFIGURATION_H) */