DeckLinkAPI.idl 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109
  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_CONST
  28. #if defined(_MSC_VER)
  29. #define BMD_CONST __declspec(selectany) static const
  30. #else
  31. #define BMD_CONST static const
  32. #endif
  33. #endif
  34. /* DeckLink API */
  35. import "unknwn.idl";
  36. [uuid(D864517A-EDD5-466D-867D-C819F1C052BB),
  37. version(1.0), helpstring("DeckLink API Library")]
  38. library DeckLinkAPI
  39. {
  40. #include "DeckLinkAPITypes.idl"
  41. #include "DeckLinkAPIModes.idl"
  42. #include "DeckLinkAPIDiscovery.idl"
  43. #include "DeckLinkAPIConfiguration.idl"
  44. #include "DeckLinkAPIDeckControl.idl"
  45. #include "DeckLinkAPIStreaming.idl"
  46. // Type Declarations
  47. // Enumeration Mapping
  48. cpp_quote("typedef unsigned int BMDFrameFlags;")
  49. cpp_quote("typedef unsigned int BMDVideoInputFlags;")
  50. cpp_quote("typedef unsigned int BMDVideoInputFormatChangedEvents;")
  51. cpp_quote("typedef unsigned int BMDDetectedVideoInputFormatFlags;")
  52. cpp_quote("typedef unsigned int BMDDeckLinkCapturePassthroughMode;")
  53. cpp_quote("typedef unsigned int BMDAnalogVideoFlags;")
  54. cpp_quote("typedef unsigned int BMDDeviceBusyState;")
  55. cpp_quote("#if 0")
  56. typedef enum _BMDFrameFlags BMDFrameFlags;
  57. typedef enum _BMDVideoInputFlags BMDVideoInputFlags;
  58. typedef enum _BMDVideoInputFormatChangedEvents BMDVideoInputFormatChangedEvents;
  59. typedef enum _BMDDetectedVideoInputFormatFlags BMDDetectedVideoInputFormatFlags;
  60. typedef enum _BMDDeckLinkCapturePassthroughMode BMDDeckLinkCapturePassthroughMode;
  61. typedef enum _BMDAnalogVideoFlags BMDAnalogVideoFlags;
  62. typedef enum _BMDDeviceBusyState BMDDeviceBusyState;
  63. cpp_quote("#endif")
  64. /* Enum BMDVideoOutputFlags - Flags to control the output of ancillary data along with video. */
  65. typedef [v1_enum] enum _BMDVideoOutputFlags {
  66. bmdVideoOutputFlagDefault = 0,
  67. bmdVideoOutputVANC = 1 << 0,
  68. bmdVideoOutputVITC = 1 << 1,
  69. bmdVideoOutputRP188 = 1 << 2,
  70. bmdVideoOutputDualStream3D = 1 << 4
  71. } BMDVideoOutputFlags;
  72. /* Enum BMDPacketType - Type of packet */
  73. typedef [v1_enum] enum _BMDPacketType {
  74. bmdPacketTypeStreamInterruptedMarker = /* 'sint' */ 0x73696E74, // A packet of this type marks the time when a video stream was interrupted, for example by a disconnected cable
  75. bmdPacketTypeStreamData = /* 'sdat' */ 0x73646174 // Regular stream data
  76. } BMDPacketType;
  77. /* Enum BMDFrameFlags - Frame flags */
  78. [v1_enum] enum _BMDFrameFlags {
  79. bmdFrameFlagDefault = 0,
  80. bmdFrameFlagFlipVertical = 1 << 0,
  81. bmdFrameContainsHDRMetadata = 1 << 1,
  82. /* Flags that are applicable only to instances of IDeckLinkVideoInputFrame */
  83. bmdFrameHasNoInputSource = 1 << 31
  84. };
  85. /* Enum BMDVideoInputFlags - Flags applicable to video input */
  86. [v1_enum] enum _BMDVideoInputFlags {
  87. bmdVideoInputFlagDefault = 0,
  88. bmdVideoInputEnableFormatDetection = 1 << 0,
  89. bmdVideoInputDualStream3D = 1 << 1
  90. };
  91. /* Enum BMDVideoInputFormatChangedEvents - Bitmask passed to the VideoInputFormatChanged notification to identify the properties of the input signal that have changed */
  92. [v1_enum] enum _BMDVideoInputFormatChangedEvents {
  93. bmdVideoInputDisplayModeChanged = 1 << 0,
  94. bmdVideoInputFieldDominanceChanged = 1 << 1,
  95. bmdVideoInputColorspaceChanged = 1 << 2
  96. };
  97. /* Enum BMDDetectedVideoInputFormatFlags - Flags passed to the VideoInputFormatChanged notification to describe the detected video input signal */
  98. [v1_enum] enum _BMDDetectedVideoInputFormatFlags {
  99. bmdDetectedVideoInputYCbCr422 = 1 << 0,
  100. bmdDetectedVideoInputRGB444 = 1 << 1,
  101. bmdDetectedVideoInputDualStream3D = 1 << 2
  102. };
  103. /* Enum BMDDeckLinkCapturePassthroughMode - Enumerates whether the video output is electrically connected to the video input or if the clean switching mode is enabled */
  104. [v1_enum] enum _BMDDeckLinkCapturePassthroughMode {
  105. bmdDeckLinkCapturePassthroughModeDisabled = /* 'pdis' */ 0x70646973,
  106. bmdDeckLinkCapturePassthroughModeDirect = /* 'pdir' */ 0x70646972,
  107. bmdDeckLinkCapturePassthroughModeCleanSwitch = /* 'pcln' */ 0x70636C6E
  108. };
  109. /* Enum BMDOutputFrameCompletionResult - Frame Completion Callback */
  110. typedef [v1_enum] enum _BMDOutputFrameCompletionResult {
  111. bmdOutputFrameCompleted,
  112. bmdOutputFrameDisplayedLate,
  113. bmdOutputFrameDropped,
  114. bmdOutputFrameFlushed
  115. } BMDOutputFrameCompletionResult;
  116. /* Enum BMDReferenceStatus - GenLock input status */
  117. typedef [v1_enum] enum _BMDReferenceStatus {
  118. bmdReferenceNotSupportedByHardware = 1 << 0,
  119. bmdReferenceLocked = 1 << 1
  120. } BMDReferenceStatus;
  121. /* Enum BMDAudioFormat - Audio Format */
  122. typedef [v1_enum] enum _BMDAudioFormat {
  123. bmdAudioFormatPCM = /* 'lpcm' */ 0x6C70636D // Linear signed PCM samples
  124. } BMDAudioFormat;
  125. /* Enum BMDAudioSampleRate - Audio sample rates supported for output/input */
  126. typedef [v1_enum] enum _BMDAudioSampleRate {
  127. bmdAudioSampleRate48kHz = 48000
  128. } BMDAudioSampleRate;
  129. /* Enum BMDAudioSampleType - Audio sample sizes supported for output/input */
  130. typedef [v1_enum] enum _BMDAudioSampleType {
  131. bmdAudioSampleType16bitInteger = 16,
  132. bmdAudioSampleType32bitInteger = 32
  133. } BMDAudioSampleType;
  134. /* Enum BMDAudioOutputStreamType - Audio output stream type */
  135. typedef [v1_enum] enum _BMDAudioOutputStreamType {
  136. bmdAudioOutputStreamContinuous,
  137. bmdAudioOutputStreamContinuousDontResample,
  138. bmdAudioOutputStreamTimestamped
  139. } BMDAudioOutputStreamType;
  140. /* Enum BMDDisplayModeSupport - Output mode supported flags */
  141. typedef [v1_enum] enum _BMDDisplayModeSupport {
  142. bmdDisplayModeNotSupported = 0,
  143. bmdDisplayModeSupported,
  144. bmdDisplayModeSupportedWithConversion
  145. } BMDDisplayModeSupport;
  146. /* Enum BMDTimecodeFormat - Timecode formats for frame metadata */
  147. typedef [v1_enum] enum _BMDTimecodeFormat {
  148. bmdTimecodeRP188VITC1 = /* 'rpv1' */ 0x72707631, // RP188 timecode where DBB1 equals VITC1 (line 9)
  149. bmdTimecodeRP188VITC2 = /* 'rp12' */ 0x72703132, // RP188 timecode where DBB1 equals VITC2 (line 9 for progressive or line 571 for interlaced/PsF)
  150. bmdTimecodeRP188LTC = /* 'rplt' */ 0x72706C74, // RP188 timecode where DBB1 equals LTC (line 10)
  151. bmdTimecodeRP188Any = /* 'rp18' */ 0x72703138, // For capture: return the first valid timecode in {VITC1, LTC ,VITC2} - For playback: set the timecode as VITC1
  152. bmdTimecodeVITC = /* 'vitc' */ 0x76697463,
  153. bmdTimecodeVITCField2 = /* 'vit2' */ 0x76697432,
  154. bmdTimecodeSerial = /* 'seri' */ 0x73657269
  155. } BMDTimecodeFormat;
  156. /* Enum BMDAnalogVideoFlags - Analog video display flags */
  157. [v1_enum] enum _BMDAnalogVideoFlags {
  158. bmdAnalogVideoFlagCompositeSetup75 = 1 << 0,
  159. bmdAnalogVideoFlagComponentBetacamLevels = 1 << 1
  160. };
  161. /* Enum BMDAudioOutputAnalogAESSwitch - Audio output Analog/AESEBU switch */
  162. typedef [v1_enum] enum _BMDAudioOutputAnalogAESSwitch {
  163. bmdAudioOutputSwitchAESEBU = /* 'aes ' */ 0x61657320,
  164. bmdAudioOutputSwitchAnalog = /* 'anlg' */ 0x616E6C67
  165. } BMDAudioOutputAnalogAESSwitch;
  166. /* Enum BMDVideoOutputConversionMode - Video/audio conversion mode */
  167. typedef [v1_enum] enum _BMDVideoOutputConversionMode {
  168. bmdNoVideoOutputConversion = /* 'none' */ 0x6E6F6E65,
  169. bmdVideoOutputLetterboxDownconversion = /* 'ltbx' */ 0x6C746278,
  170. bmdVideoOutputAnamorphicDownconversion = /* 'amph' */ 0x616D7068,
  171. bmdVideoOutputHD720toHD1080Conversion = /* '720c' */ 0x37323063,
  172. bmdVideoOutputHardwareLetterboxDownconversion = /* 'HWlb' */ 0x48576C62,
  173. bmdVideoOutputHardwareAnamorphicDownconversion = /* 'HWam' */ 0x4857616D,
  174. bmdVideoOutputHardwareCenterCutDownconversion = /* 'HWcc' */ 0x48576363,
  175. bmdVideoOutputHardware720p1080pCrossconversion = /* 'xcap' */ 0x78636170,
  176. bmdVideoOutputHardwareAnamorphic720pUpconversion = /* 'ua7p' */ 0x75613770,
  177. bmdVideoOutputHardwareAnamorphic1080iUpconversion = /* 'ua1i' */ 0x75613169,
  178. bmdVideoOutputHardwareAnamorphic149To720pUpconversion = /* 'u47p' */ 0x75343770,
  179. bmdVideoOutputHardwareAnamorphic149To1080iUpconversion = /* 'u41i' */ 0x75343169,
  180. bmdVideoOutputHardwarePillarbox720pUpconversion = /* 'up7p' */ 0x75703770,
  181. bmdVideoOutputHardwarePillarbox1080iUpconversion = /* 'up1i' */ 0x75703169
  182. } BMDVideoOutputConversionMode;
  183. /* Enum BMDVideoInputConversionMode - Video input conversion mode */
  184. typedef [v1_enum] enum _BMDVideoInputConversionMode {
  185. bmdNoVideoInputConversion = /* 'none' */ 0x6E6F6E65,
  186. bmdVideoInputLetterboxDownconversionFromHD1080 = /* '10lb' */ 0x31306C62,
  187. bmdVideoInputAnamorphicDownconversionFromHD1080 = /* '10am' */ 0x3130616D,
  188. bmdVideoInputLetterboxDownconversionFromHD720 = /* '72lb' */ 0x37326C62,
  189. bmdVideoInputAnamorphicDownconversionFromHD720 = /* '72am' */ 0x3732616D,
  190. bmdVideoInputLetterboxUpconversion = /* 'lbup' */ 0x6C627570,
  191. bmdVideoInputAnamorphicUpconversion = /* 'amup' */ 0x616D7570
  192. } BMDVideoInputConversionMode;
  193. /* Enum BMDVideo3DPackingFormat - Video 3D packing format */
  194. typedef [v1_enum] enum _BMDVideo3DPackingFormat {
  195. bmdVideo3DPackingSidebySideHalf = /* 'sbsh' */ 0x73627368,
  196. bmdVideo3DPackingLinebyLine = /* 'lbyl' */ 0x6C62796C,
  197. bmdVideo3DPackingTopAndBottom = /* 'tabo' */ 0x7461626F,
  198. bmdVideo3DPackingFramePacking = /* 'frpk' */ 0x6672706B,
  199. bmdVideo3DPackingLeftOnly = /* 'left' */ 0x6C656674,
  200. bmdVideo3DPackingRightOnly = /* 'righ' */ 0x72696768
  201. } BMDVideo3DPackingFormat;
  202. /* Enum BMDIdleVideoOutputOperation - Video output operation when not playing video */
  203. typedef [v1_enum] enum _BMDIdleVideoOutputOperation {
  204. bmdIdleVideoOutputBlack = /* 'blac' */ 0x626C6163,
  205. bmdIdleVideoOutputLastFrame = /* 'lafa' */ 0x6C616661
  206. } BMDIdleVideoOutputOperation;
  207. /* Enum BMDVideoEncoderFrameCodingMode - Video frame coding mode */
  208. typedef [v1_enum] enum _BMDVideoEncoderFrameCodingMode {
  209. bmdVideoEncoderFrameCodingModeInter = /* 'inte' */ 0x696E7465,
  210. bmdVideoEncoderFrameCodingModeIntra = /* 'intr' */ 0x696E7472
  211. } BMDVideoEncoderFrameCodingMode;
  212. /* Enum BMDDNxHRLevel - DNxHR Levels */
  213. typedef [v1_enum] enum _BMDDNxHRLevel {
  214. bmdDNxHRLevelSQ = /* 'dnsq' */ 0x646E7371,
  215. bmdDNxHRLevelLB = /* 'dnlb' */ 0x646E6C62,
  216. bmdDNxHRLevelHQ = /* 'dnhq' */ 0x646E6871,
  217. bmdDNxHRLevelHQX = /* 'dhqx' */ 0x64687178,
  218. bmdDNxHRLevel444 = /* 'd444' */ 0x64343434
  219. } BMDDNxHRLevel;
  220. /* Enum BMDLinkConfiguration - Video link configuration */
  221. typedef [v1_enum] enum _BMDLinkConfiguration {
  222. bmdLinkConfigurationSingleLink = /* 'lcsl' */ 0x6C63736C,
  223. bmdLinkConfigurationDualLink = /* 'lcdl' */ 0x6C63646C,
  224. bmdLinkConfigurationQuadLink = /* 'lcql' */ 0x6C63716C
  225. } BMDLinkConfiguration;
  226. /* Enum BMDDeviceInterface - Device interface type */
  227. typedef [v1_enum] enum _BMDDeviceInterface {
  228. bmdDeviceInterfacePCI = /* 'pci ' */ 0x70636920,
  229. bmdDeviceInterfaceUSB = /* 'usb ' */ 0x75736220,
  230. bmdDeviceInterfaceThunderbolt = /* 'thun' */ 0x7468756E
  231. } BMDDeviceInterface;
  232. /* Enum BMDDeckLinkFrameMetadataID - DeckLink Frame Metadata ID */
  233. typedef [v1_enum] enum _BMDDeckLinkFrameMetadataID {
  234. bmdDeckLinkFrameMetadataHDRElectroOpticalTransferFunc = /* 'eotf' */ 0x656F7466, // EOTF in range 0-7 as per CEA 861.3
  235. bmdDeckLinkFrameMetadataHDRDisplayPrimariesRedX = /* 'hdrx' */ 0x68647278, // Red display primaries in range 0.0 - 1.0
  236. bmdDeckLinkFrameMetadataHDRDisplayPrimariesRedY = /* 'hdry' */ 0x68647279, // Red display primaries in range 0.0 - 1.0
  237. bmdDeckLinkFrameMetadataHDRDisplayPrimariesGreenX = /* 'hdgx' */ 0x68646778, // Green display primaries in range 0.0 - 1.0
  238. bmdDeckLinkFrameMetadataHDRDisplayPrimariesGreenY = /* 'hdgy' */ 0x68646779, // Green display primaries in range 0.0 - 1.0
  239. bmdDeckLinkFrameMetadataHDRDisplayPrimariesBlueX = /* 'hdbx' */ 0x68646278, // Blue display primaries in range 0.0 - 1.0
  240. bmdDeckLinkFrameMetadataHDRDisplayPrimariesBlueY = /* 'hdby' */ 0x68646279, // Blue display primaries in range 0.0 - 1.0
  241. bmdDeckLinkFrameMetadataHDRWhitePointX = /* 'hdwx' */ 0x68647778, // White point in range 0.0 - 1.0
  242. bmdDeckLinkFrameMetadataHDRWhitePointY = /* 'hdwy' */ 0x68647779, // White point in range 0.0 - 1.0
  243. bmdDeckLinkFrameMetadataHDRMaxDisplayMasteringLuminance = /* 'hdml' */ 0x68646D6C, // Max display mastering luminance in range 1 cd/m2 - 65535 cd/m2
  244. bmdDeckLinkFrameMetadataHDRMinDisplayMasteringLuminance = /* 'hmil' */ 0x686D696C, // Min display mastering luminance in range 0.0001 cd/m2 - 6.5535 cd/m2
  245. bmdDeckLinkFrameMetadataHDRMaximumContentLightLevel = /* 'mcll' */ 0x6D636C6C, // Maximum Content Light Level in range 1 cd/m2 - 65535 cd/m2
  246. bmdDeckLinkFrameMetadataHDRMaximumFrameAverageLightLevel = /* 'fall' */ 0x66616C6C // Maximum Frame Average Light Level in range 1 cd/m2 - 65535 cd/m2
  247. } BMDDeckLinkFrameMetadataID;
  248. /* Enum BMDDuplexMode - Duplex for configurable ports */
  249. typedef [v1_enum] enum _BMDDuplexMode {
  250. bmdDuplexModeFull = /* 'fdup' */ 0x66647570,
  251. bmdDuplexModeHalf = /* 'hdup' */ 0x68647570
  252. } BMDDuplexMode;
  253. /* Enum BMDDeckLinkAttributeID - DeckLink Attribute ID */
  254. typedef [v1_enum] enum _BMDDeckLinkAttributeID {
  255. /* Flags */
  256. BMDDeckLinkSupportsInternalKeying = /* 'keyi' */ 0x6B657969,
  257. BMDDeckLinkSupportsExternalKeying = /* 'keye' */ 0x6B657965,
  258. BMDDeckLinkSupportsHDKeying = /* 'keyh' */ 0x6B657968,
  259. BMDDeckLinkSupportsInputFormatDetection = /* 'infd' */ 0x696E6664,
  260. BMDDeckLinkHasReferenceInput = /* 'hrin' */ 0x6872696E,
  261. BMDDeckLinkHasSerialPort = /* 'hspt' */ 0x68737074,
  262. BMDDeckLinkHasAnalogVideoOutputGain = /* 'avog' */ 0x61766F67,
  263. BMDDeckLinkCanOnlyAdjustOverallVideoOutputGain = /* 'ovog' */ 0x6F766F67,
  264. BMDDeckLinkHasVideoInputAntiAliasingFilter = /* 'aafl' */ 0x6161666C,
  265. BMDDeckLinkHasBypass = /* 'byps' */ 0x62797073,
  266. BMDDeckLinkSupportsClockTimingAdjustment = /* 'ctad' */ 0x63746164,
  267. BMDDeckLinkSupportsFullDuplex = /* 'fdup' */ 0x66647570,
  268. BMDDeckLinkSupportsFullFrameReferenceInputTimingOffset = /* 'frin' */ 0x6672696E,
  269. BMDDeckLinkSupportsSMPTELevelAOutput = /* 'lvla' */ 0x6C766C61,
  270. BMDDeckLinkSupportsDualLinkSDI = /* 'sdls' */ 0x73646C73,
  271. BMDDeckLinkSupportsQuadLinkSDI = /* 'sqls' */ 0x73716C73,
  272. BMDDeckLinkSupportsIdleOutput = /* 'idou' */ 0x69646F75,
  273. BMDDeckLinkHasLTCTimecodeInput = /* 'hltc' */ 0x686C7463,
  274. BMDDeckLinkSupportsDuplexModeConfiguration = /* 'dupx' */ 0x64757078,
  275. BMDDeckLinkSupportsHDRMetadata = /* 'hdrm' */ 0x6864726D,
  276. /* Integers */
  277. BMDDeckLinkMaximumAudioChannels = /* 'mach' */ 0x6D616368,
  278. BMDDeckLinkMaximumAnalogAudioChannels = /* 'aach' */ 0x61616368,
  279. BMDDeckLinkNumberOfSubDevices = /* 'nsbd' */ 0x6E736264,
  280. BMDDeckLinkSubDeviceIndex = /* 'subi' */ 0x73756269,
  281. BMDDeckLinkPersistentID = /* 'peid' */ 0x70656964,
  282. BMDDeckLinkDeviceGroupID = /* 'dgid' */ 0x64676964,
  283. BMDDeckLinkTopologicalID = /* 'toid' */ 0x746F6964,
  284. BMDDeckLinkVideoOutputConnections = /* 'vocn' */ 0x766F636E,
  285. BMDDeckLinkVideoInputConnections = /* 'vicn' */ 0x7669636E,
  286. BMDDeckLinkAudioOutputConnections = /* 'aocn' */ 0x616F636E,
  287. BMDDeckLinkAudioInputConnections = /* 'aicn' */ 0x6169636E,
  288. BMDDeckLinkVideoIOSupport = /* 'vios' */ 0x76696F73, // Returns a BMDVideoIOSupport bit field
  289. BMDDeckLinkDeckControlConnections = /* 'dccn' */ 0x6463636E,
  290. BMDDeckLinkDeviceInterface = /* 'dbus' */ 0x64627573, // Returns a BMDDeviceInterface
  291. BMDDeckLinkAudioInputRCAChannelCount = /* 'airc' */ 0x61697263,
  292. BMDDeckLinkAudioInputXLRChannelCount = /* 'aixc' */ 0x61697863,
  293. BMDDeckLinkAudioOutputRCAChannelCount = /* 'aorc' */ 0x616F7263,
  294. BMDDeckLinkAudioOutputXLRChannelCount = /* 'aoxc' */ 0x616F7863,
  295. BMDDeckLinkPairedDevicePersistentID = /* 'ppid' */ 0x70706964,
  296. /* Floats */
  297. BMDDeckLinkVideoInputGainMinimum = /* 'vigm' */ 0x7669676D,
  298. BMDDeckLinkVideoInputGainMaximum = /* 'vigx' */ 0x76696778,
  299. BMDDeckLinkVideoOutputGainMinimum = /* 'vogm' */ 0x766F676D,
  300. BMDDeckLinkVideoOutputGainMaximum = /* 'vogx' */ 0x766F6778,
  301. BMDDeckLinkMicrophoneInputGainMinimum = /* 'migm' */ 0x6D69676D,
  302. BMDDeckLinkMicrophoneInputGainMaximum = /* 'migx' */ 0x6D696778,
  303. /* Strings */
  304. BMDDeckLinkSerialPortDeviceName = /* 'slpn' */ 0x736C706E,
  305. BMDDeckLinkVendorName = /* 'vndr' */ 0x766E6472,
  306. BMDDeckLinkDisplayName = /* 'dspn' */ 0x6473706E,
  307. BMDDeckLinkModelName = /* 'mdln' */ 0x6D646C6E,
  308. BMDDeckLinkDeviceHandle = /* 'devh' */ 0x64657668
  309. } BMDDeckLinkAttributeID;
  310. /* Enum BMDDeckLinkAPIInformationID - DeckLinkAPI information ID */
  311. typedef [v1_enum] enum _BMDDeckLinkAPIInformationID {
  312. BMDDeckLinkAPIVersion = /* 'vers' */ 0x76657273
  313. } BMDDeckLinkAPIInformationID;
  314. /* Enum BMDDeckLinkStatusID - DeckLink Status ID */
  315. typedef [v1_enum] enum _BMDDeckLinkStatusID {
  316. /* Integers */
  317. bmdDeckLinkStatusDetectedVideoInputMode = /* 'dvim' */ 0x6476696D,
  318. bmdDeckLinkStatusDetectedVideoInputFlags = /* 'dvif' */ 0x64766966,
  319. bmdDeckLinkStatusCurrentVideoInputMode = /* 'cvim' */ 0x6376696D,
  320. bmdDeckLinkStatusCurrentVideoInputPixelFormat = /* 'cvip' */ 0x63766970,
  321. bmdDeckLinkStatusCurrentVideoInputFlags = /* 'cvif' */ 0x63766966,
  322. bmdDeckLinkStatusCurrentVideoOutputMode = /* 'cvom' */ 0x63766F6D,
  323. bmdDeckLinkStatusCurrentVideoOutputFlags = /* 'cvof' */ 0x63766F66,
  324. bmdDeckLinkStatusPCIExpressLinkWidth = /* 'pwid' */ 0x70776964,
  325. bmdDeckLinkStatusPCIExpressLinkSpeed = /* 'plnk' */ 0x706C6E6B,
  326. bmdDeckLinkStatusLastVideoOutputPixelFormat = /* 'opix' */ 0x6F706978,
  327. bmdDeckLinkStatusReferenceSignalMode = /* 'refm' */ 0x7265666D,
  328. bmdDeckLinkStatusReferenceSignalFlags = /* 'reff' */ 0x72656666,
  329. bmdDeckLinkStatusDuplexMode = /* 'dupx' */ 0x64757078,
  330. bmdDeckLinkStatusBusy = /* 'busy' */ 0x62757379,
  331. /* Flags */
  332. bmdDeckLinkStatusVideoInputSignalLocked = /* 'visl' */ 0x7669736C,
  333. bmdDeckLinkStatusReferenceSignalLocked = /* 'refl' */ 0x7265666C
  334. } BMDDeckLinkStatusID;
  335. /* Enum BMDDeckLinkVideoStatusFlags - */
  336. typedef [v1_enum] enum _BMDDeckLinkVideoStatusFlags {
  337. bmdDeckLinkVideoStatusPsF = 1 << 0,
  338. bmdDeckLinkVideoStatusDualStream3D = 1 << 1
  339. } BMDDeckLinkVideoStatusFlags;
  340. /* Enum BMDDuplexStatus - Duplex status of the device */
  341. typedef [v1_enum] enum _BMDDuplexStatus {
  342. bmdDuplexStatusFullDuplex = /* 'fdup' */ 0x66647570,
  343. bmdDuplexStatusHalfDuplex = /* 'hdup' */ 0x68647570,
  344. bmdDuplexStatusSimplex = /* 'splx' */ 0x73706C78,
  345. bmdDuplexStatusInactive = /* 'inac' */ 0x696E6163
  346. } BMDDuplexStatus;
  347. /* Enum BMDDeviceBusyState - Current device busy state */
  348. [v1_enum] enum _BMDDeviceBusyState {
  349. bmdDeviceCaptureBusy = 1 << 0,
  350. bmdDevicePlaybackBusy = 1 << 1,
  351. bmdDeviceSerialPortBusy = 1 << 2
  352. };
  353. /* Enum BMDVideoIOSupport - Device video input/output support */
  354. typedef [v1_enum] enum _BMDVideoIOSupport {
  355. bmdDeviceSupportsCapture = 1 << 0,
  356. bmdDeviceSupportsPlayback = 1 << 1
  357. } BMDVideoIOSupport;
  358. /* Enum BMD3DPreviewFormat - Linked Frame preview format */
  359. typedef [v1_enum] enum _BMD3DPreviewFormat {
  360. bmd3DPreviewFormatDefault = /* 'defa' */ 0x64656661,
  361. bmd3DPreviewFormatLeftOnly = /* 'left' */ 0x6C656674,
  362. bmd3DPreviewFormatRightOnly = /* 'righ' */ 0x72696768,
  363. bmd3DPreviewFormatSideBySide = /* 'side' */ 0x73696465,
  364. bmd3DPreviewFormatTopBottom = /* 'topb' */ 0x746F7062
  365. } BMD3DPreviewFormat;
  366. /* Enum BMDNotifications - Events that can be subscribed through IDeckLinkNotification */
  367. typedef [v1_enum] enum _BMDNotifications {
  368. bmdPreferencesChanged = /* 'pref' */ 0x70726566,
  369. bmdStatusChanged = /* 'stat' */ 0x73746174
  370. } BMDNotifications;
  371. // Forward Declarations
  372. interface IDeckLinkVideoOutputCallback;
  373. interface IDeckLinkInputCallback;
  374. interface IDeckLinkEncoderInputCallback;
  375. interface IDeckLinkMemoryAllocator;
  376. interface IDeckLinkAudioOutputCallback;
  377. interface IDeckLinkIterator;
  378. interface IDeckLinkAPIInformation;
  379. interface IDeckLinkOutput;
  380. interface IDeckLinkInput;
  381. interface IDeckLinkEncoderInput;
  382. interface IDeckLinkVideoFrame;
  383. interface IDeckLinkMutableVideoFrame;
  384. interface IDeckLinkVideoFrame3DExtensions;
  385. interface IDeckLinkVideoFrameMetadataExtensions;
  386. interface IDeckLinkVideoInputFrame;
  387. interface IDeckLinkVideoFrameAncillary;
  388. interface IDeckLinkEncoderPacket;
  389. interface IDeckLinkEncoderVideoPacket;
  390. interface IDeckLinkEncoderAudioPacket;
  391. interface IDeckLinkH265NALPacket;
  392. interface IDeckLinkAudioInputPacket;
  393. interface IDeckLinkScreenPreviewCallback;
  394. interface IDeckLinkGLScreenPreviewHelper;
  395. interface IDeckLinkDX9ScreenPreviewHelper;
  396. interface IDeckLinkNotificationCallback;
  397. interface IDeckLinkNotification;
  398. interface IDeckLinkAttributes;
  399. interface IDeckLinkStatus;
  400. interface IDeckLinkKeyer;
  401. interface IDeckLinkVideoConversion;
  402. interface IDeckLinkDeviceNotificationCallback;
  403. interface IDeckLinkDiscovery;
  404. /* Interface IDeckLinkVideoOutputCallback - Frame completion callback. */
  405. [
  406. object,
  407. uuid(20AA5225-1958-47CB-820B-80A8D521A6EE),
  408. helpstring("Frame completion callback.")
  409. ] interface IDeckLinkVideoOutputCallback : IUnknown
  410. {
  411. HRESULT ScheduledFrameCompleted([in] IDeckLinkVideoFrame *completedFrame, [in] BMDOutputFrameCompletionResult result);
  412. HRESULT ScheduledPlaybackHasStopped(void);
  413. };
  414. /* Interface IDeckLinkInputCallback - Frame arrival callback. */
  415. [
  416. object,
  417. uuid(DD04E5EC-7415-42AB-AE4A-E80C4DFC044A),
  418. helpstring("Frame arrival callback.")
  419. ] interface IDeckLinkInputCallback : IUnknown
  420. {
  421. HRESULT VideoInputFormatChanged([in] BMDVideoInputFormatChangedEvents notificationEvents, [in] IDeckLinkDisplayMode *newDisplayMode, [in] BMDDetectedVideoInputFormatFlags detectedSignalFlags);
  422. HRESULT VideoInputFrameArrived([in] IDeckLinkVideoInputFrame* videoFrame, [in] IDeckLinkAudioInputPacket* audioPacket);
  423. };
  424. /* Interface IDeckLinkEncoderInputCallback - Frame arrival callback. */
  425. [
  426. object,
  427. uuid(ACF13E61-F4A0-4974-A6A7-59AFF6268B31),
  428. helpstring("Frame arrival callback.")
  429. ] interface IDeckLinkEncoderInputCallback : IUnknown
  430. {
  431. HRESULT VideoInputSignalChanged([in] BMDVideoInputFormatChangedEvents notificationEvents, [in] IDeckLinkDisplayMode *newDisplayMode, [in] BMDDetectedVideoInputFormatFlags detectedSignalFlags);
  432. HRESULT VideoPacketArrived([in] IDeckLinkEncoderVideoPacket* videoPacket);
  433. HRESULT AudioPacketArrived([in] IDeckLinkEncoderAudioPacket* audioPacket);
  434. };
  435. /* Interface IDeckLinkMemoryAllocator - Memory allocator for video frames. */
  436. [
  437. object,
  438. uuid(B36EB6E7-9D29-4AA8-92EF-843B87A289E8),
  439. local,
  440. helpstring("Memory allocator for video frames.")
  441. ] interface IDeckLinkMemoryAllocator : IUnknown
  442. {
  443. HRESULT AllocateBuffer([in] unsigned int bufferSize, [out] void **allocatedBuffer);
  444. HRESULT ReleaseBuffer([in] void *buffer);
  445. HRESULT Commit(void);
  446. HRESULT Decommit(void);
  447. };
  448. /* Interface IDeckLinkAudioOutputCallback - Optional callback to allow audio samples to be pulled as required. */
  449. [
  450. object,
  451. uuid(403C681B-7F46-4A12-B993-2BB127084EE6),
  452. local,
  453. helpstring("Optional callback to allow audio samples to be pulled as required.")
  454. ] interface IDeckLinkAudioOutputCallback : IUnknown
  455. {
  456. HRESULT RenderAudioSamples([in] BOOL preroll);
  457. };
  458. /* Interface IDeckLinkIterator - enumerates installed DeckLink hardware */
  459. [
  460. object,
  461. uuid(50FB36CD-3063-4B73-BDBB-958087F2D8BA),
  462. helpstring("enumerates installed DeckLink hardware")
  463. ] interface IDeckLinkIterator : IUnknown
  464. {
  465. HRESULT Next([out] IDeckLink **deckLinkInstance);
  466. };
  467. /* Interface IDeckLinkAPIInformation - DeckLinkAPI attribute interface */
  468. [
  469. object,
  470. uuid(7BEA3C68-730D-4322-AF34-8A7152B532A4),
  471. helpstring("DeckLinkAPI attribute interface")
  472. ] interface IDeckLinkAPIInformation : IUnknown
  473. {
  474. HRESULT GetFlag([in] BMDDeckLinkAPIInformationID cfgID, [out] BOOL *value);
  475. HRESULT GetInt([in] BMDDeckLinkAPIInformationID cfgID, [out] LONGLONG *value);
  476. HRESULT GetFloat([in] BMDDeckLinkAPIInformationID cfgID, [out] double *value);
  477. HRESULT GetString([in] BMDDeckLinkAPIInformationID cfgID, [out] BSTR *value);
  478. };
  479. /* Interface IDeckLinkOutput - Created by QueryInterface from IDeckLink. */
  480. [
  481. object,
  482. uuid(CC5C8A6E-3F2F-4B3A-87EA-FD78AF300564),
  483. local,
  484. helpstring("Created by QueryInterface from IDeckLink.")
  485. ] interface IDeckLinkOutput : IUnknown
  486. {
  487. HRESULT DoesSupportVideoMode([in] BMDDisplayMode displayMode, [in] BMDPixelFormat pixelFormat, [in] BMDVideoOutputFlags flags, [out] BMDDisplayModeSupport *result, [out] IDeckLinkDisplayMode **resultDisplayMode);
  488. HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator **iterator);
  489. HRESULT SetScreenPreviewCallback([in] IDeckLinkScreenPreviewCallback *previewCallback);
  490. /* Video Output */
  491. HRESULT EnableVideoOutput([in] BMDDisplayMode displayMode, [in] BMDVideoOutputFlags flags);
  492. HRESULT DisableVideoOutput(void);
  493. HRESULT SetVideoOutputFrameMemoryAllocator([in] IDeckLinkMemoryAllocator *theAllocator);
  494. HRESULT CreateVideoFrame([in] int width, [in] int height, [in] int rowBytes, [in] BMDPixelFormat pixelFormat, [in] BMDFrameFlags flags, [out] IDeckLinkMutableVideoFrame **outFrame);
  495. HRESULT CreateAncillaryData([in] BMDPixelFormat pixelFormat, [out] IDeckLinkVideoFrameAncillary **outBuffer);
  496. HRESULT DisplayVideoFrameSync([in] IDeckLinkVideoFrame *theFrame);
  497. HRESULT ScheduleVideoFrame([in] IDeckLinkVideoFrame *theFrame, [in] BMDTimeValue displayTime, [in] BMDTimeValue displayDuration, [in] BMDTimeScale timeScale);
  498. HRESULT SetScheduledFrameCompletionCallback([in] IDeckLinkVideoOutputCallback *theCallback);
  499. HRESULT GetBufferedVideoFrameCount([out] unsigned int *bufferedFrameCount);
  500. /* Audio Output */
  501. HRESULT EnableAudioOutput([in] BMDAudioSampleRate sampleRate, [in] BMDAudioSampleType sampleType, [in] unsigned int channelCount, [in] BMDAudioOutputStreamType streamType);
  502. HRESULT DisableAudioOutput(void);
  503. HRESULT WriteAudioSamplesSync([in] void *buffer, [in] unsigned int sampleFrameCount, [out] unsigned int *sampleFramesWritten);
  504. HRESULT BeginAudioPreroll(void);
  505. HRESULT EndAudioPreroll(void);
  506. HRESULT ScheduleAudioSamples([in] void *buffer, [in] unsigned int sampleFrameCount, [in] BMDTimeValue streamTime, [in] BMDTimeScale timeScale, [out] unsigned int *sampleFramesWritten);
  507. HRESULT GetBufferedAudioSampleFrameCount([out] unsigned int *bufferedSampleFrameCount);
  508. HRESULT FlushBufferedAudioSamples(void);
  509. HRESULT SetAudioCallback([in] IDeckLinkAudioOutputCallback *theCallback);
  510. /* Output Control */
  511. HRESULT StartScheduledPlayback([in] BMDTimeValue playbackStartTime, [in] BMDTimeScale timeScale, [in] double playbackSpeed);
  512. HRESULT StopScheduledPlayback([in] BMDTimeValue stopPlaybackAtTime, [out] BMDTimeValue *actualStopTime, [in] BMDTimeScale timeScale);
  513. HRESULT IsScheduledPlaybackRunning([out] BOOL *active);
  514. HRESULT GetScheduledStreamTime([in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue *streamTime, [out] double *playbackSpeed);
  515. HRESULT GetReferenceStatus([out] BMDReferenceStatus *referenceStatus);
  516. /* Hardware Timing */
  517. HRESULT GetHardwareReferenceClock([in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue *hardwareTime, [out] BMDTimeValue *timeInFrame, [out] BMDTimeValue *ticksPerFrame);
  518. HRESULT GetFrameCompletionReferenceTimestamp([in] IDeckLinkVideoFrame *theFrame, [in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue *frameCompletionTimestamp);
  519. };
  520. /* Interface IDeckLinkInput - Created by QueryInterface from IDeckLink. */
  521. [
  522. object,
  523. uuid(AF22762B-DFAC-4846-AA79-FA8883560995),
  524. helpstring("Created by QueryInterface from IDeckLink.")
  525. ] interface IDeckLinkInput : IUnknown
  526. {
  527. HRESULT DoesSupportVideoMode([in] BMDDisplayMode displayMode, [in] BMDPixelFormat pixelFormat, [in] BMDVideoInputFlags flags, [out] BMDDisplayModeSupport *result, [out] IDeckLinkDisplayMode **resultDisplayMode);
  528. HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator **iterator);
  529. HRESULT SetScreenPreviewCallback([in] IDeckLinkScreenPreviewCallback *previewCallback);
  530. /* Video Input */
  531. HRESULT EnableVideoInput([in] BMDDisplayMode displayMode, [in] BMDPixelFormat pixelFormat, [in] BMDVideoInputFlags flags);
  532. HRESULT DisableVideoInput(void);
  533. HRESULT GetAvailableVideoFrameCount([out] unsigned int *availableFrameCount);
  534. HRESULT SetVideoInputFrameMemoryAllocator([in] IDeckLinkMemoryAllocator *theAllocator);
  535. /* Audio Input */
  536. HRESULT EnableAudioInput([in] BMDAudioSampleRate sampleRate, [in] BMDAudioSampleType sampleType, [in] unsigned int channelCount);
  537. HRESULT DisableAudioInput(void);
  538. HRESULT GetAvailableAudioSampleFrameCount([out] unsigned int *availableSampleFrameCount);
  539. /* Input Control */
  540. HRESULT StartStreams(void);
  541. HRESULT StopStreams(void);
  542. HRESULT PauseStreams(void);
  543. HRESULT FlushStreams(void);
  544. HRESULT SetCallback([in] IDeckLinkInputCallback *theCallback);
  545. /* Hardware Timing */
  546. HRESULT GetHardwareReferenceClock([in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue *hardwareTime, [out] BMDTimeValue *timeInFrame, [out] BMDTimeValue *ticksPerFrame);
  547. };
  548. /* Interface IDeckLinkEncoderInput - Created by QueryInterface from IDeckLink. */
  549. [
  550. object,
  551. uuid(270587DA-6B7D-42E7-A1F0-6D853F581185),
  552. helpstring("Created by QueryInterface from IDeckLink.")
  553. ] interface IDeckLinkEncoderInput : IUnknown
  554. {
  555. HRESULT DoesSupportVideoMode([in] BMDDisplayMode displayMode, [in] BMDPixelFormat pixelFormat, [in] BMDVideoInputFlags flags, [out] BMDDisplayModeSupport *result, [out] IDeckLinkDisplayMode **resultDisplayMode);
  556. HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator **iterator);
  557. /* Video Input */
  558. HRESULT EnableVideoInput([in] BMDDisplayMode displayMode, [in] BMDPixelFormat pixelFormat, [in] BMDVideoInputFlags flags);
  559. HRESULT DisableVideoInput(void);
  560. HRESULT GetAvailablePacketsCount([out] unsigned int *availablePacketsCount);
  561. HRESULT SetMemoryAllocator([in] IDeckLinkMemoryAllocator *theAllocator);
  562. /* Audio Input */
  563. HRESULT EnableAudioInput([in] BMDAudioFormat audioFormat, [in] BMDAudioSampleRate sampleRate, [in] BMDAudioSampleType sampleType, [in] unsigned int channelCount);
  564. HRESULT DisableAudioInput(void);
  565. HRESULT GetAvailableAudioSampleFrameCount([out] unsigned int *availableSampleFrameCount);
  566. /* Input Control */
  567. HRESULT StartStreams(void);
  568. HRESULT StopStreams(void);
  569. HRESULT PauseStreams(void);
  570. HRESULT FlushStreams(void);
  571. HRESULT SetCallback([in] IDeckLinkEncoderInputCallback *theCallback);
  572. /* Hardware Timing */
  573. HRESULT GetHardwareReferenceClock([in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue *hardwareTime, [out] BMDTimeValue *timeInFrame, [out] BMDTimeValue *ticksPerFrame);
  574. };
  575. /* Interface IDeckLinkVideoFrame - Interface to encapsulate a video frame; can be caller-implemented. */
  576. [
  577. object,
  578. uuid(3F716FE0-F023-4111-BE5D-EF4414C05B17),
  579. local,
  580. helpstring("Interface to encapsulate a video frame; can be caller-implemented.")
  581. ] interface IDeckLinkVideoFrame : IUnknown
  582. {
  583. long GetWidth(void);
  584. long GetHeight(void);
  585. long GetRowBytes(void);
  586. BMDPixelFormat GetPixelFormat(void);
  587. BMDFrameFlags GetFlags(void);
  588. HRESULT GetBytes([out] void **buffer);
  589. HRESULT GetTimecode([in] BMDTimecodeFormat format, [out] IDeckLinkTimecode **timecode);
  590. HRESULT GetAncillaryData([out] IDeckLinkVideoFrameAncillary **ancillary);
  591. };
  592. /* Interface IDeckLinkMutableVideoFrame - Created by IDeckLinkOutput::CreateVideoFrame. */
  593. [
  594. object,
  595. uuid(69E2639F-40DA-4E19-B6F2-20ACE815C390),
  596. local,
  597. helpstring("Created by IDeckLinkOutput::CreateVideoFrame.")
  598. ] interface IDeckLinkMutableVideoFrame : IDeckLinkVideoFrame
  599. {
  600. HRESULT SetFlags([in] BMDFrameFlags newFlags);
  601. HRESULT SetTimecode([in] BMDTimecodeFormat format, [in] IDeckLinkTimecode *timecode);
  602. HRESULT SetTimecodeFromComponents([in] BMDTimecodeFormat format, [in] unsigned char hours, [in] unsigned char minutes, [in] unsigned char seconds, [in] unsigned char frames, [in] BMDTimecodeFlags flags);
  603. HRESULT SetAncillaryData([in] IDeckLinkVideoFrameAncillary *ancillary);
  604. HRESULT SetTimecodeUserBits([in] BMDTimecodeFormat format, [in] BMDTimecodeUserBits userBits);
  605. };
  606. /* Interface IDeckLinkVideoFrame3DExtensions - Optional interface implemented on IDeckLinkVideoFrame to support 3D frames */
  607. [
  608. object,
  609. uuid(DA0F7E4A-EDC7-48A8-9CDD-2DB51C729CD7),
  610. local,
  611. helpstring("Optional interface implemented on IDeckLinkVideoFrame to support 3D frames")
  612. ] interface IDeckLinkVideoFrame3DExtensions : IUnknown
  613. {
  614. BMDVideo3DPackingFormat Get3DPackingFormat(void);
  615. HRESULT GetFrameForRightEye([out] IDeckLinkVideoFrame* *rightEyeFrame);
  616. };
  617. /* Interface IDeckLinkVideoFrameMetadataExtensions - Optional interface implemented on IDeckLinkVideoFrame to support frame metadata such as HDMI HDR information */
  618. [
  619. object,
  620. uuid(D5973DC9-6432-46D0-8F0B-2496F8A1238F),
  621. local,
  622. helpstring("Optional interface implemented on IDeckLinkVideoFrame to support frame metadata such as HDMI HDR information")
  623. ] interface IDeckLinkVideoFrameMetadataExtensions : IUnknown
  624. {
  625. HRESULT GetInt([in] BMDDeckLinkFrameMetadataID metadataID, [out] LONGLONG *value);
  626. HRESULT GetFloat([in] BMDDeckLinkFrameMetadataID metadataID, [out] double *value);
  627. HRESULT GetFlag([in] BMDDeckLinkFrameMetadataID metadataID, [out] BOOL* value);
  628. HRESULT GetString([in] BMDDeckLinkFrameMetadataID metadataID, [out] BSTR *value);
  629. };
  630. /* Interface IDeckLinkVideoInputFrame - Provided by the IDeckLinkVideoInput frame arrival callback. */
  631. [
  632. object,
  633. uuid(05CFE374-537C-4094-9A57-680525118F44),
  634. local,
  635. helpstring("Provided by the IDeckLinkVideoInput frame arrival callback.")
  636. ] interface IDeckLinkVideoInputFrame : IDeckLinkVideoFrame
  637. {
  638. HRESULT GetStreamTime([out] BMDTimeValue *frameTime, [out] BMDTimeValue *frameDuration, [in] BMDTimeScale timeScale);
  639. HRESULT GetHardwareReferenceTimestamp([in] BMDTimeScale timeScale, [out] BMDTimeValue *frameTime, [out] BMDTimeValue *frameDuration);
  640. };
  641. /* Interface IDeckLinkVideoFrameAncillary - Obtained through QueryInterface() on an IDeckLinkVideoFrame object. */
  642. [
  643. object,
  644. uuid(732E723C-D1A4-4E29-9E8E-4A88797A0004),
  645. local,
  646. helpstring("Obtained through QueryInterface() on an IDeckLinkVideoFrame object.")
  647. ] interface IDeckLinkVideoFrameAncillary : IUnknown
  648. {
  649. HRESULT GetBufferForVerticalBlankingLine([in] unsigned int lineNumber, [out] void **buffer);
  650. BMDPixelFormat GetPixelFormat(void);
  651. BMDDisplayMode GetDisplayMode(void);
  652. };
  653. /* Interface IDeckLinkEncoderPacket - Interface to encapsulate an encoded packet. */
  654. [
  655. object,
  656. uuid(B693F36C-316E-4AF1-B6C2-F389A4BCA620),
  657. local,
  658. helpstring("Interface to encapsulate an encoded packet.")
  659. ] interface IDeckLinkEncoderPacket : IUnknown
  660. {
  661. HRESULT GetBytes([out] void **buffer);
  662. long GetSize(void);
  663. HRESULT GetStreamTime([out] BMDTimeValue *frameTime, [in] BMDTimeScale timeScale);
  664. BMDPacketType GetPacketType(void);
  665. };
  666. /* Interface IDeckLinkEncoderVideoPacket - Provided by the IDeckLinkEncoderInput video packet arrival callback. */
  667. [
  668. object,
  669. uuid(4E7FD944-E8C7-4EAC-B8C0-7B77F80F5AE0),
  670. local,
  671. helpstring("Provided by the IDeckLinkEncoderInput video packet arrival callback.")
  672. ] interface IDeckLinkEncoderVideoPacket : IDeckLinkEncoderPacket
  673. {
  674. BMDPixelFormat GetPixelFormat(void);
  675. HRESULT GetHardwareReferenceTimestamp([in] BMDTimeScale timeScale, [out] BMDTimeValue *frameTime, [out] BMDTimeValue *frameDuration);
  676. HRESULT GetTimecode([in] BMDTimecodeFormat format, [out] IDeckLinkTimecode **timecode);
  677. };
  678. /* Interface IDeckLinkEncoderAudioPacket - Provided by the IDeckLinkEncoderInput audio packet arrival callback. */
  679. [
  680. object,
  681. uuid(49E8EDC8-693B-4E14-8EF6-12C658F5A07A),
  682. local,
  683. helpstring("Provided by the IDeckLinkEncoderInput audio packet arrival callback.")
  684. ] interface IDeckLinkEncoderAudioPacket : IDeckLinkEncoderPacket
  685. {
  686. BMDAudioFormat GetAudioFormat(void);
  687. };
  688. /* Interface IDeckLinkH265NALPacket - Obtained through QueryInterface() on an IDeckLinkEncoderVideoPacket object */
  689. [
  690. object,
  691. uuid(639C8E0B-68D5-4BDE-A6D4-95F3AEAFF2E7),
  692. local,
  693. helpstring("Obtained through QueryInterface() on an IDeckLinkEncoderVideoPacket object")
  694. ] interface IDeckLinkH265NALPacket : IDeckLinkEncoderVideoPacket
  695. {
  696. HRESULT GetUnitType([out] unsigned char *unitType);
  697. HRESULT GetBytesNoPrefix([out] void **buffer);
  698. long GetSizeNoPrefix(void);
  699. };
  700. /* Interface IDeckLinkAudioInputPacket - Provided by the IDeckLinkInput callback. */
  701. [
  702. object,
  703. uuid(E43D5870-2894-11DE-8C30-0800200C9A66),
  704. local,
  705. helpstring("Provided by the IDeckLinkInput callback.")
  706. ] interface IDeckLinkAudioInputPacket : IUnknown
  707. {
  708. long GetSampleFrameCount(void);
  709. HRESULT GetBytes([out] void **buffer);
  710. HRESULT GetPacketTime([out] BMDTimeValue *packetTime, [in] BMDTimeScale timeScale);
  711. };
  712. /* Interface IDeckLinkScreenPreviewCallback - Screen preview callback */
  713. [
  714. object,
  715. uuid(B1D3F49A-85FE-4C5D-95C8-0B5D5DCCD438),
  716. local,
  717. helpstring("Screen preview callback")
  718. ] interface IDeckLinkScreenPreviewCallback : IUnknown
  719. {
  720. HRESULT DrawFrame([in] IDeckLinkVideoFrame *theFrame);
  721. };
  722. /* Interface IDeckLinkGLScreenPreviewHelper - Created with CoCreateInstance(). */
  723. [
  724. object,
  725. uuid(504E2209-CAC7-4C1A-9FB4-C5BB6274D22F),
  726. local,
  727. helpstring("Created with CoCreateInstance().")
  728. ] interface IDeckLinkGLScreenPreviewHelper : IUnknown
  729. {
  730. /* Methods must be called with OpenGL context set */
  731. HRESULT InitializeGL(void);
  732. HRESULT PaintGL(void);
  733. HRESULT SetFrame([in] IDeckLinkVideoFrame *theFrame);
  734. HRESULT Set3DPreviewFormat([in] BMD3DPreviewFormat previewFormat);
  735. };
  736. /* Interface IDeckLinkDX9ScreenPreviewHelper - Created with CoCreateInstance(). */
  737. [
  738. object,
  739. uuid(2094B522-D1A1-40C0-9AC7-1C012218EF02),
  740. local,
  741. helpstring("Created with CoCreateInstance().")
  742. ] interface IDeckLinkDX9ScreenPreviewHelper : IUnknown
  743. {
  744. HRESULT Initialize([in] void *device);
  745. HRESULT Render([in] RECT *rc);
  746. HRESULT SetFrame([in] IDeckLinkVideoFrame *theFrame);
  747. HRESULT Set3DPreviewFormat([in] BMD3DPreviewFormat previewFormat);
  748. };
  749. /* Interface IDeckLinkNotificationCallback - DeckLink Notification Callback Interface */
  750. [
  751. object,
  752. uuid(b002a1ec-070d-4288-8289-bd5d36e5ff0d),
  753. local,
  754. helpstring("DeckLink Notification Callback Interface")
  755. ] interface IDeckLinkNotificationCallback : IUnknown
  756. {
  757. HRESULT Notify([in] BMDNotifications topic, [in] ULONGLONG param1, [in] ULONGLONG param2);
  758. };
  759. /* Interface IDeckLinkNotification - DeckLink Notification interface */
  760. [
  761. object,
  762. uuid(0a1fb207-e215-441b-9b19-6fa1575946c5),
  763. local,
  764. helpstring("DeckLink Notification interface")
  765. ] interface IDeckLinkNotification : IUnknown
  766. {
  767. HRESULT Subscribe([in] BMDNotifications topic, [in] IDeckLinkNotificationCallback *theCallback);
  768. HRESULT Unsubscribe([in] BMDNotifications topic, [in] IDeckLinkNotificationCallback *theCallback);
  769. };
  770. /* Interface IDeckLinkAttributes - DeckLink Attribute interface */
  771. [
  772. object,
  773. uuid(ABC11843-D966-44CB-96E2-A1CB5D3135C4),
  774. local,
  775. helpstring("DeckLink Attribute interface")
  776. ] interface IDeckLinkAttributes : IUnknown
  777. {
  778. HRESULT GetFlag([in] BMDDeckLinkAttributeID cfgID, [out] BOOL *value);
  779. HRESULT GetInt([in] BMDDeckLinkAttributeID cfgID, [out] LONGLONG *value);
  780. HRESULT GetFloat([in] BMDDeckLinkAttributeID cfgID, [out] double *value);
  781. HRESULT GetString([in] BMDDeckLinkAttributeID cfgID, [out] BSTR *value);
  782. };
  783. /* Interface IDeckLinkStatus - DeckLink Status interface */
  784. [
  785. object,
  786. uuid(5F558200-4028-49BC-BEAC-DB3FA4A96E46),
  787. local,
  788. helpstring("DeckLink Status interface")
  789. ] interface IDeckLinkStatus : IUnknown
  790. {
  791. HRESULT GetFlag([in] BMDDeckLinkStatusID statusID, [out] BOOL *value);
  792. HRESULT GetInt([in] BMDDeckLinkStatusID statusID, [out] LONGLONG *value);
  793. HRESULT GetFloat([in] BMDDeckLinkStatusID statusID, [out] double *value);
  794. HRESULT GetString([in] BMDDeckLinkStatusID statusID, [out] BSTR *value);
  795. HRESULT GetBytes([in] BMDDeckLinkStatusID statusID, [out] void *buffer, [in, out] unsigned int *bufferSize);
  796. };
  797. /* Interface IDeckLinkKeyer - DeckLink Keyer interface */
  798. [
  799. object,
  800. uuid(89AFCAF5-65F8-421E-98F7-96FE5F5BFBA3),
  801. local,
  802. helpstring("DeckLink Keyer interface")
  803. ] interface IDeckLinkKeyer : IUnknown
  804. {
  805. HRESULT Enable([in] BOOL isExternal);
  806. HRESULT SetLevel([in] unsigned char level);
  807. HRESULT RampUp([in] unsigned int numberOfFrames);
  808. HRESULT RampDown([in] unsigned int numberOfFrames);
  809. HRESULT Disable(void);
  810. };
  811. /* Interface IDeckLinkVideoConversion - Created with CoCreateInstance(). */
  812. [
  813. object,
  814. uuid(3BBCB8A2-DA2C-42D9-B5D8-88083644E99A),
  815. local,
  816. helpstring("Created with CoCreateInstance().")
  817. ] interface IDeckLinkVideoConversion : IUnknown
  818. {
  819. HRESULT ConvertFrame([in] IDeckLinkVideoFrame* srcFrame, [in] IDeckLinkVideoFrame* dstFrame);
  820. };
  821. /* Interface IDeckLinkDeviceNotificationCallback - DeckLink device arrival/removal notification callbacks */
  822. [
  823. object,
  824. uuid(4997053B-0ADF-4CC8-AC70-7A50C4BE728F),
  825. helpstring("DeckLink device arrival/removal notification callbacks")
  826. ] interface IDeckLinkDeviceNotificationCallback : IUnknown
  827. {
  828. HRESULT DeckLinkDeviceArrived([in] IDeckLink* deckLinkDevice);
  829. HRESULT DeckLinkDeviceRemoved([in] IDeckLink* deckLinkDevice);
  830. };
  831. /* Interface IDeckLinkDiscovery - DeckLink device discovery */
  832. [
  833. object,
  834. uuid(CDBF631C-BC76-45FA-B44D-C55059BC6101),
  835. helpstring("DeckLink device discovery")
  836. ] interface IDeckLinkDiscovery : IUnknown
  837. {
  838. HRESULT InstallDeviceNotifications([in] IDeckLinkDeviceNotificationCallback* deviceNotificationCallback);
  839. HRESULT UninstallDeviceNotifications(void);
  840. };
  841. /* Coclasses */
  842. importlib("stdole2.tlb");
  843. [
  844. uuid(1F2E109A-8F4F-49E4-9203-135595CB6FA5),
  845. helpstring("CDeckLinkIterator Class")
  846. ] coclass CDeckLinkIterator
  847. {
  848. [default] interface IDeckLinkIterator;
  849. };
  850. [
  851. uuid(263CA19F-ED09-482E-9F9D-84005783A237),
  852. helpstring("CDeckLinkAPIInformation Class")
  853. ] coclass CDeckLinkAPIInformation
  854. {
  855. [default] interface IDeckLinkAPIInformation;
  856. };
  857. [
  858. uuid(F63E77C7-B655-4A4A-9AD0-3CA85D394343),
  859. helpstring("CDeckLinkGLScreenPreviewHelper Class")
  860. ] coclass CDeckLinkGLScreenPreviewHelper
  861. {
  862. [default] interface IDeckLinkGLScreenPreviewHelper;
  863. };
  864. [
  865. uuid(CC010023-E01D-4525-9D59-80C8AB3DC7A0),
  866. helpstring("CDeckLinkDX9ScreenPreviewHelper Class")
  867. ] coclass CDeckLinkDX9ScreenPreviewHelper
  868. {
  869. [default] interface IDeckLinkDX9ScreenPreviewHelper;
  870. };
  871. [
  872. uuid(7DBBBB11-5B7B-467D-AEA4-CEA468FD368C),
  873. helpstring("CDeckLinkVideoConversion Class")
  874. ] coclass CDeckLinkVideoConversion
  875. {
  876. [default] interface IDeckLinkVideoConversion;
  877. };
  878. [
  879. uuid(1073A05C-D885-47E9-B3C6-129B3F9F648B),
  880. helpstring("CDeckLinkDiscovery Class")
  881. ] coclass CDeckLinkDiscovery
  882. {
  883. [default] interface IDeckLinkDiscovery;
  884. };
  885. // import deprecated interfaces
  886. #include "DeckLinkAPI_v10_6.idl"
  887. #include "DeckLinkAPI_v10_5.idl"
  888. #include "DeckLinkAPI_v10_4.idl"
  889. #include "DeckLinkAPI_v10_2.idl"
  890. #include "DeckLinkAPI_v9_9.idl"
  891. #include "DeckLinkAPI_v9_2.idl"
  892. #include "DeckLinkAPI_v8_1.idl"
  893. #include "DeckLinkAPI_v8_0.idl"
  894. #include "DeckLinkAPI_v7_9.idl"
  895. #include "DeckLinkAPI_v7_6.idl"
  896. #include "DeckLinkAPI_v7_3.idl"
  897. #include "DeckLinkAPI_v7_1.idl"
  898. };