DeckLinkAPI.h 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764
  1. /* -LICENSE-START-
  2. ** Copyright (c) 2014 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_DECKLINKAPI_H
  28. #define BMD_DECKLINKAPI_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. /* DeckLink API */
  37. #include <stdint.h>
  38. #include "LinuxCOM.h"
  39. #include "DeckLinkAPITypes.h"
  40. #include "DeckLinkAPIModes.h"
  41. #include "DeckLinkAPIDiscovery.h"
  42. #include "DeckLinkAPIConfiguration.h"
  43. #include "DeckLinkAPIDeckControl.h"
  44. #define BLACKMAGIC_DECKLINK_API_MAGIC 1
  45. // Type Declarations
  46. // Interface ID Declarations
  47. BMD_CONST REFIID IID_IDeckLinkVideoOutputCallback = /* 20AA5225-1958-47CB-820B-80A8D521A6EE */ {0x20,0xAA,0x52,0x25,0x19,0x58,0x47,0xCB,0x82,0x0B,0x80,0xA8,0xD5,0x21,0xA6,0xEE};
  48. BMD_CONST REFIID IID_IDeckLinkInputCallback = /* DD04E5EC-7415-42AB-AE4A-E80C4DFC044A */ {0xDD,0x04,0xE5,0xEC,0x74,0x15,0x42,0xAB,0xAE,0x4A,0xE8,0x0C,0x4D,0xFC,0x04,0x4A};
  49. BMD_CONST REFIID IID_IDeckLinkMemoryAllocator = /* B36EB6E7-9D29-4AA8-92EF-843B87A289E8 */ {0xB3,0x6E,0xB6,0xE7,0x9D,0x29,0x4A,0xA8,0x92,0xEF,0x84,0x3B,0x87,0xA2,0x89,0xE8};
  50. BMD_CONST REFIID IID_IDeckLinkAudioOutputCallback = /* 403C681B-7F46-4A12-B993-2BB127084EE6 */ {0x40,0x3C,0x68,0x1B,0x7F,0x46,0x4A,0x12,0xB9,0x93,0x2B,0xB1,0x27,0x08,0x4E,0xE6};
  51. BMD_CONST REFIID IID_IDeckLinkIterator = /* 50FB36CD-3063-4B73-BDBB-958087F2D8BA */ {0x50,0xFB,0x36,0xCD,0x30,0x63,0x4B,0x73,0xBD,0xBB,0x95,0x80,0x87,0xF2,0xD8,0xBA};
  52. BMD_CONST REFIID IID_IDeckLinkAPIInformation = /* 7BEA3C68-730D-4322-AF34-8A7152B532A4 */ {0x7B,0xEA,0x3C,0x68,0x73,0x0D,0x43,0x22,0xAF,0x34,0x8A,0x71,0x52,0xB5,0x32,0xA4};
  53. BMD_CONST REFIID IID_IDeckLinkOutput = /* CC5C8A6E-3F2F-4B3A-87EA-FD78AF300564 */ {0xCC,0x5C,0x8A,0x6E,0x3F,0x2F,0x4B,0x3A,0x87,0xEA,0xFD,0x78,0xAF,0x30,0x05,0x64};
  54. BMD_CONST REFIID IID_IDeckLinkInput = /* AF22762B-DFAC-4846-AA79-FA8883560995 */ {0xAF,0x22,0x76,0x2B,0xDF,0xAC,0x48,0x46,0xAA,0x79,0xFA,0x88,0x83,0x56,0x09,0x95};
  55. BMD_CONST REFIID IID_IDeckLinkVideoFrame = /* 3F716FE0-F023-4111-BE5D-EF4414C05B17 */ {0x3F,0x71,0x6F,0xE0,0xF0,0x23,0x41,0x11,0xBE,0x5D,0xEF,0x44,0x14,0xC0,0x5B,0x17};
  56. BMD_CONST REFIID IID_IDeckLinkMutableVideoFrame = /* 69E2639F-40DA-4E19-B6F2-20ACE815C390 */ {0x69,0xE2,0x63,0x9F,0x40,0xDA,0x4E,0x19,0xB6,0xF2,0x20,0xAC,0xE8,0x15,0xC3,0x90};
  57. BMD_CONST REFIID IID_IDeckLinkVideoFrame3DExtensions = /* DA0F7E4A-EDC7-48A8-9CDD-2DB51C729CD7 */ {0xDA,0x0F,0x7E,0x4A,0xED,0xC7,0x48,0xA8,0x9C,0xDD,0x2D,0xB5,0x1C,0x72,0x9C,0xD7};
  58. BMD_CONST REFIID IID_IDeckLinkVideoInputFrame = /* 05CFE374-537C-4094-9A57-680525118F44 */ {0x05,0xCF,0xE3,0x74,0x53,0x7C,0x40,0x94,0x9A,0x57,0x68,0x05,0x25,0x11,0x8F,0x44};
  59. BMD_CONST REFIID IID_IDeckLinkVideoFrameAncillary = /* 732E723C-D1A4-4E29-9E8E-4A88797A0004 */ {0x73,0x2E,0x72,0x3C,0xD1,0xA4,0x4E,0x29,0x9E,0x8E,0x4A,0x88,0x79,0x7A,0x00,0x04};
  60. BMD_CONST REFIID IID_IDeckLinkAudioInputPacket = /* E43D5870-2894-11DE-8C30-0800200C9A66 */ {0xE4,0x3D,0x58,0x70,0x28,0x94,0x11,0xDE,0x8C,0x30,0x08,0x00,0x20,0x0C,0x9A,0x66};
  61. BMD_CONST REFIID IID_IDeckLinkScreenPreviewCallback = /* B1D3F49A-85FE-4C5D-95C8-0B5D5DCCD438 */ {0xB1,0xD3,0xF4,0x9A,0x85,0xFE,0x4C,0x5D,0x95,0xC8,0x0B,0x5D,0x5D,0xCC,0xD4,0x38};
  62. BMD_CONST REFIID IID_IDeckLinkGLScreenPreviewHelper = /* 504E2209-CAC7-4C1A-9FB4-C5BB6274D22F */ {0x50,0x4E,0x22,0x09,0xCA,0xC7,0x4C,0x1A,0x9F,0xB4,0xC5,0xBB,0x62,0x74,0xD2,0x2F};
  63. BMD_CONST REFIID IID_IDeckLinkNotificationCallback = /* B002A1EC-070D-4288-8289-BD5D36E5FF0D */ {0xB0,0x02,0xA1,0xEC,0x07,0x0D,0x42,0x88,0x82,0x89,0xBD,0x5D,0x36,0xE5,0xFF,0x0D};
  64. BMD_CONST REFIID IID_IDeckLinkNotification = /* 0A1FB207-E215-441B-9B19-6FA1575946C5 */ {0x0A,0x1F,0xB2,0x07,0xE2,0x15,0x44,0x1B,0x9B,0x19,0x6F,0xA1,0x57,0x59,0x46,0xC5};
  65. BMD_CONST REFIID IID_IDeckLinkAttributes = /* ABC11843-D966-44CB-96E2-A1CB5D3135C4 */ {0xAB,0xC1,0x18,0x43,0xD9,0x66,0x44,0xCB,0x96,0xE2,0xA1,0xCB,0x5D,0x31,0x35,0xC4};
  66. BMD_CONST REFIID IID_IDeckLinkKeyer = /* 89AFCAF5-65F8-421E-98F7-96FE5F5BFBA3 */ {0x89,0xAF,0xCA,0xF5,0x65,0xF8,0x42,0x1E,0x98,0xF7,0x96,0xFE,0x5F,0x5B,0xFB,0xA3};
  67. BMD_CONST REFIID IID_IDeckLinkVideoConversion = /* 3BBCB8A2-DA2C-42D9-B5D8-88083644E99A */ {0x3B,0xBC,0xB8,0xA2,0xDA,0x2C,0x42,0xD9,0xB5,0xD8,0x88,0x08,0x36,0x44,0xE9,0x9A};
  68. BMD_CONST REFIID IID_IDeckLinkDeviceNotificationCallback = /* 4997053B-0ADF-4CC8-AC70-7A50C4BE728F */ {0x49,0x97,0x05,0x3B,0x0A,0xDF,0x4C,0xC8,0xAC,0x70,0x7A,0x50,0xC4,0xBE,0x72,0x8F};
  69. BMD_CONST REFIID IID_IDeckLinkDiscovery = /* CDBF631C-BC76-45FA-B44D-C55059BC6101 */ {0xCD,0xBF,0x63,0x1C,0xBC,0x76,0x45,0xFA,0xB4,0x4D,0xC5,0x50,0x59,0xBC,0x61,0x01};
  70. /* Enum BMDVideoOutputFlags - Flags to control the output of ancillary data along with video. */
  71. typedef uint32_t BMDVideoOutputFlags;
  72. enum _BMDVideoOutputFlags {
  73. bmdVideoOutputFlagDefault = 0,
  74. bmdVideoOutputVANC = 1 << 0,
  75. bmdVideoOutputVITC = 1 << 1,
  76. bmdVideoOutputRP188 = 1 << 2,
  77. bmdVideoOutputDualStream3D = 1 << 4
  78. };
  79. /* Enum BMDFrameFlags - Frame flags */
  80. typedef uint32_t BMDFrameFlags;
  81. enum _BMDFrameFlags {
  82. bmdFrameFlagDefault = 0,
  83. bmdFrameFlagFlipVertical = 1 << 0,
  84. /* Flags that are applicable only to instances of IDeckLinkVideoInputFrame */
  85. bmdFrameHasNoInputSource = 1 << 31
  86. };
  87. /* Enum BMDVideoInputFlags - Flags applicable to video input */
  88. typedef uint32_t BMDVideoInputFlags;
  89. enum _BMDVideoInputFlags {
  90. bmdVideoInputFlagDefault = 0,
  91. bmdVideoInputEnableFormatDetection = 1 << 0,
  92. bmdVideoInputDualStream3D = 1 << 1
  93. };
  94. /* Enum BMDVideoInputFormatChangedEvents - Bitmask passed to the VideoInputFormatChanged notification to identify the properties of the input signal that have changed */
  95. typedef uint32_t BMDVideoInputFormatChangedEvents;
  96. enum _BMDVideoInputFormatChangedEvents {
  97. bmdVideoInputDisplayModeChanged = 1 << 0,
  98. bmdVideoInputFieldDominanceChanged = 1 << 1,
  99. bmdVideoInputColorspaceChanged = 1 << 2
  100. };
  101. /* Enum BMDDetectedVideoInputFormatFlags - Flags passed to the VideoInputFormatChanged notification to describe the detected video input signal */
  102. typedef uint32_t BMDDetectedVideoInputFormatFlags;
  103. enum _BMDDetectedVideoInputFormatFlags {
  104. bmdDetectedVideoInputYCbCr422 = 1 << 0,
  105. bmdDetectedVideoInputRGB444 = 1 << 1,
  106. bmdDetectedVideoInputDualStream3D = 1 << 2
  107. };
  108. /* Enum BMDDeckLinkCapturePassthroughMode - Enumerates whether the video output is electrically connected to the video input or if the clean switching mode is enabled */
  109. typedef uint32_t BMDDeckLinkCapturePassthroughMode;
  110. enum _BMDDeckLinkCapturePassthroughMode {
  111. bmdDeckLinkCapturePassthroughModeDirect = /* 'pdir' */ 0x70646972,
  112. bmdDeckLinkCapturePassthroughModeCleanSwitch = /* 'pcln' */ 0x70636C6E
  113. };
  114. /* Enum BMDOutputFrameCompletionResult - Frame Completion Callback */
  115. typedef uint32_t BMDOutputFrameCompletionResult;
  116. enum _BMDOutputFrameCompletionResult {
  117. bmdOutputFrameCompleted,
  118. bmdOutputFrameDisplayedLate,
  119. bmdOutputFrameDropped,
  120. bmdOutputFrameFlushed
  121. };
  122. /* Enum BMDReferenceStatus - GenLock input status */
  123. typedef uint32_t BMDReferenceStatus;
  124. enum _BMDReferenceStatus {
  125. bmdReferenceNotSupportedByHardware = 1 << 0,
  126. bmdReferenceLocked = 1 << 1
  127. };
  128. /* Enum BMDAudioSampleRate - Audio sample rates supported for output/input */
  129. typedef uint32_t BMDAudioSampleRate;
  130. enum _BMDAudioSampleRate {
  131. bmdAudioSampleRate48kHz = 48000
  132. };
  133. /* Enum BMDAudioSampleType - Audio sample sizes supported for output/input */
  134. typedef uint32_t BMDAudioSampleType;
  135. enum _BMDAudioSampleType {
  136. bmdAudioSampleType16bitInteger = 16,
  137. bmdAudioSampleType32bitInteger = 32
  138. };
  139. /* Enum BMDAudioOutputStreamType - Audio output stream type */
  140. typedef uint32_t BMDAudioOutputStreamType;
  141. enum _BMDAudioOutputStreamType {
  142. bmdAudioOutputStreamContinuous,
  143. bmdAudioOutputStreamContinuousDontResample,
  144. bmdAudioOutputStreamTimestamped
  145. };
  146. /* Enum BMDDisplayModeSupport - Output mode supported flags */
  147. typedef uint32_t BMDDisplayModeSupport;
  148. enum _BMDDisplayModeSupport {
  149. bmdDisplayModeNotSupported = 0,
  150. bmdDisplayModeSupported,
  151. bmdDisplayModeSupportedWithConversion
  152. };
  153. /* Enum BMDTimecodeFormat - Timecode formats for frame metadata */
  154. typedef uint32_t BMDTimecodeFormat;
  155. enum _BMDTimecodeFormat {
  156. bmdTimecodeRP188VITC1 = /* 'rpv1' */ 0x72707631, // RP188 timecode where DBB1 equals VITC1 (line 9)
  157. bmdTimecodeRP188VITC2 = /* 'rp12' */ 0x72703132, // RP188 timecode where DBB1 equals VITC2 (line 9 for progressive or line 571 for interlaced/PsF)
  158. bmdTimecodeRP188LTC = /* 'rplt' */ 0x72706C74, // RP188 timecode where DBB1 equals LTC (line 10)
  159. bmdTimecodeRP188Any = /* 'rp18' */ 0x72703138, // For capture: return the first valid timecode in {VITC1, LTC ,VITC2} - For playback: set the timecode as VITC1
  160. bmdTimecodeVITC = /* 'vitc' */ 0x76697463,
  161. bmdTimecodeVITCField2 = /* 'vit2' */ 0x76697432,
  162. bmdTimecodeSerial = /* 'seri' */ 0x73657269
  163. };
  164. /* Enum BMDAnalogVideoFlags - Analog video display flags */
  165. typedef uint32_t BMDAnalogVideoFlags;
  166. enum _BMDAnalogVideoFlags {
  167. bmdAnalogVideoFlagCompositeSetup75 = 1 << 0,
  168. bmdAnalogVideoFlagComponentBetacamLevels = 1 << 1
  169. };
  170. /* Enum BMDAudioOutputAnalogAESSwitch - Audio output Analog/AESEBU switch */
  171. typedef uint32_t BMDAudioOutputAnalogAESSwitch;
  172. enum _BMDAudioOutputAnalogAESSwitch {
  173. bmdAudioOutputSwitchAESEBU = /* 'aes ' */ 0x61657320,
  174. bmdAudioOutputSwitchAnalog = /* 'anlg' */ 0x616E6C67
  175. };
  176. /* Enum BMDVideoOutputConversionMode - Video/audio conversion mode */
  177. typedef uint32_t BMDVideoOutputConversionMode;
  178. enum _BMDVideoOutputConversionMode {
  179. bmdNoVideoOutputConversion = /* 'none' */ 0x6E6F6E65,
  180. bmdVideoOutputLetterboxDownconversion = /* 'ltbx' */ 0x6C746278,
  181. bmdVideoOutputAnamorphicDownconversion = /* 'amph' */ 0x616D7068,
  182. bmdVideoOutputHD720toHD1080Conversion = /* '720c' */ 0x37323063,
  183. bmdVideoOutputHardwareLetterboxDownconversion = /* 'HWlb' */ 0x48576C62,
  184. bmdVideoOutputHardwareAnamorphicDownconversion = /* 'HWam' */ 0x4857616D,
  185. bmdVideoOutputHardwareCenterCutDownconversion = /* 'HWcc' */ 0x48576363,
  186. bmdVideoOutputHardware720p1080pCrossconversion = /* 'xcap' */ 0x78636170,
  187. bmdVideoOutputHardwareAnamorphic720pUpconversion = /* 'ua7p' */ 0x75613770,
  188. bmdVideoOutputHardwareAnamorphic1080iUpconversion = /* 'ua1i' */ 0x75613169,
  189. bmdVideoOutputHardwareAnamorphic149To720pUpconversion = /* 'u47p' */ 0x75343770,
  190. bmdVideoOutputHardwareAnamorphic149To1080iUpconversion = /* 'u41i' */ 0x75343169,
  191. bmdVideoOutputHardwarePillarbox720pUpconversion = /* 'up7p' */ 0x75703770,
  192. bmdVideoOutputHardwarePillarbox1080iUpconversion = /* 'up1i' */ 0x75703169
  193. };
  194. /* Enum BMDVideoInputConversionMode - Video input conversion mode */
  195. typedef uint32_t BMDVideoInputConversionMode;
  196. enum _BMDVideoInputConversionMode {
  197. bmdNoVideoInputConversion = /* 'none' */ 0x6E6F6E65,
  198. bmdVideoInputLetterboxDownconversionFromHD1080 = /* '10lb' */ 0x31306C62,
  199. bmdVideoInputAnamorphicDownconversionFromHD1080 = /* '10am' */ 0x3130616D,
  200. bmdVideoInputLetterboxDownconversionFromHD720 = /* '72lb' */ 0x37326C62,
  201. bmdVideoInputAnamorphicDownconversionFromHD720 = /* '72am' */ 0x3732616D,
  202. bmdVideoInputLetterboxUpconversion = /* 'lbup' */ 0x6C627570,
  203. bmdVideoInputAnamorphicUpconversion = /* 'amup' */ 0x616D7570
  204. };
  205. /* Enum BMDVideo3DPackingFormat - Video 3D packing format */
  206. typedef uint32_t BMDVideo3DPackingFormat;
  207. enum _BMDVideo3DPackingFormat {
  208. bmdVideo3DPackingSidebySideHalf = /* 'sbsh' */ 0x73627368,
  209. bmdVideo3DPackingLinebyLine = /* 'lbyl' */ 0x6C62796C,
  210. bmdVideo3DPackingTopAndBottom = /* 'tabo' */ 0x7461626F,
  211. bmdVideo3DPackingFramePacking = /* 'frpk' */ 0x6672706B,
  212. bmdVideo3DPackingLeftOnly = /* 'left' */ 0x6C656674,
  213. bmdVideo3DPackingRightOnly = /* 'righ' */ 0x72696768
  214. };
  215. /* Enum BMDIdleVideoOutputOperation - Video output operation when not playing video */
  216. typedef uint32_t BMDIdleVideoOutputOperation;
  217. enum _BMDIdleVideoOutputOperation {
  218. bmdIdleVideoOutputBlack = /* 'blac' */ 0x626C6163,
  219. bmdIdleVideoOutputLastFrame = /* 'lafa' */ 0x6C616661,
  220. bmdIdleVideoOutputDesktop = /* 'desk' */ 0x6465736B
  221. };
  222. /* Enum BMDDeckLinkAttributeID - DeckLink Attribute ID */
  223. typedef uint32_t BMDDeckLinkAttributeID;
  224. enum _BMDDeckLinkAttributeID {
  225. /* Flags */
  226. BMDDeckLinkSupportsInternalKeying = /* 'keyi' */ 0x6B657969,
  227. BMDDeckLinkSupportsExternalKeying = /* 'keye' */ 0x6B657965,
  228. BMDDeckLinkSupportsHDKeying = /* 'keyh' */ 0x6B657968,
  229. BMDDeckLinkSupportsInputFormatDetection = /* 'infd' */ 0x696E6664,
  230. BMDDeckLinkHasReferenceInput = /* 'hrin' */ 0x6872696E,
  231. BMDDeckLinkHasSerialPort = /* 'hspt' */ 0x68737074,
  232. BMDDeckLinkHasAnalogVideoOutputGain = /* 'avog' */ 0x61766F67,
  233. BMDDeckLinkCanOnlyAdjustOverallVideoOutputGain = /* 'ovog' */ 0x6F766F67,
  234. BMDDeckLinkHasVideoInputAntiAliasingFilter = /* 'aafl' */ 0x6161666C,
  235. BMDDeckLinkHasBypass = /* 'byps' */ 0x62797073,
  236. BMDDeckLinkSupportsDesktopDisplay = /* 'extd' */ 0x65787464,
  237. BMDDeckLinkSupportsClockTimingAdjustment = /* 'ctad' */ 0x63746164,
  238. BMDDeckLinkSupportsFullDuplex = /* 'fdup' */ 0x66647570,
  239. BMDDeckLinkSupportsFullFrameReferenceInputTimingOffset = /* 'frin' */ 0x6672696E,
  240. /* Integers */
  241. BMDDeckLinkMaximumAudioChannels = /* 'mach' */ 0x6D616368,
  242. BMDDeckLinkMaximumAnalogAudioChannels = /* 'aach' */ 0x61616368,
  243. BMDDeckLinkNumberOfSubDevices = /* 'nsbd' */ 0x6E736264,
  244. BMDDeckLinkSubDeviceIndex = /* 'subi' */ 0x73756269,
  245. BMDDeckLinkPersistentID = /* 'peid' */ 0x70656964,
  246. BMDDeckLinkTopologicalID = /* 'toid' */ 0x746F6964,
  247. BMDDeckLinkVideoOutputConnections = /* 'vocn' */ 0x766F636E,
  248. BMDDeckLinkVideoInputConnections = /* 'vicn' */ 0x7669636E,
  249. BMDDeckLinkAudioOutputConnections = /* 'aocn' */ 0x616F636E,
  250. BMDDeckLinkAudioInputConnections = /* 'aicn' */ 0x6169636E,
  251. BMDDeckLinkDeviceBusyState = /* 'dbst' */ 0x64627374,
  252. BMDDeckLinkVideoIOSupport = /* 'vios' */ 0x76696F73, // Returns a BMDVideoIOSupport bit field
  253. /* Floats */
  254. BMDDeckLinkVideoInputGainMinimum = /* 'vigm' */ 0x7669676D,
  255. BMDDeckLinkVideoInputGainMaximum = /* 'vigx' */ 0x76696778,
  256. BMDDeckLinkVideoOutputGainMinimum = /* 'vogm' */ 0x766F676D,
  257. BMDDeckLinkVideoOutputGainMaximum = /* 'vogx' */ 0x766F6778,
  258. /* Strings */
  259. BMDDeckLinkSerialPortDeviceName = /* 'slpn' */ 0x736C706E
  260. };
  261. /* Enum BMDDeckLinkAPIInformationID - DeckLinkAPI information ID */
  262. typedef uint32_t BMDDeckLinkAPIInformationID;
  263. enum _BMDDeckLinkAPIInformationID {
  264. BMDDeckLinkAPIVersion = /* 'vers' */ 0x76657273
  265. };
  266. /* Enum BMDDeviceBusyState - Current device busy state */
  267. typedef uint32_t BMDDeviceBusyState;
  268. enum _BMDDeviceBusyState {
  269. bmdDeviceCaptureBusy = 1 << 0,
  270. bmdDevicePlaybackBusy = 1 << 1,
  271. bmdDeviceSerialPortBusy = 1 << 2
  272. };
  273. /* Enum BMDVideoIOSupport - Device video input/output support */
  274. typedef uint32_t BMDVideoIOSupport;
  275. enum _BMDVideoIOSupport {
  276. bmdDeviceSupportsCapture = 1 << 0,
  277. bmdDeviceSupportsPlayback = 1 << 1
  278. };
  279. /* Enum BMD3DPreviewFormat - Linked Frame preview format */
  280. typedef uint32_t BMD3DPreviewFormat;
  281. enum _BMD3DPreviewFormat {
  282. bmd3DPreviewFormatDefault = /* 'defa' */ 0x64656661,
  283. bmd3DPreviewFormatLeftOnly = /* 'left' */ 0x6C656674,
  284. bmd3DPreviewFormatRightOnly = /* 'righ' */ 0x72696768,
  285. bmd3DPreviewFormatSideBySide = /* 'side' */ 0x73696465,
  286. bmd3DPreviewFormatTopBottom = /* 'topb' */ 0x746F7062
  287. };
  288. /* Enum BMDNotifications - Events that can be subscribed through IDeckLinkNotification */
  289. typedef uint32_t BMDNotifications;
  290. enum _BMDNotifications {
  291. bmdPreferencesChanged = /* 'pref' */ 0x70726566
  292. };
  293. #if defined(__cplusplus)
  294. // Forward Declarations
  295. class IDeckLinkVideoOutputCallback;
  296. class IDeckLinkInputCallback;
  297. class IDeckLinkMemoryAllocator;
  298. class IDeckLinkAudioOutputCallback;
  299. class IDeckLinkIterator;
  300. class IDeckLinkAPIInformation;
  301. class IDeckLinkOutput;
  302. class IDeckLinkInput;
  303. class IDeckLinkVideoFrame;
  304. class IDeckLinkMutableVideoFrame;
  305. class IDeckLinkVideoFrame3DExtensions;
  306. class IDeckLinkVideoInputFrame;
  307. class IDeckLinkVideoFrameAncillary;
  308. class IDeckLinkAudioInputPacket;
  309. class IDeckLinkScreenPreviewCallback;
  310. class IDeckLinkGLScreenPreviewHelper;
  311. class IDeckLinkNotificationCallback;
  312. class IDeckLinkNotification;
  313. class IDeckLinkAttributes;
  314. class IDeckLinkKeyer;
  315. class IDeckLinkVideoConversion;
  316. class IDeckLinkDeviceNotificationCallback;
  317. class IDeckLinkDiscovery;
  318. /* Interface IDeckLinkVideoOutputCallback - Frame completion callback. */
  319. class IDeckLinkVideoOutputCallback : public IUnknown
  320. {
  321. public:
  322. virtual HRESULT ScheduledFrameCompleted (/* in */ IDeckLinkVideoFrame *completedFrame, /* in */ BMDOutputFrameCompletionResult result) = 0;
  323. virtual HRESULT ScheduledPlaybackHasStopped (void) = 0;
  324. protected:
  325. virtual ~IDeckLinkVideoOutputCallback () {} // call Release method to drop reference count
  326. };
  327. /* Interface IDeckLinkInputCallback - Frame arrival callback. */
  328. class IDeckLinkInputCallback : public IUnknown
  329. {
  330. public:
  331. virtual HRESULT VideoInputFormatChanged (/* in */ BMDVideoInputFormatChangedEvents notificationEvents, /* in */ IDeckLinkDisplayMode *newDisplayMode, /* in */ BMDDetectedVideoInputFormatFlags detectedSignalFlags) = 0;
  332. virtual HRESULT VideoInputFrameArrived (/* in */ IDeckLinkVideoInputFrame* videoFrame, /* in */ IDeckLinkAudioInputPacket* audioPacket) = 0;
  333. protected:
  334. virtual ~IDeckLinkInputCallback () {} // call Release method to drop reference count
  335. };
  336. /* Interface IDeckLinkMemoryAllocator - Memory allocator for video frames. */
  337. class IDeckLinkMemoryAllocator : public IUnknown
  338. {
  339. public:
  340. virtual HRESULT AllocateBuffer (/* in */ uint32_t bufferSize, /* out */ void **allocatedBuffer) = 0;
  341. virtual HRESULT ReleaseBuffer (/* in */ void *buffer) = 0;
  342. virtual HRESULT Commit (void) = 0;
  343. virtual HRESULT Decommit (void) = 0;
  344. };
  345. /* Interface IDeckLinkAudioOutputCallback - Optional callback to allow audio samples to be pulled as required. */
  346. class IDeckLinkAudioOutputCallback : public IUnknown
  347. {
  348. public:
  349. virtual HRESULT RenderAudioSamples (/* in */ bool preroll) = 0;
  350. };
  351. /* Interface IDeckLinkIterator - enumerates installed DeckLink hardware */
  352. class IDeckLinkIterator : public IUnknown
  353. {
  354. public:
  355. virtual HRESULT Next (/* out */ IDeckLink **deckLinkInstance) = 0;
  356. };
  357. /* Interface IDeckLinkAPIInformation - DeckLinkAPI attribute interface */
  358. class IDeckLinkAPIInformation : public IUnknown
  359. {
  360. public:
  361. virtual HRESULT GetFlag (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ bool *value) = 0;
  362. virtual HRESULT GetInt (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ int64_t *value) = 0;
  363. virtual HRESULT GetFloat (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ double *value) = 0;
  364. virtual HRESULT GetString (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ const char **value) = 0;
  365. protected:
  366. virtual ~IDeckLinkAPIInformation () {} // call Release method to drop reference count
  367. };
  368. /* Interface IDeckLinkOutput - Created by QueryInterface from IDeckLink. */
  369. class IDeckLinkOutput : public IUnknown
  370. {
  371. public:
  372. virtual HRESULT DoesSupportVideoMode (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoOutputFlags flags, /* out */ BMDDisplayModeSupport *result, /* out */ IDeckLinkDisplayMode **resultDisplayMode) = 0;
  373. virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator **iterator) = 0;
  374. virtual HRESULT SetScreenPreviewCallback (/* in */ IDeckLinkScreenPreviewCallback *previewCallback) = 0;
  375. /* Video Output */
  376. virtual HRESULT EnableVideoOutput (/* in */ BMDDisplayMode displayMode, /* in */ BMDVideoOutputFlags flags) = 0;
  377. virtual HRESULT DisableVideoOutput (void) = 0;
  378. virtual HRESULT SetVideoOutputFrameMemoryAllocator (/* in */ IDeckLinkMemoryAllocator *theAllocator) = 0;
  379. virtual HRESULT CreateVideoFrame (/* in */ int32_t width, /* in */ int32_t height, /* in */ int32_t rowBytes, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDFrameFlags flags, /* out */ IDeckLinkMutableVideoFrame **outFrame) = 0;
  380. virtual HRESULT CreateAncillaryData (/* in */ BMDPixelFormat pixelFormat, /* out */ IDeckLinkVideoFrameAncillary **outBuffer) = 0;
  381. virtual HRESULT DisplayVideoFrameSync (/* in */ IDeckLinkVideoFrame *theFrame) = 0;
  382. virtual HRESULT ScheduleVideoFrame (/* in */ IDeckLinkVideoFrame *theFrame, /* in */ BMDTimeValue displayTime, /* in */ BMDTimeValue displayDuration, /* in */ BMDTimeScale timeScale) = 0;
  383. virtual HRESULT SetScheduledFrameCompletionCallback (/* in */ IDeckLinkVideoOutputCallback *theCallback) = 0;
  384. virtual HRESULT GetBufferedVideoFrameCount (/* out */ uint32_t *bufferedFrameCount) = 0;
  385. /* Audio Output */
  386. virtual HRESULT EnableAudioOutput (/* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount, /* in */ BMDAudioOutputStreamType streamType) = 0;
  387. virtual HRESULT DisableAudioOutput (void) = 0;
  388. virtual HRESULT WriteAudioSamplesSync (/* in */ void *buffer, /* in */ uint32_t sampleFrameCount, /* out */ uint32_t *sampleFramesWritten) = 0;
  389. virtual HRESULT BeginAudioPreroll (void) = 0;
  390. virtual HRESULT EndAudioPreroll (void) = 0;
  391. virtual HRESULT ScheduleAudioSamples (/* in */ void *buffer, /* in */ uint32_t sampleFrameCount, /* in */ BMDTimeValue streamTime, /* in */ BMDTimeScale timeScale, /* out */ uint32_t *sampleFramesWritten) = 0;
  392. virtual HRESULT GetBufferedAudioSampleFrameCount (/* out */ uint32_t *bufferedSampleFrameCount) = 0;
  393. virtual HRESULT FlushBufferedAudioSamples (void) = 0;
  394. virtual HRESULT SetAudioCallback (/* in */ IDeckLinkAudioOutputCallback *theCallback) = 0;
  395. /* Output Control */
  396. virtual HRESULT StartScheduledPlayback (/* in */ BMDTimeValue playbackStartTime, /* in */ BMDTimeScale timeScale, /* in */ double playbackSpeed) = 0;
  397. virtual HRESULT StopScheduledPlayback (/* in */ BMDTimeValue stopPlaybackAtTime, /* out */ BMDTimeValue *actualStopTime, /* in */ BMDTimeScale timeScale) = 0;
  398. virtual HRESULT IsScheduledPlaybackRunning (/* out */ bool *active) = 0;
  399. virtual HRESULT GetScheduledStreamTime (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *streamTime, /* out */ double *playbackSpeed) = 0;
  400. virtual HRESULT GetReferenceStatus (/* out */ BMDReferenceStatus *referenceStatus) = 0;
  401. /* Hardware Timing */
  402. virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *hardwareTime, /* out */ BMDTimeValue *timeInFrame, /* out */ BMDTimeValue *ticksPerFrame) = 0;
  403. virtual HRESULT GetFrameCompletionReferenceTimestamp (/* in */ IDeckLinkVideoFrame *theFrame, /* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *frameCompletionTimestamp) = 0;
  404. protected:
  405. virtual ~IDeckLinkOutput () {} // call Release method to drop reference count
  406. };
  407. /* Interface IDeckLinkInput - Created by QueryInterface from IDeckLink. */
  408. class IDeckLinkInput : public IUnknown
  409. {
  410. public:
  411. virtual HRESULT DoesSupportVideoMode (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags, /* out */ BMDDisplayModeSupport *result, /* out */ IDeckLinkDisplayMode **resultDisplayMode) = 0;
  412. virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator **iterator) = 0;
  413. virtual HRESULT SetScreenPreviewCallback (/* in */ IDeckLinkScreenPreviewCallback *previewCallback) = 0;
  414. /* Video Input */
  415. virtual HRESULT EnableVideoInput (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags) = 0;
  416. virtual HRESULT DisableVideoInput (void) = 0;
  417. virtual HRESULT GetAvailableVideoFrameCount (/* out */ uint32_t *availableFrameCount) = 0;
  418. virtual HRESULT SetVideoInputFrameMemoryAllocator (/* in */ IDeckLinkMemoryAllocator *theAllocator) = 0;
  419. /* Audio Input */
  420. virtual HRESULT EnableAudioInput (/* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount) = 0;
  421. virtual HRESULT DisableAudioInput (void) = 0;
  422. virtual HRESULT GetAvailableAudioSampleFrameCount (/* out */ uint32_t *availableSampleFrameCount) = 0;
  423. /* Input Control */
  424. virtual HRESULT StartStreams (void) = 0;
  425. virtual HRESULT StopStreams (void) = 0;
  426. virtual HRESULT PauseStreams (void) = 0;
  427. virtual HRESULT FlushStreams (void) = 0;
  428. virtual HRESULT SetCallback (/* in */ IDeckLinkInputCallback *theCallback) = 0;
  429. /* Hardware Timing */
  430. virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *hardwareTime, /* out */ BMDTimeValue *timeInFrame, /* out */ BMDTimeValue *ticksPerFrame) = 0;
  431. protected:
  432. virtual ~IDeckLinkInput () {} // call Release method to drop reference count
  433. };
  434. /* Interface IDeckLinkVideoFrame - Interface to encapsulate a video frame; can be caller-implemented. */
  435. class IDeckLinkVideoFrame : public IUnknown
  436. {
  437. public:
  438. virtual long GetWidth (void) = 0;
  439. virtual long GetHeight (void) = 0;
  440. virtual long GetRowBytes (void) = 0;
  441. virtual BMDPixelFormat GetPixelFormat (void) = 0;
  442. virtual BMDFrameFlags GetFlags (void) = 0;
  443. virtual HRESULT GetBytes (/* out */ void **buffer) = 0;
  444. virtual HRESULT GetTimecode (/* in */ BMDTimecodeFormat format, /* out */ IDeckLinkTimecode **timecode) = 0;
  445. virtual HRESULT GetAncillaryData (/* out */ IDeckLinkVideoFrameAncillary **ancillary) = 0;
  446. protected:
  447. virtual ~IDeckLinkVideoFrame () {} // call Release method to drop reference count
  448. };
  449. /* Interface IDeckLinkMutableVideoFrame - Created by IDeckLinkOutput::CreateVideoFrame. */
  450. class IDeckLinkMutableVideoFrame : public IDeckLinkVideoFrame
  451. {
  452. public:
  453. virtual HRESULT SetFlags (/* in */ BMDFrameFlags newFlags) = 0;
  454. virtual HRESULT SetTimecode (/* in */ BMDTimecodeFormat format, /* in */ IDeckLinkTimecode *timecode) = 0;
  455. virtual HRESULT SetTimecodeFromComponents (/* in */ BMDTimecodeFormat format, /* in */ uint8_t hours, /* in */ uint8_t minutes, /* in */ uint8_t seconds, /* in */ uint8_t frames, /* in */ BMDTimecodeFlags flags) = 0;
  456. virtual HRESULT SetAncillaryData (/* in */ IDeckLinkVideoFrameAncillary *ancillary) = 0;
  457. virtual HRESULT SetTimecodeUserBits (/* in */ BMDTimecodeFormat format, /* in */ BMDTimecodeUserBits userBits) = 0;
  458. protected:
  459. virtual ~IDeckLinkMutableVideoFrame () {} // call Release method to drop reference count
  460. };
  461. /* Interface IDeckLinkVideoFrame3DExtensions - Optional interface implemented on IDeckLinkVideoFrame to support 3D frames */
  462. class IDeckLinkVideoFrame3DExtensions : public IUnknown
  463. {
  464. public:
  465. virtual BMDVideo3DPackingFormat Get3DPackingFormat (void) = 0;
  466. virtual HRESULT GetFrameForRightEye (/* out */ IDeckLinkVideoFrame* *rightEyeFrame) = 0;
  467. protected:
  468. virtual ~IDeckLinkVideoFrame3DExtensions () {} // call Release method to drop reference count
  469. };
  470. /* Interface IDeckLinkVideoInputFrame - Provided by the IDeckLinkVideoInput frame arrival callback. */
  471. class IDeckLinkVideoInputFrame : public IDeckLinkVideoFrame
  472. {
  473. public:
  474. virtual HRESULT GetStreamTime (/* out */ BMDTimeValue *frameTime, /* out */ BMDTimeValue *frameDuration, /* in */ BMDTimeScale timeScale) = 0;
  475. virtual HRESULT GetHardwareReferenceTimestamp (/* in */ BMDTimeScale timeScale, /* out */ BMDTimeValue *frameTime, /* out */ BMDTimeValue *frameDuration) = 0;
  476. protected:
  477. virtual ~IDeckLinkVideoInputFrame () {} // call Release method to drop reference count
  478. };
  479. /* Interface IDeckLinkVideoFrameAncillary - Obtained through QueryInterface() on an IDeckLinkVideoFrame object. */
  480. class IDeckLinkVideoFrameAncillary : public IUnknown
  481. {
  482. public:
  483. virtual HRESULT GetBufferForVerticalBlankingLine (/* in */ uint32_t lineNumber, /* out */ void **buffer) = 0;
  484. virtual BMDPixelFormat GetPixelFormat (void) = 0;
  485. virtual BMDDisplayMode GetDisplayMode (void) = 0;
  486. protected:
  487. virtual ~IDeckLinkVideoFrameAncillary () {} // call Release method to drop reference count
  488. };
  489. /* Interface IDeckLinkAudioInputPacket - Provided by the IDeckLinkInput callback. */
  490. class IDeckLinkAudioInputPacket : public IUnknown
  491. {
  492. public:
  493. virtual long GetSampleFrameCount (void) = 0;
  494. virtual HRESULT GetBytes (/* out */ void **buffer) = 0;
  495. virtual HRESULT GetPacketTime (/* out */ BMDTimeValue *packetTime, /* in */ BMDTimeScale timeScale) = 0;
  496. protected:
  497. virtual ~IDeckLinkAudioInputPacket () {} // call Release method to drop reference count
  498. };
  499. /* Interface IDeckLinkScreenPreviewCallback - Screen preview callback */
  500. class IDeckLinkScreenPreviewCallback : public IUnknown
  501. {
  502. public:
  503. virtual HRESULT DrawFrame (/* in */ IDeckLinkVideoFrame *theFrame) = 0;
  504. protected:
  505. virtual ~IDeckLinkScreenPreviewCallback () {} // call Release method to drop reference count
  506. };
  507. /* Interface IDeckLinkGLScreenPreviewHelper - Created with CoCreateInstance(). */
  508. class IDeckLinkGLScreenPreviewHelper : public IUnknown
  509. {
  510. public:
  511. /* Methods must be called with OpenGL context set */
  512. virtual HRESULT InitializeGL (void) = 0;
  513. virtual HRESULT PaintGL (void) = 0;
  514. virtual HRESULT SetFrame (/* in */ IDeckLinkVideoFrame *theFrame) = 0;
  515. virtual HRESULT Set3DPreviewFormat (/* in */ BMD3DPreviewFormat previewFormat) = 0;
  516. protected:
  517. virtual ~IDeckLinkGLScreenPreviewHelper () {} // call Release method to drop reference count
  518. };
  519. /* Interface IDeckLinkNotificationCallback - DeckLink Notification Callback Interface */
  520. class IDeckLinkNotificationCallback : public IUnknown
  521. {
  522. public:
  523. virtual HRESULT Notify (/* in */ BMDNotifications topic, /* in */ uint64_t param1, /* in */ uint64_t param2) = 0;
  524. };
  525. /* Interface IDeckLinkNotification - DeckLink Notification interface */
  526. class IDeckLinkNotification : public IUnknown
  527. {
  528. public:
  529. virtual HRESULT Subscribe (/* in */ BMDNotifications topic, /* in */ IDeckLinkNotificationCallback *theCallback) = 0;
  530. virtual HRESULT Unsubscribe (/* in */ BMDNotifications topic, /* in */ IDeckLinkNotificationCallback *theCallback) = 0;
  531. };
  532. /* Interface IDeckLinkAttributes - DeckLink Attribute interface */
  533. class IDeckLinkAttributes : public IUnknown
  534. {
  535. public:
  536. virtual HRESULT GetFlag (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ bool *value) = 0;
  537. virtual HRESULT GetInt (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ int64_t *value) = 0;
  538. virtual HRESULT GetFloat (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ double *value) = 0;
  539. virtual HRESULT GetString (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ const char **value) = 0;
  540. protected:
  541. virtual ~IDeckLinkAttributes () {} // call Release method to drop reference count
  542. };
  543. /* Interface IDeckLinkKeyer - DeckLink Keyer interface */
  544. class IDeckLinkKeyer : public IUnknown
  545. {
  546. public:
  547. virtual HRESULT Enable (/* in */ bool isExternal) = 0;
  548. virtual HRESULT SetLevel (/* in */ uint8_t level) = 0;
  549. virtual HRESULT RampUp (/* in */ uint32_t numberOfFrames) = 0;
  550. virtual HRESULT RampDown (/* in */ uint32_t numberOfFrames) = 0;
  551. virtual HRESULT Disable (void) = 0;
  552. protected:
  553. virtual ~IDeckLinkKeyer () {} // call Release method to drop reference count
  554. };
  555. /* Interface IDeckLinkVideoConversion - Created with CoCreateInstance(). */
  556. class IDeckLinkVideoConversion : public IUnknown
  557. {
  558. public:
  559. virtual HRESULT ConvertFrame (/* in */ IDeckLinkVideoFrame* srcFrame, /* in */ IDeckLinkVideoFrame* dstFrame) = 0;
  560. protected:
  561. virtual ~IDeckLinkVideoConversion () {} // call Release method to drop reference count
  562. };
  563. /* Interface IDeckLinkDeviceNotificationCallback - DeckLink device arrival/removal notification callbacks */
  564. class IDeckLinkDeviceNotificationCallback : public IUnknown
  565. {
  566. public:
  567. virtual HRESULT DeckLinkDeviceArrived (/* in */ IDeckLink* deckLinkDevice) = 0;
  568. virtual HRESULT DeckLinkDeviceRemoved (/* in */ IDeckLink* deckLinkDevice) = 0;
  569. protected:
  570. virtual ~IDeckLinkDeviceNotificationCallback () {} // call Release method to drop reference count
  571. };
  572. /* Interface IDeckLinkDiscovery - DeckLink device discovery */
  573. class IDeckLinkDiscovery : public IUnknown
  574. {
  575. public:
  576. virtual HRESULT InstallDeviceNotifications (/* in */ IDeckLinkDeviceNotificationCallback* deviceNotificationCallback) = 0;
  577. virtual HRESULT UninstallDeviceNotifications (void) = 0;
  578. protected:
  579. virtual ~IDeckLinkDiscovery () {} // call Release method to drop reference count
  580. };
  581. /* Functions */
  582. extern "C" {
  583. IDeckLinkIterator* CreateDeckLinkIteratorInstance (void);
  584. IDeckLinkDiscovery* CreateDeckLinkDiscoveryInstance (void);
  585. IDeckLinkAPIInformation* CreateDeckLinkAPIInformationInstance (void);
  586. IDeckLinkGLScreenPreviewHelper* CreateOpenGLScreenPreviewHelper (void);
  587. IDeckLinkVideoConversion* CreateVideoConversionInstance (void);
  588. }
  589. #endif // defined(__cplusplus)
  590. #endif /* defined(BMD_DECKLINKAPI_H) */