DeckLinkAPI.h 61 KB

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