DeckLinkAPI.h 63 KB

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