DeckLinkAPI.h 64 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173
  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_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. #ifndef BMD_PUBLIC
  37. #define BMD_PUBLIC
  38. #endif
  39. /* DeckLink API */
  40. #include <stdint.h>
  41. #include "LinuxCOM.h"
  42. #include "DeckLinkAPITypes.h"
  43. #include "DeckLinkAPIModes.h"
  44. #include "DeckLinkAPIDiscovery.h"
  45. #include "DeckLinkAPIConfiguration.h"
  46. #include "DeckLinkAPIDeckControl.h"
  47. #define BLACKMAGIC_DECKLINK_API_MAGIC 1
  48. // Type Declarations
  49. // Interface ID Declarations
  50. 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};
  51. 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};
  52. BMD_CONST REFIID IID_IDeckLinkEncoderInputCallback = /* ACF13E61-F4A0-4974-A6A7-59AFF6268B31 */ {0xAC,0xF1,0x3E,0x61,0xF4,0xA0,0x49,0x74,0xA6,0xA7,0x59,0xAF,0xF6,0x26,0x8B,0x31};
  53. 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};
  54. 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};
  55. 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};
  56. 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};
  57. 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};
  58. 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};
  59. BMD_CONST REFIID IID_IDeckLinkEncoderInput = /* 270587DA-6B7D-42E7-A1F0-6D853F581185 */ {0x27,0x05,0x87,0xDA,0x6B,0x7D,0x42,0xE7,0xA1,0xF0,0x6D,0x85,0x3F,0x58,0x11,0x85};
  60. 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};
  61. 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};
  62. 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};
  63. BMD_CONST REFIID IID_IDeckLinkVideoFrameMetadataExtensions = /* D5973DC9-6432-46D0-8F0B-2496F8A1238F */ {0xD5,0x97,0x3D,0xC9,0x64,0x32,0x46,0xD0,0x8F,0x0B,0x24,0x96,0xF8,0xA1,0x23,0x8F};
  64. 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};
  65. BMD_CONST REFIID IID_IDeckLinkAncillaryPacket = /* CC5BBF7E-029C-4D3B-9158-6000EF5E3670 */ {0xCC,0x5B,0xBF,0x7E,0x02,0x9C,0x4D,0x3B,0x91,0x58,0x60,0x00,0xEF,0x5E,0x36,0x70};
  66. BMD_CONST REFIID IID_IDeckLinkAncillaryPacketIterator = /* 3FC8994B-88FB-4C17-968F-9AAB69D964A7 */ {0x3F,0xC8,0x99,0x4B,0x88,0xFB,0x4C,0x17,0x96,0x8F,0x9A,0xAB,0x69,0xD9,0x64,0xA7};
  67. BMD_CONST REFIID IID_IDeckLinkVideoFrameAncillaryPackets = /* 6C186C0F-459E-41D8-AEE2-4812D81AEE68 */ {0x6C,0x18,0x6C,0x0F,0x45,0x9E,0x41,0xD8,0xAE,0xE2,0x48,0x12,0xD8,0x1A,0xEE,0x68};
  68. 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};
  69. BMD_CONST REFIID IID_IDeckLinkEncoderPacket = /* B693F36C-316E-4AF1-B6C2-F389A4BCA620 */ {0xB6,0x93,0xF3,0x6C,0x31,0x6E,0x4A,0xF1,0xB6,0xC2,0xF3,0x89,0xA4,0xBC,0xA6,0x20};
  70. BMD_CONST REFIID IID_IDeckLinkEncoderVideoPacket = /* 4E7FD944-E8C7-4EAC-B8C0-7B77F80F5AE0 */ {0x4E,0x7F,0xD9,0x44,0xE8,0xC7,0x4E,0xAC,0xB8,0xC0,0x7B,0x77,0xF8,0x0F,0x5A,0xE0};
  71. BMD_CONST REFIID IID_IDeckLinkEncoderAudioPacket = /* 49E8EDC8-693B-4E14-8EF6-12C658F5A07A */ {0x49,0xE8,0xED,0xC8,0x69,0x3B,0x4E,0x14,0x8E,0xF6,0x12,0xC6,0x58,0xF5,0xA0,0x7A};
  72. BMD_CONST REFIID IID_IDeckLinkH265NALPacket = /* 639C8E0B-68D5-4BDE-A6D4-95F3AEAFF2E7 */ {0x63,0x9C,0x8E,0x0B,0x68,0xD5,0x4B,0xDE,0xA6,0xD4,0x95,0xF3,0xAE,0xAF,0xF2,0xE7};
  73. 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};
  74. 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};
  75. 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};
  76. 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};
  77. 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};
  78. 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};
  79. BMD_CONST REFIID IID_IDeckLinkStatus = /* 5F558200-4028-49BC-BEAC-DB3FA4A96E46 */ {0x5F,0x55,0x82,0x00,0x40,0x28,0x49,0xBC,0xBE,0xAC,0xDB,0x3F,0xA4,0xA9,0x6E,0x46};
  80. 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};
  81. 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};
  82. 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};
  83. 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};
  84. /* Enum BMDVideoOutputFlags - Flags to control the output of ancillary data along with video. */
  85. typedef uint32_t BMDVideoOutputFlags;
  86. enum _BMDVideoOutputFlags {
  87. bmdVideoOutputFlagDefault = 0,
  88. bmdVideoOutputVANC = 1 << 0,
  89. bmdVideoOutputVITC = 1 << 1,
  90. bmdVideoOutputRP188 = 1 << 2,
  91. bmdVideoOutputDualStream3D = 1 << 4
  92. };
  93. /* Enum BMDPacketType - Type of packet */
  94. typedef uint32_t BMDPacketType;
  95. enum _BMDPacketType {
  96. bmdPacketTypeStreamInterruptedMarker = /* 'sint' */ 0x73696E74, // A packet of this type marks the time when a video stream was interrupted, for example by a disconnected cable
  97. bmdPacketTypeStreamData = /* 'sdat' */ 0x73646174 // Regular stream data
  98. };
  99. /* Enum BMDFrameFlags - Frame flags */
  100. typedef uint32_t BMDFrameFlags;
  101. enum _BMDFrameFlags {
  102. bmdFrameFlagDefault = 0,
  103. bmdFrameFlagFlipVertical = 1 << 0,
  104. bmdFrameContainsHDRMetadata = 1 << 1,
  105. bmdFrameContainsCintelMetadata = 1 << 2,
  106. /* Flags that are applicable only to instances of IDeckLinkVideoInputFrame */
  107. bmdFrameCapturedAsPsF = 1 << 30,
  108. bmdFrameHasNoInputSource = 1 << 31
  109. };
  110. /* Enum BMDVideoInputFlags - Flags applicable to video input */
  111. typedef uint32_t BMDVideoInputFlags;
  112. enum _BMDVideoInputFlags {
  113. bmdVideoInputFlagDefault = 0,
  114. bmdVideoInputEnableFormatDetection = 1 << 0,
  115. bmdVideoInputDualStream3D = 1 << 1
  116. };
  117. /* Enum BMDVideoInputFormatChangedEvents - Bitmask passed to the VideoInputFormatChanged notification to identify the properties of the input signal that have changed */
  118. typedef uint32_t BMDVideoInputFormatChangedEvents;
  119. enum _BMDVideoInputFormatChangedEvents {
  120. bmdVideoInputDisplayModeChanged = 1 << 0,
  121. bmdVideoInputFieldDominanceChanged = 1 << 1,
  122. bmdVideoInputColorspaceChanged = 1 << 2
  123. };
  124. /* Enum BMDDetectedVideoInputFormatFlags - Flags passed to the VideoInputFormatChanged notification to describe the detected video input signal */
  125. typedef uint32_t BMDDetectedVideoInputFormatFlags;
  126. enum _BMDDetectedVideoInputFormatFlags {
  127. bmdDetectedVideoInputYCbCr422 = 1 << 0,
  128. bmdDetectedVideoInputRGB444 = 1 << 1,
  129. bmdDetectedVideoInputDualStream3D = 1 << 2
  130. };
  131. /* Enum BMDDeckLinkCapturePassthroughMode - Enumerates whether the video output is electrically connected to the video input or if the clean switching mode is enabled */
  132. typedef uint32_t BMDDeckLinkCapturePassthroughMode;
  133. enum _BMDDeckLinkCapturePassthroughMode {
  134. bmdDeckLinkCapturePassthroughModeDisabled = /* 'pdis' */ 0x70646973,
  135. bmdDeckLinkCapturePassthroughModeDirect = /* 'pdir' */ 0x70646972,
  136. bmdDeckLinkCapturePassthroughModeCleanSwitch = /* 'pcln' */ 0x70636C6E
  137. };
  138. /* Enum BMDOutputFrameCompletionResult - Frame Completion Callback */
  139. typedef uint32_t BMDOutputFrameCompletionResult;
  140. enum _BMDOutputFrameCompletionResult {
  141. bmdOutputFrameCompleted,
  142. bmdOutputFrameDisplayedLate,
  143. bmdOutputFrameDropped,
  144. bmdOutputFrameFlushed
  145. };
  146. /* Enum BMDReferenceStatus - GenLock input status */
  147. typedef uint32_t BMDReferenceStatus;
  148. enum _BMDReferenceStatus {
  149. bmdReferenceNotSupportedByHardware = 1 << 0,
  150. bmdReferenceLocked = 1 << 1
  151. };
  152. /* Enum BMDAudioFormat - Audio Format */
  153. typedef uint32_t BMDAudioFormat;
  154. enum _BMDAudioFormat {
  155. bmdAudioFormatPCM = /* 'lpcm' */ 0x6C70636D // Linear signed PCM samples
  156. };
  157. /* Enum BMDAudioSampleRate - Audio sample rates supported for output/input */
  158. typedef uint32_t BMDAudioSampleRate;
  159. enum _BMDAudioSampleRate {
  160. bmdAudioSampleRate48kHz = 48000
  161. };
  162. /* Enum BMDAudioSampleType - Audio sample sizes supported for output/input */
  163. typedef uint32_t BMDAudioSampleType;
  164. enum _BMDAudioSampleType {
  165. bmdAudioSampleType16bitInteger = 16,
  166. bmdAudioSampleType32bitInteger = 32
  167. };
  168. /* Enum BMDAudioOutputStreamType - Audio output stream type */
  169. typedef uint32_t BMDAudioOutputStreamType;
  170. enum _BMDAudioOutputStreamType {
  171. bmdAudioOutputStreamContinuous,
  172. bmdAudioOutputStreamContinuousDontResample,
  173. bmdAudioOutputStreamTimestamped
  174. };
  175. /* Enum BMDDisplayModeSupport - Output mode supported flags */
  176. typedef uint32_t BMDDisplayModeSupport;
  177. enum _BMDDisplayModeSupport {
  178. bmdDisplayModeNotSupported = 0,
  179. bmdDisplayModeSupported,
  180. bmdDisplayModeSupportedWithConversion
  181. };
  182. /* Enum BMDAncillaryPacketFormat - Ancillary packet format */
  183. typedef uint32_t BMDAncillaryPacketFormat;
  184. enum _BMDAncillaryPacketFormat {
  185. bmdAncillaryPacketFormatUInt8 = /* 'ui08' */ 0x75693038,
  186. bmdAncillaryPacketFormatUInt16 = /* 'ui16' */ 0x75693136,
  187. bmdAncillaryPacketFormatYCbCr10 = /* 'v210' */ 0x76323130
  188. };
  189. /* Enum BMDTimecodeFormat - Timecode formats for frame metadata */
  190. typedef uint32_t BMDTimecodeFormat;
  191. enum _BMDTimecodeFormat {
  192. bmdTimecodeRP188VITC1 = /* 'rpv1' */ 0x72707631, // RP188 timecode where DBB1 equals VITC1 (line 9)
  193. bmdTimecodeRP188VITC2 = /* 'rp12' */ 0x72703132, // RP188 timecode where DBB1 equals VITC2 (line 9 for progressive or line 571 for interlaced/PsF)
  194. bmdTimecodeRP188LTC = /* 'rplt' */ 0x72706C74, // RP188 timecode where DBB1 equals LTC (line 10)
  195. bmdTimecodeRP188Any = /* 'rp18' */ 0x72703138, // For capture: return the first valid timecode in {VITC1, LTC ,VITC2} - For playback: set the timecode as VITC1
  196. bmdTimecodeVITC = /* 'vitc' */ 0x76697463,
  197. bmdTimecodeVITCField2 = /* 'vit2' */ 0x76697432,
  198. bmdTimecodeSerial = /* 'seri' */ 0x73657269
  199. };
  200. /* Enum BMDAnalogVideoFlags - Analog video display flags */
  201. typedef uint32_t BMDAnalogVideoFlags;
  202. enum _BMDAnalogVideoFlags {
  203. bmdAnalogVideoFlagCompositeSetup75 = 1 << 0,
  204. bmdAnalogVideoFlagComponentBetacamLevels = 1 << 1
  205. };
  206. /* Enum BMDAudioOutputAnalogAESSwitch - Audio output Analog/AESEBU switch */
  207. typedef uint32_t BMDAudioOutputAnalogAESSwitch;
  208. enum _BMDAudioOutputAnalogAESSwitch {
  209. bmdAudioOutputSwitchAESEBU = /* 'aes ' */ 0x61657320,
  210. bmdAudioOutputSwitchAnalog = /* 'anlg' */ 0x616E6C67
  211. };
  212. /* Enum BMDVideoOutputConversionMode - Video/audio conversion mode */
  213. typedef uint32_t BMDVideoOutputConversionMode;
  214. enum _BMDVideoOutputConversionMode {
  215. bmdNoVideoOutputConversion = /* 'none' */ 0x6E6F6E65,
  216. bmdVideoOutputLetterboxDownconversion = /* 'ltbx' */ 0x6C746278,
  217. bmdVideoOutputAnamorphicDownconversion = /* 'amph' */ 0x616D7068,
  218. bmdVideoOutputHD720toHD1080Conversion = /* '720c' */ 0x37323063,
  219. bmdVideoOutputHardwareLetterboxDownconversion = /* 'HWlb' */ 0x48576C62,
  220. bmdVideoOutputHardwareAnamorphicDownconversion = /* 'HWam' */ 0x4857616D,
  221. bmdVideoOutputHardwareCenterCutDownconversion = /* 'HWcc' */ 0x48576363,
  222. bmdVideoOutputHardware720p1080pCrossconversion = /* 'xcap' */ 0x78636170,
  223. bmdVideoOutputHardwareAnamorphic720pUpconversion = /* 'ua7p' */ 0x75613770,
  224. bmdVideoOutputHardwareAnamorphic1080iUpconversion = /* 'ua1i' */ 0x75613169,
  225. bmdVideoOutputHardwareAnamorphic149To720pUpconversion = /* 'u47p' */ 0x75343770,
  226. bmdVideoOutputHardwareAnamorphic149To1080iUpconversion = /* 'u41i' */ 0x75343169,
  227. bmdVideoOutputHardwarePillarbox720pUpconversion = /* 'up7p' */ 0x75703770,
  228. bmdVideoOutputHardwarePillarbox1080iUpconversion = /* 'up1i' */ 0x75703169
  229. };
  230. /* Enum BMDVideoInputConversionMode - Video input conversion mode */
  231. typedef uint32_t BMDVideoInputConversionMode;
  232. enum _BMDVideoInputConversionMode {
  233. bmdNoVideoInputConversion = /* 'none' */ 0x6E6F6E65,
  234. bmdVideoInputLetterboxDownconversionFromHD1080 = /* '10lb' */ 0x31306C62,
  235. bmdVideoInputAnamorphicDownconversionFromHD1080 = /* '10am' */ 0x3130616D,
  236. bmdVideoInputLetterboxDownconversionFromHD720 = /* '72lb' */ 0x37326C62,
  237. bmdVideoInputAnamorphicDownconversionFromHD720 = /* '72am' */ 0x3732616D,
  238. bmdVideoInputLetterboxUpconversion = /* 'lbup' */ 0x6C627570,
  239. bmdVideoInputAnamorphicUpconversion = /* 'amup' */ 0x616D7570
  240. };
  241. /* Enum BMDVideo3DPackingFormat - Video 3D packing format */
  242. typedef uint32_t BMDVideo3DPackingFormat;
  243. enum _BMDVideo3DPackingFormat {
  244. bmdVideo3DPackingSidebySideHalf = /* 'sbsh' */ 0x73627368,
  245. bmdVideo3DPackingLinebyLine = /* 'lbyl' */ 0x6C62796C,
  246. bmdVideo3DPackingTopAndBottom = /* 'tabo' */ 0x7461626F,
  247. bmdVideo3DPackingFramePacking = /* 'frpk' */ 0x6672706B,
  248. bmdVideo3DPackingLeftOnly = /* 'left' */ 0x6C656674,
  249. bmdVideo3DPackingRightOnly = /* 'righ' */ 0x72696768
  250. };
  251. /* Enum BMDIdleVideoOutputOperation - Video output operation when not playing video */
  252. typedef uint32_t BMDIdleVideoOutputOperation;
  253. enum _BMDIdleVideoOutputOperation {
  254. bmdIdleVideoOutputBlack = /* 'blac' */ 0x626C6163,
  255. bmdIdleVideoOutputLastFrame = /* 'lafa' */ 0x6C616661
  256. };
  257. /* Enum BMDVideoEncoderFrameCodingMode - Video frame coding mode */
  258. typedef uint32_t BMDVideoEncoderFrameCodingMode;
  259. enum _BMDVideoEncoderFrameCodingMode {
  260. bmdVideoEncoderFrameCodingModeInter = /* 'inte' */ 0x696E7465,
  261. bmdVideoEncoderFrameCodingModeIntra = /* 'intr' */ 0x696E7472
  262. };
  263. /* Enum BMDDNxHRLevel - DNxHR Levels */
  264. typedef uint32_t BMDDNxHRLevel;
  265. enum _BMDDNxHRLevel {
  266. bmdDNxHRLevelSQ = /* 'dnsq' */ 0x646E7371,
  267. bmdDNxHRLevelLB = /* 'dnlb' */ 0x646E6C62,
  268. bmdDNxHRLevelHQ = /* 'dnhq' */ 0x646E6871,
  269. bmdDNxHRLevelHQX = /* 'dhqx' */ 0x64687178,
  270. bmdDNxHRLevel444 = /* 'd444' */ 0x64343434
  271. };
  272. /* Enum BMDLinkConfiguration - Video link configuration */
  273. typedef uint32_t BMDLinkConfiguration;
  274. enum _BMDLinkConfiguration {
  275. bmdLinkConfigurationSingleLink = /* 'lcsl' */ 0x6C63736C,
  276. bmdLinkConfigurationDualLink = /* 'lcdl' */ 0x6C63646C,
  277. bmdLinkConfigurationQuadLink = /* 'lcql' */ 0x6C63716C
  278. };
  279. /* Enum BMDDeviceInterface - Device interface type */
  280. typedef uint32_t BMDDeviceInterface;
  281. enum _BMDDeviceInterface {
  282. bmdDeviceInterfacePCI = /* 'pci ' */ 0x70636920,
  283. bmdDeviceInterfaceUSB = /* 'usb ' */ 0x75736220,
  284. bmdDeviceInterfaceThunderbolt = /* 'thun' */ 0x7468756E
  285. };
  286. /* Enum BMDDeckLinkFrameMetadataID - DeckLink Frame Metadata ID */
  287. typedef uint32_t BMDDeckLinkFrameMetadataID;
  288. enum _BMDDeckLinkFrameMetadataID {
  289. bmdDeckLinkFrameMetadataHDRElectroOpticalTransferFunc = /* 'eotf' */ 0x656F7466, // EOTF in range 0-7 as per CEA 861.3
  290. bmdDeckLinkFrameMetadataCintelFilmType = /* 'cfty' */ 0x63667479, // Current film type
  291. bmdDeckLinkFrameMetadataCintelFilmGauge = /* 'cfga' */ 0x63666761, // Current film gauge
  292. bmdDeckLinkFrameMetadataCintelOffsetDetectedHorizontal = /* 'odfh' */ 0x6F646668, // Horizontal offset (pixels) detected in image
  293. bmdDeckLinkFrameMetadataCintelOffsetDetectedVertical = /* 'odfv' */ 0x6F646676, // Vertical offset (pixels) detected in image
  294. bmdDeckLinkFrameMetadataCintelKeykodeLow = /* 'ckkl' */ 0x636B6B6C, // Raw keykode value - low 64 bits
  295. bmdDeckLinkFrameMetadataCintelKeykodeHigh = /* 'ckkh' */ 0x636B6B68, // Raw keykode value - high 64 bits
  296. bmdDeckLinkFrameMetadataCintelTile1Size = /* 'ct1s' */ 0x63743173, // Size in bytes of compressed raw tile 1
  297. bmdDeckLinkFrameMetadataCintelTile2Size = /* 'ct2s' */ 0x63743273, // Size in bytes of compressed raw tile 2
  298. bmdDeckLinkFrameMetadataCintelTile3Size = /* 'ct3s' */ 0x63743373, // Size in bytes of compressed raw tile 3
  299. bmdDeckLinkFrameMetadataCintelTile4Size = /* 'ct4s' */ 0x63743473, // Size in bytes of compressed raw tile 4
  300. bmdDeckLinkFrameMetadataCintelImageWidth = /* 'IWPx' */ 0x49575078, // Width in pixels of image
  301. bmdDeckLinkFrameMetadataCintelImageHeight = /* 'IHPx' */ 0x49485078, // Height in pixels of image
  302. bmdDeckLinkFrameMetadataCintelLinearMaskingRedInRed = /* 'mrir' */ 0x6D726972, // Red in red linear masking parameter
  303. bmdDeckLinkFrameMetadataCintelLinearMaskingGreenInRed = /* 'mgir' */ 0x6D676972, // Green in red linear masking parameter
  304. bmdDeckLinkFrameMetadataCintelLinearMaskingBlueInRed = /* 'mbir' */ 0x6D626972, // Blue in red linear masking parameter
  305. bmdDeckLinkFrameMetadataCintelLinearMaskingRedInGreen = /* 'mrig' */ 0x6D726967, // Red in green linear masking parameter
  306. bmdDeckLinkFrameMetadataCintelLinearMaskingGreenInGreen = /* 'mgig' */ 0x6D676967, // Green in green linear masking parameter
  307. bmdDeckLinkFrameMetadataCintelLinearMaskingBlueInGreen = /* 'mbig' */ 0x6D626967, // Blue in green linear masking parameter
  308. bmdDeckLinkFrameMetadataCintelLinearMaskingRedInBlue = /* 'mrib' */ 0x6D726962, // Red in blue linear masking parameter
  309. bmdDeckLinkFrameMetadataCintelLinearMaskingGreenInBlue = /* 'mgib' */ 0x6D676962, // Green in blue linear masking parameter
  310. bmdDeckLinkFrameMetadataCintelLinearMaskingBlueInBlue = /* 'mbib' */ 0x6D626962, // Blue in blue linear masking parameter
  311. bmdDeckLinkFrameMetadataCintelLogMaskingRedInRed = /* 'mlrr' */ 0x6D6C7272, // Red in red log masking parameter
  312. bmdDeckLinkFrameMetadataCintelLogMaskingGreenInRed = /* 'mlgr' */ 0x6D6C6772, // Green in red log masking parameter
  313. bmdDeckLinkFrameMetadataCintelLogMaskingBlueInRed = /* 'mlbr' */ 0x6D6C6272, // Blue in red log masking parameter
  314. bmdDeckLinkFrameMetadataCintelLogMaskingRedInGreen = /* 'mlrg' */ 0x6D6C7267, // Red in green log masking parameter
  315. bmdDeckLinkFrameMetadataCintelLogMaskingGreenInGreen = /* 'mlgg' */ 0x6D6C6767, // Green in green log masking parameter
  316. bmdDeckLinkFrameMetadataCintelLogMaskingBlueInGreen = /* 'mlbg' */ 0x6D6C6267, // Blue in green log masking parameter
  317. bmdDeckLinkFrameMetadataCintelLogMaskingRedInBlue = /* 'mlrb' */ 0x6D6C7262, // Red in blue log masking parameter
  318. bmdDeckLinkFrameMetadataCintelLogMaskingGreenInBlue = /* 'mlgb' */ 0x6D6C6762, // Green in blue log masking parameter
  319. bmdDeckLinkFrameMetadataCintelLogMaskingBlueInBlue = /* 'mlbb' */ 0x6D6C6262, // Blue in blue log masking parameter
  320. bmdDeckLinkFrameMetadataCintelFilmFrameRate = /* 'cffr' */ 0x63666672, // Film frame rate
  321. bmdDeckLinkFrameMetadataHDRDisplayPrimariesRedX = /* 'hdrx' */ 0x68647278, // Red display primaries in range 0.0 - 1.0
  322. bmdDeckLinkFrameMetadataHDRDisplayPrimariesRedY = /* 'hdry' */ 0x68647279, // Red display primaries in range 0.0 - 1.0
  323. bmdDeckLinkFrameMetadataHDRDisplayPrimariesGreenX = /* 'hdgx' */ 0x68646778, // Green display primaries in range 0.0 - 1.0
  324. bmdDeckLinkFrameMetadataHDRDisplayPrimariesGreenY = /* 'hdgy' */ 0x68646779, // Green display primaries in range 0.0 - 1.0
  325. bmdDeckLinkFrameMetadataHDRDisplayPrimariesBlueX = /* 'hdbx' */ 0x68646278, // Blue display primaries in range 0.0 - 1.0
  326. bmdDeckLinkFrameMetadataHDRDisplayPrimariesBlueY = /* 'hdby' */ 0x68646279, // Blue display primaries in range 0.0 - 1.0
  327. bmdDeckLinkFrameMetadataHDRWhitePointX = /* 'hdwx' */ 0x68647778, // White point in range 0.0 - 1.0
  328. bmdDeckLinkFrameMetadataHDRWhitePointY = /* 'hdwy' */ 0x68647779, // White point in range 0.0 - 1.0
  329. bmdDeckLinkFrameMetadataHDRMaxDisplayMasteringLuminance = /* 'hdml' */ 0x68646D6C, // Max display mastering luminance in range 1 cd/m2 - 65535 cd/m2
  330. bmdDeckLinkFrameMetadataHDRMinDisplayMasteringLuminance = /* 'hmil' */ 0x686D696C, // Min display mastering luminance in range 0.0001 cd/m2 - 6.5535 cd/m2
  331. bmdDeckLinkFrameMetadataHDRMaximumContentLightLevel = /* 'mcll' */ 0x6D636C6C, // Maximum Content Light Level in range 1 cd/m2 - 65535 cd/m2
  332. bmdDeckLinkFrameMetadataHDRMaximumFrameAverageLightLevel = /* 'fall' */ 0x66616C6C, // Maximum Frame Average Light Level in range 1 cd/m2 - 65535 cd/m2
  333. bmdDeckLinkFrameMetadataCintelOffsetToApplyHorizontal = /* 'otah' */ 0x6F746168, // Horizontal offset (pixels) to be applied to image
  334. bmdDeckLinkFrameMetadataCintelOffsetToApplyVertical = /* 'otav' */ 0x6F746176, // Vertical offset (pixels) to be applied to image
  335. bmdDeckLinkFrameMetadataCintelGainRed = /* 'LfRd' */ 0x4C665264, // Red gain parameter to apply after log
  336. bmdDeckLinkFrameMetadataCintelGainGreen = /* 'LfGr' */ 0x4C664772, // Green gain parameter to apply after log
  337. bmdDeckLinkFrameMetadataCintelGainBlue = /* 'LfBl' */ 0x4C66426C, // Blue gain parameter to apply after log
  338. bmdDeckLinkFrameMetadataCintelLiftRed = /* 'GnRd' */ 0x476E5264, // Red lift parameter to apply after log and gain
  339. bmdDeckLinkFrameMetadataCintelLiftGreen = /* 'GnGr' */ 0x476E4772, // Green lift parameter to apply after log and gain
  340. bmdDeckLinkFrameMetadataCintelLiftBlue = /* 'GnBl' */ 0x476E426C // Blue lift parameter to apply after log and gain
  341. };
  342. /* Enum BMDDuplexMode - Duplex for configurable ports */
  343. typedef uint32_t BMDDuplexMode;
  344. enum _BMDDuplexMode {
  345. bmdDuplexModeFull = /* 'fdup' */ 0x66647570,
  346. bmdDuplexModeHalf = /* 'hdup' */ 0x68647570
  347. };
  348. /* Enum BMDDeckLinkAttributeID - DeckLink Attribute ID */
  349. typedef uint32_t BMDDeckLinkAttributeID;
  350. enum _BMDDeckLinkAttributeID {
  351. /* Flags */
  352. BMDDeckLinkSupportsInternalKeying = /* 'keyi' */ 0x6B657969,
  353. BMDDeckLinkSupportsExternalKeying = /* 'keye' */ 0x6B657965,
  354. BMDDeckLinkSupportsHDKeying = /* 'keyh' */ 0x6B657968,
  355. BMDDeckLinkSupportsInputFormatDetection = /* 'infd' */ 0x696E6664,
  356. BMDDeckLinkHasReferenceInput = /* 'hrin' */ 0x6872696E,
  357. BMDDeckLinkHasSerialPort = /* 'hspt' */ 0x68737074,
  358. BMDDeckLinkHasAnalogVideoOutputGain = /* 'avog' */ 0x61766F67,
  359. BMDDeckLinkCanOnlyAdjustOverallVideoOutputGain = /* 'ovog' */ 0x6F766F67,
  360. BMDDeckLinkHasVideoInputAntiAliasingFilter = /* 'aafl' */ 0x6161666C,
  361. BMDDeckLinkHasBypass = /* 'byps' */ 0x62797073,
  362. BMDDeckLinkSupportsClockTimingAdjustment = /* 'ctad' */ 0x63746164,
  363. BMDDeckLinkSupportsFullDuplex = /* 'fdup' */ 0x66647570,
  364. BMDDeckLinkSupportsFullFrameReferenceInputTimingOffset = /* 'frin' */ 0x6672696E,
  365. BMDDeckLinkSupportsSMPTELevelAOutput = /* 'lvla' */ 0x6C766C61,
  366. BMDDeckLinkSupportsDualLinkSDI = /* 'sdls' */ 0x73646C73,
  367. BMDDeckLinkSupportsQuadLinkSDI = /* 'sqls' */ 0x73716C73,
  368. BMDDeckLinkSupportsIdleOutput = /* 'idou' */ 0x69646F75,
  369. BMDDeckLinkHasLTCTimecodeInput = /* 'hltc' */ 0x686C7463,
  370. BMDDeckLinkSupportsDuplexModeConfiguration = /* 'dupx' */ 0x64757078,
  371. BMDDeckLinkSupportsHDRMetadata = /* 'hdrm' */ 0x6864726D,
  372. /* Integers */
  373. BMDDeckLinkMaximumAudioChannels = /* 'mach' */ 0x6D616368,
  374. BMDDeckLinkMaximumAnalogAudioInputChannels = /* 'iach' */ 0x69616368,
  375. BMDDeckLinkMaximumAnalogAudioOutputChannels = /* 'aach' */ 0x61616368,
  376. BMDDeckLinkNumberOfSubDevices = /* 'nsbd' */ 0x6E736264,
  377. BMDDeckLinkSubDeviceIndex = /* 'subi' */ 0x73756269,
  378. BMDDeckLinkPersistentID = /* 'peid' */ 0x70656964,
  379. BMDDeckLinkDeviceGroupID = /* 'dgid' */ 0x64676964,
  380. BMDDeckLinkTopologicalID = /* 'toid' */ 0x746F6964,
  381. BMDDeckLinkVideoOutputConnections = /* 'vocn' */ 0x766F636E, // Returns a BMDVideoConnection bit field
  382. BMDDeckLinkVideoInputConnections = /* 'vicn' */ 0x7669636E, // Returns a BMDVideoConnection bit field
  383. BMDDeckLinkAudioOutputConnections = /* 'aocn' */ 0x616F636E, // Returns a BMDAudioConnection bit field
  384. BMDDeckLinkAudioInputConnections = /* 'aicn' */ 0x6169636E, // Returns a BMDAudioConnection bit field
  385. BMDDeckLinkVideoIOSupport = /* 'vios' */ 0x76696F73, // Returns a BMDVideoIOSupport bit field
  386. BMDDeckLinkDeckControlConnections = /* 'dccn' */ 0x6463636E, // Returns a BMDDeckControlConnection bit field
  387. BMDDeckLinkDeviceInterface = /* 'dbus' */ 0x64627573, // Returns a BMDDeviceInterface
  388. BMDDeckLinkAudioInputRCAChannelCount = /* 'airc' */ 0x61697263,
  389. BMDDeckLinkAudioInputXLRChannelCount = /* 'aixc' */ 0x61697863,
  390. BMDDeckLinkAudioOutputRCAChannelCount = /* 'aorc' */ 0x616F7263,
  391. BMDDeckLinkAudioOutputXLRChannelCount = /* 'aoxc' */ 0x616F7863,
  392. BMDDeckLinkPairedDevicePersistentID = /* 'ppid' */ 0x70706964,
  393. /* Floats */
  394. BMDDeckLinkVideoInputGainMinimum = /* 'vigm' */ 0x7669676D,
  395. BMDDeckLinkVideoInputGainMaximum = /* 'vigx' */ 0x76696778,
  396. BMDDeckLinkVideoOutputGainMinimum = /* 'vogm' */ 0x766F676D,
  397. BMDDeckLinkVideoOutputGainMaximum = /* 'vogx' */ 0x766F6778,
  398. BMDDeckLinkMicrophoneInputGainMinimum = /* 'migm' */ 0x6D69676D,
  399. BMDDeckLinkMicrophoneInputGainMaximum = /* 'migx' */ 0x6D696778,
  400. /* Strings */
  401. BMDDeckLinkSerialPortDeviceName = /* 'slpn' */ 0x736C706E,
  402. BMDDeckLinkVendorName = /* 'vndr' */ 0x766E6472,
  403. BMDDeckLinkDisplayName = /* 'dspn' */ 0x6473706E,
  404. BMDDeckLinkModelName = /* 'mdln' */ 0x6D646C6E,
  405. BMDDeckLinkDeviceHandle = /* 'devh' */ 0x64657668
  406. };
  407. /* Enum BMDDeckLinkAPIInformationID - DeckLinkAPI information ID */
  408. typedef uint32_t BMDDeckLinkAPIInformationID;
  409. enum _BMDDeckLinkAPIInformationID {
  410. BMDDeckLinkAPIVersion = /* 'vers' */ 0x76657273
  411. };
  412. /* Enum BMDDeckLinkStatusID - DeckLink Status ID */
  413. typedef uint32_t BMDDeckLinkStatusID;
  414. enum _BMDDeckLinkStatusID {
  415. /* Integers */
  416. bmdDeckLinkStatusDetectedVideoInputMode = /* 'dvim' */ 0x6476696D,
  417. bmdDeckLinkStatusDetectedVideoInputFlags = /* 'dvif' */ 0x64766966,
  418. bmdDeckLinkStatusCurrentVideoInputMode = /* 'cvim' */ 0x6376696D,
  419. bmdDeckLinkStatusCurrentVideoInputPixelFormat = /* 'cvip' */ 0x63766970,
  420. bmdDeckLinkStatusCurrentVideoInputFlags = /* 'cvif' */ 0x63766966,
  421. bmdDeckLinkStatusCurrentVideoOutputMode = /* 'cvom' */ 0x63766F6D,
  422. bmdDeckLinkStatusCurrentVideoOutputFlags = /* 'cvof' */ 0x63766F66,
  423. bmdDeckLinkStatusPCIExpressLinkWidth = /* 'pwid' */ 0x70776964,
  424. bmdDeckLinkStatusPCIExpressLinkSpeed = /* 'plnk' */ 0x706C6E6B,
  425. bmdDeckLinkStatusLastVideoOutputPixelFormat = /* 'opix' */ 0x6F706978,
  426. bmdDeckLinkStatusReferenceSignalMode = /* 'refm' */ 0x7265666D,
  427. bmdDeckLinkStatusReferenceSignalFlags = /* 'reff' */ 0x72656666,
  428. bmdDeckLinkStatusDuplexMode = /* 'dupx' */ 0x64757078,
  429. bmdDeckLinkStatusBusy = /* 'busy' */ 0x62757379,
  430. bmdDeckLinkStatusInterchangeablePanelType = /* 'icpt' */ 0x69637074,
  431. bmdDeckLinkStatusDeviceTemperature = /* 'dtmp' */ 0x64746D70,
  432. /* Flags */
  433. bmdDeckLinkStatusVideoInputSignalLocked = /* 'visl' */ 0x7669736C,
  434. bmdDeckLinkStatusReferenceSignalLocked = /* 'refl' */ 0x7265666C,
  435. bmdDeckLinkStatusReceivedEDID = /* 'edid' */ 0x65646964
  436. };
  437. /* Enum BMDDeckLinkVideoStatusFlags - */
  438. typedef uint32_t BMDDeckLinkVideoStatusFlags;
  439. enum _BMDDeckLinkVideoStatusFlags {
  440. bmdDeckLinkVideoStatusPsF = 1 << 0,
  441. bmdDeckLinkVideoStatusDualStream3D = 1 << 1
  442. };
  443. /* Enum BMDDuplexStatus - Duplex status of the device */
  444. typedef uint32_t BMDDuplexStatus;
  445. enum _BMDDuplexStatus {
  446. bmdDuplexStatusFullDuplex = /* 'fdup' */ 0x66647570,
  447. bmdDuplexStatusHalfDuplex = /* 'hdup' */ 0x68647570,
  448. bmdDuplexStatusSimplex = /* 'splx' */ 0x73706C78,
  449. bmdDuplexStatusInactive = /* 'inac' */ 0x696E6163
  450. };
  451. /* Enum BMDPanelType - The type of interchangeable panel */
  452. typedef uint32_t BMDPanelType;
  453. enum _BMDPanelType {
  454. bmdPanelNotDetected = /* 'npnl' */ 0x6E706E6C,
  455. bmdPanelTeranexMiniSmartPanel = /* 'tmsm' */ 0x746D736D
  456. };
  457. /* Enum BMDDeviceBusyState - Current device busy state */
  458. typedef uint32_t BMDDeviceBusyState;
  459. enum _BMDDeviceBusyState {
  460. bmdDeviceCaptureBusy = 1 << 0,
  461. bmdDevicePlaybackBusy = 1 << 1,
  462. bmdDeviceSerialPortBusy = 1 << 2
  463. };
  464. /* Enum BMDVideoIOSupport - Device video input/output support */
  465. typedef uint32_t BMDVideoIOSupport;
  466. enum _BMDVideoIOSupport {
  467. bmdDeviceSupportsCapture = 1 << 0,
  468. bmdDeviceSupportsPlayback = 1 << 1
  469. };
  470. /* Enum BMD3DPreviewFormat - Linked Frame preview format */
  471. typedef uint32_t BMD3DPreviewFormat;
  472. enum _BMD3DPreviewFormat {
  473. bmd3DPreviewFormatDefault = /* 'defa' */ 0x64656661,
  474. bmd3DPreviewFormatLeftOnly = /* 'left' */ 0x6C656674,
  475. bmd3DPreviewFormatRightOnly = /* 'righ' */ 0x72696768,
  476. bmd3DPreviewFormatSideBySide = /* 'side' */ 0x73696465,
  477. bmd3DPreviewFormatTopBottom = /* 'topb' */ 0x746F7062
  478. };
  479. /* Enum BMDNotifications - Events that can be subscribed through IDeckLinkNotification */
  480. typedef uint32_t BMDNotifications;
  481. enum _BMDNotifications {
  482. bmdPreferencesChanged = /* 'pref' */ 0x70726566,
  483. bmdStatusChanged = /* 'stat' */ 0x73746174
  484. };
  485. #if defined(__cplusplus)
  486. // Forward Declarations
  487. class IDeckLinkVideoOutputCallback;
  488. class IDeckLinkInputCallback;
  489. class IDeckLinkEncoderInputCallback;
  490. class IDeckLinkMemoryAllocator;
  491. class IDeckLinkAudioOutputCallback;
  492. class IDeckLinkIterator;
  493. class IDeckLinkAPIInformation;
  494. class IDeckLinkOutput;
  495. class IDeckLinkInput;
  496. class IDeckLinkEncoderInput;
  497. class IDeckLinkVideoFrame;
  498. class IDeckLinkMutableVideoFrame;
  499. class IDeckLinkVideoFrame3DExtensions;
  500. class IDeckLinkVideoFrameMetadataExtensions;
  501. class IDeckLinkVideoInputFrame;
  502. class IDeckLinkAncillaryPacket;
  503. class IDeckLinkAncillaryPacketIterator;
  504. class IDeckLinkVideoFrameAncillaryPackets;
  505. class IDeckLinkVideoFrameAncillary;
  506. class IDeckLinkEncoderPacket;
  507. class IDeckLinkEncoderVideoPacket;
  508. class IDeckLinkEncoderAudioPacket;
  509. class IDeckLinkH265NALPacket;
  510. class IDeckLinkAudioInputPacket;
  511. class IDeckLinkScreenPreviewCallback;
  512. class IDeckLinkGLScreenPreviewHelper;
  513. class IDeckLinkNotificationCallback;
  514. class IDeckLinkNotification;
  515. class IDeckLinkAttributes;
  516. class IDeckLinkStatus;
  517. class IDeckLinkKeyer;
  518. class IDeckLinkVideoConversion;
  519. class IDeckLinkDeviceNotificationCallback;
  520. class IDeckLinkDiscovery;
  521. /* Interface IDeckLinkVideoOutputCallback - Frame completion callback. */
  522. class BMD_PUBLIC IDeckLinkVideoOutputCallback : public IUnknown
  523. {
  524. public:
  525. virtual HRESULT ScheduledFrameCompleted (/* in */ IDeckLinkVideoFrame *completedFrame, /* in */ BMDOutputFrameCompletionResult result) = 0;
  526. virtual HRESULT ScheduledPlaybackHasStopped (void) = 0;
  527. protected:
  528. virtual ~IDeckLinkVideoOutputCallback () {} // call Release method to drop reference count
  529. };
  530. /* Interface IDeckLinkInputCallback - Frame arrival callback. */
  531. class BMD_PUBLIC IDeckLinkInputCallback : public IUnknown
  532. {
  533. public:
  534. virtual HRESULT VideoInputFormatChanged (/* in */ BMDVideoInputFormatChangedEvents notificationEvents, /* in */ IDeckLinkDisplayMode *newDisplayMode, /* in */ BMDDetectedVideoInputFormatFlags detectedSignalFlags) = 0;
  535. virtual HRESULT VideoInputFrameArrived (/* in */ IDeckLinkVideoInputFrame* videoFrame, /* in */ IDeckLinkAudioInputPacket* audioPacket) = 0;
  536. protected:
  537. virtual ~IDeckLinkInputCallback () {} // call Release method to drop reference count
  538. };
  539. /* Interface IDeckLinkEncoderInputCallback - Frame arrival callback. */
  540. class BMD_PUBLIC IDeckLinkEncoderInputCallback : public IUnknown
  541. {
  542. public:
  543. virtual HRESULT VideoInputSignalChanged (/* in */ BMDVideoInputFormatChangedEvents notificationEvents, /* in */ IDeckLinkDisplayMode *newDisplayMode, /* in */ BMDDetectedVideoInputFormatFlags detectedSignalFlags) = 0;
  544. virtual HRESULT VideoPacketArrived (/* in */ IDeckLinkEncoderVideoPacket* videoPacket) = 0;
  545. virtual HRESULT AudioPacketArrived (/* in */ IDeckLinkEncoderAudioPacket* audioPacket) = 0;
  546. protected:
  547. virtual ~IDeckLinkEncoderInputCallback () {} // call Release method to drop reference count
  548. };
  549. /* Interface IDeckLinkMemoryAllocator - Memory allocator for video frames. */
  550. class BMD_PUBLIC IDeckLinkMemoryAllocator : public IUnknown
  551. {
  552. public:
  553. virtual HRESULT AllocateBuffer (/* in */ uint32_t bufferSize, /* out */ void **allocatedBuffer) = 0;
  554. virtual HRESULT ReleaseBuffer (/* in */ void *buffer) = 0;
  555. virtual HRESULT Commit (void) = 0;
  556. virtual HRESULT Decommit (void) = 0;
  557. };
  558. /* Interface IDeckLinkAudioOutputCallback - Optional callback to allow audio samples to be pulled as required. */
  559. class BMD_PUBLIC IDeckLinkAudioOutputCallback : public IUnknown
  560. {
  561. public:
  562. virtual HRESULT RenderAudioSamples (/* in */ bool preroll) = 0;
  563. };
  564. /* Interface IDeckLinkIterator - enumerates installed DeckLink hardware */
  565. class BMD_PUBLIC IDeckLinkIterator : public IUnknown
  566. {
  567. public:
  568. virtual HRESULT Next (/* out */ IDeckLink **deckLinkInstance) = 0;
  569. };
  570. /* Interface IDeckLinkAPIInformation - DeckLinkAPI attribute interface */
  571. class BMD_PUBLIC IDeckLinkAPIInformation : public IUnknown
  572. {
  573. public:
  574. virtual HRESULT GetFlag (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ bool *value) = 0;
  575. virtual HRESULT GetInt (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ int64_t *value) = 0;
  576. virtual HRESULT GetFloat (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ double *value) = 0;
  577. virtual HRESULT GetString (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ const char **value) = 0;
  578. protected:
  579. virtual ~IDeckLinkAPIInformation () {} // call Release method to drop reference count
  580. };
  581. /* Interface IDeckLinkOutput - Created by QueryInterface from IDeckLink. */
  582. class BMD_PUBLIC IDeckLinkOutput : public IUnknown
  583. {
  584. public:
  585. virtual HRESULT DoesSupportVideoMode (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoOutputFlags flags, /* out */ BMDDisplayModeSupport *result, /* out */ IDeckLinkDisplayMode **resultDisplayMode) = 0;
  586. virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator **iterator) = 0;
  587. virtual HRESULT SetScreenPreviewCallback (/* in */ IDeckLinkScreenPreviewCallback *previewCallback) = 0;
  588. /* Video Output */
  589. virtual HRESULT EnableVideoOutput (/* in */ BMDDisplayMode displayMode, /* in */ BMDVideoOutputFlags flags) = 0;
  590. virtual HRESULT DisableVideoOutput (void) = 0;
  591. virtual HRESULT SetVideoOutputFrameMemoryAllocator (/* in */ IDeckLinkMemoryAllocator *theAllocator) = 0;
  592. 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;
  593. virtual HRESULT CreateAncillaryData (/* in */ BMDPixelFormat pixelFormat, /* out */ IDeckLinkVideoFrameAncillary **outBuffer) = 0; // Use of IDeckLinkVideoFrameAncillaryPackets is preferred
  594. virtual HRESULT DisplayVideoFrameSync (/* in */ IDeckLinkVideoFrame *theFrame) = 0;
  595. virtual HRESULT ScheduleVideoFrame (/* in */ IDeckLinkVideoFrame *theFrame, /* in */ BMDTimeValue displayTime, /* in */ BMDTimeValue displayDuration, /* in */ BMDTimeScale timeScale) = 0;
  596. virtual HRESULT SetScheduledFrameCompletionCallback (/* in */ IDeckLinkVideoOutputCallback *theCallback) = 0;
  597. virtual HRESULT GetBufferedVideoFrameCount (/* out */ uint32_t *bufferedFrameCount) = 0;
  598. /* Audio Output */
  599. virtual HRESULT EnableAudioOutput (/* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount, /* in */ BMDAudioOutputStreamType streamType) = 0;
  600. virtual HRESULT DisableAudioOutput (void) = 0;
  601. virtual HRESULT WriteAudioSamplesSync (/* in */ void *buffer, /* in */ uint32_t sampleFrameCount, /* out */ uint32_t *sampleFramesWritten) = 0;
  602. virtual HRESULT BeginAudioPreroll (void) = 0;
  603. virtual HRESULT EndAudioPreroll (void) = 0;
  604. virtual HRESULT ScheduleAudioSamples (/* in */ void *buffer, /* in */ uint32_t sampleFrameCount, /* in */ BMDTimeValue streamTime, /* in */ BMDTimeScale timeScale, /* out */ uint32_t *sampleFramesWritten) = 0;
  605. virtual HRESULT GetBufferedAudioSampleFrameCount (/* out */ uint32_t *bufferedSampleFrameCount) = 0;
  606. virtual HRESULT FlushBufferedAudioSamples (void) = 0;
  607. virtual HRESULT SetAudioCallback (/* in */ IDeckLinkAudioOutputCallback *theCallback) = 0;
  608. /* Output Control */
  609. virtual HRESULT StartScheduledPlayback (/* in */ BMDTimeValue playbackStartTime, /* in */ BMDTimeScale timeScale, /* in */ double playbackSpeed) = 0;
  610. virtual HRESULT StopScheduledPlayback (/* in */ BMDTimeValue stopPlaybackAtTime, /* out */ BMDTimeValue *actualStopTime, /* in */ BMDTimeScale timeScale) = 0;
  611. virtual HRESULT IsScheduledPlaybackRunning (/* out */ bool *active) = 0;
  612. virtual HRESULT GetScheduledStreamTime (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *streamTime, /* out */ double *playbackSpeed) = 0;
  613. virtual HRESULT GetReferenceStatus (/* out */ BMDReferenceStatus *referenceStatus) = 0;
  614. /* Hardware Timing */
  615. virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *hardwareTime, /* out */ BMDTimeValue *timeInFrame, /* out */ BMDTimeValue *ticksPerFrame) = 0;
  616. virtual HRESULT GetFrameCompletionReferenceTimestamp (/* in */ IDeckLinkVideoFrame *theFrame, /* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *frameCompletionTimestamp) = 0;
  617. protected:
  618. virtual ~IDeckLinkOutput () {} // call Release method to drop reference count
  619. };
  620. /* Interface IDeckLinkInput - Created by QueryInterface from IDeckLink. */
  621. class BMD_PUBLIC IDeckLinkInput : public IUnknown
  622. {
  623. public:
  624. virtual HRESULT DoesSupportVideoMode (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags, /* out */ BMDDisplayModeSupport *result, /* out */ IDeckLinkDisplayMode **resultDisplayMode) = 0;
  625. virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator **iterator) = 0;
  626. virtual HRESULT SetScreenPreviewCallback (/* in */ IDeckLinkScreenPreviewCallback *previewCallback) = 0;
  627. /* Video Input */
  628. virtual HRESULT EnableVideoInput (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags) = 0;
  629. virtual HRESULT DisableVideoInput (void) = 0;
  630. virtual HRESULT GetAvailableVideoFrameCount (/* out */ uint32_t *availableFrameCount) = 0;
  631. virtual HRESULT SetVideoInputFrameMemoryAllocator (/* in */ IDeckLinkMemoryAllocator *theAllocator) = 0;
  632. /* Audio Input */
  633. virtual HRESULT EnableAudioInput (/* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount) = 0;
  634. virtual HRESULT DisableAudioInput (void) = 0;
  635. virtual HRESULT GetAvailableAudioSampleFrameCount (/* out */ uint32_t *availableSampleFrameCount) = 0;
  636. /* Input Control */
  637. virtual HRESULT StartStreams (void) = 0;
  638. virtual HRESULT StopStreams (void) = 0;
  639. virtual HRESULT PauseStreams (void) = 0;
  640. virtual HRESULT FlushStreams (void) = 0;
  641. virtual HRESULT SetCallback (/* in */ IDeckLinkInputCallback *theCallback) = 0;
  642. /* Hardware Timing */
  643. virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *hardwareTime, /* out */ BMDTimeValue *timeInFrame, /* out */ BMDTimeValue *ticksPerFrame) = 0;
  644. protected:
  645. virtual ~IDeckLinkInput () {} // call Release method to drop reference count
  646. };
  647. /* Interface IDeckLinkEncoderInput - Created by QueryInterface from IDeckLink. */
  648. class BMD_PUBLIC IDeckLinkEncoderInput : public IUnknown
  649. {
  650. public:
  651. virtual HRESULT DoesSupportVideoMode (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags, /* out */ BMDDisplayModeSupport *result, /* out */ IDeckLinkDisplayMode **resultDisplayMode) = 0;
  652. virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator **iterator) = 0;
  653. /* Video Input */
  654. virtual HRESULT EnableVideoInput (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags) = 0;
  655. virtual HRESULT DisableVideoInput (void) = 0;
  656. virtual HRESULT GetAvailablePacketsCount (/* out */ uint32_t *availablePacketsCount) = 0;
  657. virtual HRESULT SetMemoryAllocator (/* in */ IDeckLinkMemoryAllocator *theAllocator) = 0;
  658. /* Audio Input */
  659. virtual HRESULT EnableAudioInput (/* in */ BMDAudioFormat audioFormat, /* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount) = 0;
  660. virtual HRESULT DisableAudioInput (void) = 0;
  661. virtual HRESULT GetAvailableAudioSampleFrameCount (/* out */ uint32_t *availableSampleFrameCount) = 0;
  662. /* Input Control */
  663. virtual HRESULT StartStreams (void) = 0;
  664. virtual HRESULT StopStreams (void) = 0;
  665. virtual HRESULT PauseStreams (void) = 0;
  666. virtual HRESULT FlushStreams (void) = 0;
  667. virtual HRESULT SetCallback (/* in */ IDeckLinkEncoderInputCallback *theCallback) = 0;
  668. /* Hardware Timing */
  669. virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue *hardwareTime, /* out */ BMDTimeValue *timeInFrame, /* out */ BMDTimeValue *ticksPerFrame) = 0;
  670. protected:
  671. virtual ~IDeckLinkEncoderInput () {} // call Release method to drop reference count
  672. };
  673. /* Interface IDeckLinkVideoFrame - Interface to encapsulate a video frame; can be caller-implemented. */
  674. class BMD_PUBLIC IDeckLinkVideoFrame : public IUnknown
  675. {
  676. public:
  677. virtual long GetWidth (void) = 0;
  678. virtual long GetHeight (void) = 0;
  679. virtual long GetRowBytes (void) = 0;
  680. virtual BMDPixelFormat GetPixelFormat (void) = 0;
  681. virtual BMDFrameFlags GetFlags (void) = 0;
  682. virtual HRESULT GetBytes (/* out */ void **buffer) = 0;
  683. virtual HRESULT GetTimecode (/* in */ BMDTimecodeFormat format, /* out */ IDeckLinkTimecode **timecode) = 0;
  684. virtual HRESULT GetAncillaryData (/* out */ IDeckLinkVideoFrameAncillary **ancillary) = 0; // Use of IDeckLinkVideoFrameAncillaryPackets is preferred
  685. protected:
  686. virtual ~IDeckLinkVideoFrame () {} // call Release method to drop reference count
  687. };
  688. /* Interface IDeckLinkMutableVideoFrame - Created by IDeckLinkOutput::CreateVideoFrame. */
  689. class BMD_PUBLIC IDeckLinkMutableVideoFrame : public IDeckLinkVideoFrame
  690. {
  691. public:
  692. virtual HRESULT SetFlags (/* in */ BMDFrameFlags newFlags) = 0;
  693. virtual HRESULT SetTimecode (/* in */ BMDTimecodeFormat format, /* in */ IDeckLinkTimecode *timecode) = 0;
  694. 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;
  695. virtual HRESULT SetAncillaryData (/* in */ IDeckLinkVideoFrameAncillary *ancillary) = 0;
  696. virtual HRESULT SetTimecodeUserBits (/* in */ BMDTimecodeFormat format, /* in */ BMDTimecodeUserBits userBits) = 0;
  697. protected:
  698. virtual ~IDeckLinkMutableVideoFrame () {} // call Release method to drop reference count
  699. };
  700. /* Interface IDeckLinkVideoFrame3DExtensions - Optional interface implemented on IDeckLinkVideoFrame to support 3D frames */
  701. class BMD_PUBLIC IDeckLinkVideoFrame3DExtensions : public IUnknown
  702. {
  703. public:
  704. virtual BMDVideo3DPackingFormat Get3DPackingFormat (void) = 0;
  705. virtual HRESULT GetFrameForRightEye (/* out */ IDeckLinkVideoFrame* *rightEyeFrame) = 0;
  706. protected:
  707. virtual ~IDeckLinkVideoFrame3DExtensions () {} // call Release method to drop reference count
  708. };
  709. /* Interface IDeckLinkVideoFrameMetadataExtensions - Optional interface implemented on IDeckLinkVideoFrame to support frame metadata such as HDMI HDR information */
  710. class BMD_PUBLIC IDeckLinkVideoFrameMetadataExtensions : public IUnknown
  711. {
  712. public:
  713. virtual HRESULT GetInt (/* in */ BMDDeckLinkFrameMetadataID metadataID, /* out */ int64_t *value) = 0;
  714. virtual HRESULT GetFloat (/* in */ BMDDeckLinkFrameMetadataID metadataID, /* out */ double *value) = 0;
  715. virtual HRESULT GetFlag (/* in */ BMDDeckLinkFrameMetadataID metadataID, /* out */ bool* value) = 0;
  716. virtual HRESULT GetString (/* in */ BMDDeckLinkFrameMetadataID metadataID, /* out */ const char **value) = 0;
  717. protected:
  718. virtual ~IDeckLinkVideoFrameMetadataExtensions () {} // call Release method to drop reference count
  719. };
  720. /* Interface IDeckLinkVideoInputFrame - Provided by the IDeckLinkVideoInput frame arrival callback. */
  721. class BMD_PUBLIC IDeckLinkVideoInputFrame : public IDeckLinkVideoFrame
  722. {
  723. public:
  724. virtual HRESULT GetStreamTime (/* out */ BMDTimeValue *frameTime, /* out */ BMDTimeValue *frameDuration, /* in */ BMDTimeScale timeScale) = 0;
  725. virtual HRESULT GetHardwareReferenceTimestamp (/* in */ BMDTimeScale timeScale, /* out */ BMDTimeValue *frameTime, /* out */ BMDTimeValue *frameDuration) = 0;
  726. protected:
  727. virtual ~IDeckLinkVideoInputFrame () {} // call Release method to drop reference count
  728. };
  729. /* Interface IDeckLinkAncillaryPacket - On output, user needs to implement this interface */
  730. class BMD_PUBLIC IDeckLinkAncillaryPacket : public IUnknown
  731. {
  732. public:
  733. virtual HRESULT GetBytes (/* in */ BMDAncillaryPacketFormat format /* For output, only one format need be offered */, /* out */ const void **data /* Optional */, /* out */ uint32_t *size /* Optional */) = 0;
  734. virtual uint8_t GetDID (void) = 0;
  735. virtual uint8_t GetSDID (void) = 0;
  736. virtual uint32_t GetLineNumber (void) = 0; // On output, zero is auto
  737. virtual uint8_t GetDataStreamIndex (void) = 0; // Usually zero. Can only be 1 if non-SD and the first data stream is completely full
  738. protected:
  739. virtual ~IDeckLinkAncillaryPacket () {} // call Release method to drop reference count
  740. };
  741. /* Interface IDeckLinkAncillaryPacketIterator - Enumerates ancillary packets */
  742. class BMD_PUBLIC IDeckLinkAncillaryPacketIterator : public IUnknown
  743. {
  744. public:
  745. virtual HRESULT Next (/* out */ IDeckLinkAncillaryPacket **packet) = 0;
  746. protected:
  747. virtual ~IDeckLinkAncillaryPacketIterator () {} // call Release method to drop reference count
  748. };
  749. /* Interface IDeckLinkVideoFrameAncillaryPackets - Obtained through QueryInterface() on an IDeckLinkVideoFrame object. */
  750. class BMD_PUBLIC IDeckLinkVideoFrameAncillaryPackets : public IUnknown
  751. {
  752. public:
  753. virtual HRESULT GetPacketIterator (/* out */ IDeckLinkAncillaryPacketIterator **iterator) = 0;
  754. virtual HRESULT GetFirstPacketByID (/* in */ uint8_t DID, /* in */ uint8_t SDID, /* out */ IDeckLinkAncillaryPacket **packet) = 0;
  755. virtual HRESULT AttachPacket (/* in */ IDeckLinkAncillaryPacket *packet) = 0; // Implement IDeckLinkAncillaryPacket to output your own
  756. virtual HRESULT DetachPacket (/* in */ IDeckLinkAncillaryPacket *packet) = 0;
  757. virtual HRESULT DetachAllPackets (void) = 0;
  758. protected:
  759. virtual ~IDeckLinkVideoFrameAncillaryPackets () {} // call Release method to drop reference count
  760. };
  761. /* Interface IDeckLinkVideoFrameAncillary - Use of IDeckLinkVideoFrameAncillaryPackets is preferred. Obtained through QueryInterface() on an IDeckLinkVideoFrame object. */
  762. class BMD_PUBLIC IDeckLinkVideoFrameAncillary : public IUnknown
  763. {
  764. public:
  765. virtual HRESULT GetBufferForVerticalBlankingLine (/* in */ uint32_t lineNumber, /* out */ void **buffer) = 0; // Pixels/rowbytes is same as display mode, except for above HD where it's 1920 pixels for UHD modes and 2048 pixels for DCI modes
  766. virtual BMDPixelFormat GetPixelFormat (void) = 0;
  767. virtual BMDDisplayMode GetDisplayMode (void) = 0;
  768. protected:
  769. virtual ~IDeckLinkVideoFrameAncillary () {} // call Release method to drop reference count
  770. };
  771. /* Interface IDeckLinkEncoderPacket - Interface to encapsulate an encoded packet. */
  772. class BMD_PUBLIC IDeckLinkEncoderPacket : public IUnknown
  773. {
  774. public:
  775. virtual HRESULT GetBytes (/* out */ void **buffer) = 0;
  776. virtual long GetSize (void) = 0;
  777. virtual HRESULT GetStreamTime (/* out */ BMDTimeValue *frameTime, /* in */ BMDTimeScale timeScale) = 0;
  778. virtual BMDPacketType GetPacketType (void) = 0;
  779. protected:
  780. virtual ~IDeckLinkEncoderPacket () {} // call Release method to drop reference count
  781. };
  782. /* Interface IDeckLinkEncoderVideoPacket - Provided by the IDeckLinkEncoderInput video packet arrival callback. */
  783. class BMD_PUBLIC IDeckLinkEncoderVideoPacket : public IDeckLinkEncoderPacket
  784. {
  785. public:
  786. virtual BMDPixelFormat GetPixelFormat (void) = 0;
  787. virtual HRESULT GetHardwareReferenceTimestamp (/* in */ BMDTimeScale timeScale, /* out */ BMDTimeValue *frameTime, /* out */ BMDTimeValue *frameDuration) = 0;
  788. virtual HRESULT GetTimecode (/* in */ BMDTimecodeFormat format, /* out */ IDeckLinkTimecode **timecode) = 0;
  789. protected:
  790. virtual ~IDeckLinkEncoderVideoPacket () {} // call Release method to drop reference count
  791. };
  792. /* Interface IDeckLinkEncoderAudioPacket - Provided by the IDeckLinkEncoderInput audio packet arrival callback. */
  793. class BMD_PUBLIC IDeckLinkEncoderAudioPacket : public IDeckLinkEncoderPacket
  794. {
  795. public:
  796. virtual BMDAudioFormat GetAudioFormat (void) = 0;
  797. protected:
  798. virtual ~IDeckLinkEncoderAudioPacket () {} // call Release method to drop reference count
  799. };
  800. /* Interface IDeckLinkH265NALPacket - Obtained through QueryInterface() on an IDeckLinkEncoderVideoPacket object */
  801. class BMD_PUBLIC IDeckLinkH265NALPacket : public IDeckLinkEncoderVideoPacket
  802. {
  803. public:
  804. virtual HRESULT GetUnitType (/* out */ uint8_t *unitType) = 0;
  805. virtual HRESULT GetBytesNoPrefix (/* out */ void **buffer) = 0;
  806. virtual long GetSizeNoPrefix (void) = 0;
  807. protected:
  808. virtual ~IDeckLinkH265NALPacket () {} // call Release method to drop reference count
  809. };
  810. /* Interface IDeckLinkAudioInputPacket - Provided by the IDeckLinkInput callback. */
  811. class BMD_PUBLIC IDeckLinkAudioInputPacket : public IUnknown
  812. {
  813. public:
  814. virtual long GetSampleFrameCount (void) = 0;
  815. virtual HRESULT GetBytes (/* out */ void **buffer) = 0;
  816. virtual HRESULT GetPacketTime (/* out */ BMDTimeValue *packetTime, /* in */ BMDTimeScale timeScale) = 0;
  817. protected:
  818. virtual ~IDeckLinkAudioInputPacket () {} // call Release method to drop reference count
  819. };
  820. /* Interface IDeckLinkScreenPreviewCallback - Screen preview callback */
  821. class BMD_PUBLIC IDeckLinkScreenPreviewCallback : public IUnknown
  822. {
  823. public:
  824. virtual HRESULT DrawFrame (/* in */ IDeckLinkVideoFrame *theFrame) = 0;
  825. protected:
  826. virtual ~IDeckLinkScreenPreviewCallback () {} // call Release method to drop reference count
  827. };
  828. /* Interface IDeckLinkGLScreenPreviewHelper - Created with CoCreateInstance(). */
  829. class BMD_PUBLIC IDeckLinkGLScreenPreviewHelper : public IUnknown
  830. {
  831. public:
  832. /* Methods must be called with OpenGL context set */
  833. virtual HRESULT InitializeGL (void) = 0;
  834. virtual HRESULT PaintGL (void) = 0;
  835. virtual HRESULT SetFrame (/* in */ IDeckLinkVideoFrame *theFrame) = 0;
  836. virtual HRESULT Set3DPreviewFormat (/* in */ BMD3DPreviewFormat previewFormat) = 0;
  837. protected:
  838. virtual ~IDeckLinkGLScreenPreviewHelper () {} // call Release method to drop reference count
  839. };
  840. /* Interface IDeckLinkNotificationCallback - DeckLink Notification Callback Interface */
  841. class BMD_PUBLIC IDeckLinkNotificationCallback : public IUnknown
  842. {
  843. public:
  844. virtual HRESULT Notify (/* in */ BMDNotifications topic, /* in */ uint64_t param1, /* in */ uint64_t param2) = 0;
  845. };
  846. /* Interface IDeckLinkNotification - DeckLink Notification interface */
  847. class BMD_PUBLIC IDeckLinkNotification : public IUnknown
  848. {
  849. public:
  850. virtual HRESULT Subscribe (/* in */ BMDNotifications topic, /* in */ IDeckLinkNotificationCallback *theCallback) = 0;
  851. virtual HRESULT Unsubscribe (/* in */ BMDNotifications topic, /* in */ IDeckLinkNotificationCallback *theCallback) = 0;
  852. };
  853. /* Interface IDeckLinkAttributes - DeckLink Attribute interface */
  854. class BMD_PUBLIC IDeckLinkAttributes : public IUnknown
  855. {
  856. public:
  857. virtual HRESULT GetFlag (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ bool *value) = 0;
  858. virtual HRESULT GetInt (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ int64_t *value) = 0;
  859. virtual HRESULT GetFloat (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ double *value) = 0;
  860. virtual HRESULT GetString (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ const char **value) = 0;
  861. protected:
  862. virtual ~IDeckLinkAttributes () {} // call Release method to drop reference count
  863. };
  864. /* Interface IDeckLinkStatus - DeckLink Status interface */
  865. class BMD_PUBLIC IDeckLinkStatus : public IUnknown
  866. {
  867. public:
  868. virtual HRESULT GetFlag (/* in */ BMDDeckLinkStatusID statusID, /* out */ bool *value) = 0;
  869. virtual HRESULT GetInt (/* in */ BMDDeckLinkStatusID statusID, /* out */ int64_t *value) = 0;
  870. virtual HRESULT GetFloat (/* in */ BMDDeckLinkStatusID statusID, /* out */ double *value) = 0;
  871. virtual HRESULT GetString (/* in */ BMDDeckLinkStatusID statusID, /* out */ const char **value) = 0;
  872. virtual HRESULT GetBytes (/* in */ BMDDeckLinkStatusID statusID, /* out */ void *buffer, /* in, out */ uint32_t *bufferSize) = 0;
  873. protected:
  874. virtual ~IDeckLinkStatus () {} // call Release method to drop reference count
  875. };
  876. /* Interface IDeckLinkKeyer - DeckLink Keyer interface */
  877. class BMD_PUBLIC IDeckLinkKeyer : public IUnknown
  878. {
  879. public:
  880. virtual HRESULT Enable (/* in */ bool isExternal) = 0;
  881. virtual HRESULT SetLevel (/* in */ uint8_t level) = 0;
  882. virtual HRESULT RampUp (/* in */ uint32_t numberOfFrames) = 0;
  883. virtual HRESULT RampDown (/* in */ uint32_t numberOfFrames) = 0;
  884. virtual HRESULT Disable (void) = 0;
  885. protected:
  886. virtual ~IDeckLinkKeyer () {} // call Release method to drop reference count
  887. };
  888. /* Interface IDeckLinkVideoConversion - Created with CoCreateInstance(). */
  889. class BMD_PUBLIC IDeckLinkVideoConversion : public IUnknown
  890. {
  891. public:
  892. virtual HRESULT ConvertFrame (/* in */ IDeckLinkVideoFrame* srcFrame, /* in */ IDeckLinkVideoFrame* dstFrame) = 0;
  893. protected:
  894. virtual ~IDeckLinkVideoConversion () {} // call Release method to drop reference count
  895. };
  896. /* Interface IDeckLinkDeviceNotificationCallback - DeckLink device arrival/removal notification callbacks */
  897. class BMD_PUBLIC IDeckLinkDeviceNotificationCallback : public IUnknown
  898. {
  899. public:
  900. virtual HRESULT DeckLinkDeviceArrived (/* in */ IDeckLink* deckLinkDevice) = 0;
  901. virtual HRESULT DeckLinkDeviceRemoved (/* in */ IDeckLink* deckLinkDevice) = 0;
  902. protected:
  903. virtual ~IDeckLinkDeviceNotificationCallback () {} // call Release method to drop reference count
  904. };
  905. /* Interface IDeckLinkDiscovery - DeckLink device discovery */
  906. class BMD_PUBLIC IDeckLinkDiscovery : public IUnknown
  907. {
  908. public:
  909. virtual HRESULT InstallDeviceNotifications (/* in */ IDeckLinkDeviceNotificationCallback* deviceNotificationCallback) = 0;
  910. virtual HRESULT UninstallDeviceNotifications (void) = 0;
  911. protected:
  912. virtual ~IDeckLinkDiscovery () {} // call Release method to drop reference count
  913. };
  914. /* Functions */
  915. extern "C" {
  916. IDeckLinkIterator* BMD_PUBLIC CreateDeckLinkIteratorInstance (void);
  917. IDeckLinkDiscovery* BMD_PUBLIC CreateDeckLinkDiscoveryInstance (void);
  918. IDeckLinkAPIInformation* BMD_PUBLIC CreateDeckLinkAPIInformationInstance (void);
  919. IDeckLinkGLScreenPreviewHelper* BMD_PUBLIC CreateOpenGLScreenPreviewHelper (void);
  920. IDeckLinkVideoConversion* BMD_PUBLIC CreateVideoConversionInstance (void);
  921. IDeckLinkVideoFrameAncillaryPackets* BMD_PUBLIC CreateVideoFrameAncillaryPacketsInstance (void); // For use when creating a custom IDeckLinkVideoFrame without wrapping IDeckLinkOutput::CreateVideoFrame
  922. }
  923. #endif // defined(__cplusplus)
  924. #endif /* defined(BMD_DECKLINKAPI_H) */