DeckLinkAPI.h 68 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281
  1. /* -LICENSE-START-
  2. ** Copyright (c) 2021 Blackmagic Design
  3. **
  4. ** Permission is hereby granted, free of charge, to any person or organization
  5. ** obtaining a copy of the software and accompanying documentation covered by
  6. ** this license (the "Software") to use, reproduce, display, distribute,
  7. ** execute, and transmit the Software, and to prepare derivative works of the
  8. ** Software, and to permit third-parties to whom the Software is furnished to
  9. ** do so, all subject to the following:
  10. **
  11. ** The copyright notices in the Software and this entire statement, including
  12. ** the above license grant, this restriction and the following disclaimer,
  13. ** must be included in all copies of the Software, in whole or in part, and
  14. ** all derivative works of the Software, unless such copies or derivative
  15. ** works are solely in the form of machine-executable object code generated by
  16. ** a source language processor.
  17. **
  18. ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  19. ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  20. ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
  21. ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
  22. ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
  23. ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  24. ** DEALINGS IN THE SOFTWARE.
  25. ** -LICENSE-END-
  26. */
  27. #ifndef BMD_DECKLINKAPI_H
  28. #define BMD_DECKLINKAPI_H
  29. #ifndef BMD_CONST
  30. #if defined(_MSC_VER)
  31. #define BMD_CONST __declspec(selectany) static const
  32. #else
  33. #define BMD_CONST static const
  34. #endif
  35. #endif
  36. #ifndef BMD_PUBLIC
  37. #define BMD_PUBLIC
  38. #endif
  39. /* DeckLink API */
  40. #include <stdint.h>
  41. #include "LinuxCOM.h"
  42. #include "DeckLinkAPITypes.h"
  43. #include "DeckLinkAPIModes.h"
  44. #include "DeckLinkAPIDiscovery.h"
  45. #include "DeckLinkAPIConfiguration.h"
  46. #include "DeckLinkAPIDeckControl.h"
  47. #define BLACKMAGIC_DECKLINK_API_MAGIC 1
  48. // Type Declarations
  49. // Interface ID Declarations
  50. BMD_CONST REFIID IID_IDeckLinkVideoOutputCallback = /* 20AA5225-1958-47CB-820B-80A8D521A6EE */ { 0x20,0xAA,0x52,0x25,0x19,0x58,0x47,0xCB,0x82,0x0B,0x80,0xA8,0xD5,0x21,0xA6,0xEE };
  51. BMD_CONST REFIID IID_IDeckLinkInputCallback = /* C6FCE4C9-C4E4-4047-82FB-5D238232A902 */ { 0xC6,0xFC,0xE4,0xC9,0xC4,0xE4,0x40,0x47,0x82,0xFB,0x5D,0x23,0x82,0x32,0xA9,0x02 };
  52. BMD_CONST REFIID IID_IDeckLinkEncoderInputCallback = /* ACF13E61-F4A0-4974-A6A7-59AFF6268B31 */ { 0xAC,0xF1,0x3E,0x61,0xF4,0xA0,0x49,0x74,0xA6,0xA7,0x59,0xAF,0xF6,0x26,0x8B,0x31 };
  53. BMD_CONST REFIID IID_IDeckLinkMemoryAllocator = /* B36EB6E7-9D29-4AA8-92EF-843B87A289E8 */ { 0xB3,0x6E,0xB6,0xE7,0x9D,0x29,0x4A,0xA8,0x92,0xEF,0x84,0x3B,0x87,0xA2,0x89,0xE8 };
  54. BMD_CONST REFIID IID_IDeckLinkAudioOutputCallback = /* 403C681B-7F46-4A12-B993-2BB127084EE6 */ { 0x40,0x3C,0x68,0x1B,0x7F,0x46,0x4A,0x12,0xB9,0x93,0x2B,0xB1,0x27,0x08,0x4E,0xE6 };
  55. BMD_CONST REFIID IID_IDeckLinkIterator = /* 50FB36CD-3063-4B73-BDBB-958087F2D8BA */ { 0x50,0xFB,0x36,0xCD,0x30,0x63,0x4B,0x73,0xBD,0xBB,0x95,0x80,0x87,0xF2,0xD8,0xBA };
  56. BMD_CONST REFIID IID_IDeckLinkAPIInformation = /* 7BEA3C68-730D-4322-AF34-8A7152B532A4 */ { 0x7B,0xEA,0x3C,0x68,0x73,0x0D,0x43,0x22,0xAF,0x34,0x8A,0x71,0x52,0xB5,0x32,0xA4 };
  57. BMD_CONST REFIID IID_IDeckLinkOutput = /* BE2D9020-461E-442F-84B7-E949CB953B9D */ { 0xBE,0x2D,0x90,0x20,0x46,0x1E,0x44,0x2F,0x84,0xB7,0xE9,0x49,0xCB,0x95,0x3B,0x9D };
  58. BMD_CONST REFIID IID_IDeckLinkInput = /* C21CDB6E-F414-46E4-A636-80A566E0ED37 */ { 0xC2,0x1C,0xDB,0x6E,0xF4,0x14,0x46,0xE4,0xA6,0x36,0x80,0xA5,0x66,0xE0,0xED,0x37 };
  59. 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 };
  60. BMD_CONST REFIID IID_IDeckLinkEncoderInput = /* F222551D-13DF-4FD8-B587-9D4F19EC12C9 */ { 0xF2,0x22,0x55,0x1D,0x13,0xDF,0x4F,0xD8,0xB5,0x87,0x9D,0x4F,0x19,0xEC,0x12,0xC9 };
  61. 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 };
  62. 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 };
  63. 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 };
  64. BMD_CONST REFIID IID_IDeckLinkVideoFrameMetadataExtensions = /* E232A5B7-4DB4-44C9-9152-F47C12E5F051 */ { 0xE2,0x32,0xA5,0xB7,0x4D,0xB4,0x44,0xC9,0x91,0x52,0xF4,0x7C,0x12,0xE5,0xF0,0x51 };
  65. 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 };
  66. 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 };
  67. 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 };
  68. 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 };
  69. 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 };
  70. 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 };
  71. 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 };
  72. 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 };
  73. 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 };
  74. 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 };
  75. 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 };
  76. 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 };
  77. 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 };
  78. BMD_CONST REFIID IID_IDeckLinkNotification = /* B85DF4C8-BDF5-47C1-8064-28162EBDD4EB */ { 0xB8,0x5D,0xF4,0xC8,0xBD,0xF5,0x47,0xC1,0x80,0x64,0x28,0x16,0x2E,0xBD,0xD4,0xEB };
  79. BMD_CONST REFIID IID_IDeckLinkProfileAttributes = /* 17D4BF8E-4911-473A-80A0-731CF6FF345B */ { 0x17,0xD4,0xBF,0x8E,0x49,0x11,0x47,0x3A,0x80,0xA0,0x73,0x1C,0xF6,0xFF,0x34,0x5B };
  80. BMD_CONST REFIID IID_IDeckLinkProfileIterator = /* 29E5A8C0-8BE4-46EB-93AC-31DAAB5B7BF2 */ { 0x29,0xE5,0xA8,0xC0,0x8B,0xE4,0x46,0xEB,0x93,0xAC,0x31,0xDA,0xAB,0x5B,0x7B,0xF2 };
  81. BMD_CONST REFIID IID_IDeckLinkProfile = /* 16093466-674A-432B-9DA0-1AC2C5A8241C */ { 0x16,0x09,0x34,0x66,0x67,0x4A,0x43,0x2B,0x9D,0xA0,0x1A,0xC2,0xC5,0xA8,0x24,0x1C };
  82. BMD_CONST REFIID IID_IDeckLinkProfileCallback = /* A4F9341E-97AA-4E04-8935-15F809898CEA */ { 0xA4,0xF9,0x34,0x1E,0x97,0xAA,0x4E,0x04,0x89,0x35,0x15,0xF8,0x09,0x89,0x8C,0xEA };
  83. BMD_CONST REFIID IID_IDeckLinkProfileManager = /* 30D41429-3998-4B6D-84F8-78C94A797C6E */ { 0x30,0xD4,0x14,0x29,0x39,0x98,0x4B,0x6D,0x84,0xF8,0x78,0xC9,0x4A,0x79,0x7C,0x6E };
  84. 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 };
  85. 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 };
  86. 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 };
  87. 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 };
  88. 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 };
  89. /* Enum BMDVideoOutputFlags - Flags to control the output of ancillary data along with video. */
  90. typedef uint32_t BMDVideoOutputFlags;
  91. enum _BMDVideoOutputFlags {
  92. bmdVideoOutputFlagDefault = 0,
  93. bmdVideoOutputVANC = 1 << 0,
  94. bmdVideoOutputVITC = 1 << 1,
  95. bmdVideoOutputRP188 = 1 << 2,
  96. bmdVideoOutputDualStream3D = 1 << 4,
  97. bmdVideoOutputSynchronizeToPlaybackGroup = 1 << 6
  98. };
  99. /* Enum BMDSupportedVideoModeFlags - Flags to describe supported video modes */
  100. typedef uint32_t BMDSupportedVideoModeFlags;
  101. enum _BMDSupportedVideoModeFlags {
  102. bmdSupportedVideoModeDefault = 0,
  103. bmdSupportedVideoModeKeying = 1 << 0,
  104. bmdSupportedVideoModeDualStream3D = 1 << 1,
  105. bmdSupportedVideoModeSDISingleLink = 1 << 2,
  106. bmdSupportedVideoModeSDIDualLink = 1 << 3,
  107. bmdSupportedVideoModeSDIQuadLink = 1 << 4,
  108. bmdSupportedVideoModeInAnyProfile = 1 << 5
  109. };
  110. /* Enum BMDPacketType - Type of packet */
  111. typedef uint32_t BMDPacketType;
  112. enum _BMDPacketType {
  113. bmdPacketTypeStreamInterruptedMarker = /* 'sint' */ 0x73696E74, // A packet of this type marks the time when a video stream was interrupted, for example by a disconnected cable
  114. bmdPacketTypeStreamData = /* 'sdat' */ 0x73646174 // Regular stream data
  115. };
  116. /* Enum BMDFrameFlags - Frame flags */
  117. typedef uint32_t BMDFrameFlags;
  118. enum _BMDFrameFlags {
  119. bmdFrameFlagDefault = 0,
  120. bmdFrameFlagFlipVertical = 1 << 0,
  121. bmdFrameContainsHDRMetadata = 1 << 1,
  122. /* Flags that are applicable only to instances of IDeckLinkVideoInputFrame */
  123. bmdFrameCapturedAsPsF = 1 << 30,
  124. bmdFrameHasNoInputSource = 1 << 31
  125. };
  126. /* Enum BMDVideoInputFlags - Flags applicable to video input */
  127. typedef uint32_t BMDVideoInputFlags;
  128. enum _BMDVideoInputFlags {
  129. bmdVideoInputFlagDefault = 0,
  130. bmdVideoInputEnableFormatDetection = 1 << 0,
  131. bmdVideoInputDualStream3D = 1 << 1,
  132. bmdVideoInputSynchronizeToCaptureGroup = 1 << 2
  133. };
  134. /* Enum BMDVideoInputFormatChangedEvents - Bitmask passed to the VideoInputFormatChanged notification to identify the properties of the input signal that have changed */
  135. typedef uint32_t BMDVideoInputFormatChangedEvents;
  136. enum _BMDVideoInputFormatChangedEvents {
  137. bmdVideoInputDisplayModeChanged = 1 << 0,
  138. bmdVideoInputFieldDominanceChanged = 1 << 1,
  139. bmdVideoInputColorspaceChanged = 1 << 2
  140. };
  141. /* Enum BMDDetectedVideoInputFormatFlags - Flags passed to the VideoInputFormatChanged notification to describe the detected video input signal */
  142. typedef uint32_t BMDDetectedVideoInputFormatFlags;
  143. enum _BMDDetectedVideoInputFormatFlags {
  144. bmdDetectedVideoInputYCbCr422 = 1 << 0,
  145. bmdDetectedVideoInputRGB444 = 1 << 1,
  146. bmdDetectedVideoInputDualStream3D = 1 << 2,
  147. bmdDetectedVideoInput12BitDepth = 1 << 3,
  148. bmdDetectedVideoInput10BitDepth = 1 << 4,
  149. bmdDetectedVideoInput8BitDepth = 1 << 5
  150. };
  151. /* Enum BMDDeckLinkCapturePassthroughMode - Enumerates whether the video output is electrically connected to the video input or if the clean switching mode is enabled */
  152. typedef uint32_t BMDDeckLinkCapturePassthroughMode;
  153. enum _BMDDeckLinkCapturePassthroughMode {
  154. bmdDeckLinkCapturePassthroughModeDisabled = /* 'pdis' */ 0x70646973,
  155. bmdDeckLinkCapturePassthroughModeDirect = /* 'pdir' */ 0x70646972,
  156. bmdDeckLinkCapturePassthroughModeCleanSwitch = /* 'pcln' */ 0x70636C6E
  157. };
  158. /* Enum BMDOutputFrameCompletionResult - Frame Completion Callback */
  159. typedef uint32_t BMDOutputFrameCompletionResult;
  160. enum _BMDOutputFrameCompletionResult {
  161. bmdOutputFrameCompleted,
  162. bmdOutputFrameDisplayedLate,
  163. bmdOutputFrameDropped,
  164. bmdOutputFrameFlushed
  165. };
  166. /* Enum BMDReferenceStatus - GenLock input status */
  167. typedef uint32_t BMDReferenceStatus;
  168. enum _BMDReferenceStatus {
  169. bmdReferenceNotSupportedByHardware = 1 << 0,
  170. bmdReferenceLocked = 1 << 1
  171. };
  172. /* Enum BMDAudioFormat - Audio Format */
  173. typedef uint32_t BMDAudioFormat;
  174. enum _BMDAudioFormat {
  175. bmdAudioFormatPCM = /* 'lpcm' */ 0x6C70636D // Linear signed PCM samples
  176. };
  177. /* Enum BMDAudioSampleRate - Audio sample rates supported for output/input */
  178. typedef uint32_t BMDAudioSampleRate;
  179. enum _BMDAudioSampleRate {
  180. bmdAudioSampleRate48kHz = 48000
  181. };
  182. /* Enum BMDAudioSampleType - Audio sample sizes supported for output/input */
  183. typedef uint32_t BMDAudioSampleType;
  184. enum _BMDAudioSampleType {
  185. bmdAudioSampleType16bitInteger = 16,
  186. bmdAudioSampleType32bitInteger = 32
  187. };
  188. /* Enum BMDAudioOutputStreamType - Audio output stream type */
  189. typedef uint32_t BMDAudioOutputStreamType;
  190. enum _BMDAudioOutputStreamType {
  191. bmdAudioOutputStreamContinuous,
  192. bmdAudioOutputStreamContinuousDontResample,
  193. bmdAudioOutputStreamTimestamped
  194. };
  195. /* Enum BMDAncillaryPacketFormat - Ancillary packet format */
  196. typedef uint32_t BMDAncillaryPacketFormat;
  197. enum _BMDAncillaryPacketFormat {
  198. bmdAncillaryPacketFormatUInt8 = /* 'ui08' */ 0x75693038,
  199. bmdAncillaryPacketFormatUInt16 = /* 'ui16' */ 0x75693136,
  200. bmdAncillaryPacketFormatYCbCr10 = /* 'v210' */ 0x76323130
  201. };
  202. /* Enum BMDTimecodeFormat - Timecode formats for frame metadata */
  203. typedef uint32_t BMDTimecodeFormat;
  204. enum _BMDTimecodeFormat {
  205. bmdTimecodeRP188VITC1 = /* 'rpv1' */ 0x72707631, // RP188 timecode where DBB1 equals VITC1 (line 9)
  206. bmdTimecodeRP188VITC2 = /* 'rp12' */ 0x72703132, // RP188 timecode where DBB1 equals VITC2 (line 9 for progressive or line 571 for interlaced/PsF)
  207. bmdTimecodeRP188LTC = /* 'rplt' */ 0x72706C74, // RP188 timecode where DBB1 equals LTC (line 10)
  208. bmdTimecodeRP188HighFrameRate = /* 'rphr' */ 0x72706872, // RP188 timecode where DBB1 is an HFRTC (SMPTE ST 12-3), the only timecode allowing the frame value to go above 30
  209. bmdTimecodeRP188Any = /* 'rp18' */ 0x72703138, // Convenience for capture, returning the first valid timecode in {HFRTC (if supported), VITC1, LTC, VITC2}
  210. bmdTimecodeVITC = /* 'vitc' */ 0x76697463,
  211. bmdTimecodeVITCField2 = /* 'vit2' */ 0x76697432,
  212. bmdTimecodeSerial = /* 'seri' */ 0x73657269
  213. };
  214. /* Enum BMDAnalogVideoFlags - Analog video display flags */
  215. typedef uint32_t BMDAnalogVideoFlags;
  216. enum _BMDAnalogVideoFlags {
  217. bmdAnalogVideoFlagCompositeSetup75 = 1 << 0,
  218. bmdAnalogVideoFlagComponentBetacamLevels = 1 << 1
  219. };
  220. /* Enum BMDAudioOutputAnalogAESSwitch - Audio output Analog/AESEBU switch */
  221. typedef uint32_t BMDAudioOutputAnalogAESSwitch;
  222. enum _BMDAudioOutputAnalogAESSwitch {
  223. bmdAudioOutputSwitchAESEBU = /* 'aes ' */ 0x61657320,
  224. bmdAudioOutputSwitchAnalog = /* 'anlg' */ 0x616E6C67
  225. };
  226. /* Enum BMDVideoOutputConversionMode - Video/audio conversion mode */
  227. typedef uint32_t BMDVideoOutputConversionMode;
  228. enum _BMDVideoOutputConversionMode {
  229. bmdNoVideoOutputConversion = /* 'none' */ 0x6E6F6E65,
  230. bmdVideoOutputLetterboxDownconversion = /* 'ltbx' */ 0x6C746278,
  231. bmdVideoOutputAnamorphicDownconversion = /* 'amph' */ 0x616D7068,
  232. bmdVideoOutputHD720toHD1080Conversion = /* '720c' */ 0x37323063,
  233. bmdVideoOutputHardwareLetterboxDownconversion = /* 'HWlb' */ 0x48576C62,
  234. bmdVideoOutputHardwareAnamorphicDownconversion = /* 'HWam' */ 0x4857616D,
  235. bmdVideoOutputHardwareCenterCutDownconversion = /* 'HWcc' */ 0x48576363,
  236. bmdVideoOutputHardware720p1080pCrossconversion = /* 'xcap' */ 0x78636170,
  237. bmdVideoOutputHardwareAnamorphic720pUpconversion = /* 'ua7p' */ 0x75613770,
  238. bmdVideoOutputHardwareAnamorphic1080iUpconversion = /* 'ua1i' */ 0x75613169,
  239. bmdVideoOutputHardwareAnamorphic149To720pUpconversion = /* 'u47p' */ 0x75343770,
  240. bmdVideoOutputHardwareAnamorphic149To1080iUpconversion = /* 'u41i' */ 0x75343169,
  241. bmdVideoOutputHardwarePillarbox720pUpconversion = /* 'up7p' */ 0x75703770,
  242. bmdVideoOutputHardwarePillarbox1080iUpconversion = /* 'up1i' */ 0x75703169
  243. };
  244. /* Enum BMDVideoInputConversionMode - Video input conversion mode */
  245. typedef uint32_t BMDVideoInputConversionMode;
  246. enum _BMDVideoInputConversionMode {
  247. bmdNoVideoInputConversion = /* 'none' */ 0x6E6F6E65,
  248. bmdVideoInputLetterboxDownconversionFromHD1080 = /* '10lb' */ 0x31306C62,
  249. bmdVideoInputAnamorphicDownconversionFromHD1080 = /* '10am' */ 0x3130616D,
  250. bmdVideoInputLetterboxDownconversionFromHD720 = /* '72lb' */ 0x37326C62,
  251. bmdVideoInputAnamorphicDownconversionFromHD720 = /* '72am' */ 0x3732616D,
  252. bmdVideoInputLetterboxUpconversion = /* 'lbup' */ 0x6C627570,
  253. bmdVideoInputAnamorphicUpconversion = /* 'amup' */ 0x616D7570
  254. };
  255. /* Enum BMDVideo3DPackingFormat - Video 3D packing format */
  256. typedef uint32_t BMDVideo3DPackingFormat;
  257. enum _BMDVideo3DPackingFormat {
  258. bmdVideo3DPackingSidebySideHalf = /* 'sbsh' */ 0x73627368,
  259. bmdVideo3DPackingLinebyLine = /* 'lbyl' */ 0x6C62796C,
  260. bmdVideo3DPackingTopAndBottom = /* 'tabo' */ 0x7461626F,
  261. bmdVideo3DPackingFramePacking = /* 'frpk' */ 0x6672706B,
  262. bmdVideo3DPackingLeftOnly = /* 'left' */ 0x6C656674,
  263. bmdVideo3DPackingRightOnly = /* 'righ' */ 0x72696768
  264. };
  265. /* Enum BMDIdleVideoOutputOperation - Video output operation when not playing video */
  266. typedef uint32_t BMDIdleVideoOutputOperation;
  267. enum _BMDIdleVideoOutputOperation {
  268. bmdIdleVideoOutputBlack = /* 'blac' */ 0x626C6163,
  269. bmdIdleVideoOutputLastFrame = /* 'lafa' */ 0x6C616661
  270. };
  271. /* Enum BMDVideoEncoderFrameCodingMode - Video frame coding mode */
  272. typedef uint32_t BMDVideoEncoderFrameCodingMode;
  273. enum _BMDVideoEncoderFrameCodingMode {
  274. bmdVideoEncoderFrameCodingModeInter = /* 'inte' */ 0x696E7465,
  275. bmdVideoEncoderFrameCodingModeIntra = /* 'intr' */ 0x696E7472
  276. };
  277. /* Enum BMDDNxHRLevel - DNxHR Levels */
  278. typedef uint32_t BMDDNxHRLevel;
  279. enum _BMDDNxHRLevel {
  280. bmdDNxHRLevelSQ = /* 'dnsq' */ 0x646E7371,
  281. bmdDNxHRLevelLB = /* 'dnlb' */ 0x646E6C62,
  282. bmdDNxHRLevelHQ = /* 'dnhq' */ 0x646E6871,
  283. bmdDNxHRLevelHQX = /* 'dhqx' */ 0x64687178,
  284. bmdDNxHRLevel444 = /* 'd444' */ 0x64343434
  285. };
  286. /* Enum BMDLinkConfiguration - Video link configuration */
  287. typedef uint32_t BMDLinkConfiguration;
  288. enum _BMDLinkConfiguration {
  289. bmdLinkConfigurationSingleLink = /* 'lcsl' */ 0x6C63736C,
  290. bmdLinkConfigurationDualLink = /* 'lcdl' */ 0x6C63646C,
  291. bmdLinkConfigurationQuadLink = /* 'lcql' */ 0x6C63716C
  292. };
  293. /* Enum BMDDeviceInterface - Device interface type */
  294. typedef uint32_t BMDDeviceInterface;
  295. enum _BMDDeviceInterface {
  296. bmdDeviceInterfacePCI = /* 'pci ' */ 0x70636920,
  297. bmdDeviceInterfaceUSB = /* 'usb ' */ 0x75736220,
  298. bmdDeviceInterfaceThunderbolt = /* 'thun' */ 0x7468756E
  299. };
  300. /* Enum BMDColorspace - Colorspace */
  301. typedef uint32_t BMDColorspace;
  302. enum _BMDColorspace {
  303. bmdColorspaceRec601 = /* 'r601' */ 0x72363031,
  304. bmdColorspaceRec709 = /* 'r709' */ 0x72373039,
  305. bmdColorspaceRec2020 = /* '2020' */ 0x32303230
  306. };
  307. /* Enum BMDDynamicRange - SDR or HDR */
  308. typedef uint32_t BMDDynamicRange;
  309. enum _BMDDynamicRange {
  310. bmdDynamicRangeSDR = 0, // Standard Dynamic Range in accordance with SMPTE ST 2036-1
  311. bmdDynamicRangeHDRStaticPQ = 1 << 29, // High Dynamic Range PQ in accordance with SMPTE ST 2084
  312. bmdDynamicRangeHDRStaticHLG = 1 << 30 // High Dynamic Range HLG in accordance with ITU-R BT.2100-0
  313. };
  314. /* Enum BMDDeckLinkHDMIInputEDIDID - DeckLink HDMI Input EDID ID */
  315. typedef uint32_t BMDDeckLinkHDMIInputEDIDID;
  316. enum _BMDDeckLinkHDMIInputEDIDID {
  317. /* Integers */
  318. bmdDeckLinkHDMIInputEDIDDynamicRange = /* 'HIDy' */ 0x48494479 // Parameter is of type BMDDynamicRange. Default is (bmdDynamicRangeSDR|bmdDynamicRangeHDRStaticPQ)
  319. };
  320. /* Enum BMDDeckLinkFrameMetadataID - DeckLink Frame Metadata ID */
  321. typedef uint32_t BMDDeckLinkFrameMetadataID;
  322. enum _BMDDeckLinkFrameMetadataID {
  323. /* Colorspace Metadata - Integers */
  324. bmdDeckLinkFrameMetadataColorspace = /* 'cspc' */ 0x63737063, // Colorspace of video frame (see BMDColorspace)
  325. /* HDR Metadata - Integers */
  326. bmdDeckLinkFrameMetadataHDRElectroOpticalTransferFunc = /* 'eotf' */ 0x656F7466, // EOTF in range 0-7 as per CEA 861.3
  327. /* HDR Metadata - Floats */
  328. bmdDeckLinkFrameMetadataHDRDisplayPrimariesRedX = /* 'hdrx' */ 0x68647278, // Red display primaries in range 0.0 - 1.0
  329. bmdDeckLinkFrameMetadataHDRDisplayPrimariesRedY = /* 'hdry' */ 0x68647279, // Red display primaries in range 0.0 - 1.0
  330. bmdDeckLinkFrameMetadataHDRDisplayPrimariesGreenX = /* 'hdgx' */ 0x68646778, // Green display primaries in range 0.0 - 1.0
  331. bmdDeckLinkFrameMetadataHDRDisplayPrimariesGreenY = /* 'hdgy' */ 0x68646779, // Green display primaries in range 0.0 - 1.0
  332. bmdDeckLinkFrameMetadataHDRDisplayPrimariesBlueX = /* 'hdbx' */ 0x68646278, // Blue display primaries in range 0.0 - 1.0
  333. bmdDeckLinkFrameMetadataHDRDisplayPrimariesBlueY = /* 'hdby' */ 0x68646279, // Blue display primaries in range 0.0 - 1.0
  334. bmdDeckLinkFrameMetadataHDRWhitePointX = /* 'hdwx' */ 0x68647778, // White point in range 0.0 - 1.0
  335. bmdDeckLinkFrameMetadataHDRWhitePointY = /* 'hdwy' */ 0x68647779, // White point in range 0.0 - 1.0
  336. bmdDeckLinkFrameMetadataHDRMaxDisplayMasteringLuminance = /* 'hdml' */ 0x68646D6C, // Max display mastering luminance in range 1 cd/m2 - 65535 cd/m2
  337. bmdDeckLinkFrameMetadataHDRMinDisplayMasteringLuminance = /* 'hmil' */ 0x686D696C, // Min display mastering luminance in range 0.0001 cd/m2 - 6.5535 cd/m2
  338. bmdDeckLinkFrameMetadataHDRMaximumContentLightLevel = /* 'mcll' */ 0x6D636C6C, // Maximum Content Light Level in range 1 cd/m2 - 65535 cd/m2
  339. bmdDeckLinkFrameMetadataHDRMaximumFrameAverageLightLevel = /* 'fall' */ 0x66616C6C // Maximum Frame Average Light Level in range 1 cd/m2 - 65535 cd/m2
  340. };
  341. /* Enum BMDProfileID - Identifies a profile */
  342. typedef uint32_t BMDProfileID;
  343. enum _BMDProfileID {
  344. bmdProfileOneSubDeviceFullDuplex = /* '1dfd' */ 0x31646664,
  345. bmdProfileOneSubDeviceHalfDuplex = /* '1dhd' */ 0x31646864,
  346. bmdProfileTwoSubDevicesFullDuplex = /* '2dfd' */ 0x32646664,
  347. bmdProfileTwoSubDevicesHalfDuplex = /* '2dhd' */ 0x32646864,
  348. bmdProfileFourSubDevicesHalfDuplex = /* '4dhd' */ 0x34646864
  349. };
  350. /* Enum BMDHDMITimecodePacking - Packing form of timecode on HDMI */
  351. typedef uint32_t BMDHDMITimecodePacking;
  352. enum _BMDHDMITimecodePacking {
  353. bmdHDMITimecodePackingIEEEOUI000085 = 0x00008500,
  354. bmdHDMITimecodePackingIEEEOUI080046 = 0x08004601,
  355. bmdHDMITimecodePackingIEEEOUI5CF9F0 = 0x5CF9F003
  356. };
  357. /* Enum BMDInternalKeyingAncillaryDataSource - Source for VANC and timecode data when performing internal keying */
  358. typedef uint32_t BMDInternalKeyingAncillaryDataSource;
  359. enum _BMDInternalKeyingAncillaryDataSource {
  360. bmdInternalKeyingUsesAncillaryDataFromInputSignal = /* 'ikai' */ 0x696B6169,
  361. bmdInternalKeyingUsesAncillaryDataFromKeyFrame = /* 'ikak' */ 0x696B616B
  362. };
  363. /* Enum BMDDeckLinkAttributeID - DeckLink Attribute ID */
  364. typedef uint32_t BMDDeckLinkAttributeID;
  365. enum _BMDDeckLinkAttributeID {
  366. /* Flags */
  367. BMDDeckLinkSupportsInternalKeying = /* 'keyi' */ 0x6B657969,
  368. BMDDeckLinkSupportsExternalKeying = /* 'keye' */ 0x6B657965,
  369. BMDDeckLinkSupportsInputFormatDetection = /* 'infd' */ 0x696E6664,
  370. BMDDeckLinkHasReferenceInput = /* 'hrin' */ 0x6872696E,
  371. BMDDeckLinkHasSerialPort = /* 'hspt' */ 0x68737074,
  372. BMDDeckLinkHasAnalogVideoOutputGain = /* 'avog' */ 0x61766F67,
  373. BMDDeckLinkCanOnlyAdjustOverallVideoOutputGain = /* 'ovog' */ 0x6F766F67,
  374. BMDDeckLinkHasVideoInputAntiAliasingFilter = /* 'aafl' */ 0x6161666C,
  375. BMDDeckLinkHasBypass = /* 'byps' */ 0x62797073,
  376. BMDDeckLinkSupportsClockTimingAdjustment = /* 'ctad' */ 0x63746164,
  377. BMDDeckLinkSupportsFullFrameReferenceInputTimingOffset = /* 'frin' */ 0x6672696E,
  378. BMDDeckLinkSupportsSMPTELevelAOutput = /* 'lvla' */ 0x6C766C61,
  379. BMDDeckLinkSupportsAutoSwitchingPPsFOnInput = /* 'apsf' */ 0x61707366,
  380. BMDDeckLinkSupportsDualLinkSDI = /* 'sdls' */ 0x73646C73,
  381. BMDDeckLinkSupportsQuadLinkSDI = /* 'sqls' */ 0x73716C73,
  382. BMDDeckLinkSupportsIdleOutput = /* 'idou' */ 0x69646F75,
  383. BMDDeckLinkVANCRequires10BitYUVVideoFrames = /* 'vioY' */ 0x76696F59, // Legacy product requires v210 active picture for IDeckLinkVideoFrameAncillaryPackets or 10-bit VANC
  384. BMDDeckLinkHasLTCTimecodeInput = /* 'hltc' */ 0x686C7463,
  385. BMDDeckLinkSupportsHDRMetadata = /* 'hdrm' */ 0x6864726D,
  386. BMDDeckLinkSupportsColorspaceMetadata = /* 'cmet' */ 0x636D6574,
  387. BMDDeckLinkSupportsHDMITimecode = /* 'htim' */ 0x6874696D,
  388. BMDDeckLinkSupportsHighFrameRateTimecode = /* 'HFRT' */ 0x48465254,
  389. BMDDeckLinkSupportsSynchronizeToCaptureGroup = /* 'stcg' */ 0x73746367,
  390. BMDDeckLinkSupportsSynchronizeToPlaybackGroup = /* 'stpg' */ 0x73747067,
  391. /* Integers */
  392. BMDDeckLinkMaximumAudioChannels = /* 'mach' */ 0x6D616368,
  393. BMDDeckLinkMaximumAnalogAudioInputChannels = /* 'iach' */ 0x69616368,
  394. BMDDeckLinkMaximumAnalogAudioOutputChannels = /* 'aach' */ 0x61616368,
  395. BMDDeckLinkNumberOfSubDevices = /* 'nsbd' */ 0x6E736264,
  396. BMDDeckLinkSubDeviceIndex = /* 'subi' */ 0x73756269,
  397. BMDDeckLinkPersistentID = /* 'peid' */ 0x70656964,
  398. BMDDeckLinkDeviceGroupID = /* 'dgid' */ 0x64676964,
  399. BMDDeckLinkTopologicalID = /* 'toid' */ 0x746F6964,
  400. BMDDeckLinkVideoOutputConnections = /* 'vocn' */ 0x766F636E, // Returns a BMDVideoConnection bit field
  401. BMDDeckLinkVideoInputConnections = /* 'vicn' */ 0x7669636E, // Returns a BMDVideoConnection bit field
  402. BMDDeckLinkAudioOutputConnections = /* 'aocn' */ 0x616F636E, // Returns a BMDAudioConnection bit field
  403. BMDDeckLinkAudioInputConnections = /* 'aicn' */ 0x6169636E, // Returns a BMDAudioConnection bit field
  404. BMDDeckLinkVideoIOSupport = /* 'vios' */ 0x76696F73, // Returns a BMDVideoIOSupport bit field
  405. BMDDeckLinkDeckControlConnections = /* 'dccn' */ 0x6463636E, // Returns a BMDDeckControlConnection bit field
  406. BMDDeckLinkDeviceInterface = /* 'dbus' */ 0x64627573, // Returns a BMDDeviceInterface
  407. BMDDeckLinkAudioInputRCAChannelCount = /* 'airc' */ 0x61697263,
  408. BMDDeckLinkAudioInputXLRChannelCount = /* 'aixc' */ 0x61697863,
  409. BMDDeckLinkAudioOutputRCAChannelCount = /* 'aorc' */ 0x616F7263,
  410. BMDDeckLinkAudioOutputXLRChannelCount = /* 'aoxc' */ 0x616F7863,
  411. BMDDeckLinkProfileID = /* 'prid' */ 0x70726964, // Returns a BMDProfileID
  412. BMDDeckLinkDuplex = /* 'dupx' */ 0x64757078,
  413. BMDDeckLinkMinimumPrerollFrames = /* 'mprf' */ 0x6D707266,
  414. BMDDeckLinkSupportedDynamicRange = /* 'sudr' */ 0x73756472,
  415. /* Floats */
  416. BMDDeckLinkVideoInputGainMinimum = /* 'vigm' */ 0x7669676D,
  417. BMDDeckLinkVideoInputGainMaximum = /* 'vigx' */ 0x76696778,
  418. BMDDeckLinkVideoOutputGainMinimum = /* 'vogm' */ 0x766F676D,
  419. BMDDeckLinkVideoOutputGainMaximum = /* 'vogx' */ 0x766F6778,
  420. BMDDeckLinkMicrophoneInputGainMinimum = /* 'migm' */ 0x6D69676D,
  421. BMDDeckLinkMicrophoneInputGainMaximum = /* 'migx' */ 0x6D696778,
  422. /* Strings */
  423. BMDDeckLinkSerialPortDeviceName = /* 'slpn' */ 0x736C706E,
  424. BMDDeckLinkVendorName = /* 'vndr' */ 0x766E6472,
  425. BMDDeckLinkDisplayName = /* 'dspn' */ 0x6473706E,
  426. BMDDeckLinkModelName = /* 'mdln' */ 0x6D646C6E,
  427. BMDDeckLinkDeviceHandle = /* 'devh' */ 0x64657668
  428. };
  429. /* Enum BMDDeckLinkAPIInformationID - DeckLinkAPI information ID */
  430. typedef uint32_t BMDDeckLinkAPIInformationID;
  431. enum _BMDDeckLinkAPIInformationID {
  432. /* Integer or String */
  433. BMDDeckLinkAPIVersion = /* 'vers' */ 0x76657273
  434. };
  435. /* Enum BMDDeckLinkStatusID - DeckLink Status ID */
  436. typedef uint32_t BMDDeckLinkStatusID;
  437. enum _BMDDeckLinkStatusID {
  438. /* Integers */
  439. bmdDeckLinkStatusDetectedVideoInputMode = /* 'dvim' */ 0x6476696D,
  440. bmdDeckLinkStatusDetectedVideoInputFormatFlags = /* 'dvff' */ 0x64766666,
  441. bmdDeckLinkStatusDetectedVideoInputFieldDominance = /* 'dvfd' */ 0x64766664,
  442. bmdDeckLinkStatusDetectedVideoInputColorspace = /* 'dscl' */ 0x6473636C,
  443. bmdDeckLinkStatusDetectedVideoInputDynamicRange = /* 'dsdr' */ 0x64736472,
  444. bmdDeckLinkStatusDetectedSDILinkConfiguration = /* 'dslc' */ 0x64736C63,
  445. bmdDeckLinkStatusCurrentVideoInputMode = /* 'cvim' */ 0x6376696D,
  446. bmdDeckLinkStatusCurrentVideoInputPixelFormat = /* 'cvip' */ 0x63766970,
  447. bmdDeckLinkStatusCurrentVideoInputFlags = /* 'cvif' */ 0x63766966,
  448. bmdDeckLinkStatusCurrentVideoOutputMode = /* 'cvom' */ 0x63766F6D,
  449. bmdDeckLinkStatusCurrentVideoOutputFlags = /* 'cvof' */ 0x63766F66,
  450. bmdDeckLinkStatusPCIExpressLinkWidth = /* 'pwid' */ 0x70776964,
  451. bmdDeckLinkStatusPCIExpressLinkSpeed = /* 'plnk' */ 0x706C6E6B,
  452. bmdDeckLinkStatusLastVideoOutputPixelFormat = /* 'opix' */ 0x6F706978,
  453. bmdDeckLinkStatusReferenceSignalMode = /* 'refm' */ 0x7265666D,
  454. bmdDeckLinkStatusReferenceSignalFlags = /* 'reff' */ 0x72656666,
  455. bmdDeckLinkStatusBusy = /* 'busy' */ 0x62757379,
  456. bmdDeckLinkStatusInterchangeablePanelType = /* 'icpt' */ 0x69637074,
  457. bmdDeckLinkStatusDeviceTemperature = /* 'dtmp' */ 0x64746D70,
  458. /* Flags */
  459. bmdDeckLinkStatusVideoInputSignalLocked = /* 'visl' */ 0x7669736C,
  460. bmdDeckLinkStatusReferenceSignalLocked = /* 'refl' */ 0x7265666C,
  461. /* Bytes */
  462. bmdDeckLinkStatusReceivedEDID = /* 'edid' */ 0x65646964
  463. };
  464. /* Enum BMDDeckLinkVideoStatusFlags - */
  465. typedef uint32_t BMDDeckLinkVideoStatusFlags;
  466. enum _BMDDeckLinkVideoStatusFlags {
  467. bmdDeckLinkVideoStatusPsF = 1 << 0,
  468. bmdDeckLinkVideoStatusDualStream3D = 1 << 1
  469. };
  470. /* Enum BMDDuplexMode - Duplex of the device */
  471. typedef uint32_t BMDDuplexMode;
  472. enum _BMDDuplexMode {
  473. bmdDuplexFull = /* 'dxfu' */ 0x64786675,
  474. bmdDuplexHalf = /* 'dxha' */ 0x64786861,
  475. bmdDuplexSimplex = /* 'dxsp' */ 0x64787370,
  476. bmdDuplexInactive = /* 'dxin' */ 0x6478696E
  477. };
  478. /* Enum BMDPanelType - The type of interchangeable panel */
  479. typedef uint32_t BMDPanelType;
  480. enum _BMDPanelType {
  481. bmdPanelNotDetected = /* 'npnl' */ 0x6E706E6C,
  482. bmdPanelTeranexMiniSmartPanel = /* 'tmsm' */ 0x746D736D
  483. };
  484. /* Enum BMDDeviceBusyState - Current device busy state */
  485. typedef uint32_t BMDDeviceBusyState;
  486. enum _BMDDeviceBusyState {
  487. bmdDeviceCaptureBusy = 1 << 0,
  488. bmdDevicePlaybackBusy = 1 << 1,
  489. bmdDeviceSerialPortBusy = 1 << 2
  490. };
  491. /* Enum BMDVideoIOSupport - Device video input/output support */
  492. typedef uint32_t BMDVideoIOSupport;
  493. enum _BMDVideoIOSupport {
  494. bmdDeviceSupportsCapture = 1 << 0,
  495. bmdDeviceSupportsPlayback = 1 << 1
  496. };
  497. /* Enum BMD3DPreviewFormat - Linked Frame preview format */
  498. typedef uint32_t BMD3DPreviewFormat;
  499. enum _BMD3DPreviewFormat {
  500. bmd3DPreviewFormatDefault = /* 'defa' */ 0x64656661,
  501. bmd3DPreviewFormatLeftOnly = /* 'left' */ 0x6C656674,
  502. bmd3DPreviewFormatRightOnly = /* 'righ' */ 0x72696768,
  503. bmd3DPreviewFormatSideBySide = /* 'side' */ 0x73696465,
  504. bmd3DPreviewFormatTopBottom = /* 'topb' */ 0x746F7062
  505. };
  506. /* Enum BMDNotifications - Events that can be subscribed through IDeckLinkNotification */
  507. typedef uint32_t BMDNotifications;
  508. enum _BMDNotifications {
  509. bmdPreferencesChanged = /* 'pref' */ 0x70726566,
  510. bmdStatusChanged = /* 'stat' */ 0x73746174
  511. };
  512. #if defined(__cplusplus)
  513. // Forward Declarations
  514. class IDeckLinkVideoOutputCallback;
  515. class IDeckLinkInputCallback;
  516. class IDeckLinkEncoderInputCallback;
  517. class IDeckLinkMemoryAllocator;
  518. class IDeckLinkAudioOutputCallback;
  519. class IDeckLinkIterator;
  520. class IDeckLinkAPIInformation;
  521. class IDeckLinkOutput;
  522. class IDeckLinkInput;
  523. class IDeckLinkHDMIInputEDID;
  524. class IDeckLinkEncoderInput;
  525. class IDeckLinkVideoFrame;
  526. class IDeckLinkMutableVideoFrame;
  527. class IDeckLinkVideoFrame3DExtensions;
  528. class IDeckLinkVideoFrameMetadataExtensions;
  529. class IDeckLinkVideoInputFrame;
  530. class IDeckLinkAncillaryPacket;
  531. class IDeckLinkAncillaryPacketIterator;
  532. class IDeckLinkVideoFrameAncillaryPackets;
  533. class IDeckLinkVideoFrameAncillary;
  534. class IDeckLinkEncoderPacket;
  535. class IDeckLinkEncoderVideoPacket;
  536. class IDeckLinkEncoderAudioPacket;
  537. class IDeckLinkH265NALPacket;
  538. class IDeckLinkAudioInputPacket;
  539. class IDeckLinkScreenPreviewCallback;
  540. class IDeckLinkGLScreenPreviewHelper;
  541. class IDeckLinkNotificationCallback;
  542. class IDeckLinkNotification;
  543. class IDeckLinkProfileAttributes;
  544. class IDeckLinkProfileIterator;
  545. class IDeckLinkProfile;
  546. class IDeckLinkProfileCallback;
  547. class IDeckLinkProfileManager;
  548. class IDeckLinkStatus;
  549. class IDeckLinkKeyer;
  550. class IDeckLinkVideoConversion;
  551. class IDeckLinkDeviceNotificationCallback;
  552. class IDeckLinkDiscovery;
  553. /* Interface IDeckLinkVideoOutputCallback - Frame completion callback. */
  554. class BMD_PUBLIC IDeckLinkVideoOutputCallback : public IUnknown
  555. {
  556. public:
  557. virtual HRESULT ScheduledFrameCompleted (/* in */ IDeckLinkVideoFrame* completedFrame, /* in */ BMDOutputFrameCompletionResult result) = 0;
  558. virtual HRESULT ScheduledPlaybackHasStopped (void) = 0;
  559. protected:
  560. virtual ~IDeckLinkVideoOutputCallback () {} // call Release method to drop reference count
  561. };
  562. /* Interface IDeckLinkInputCallback - Frame arrival callback. */
  563. class BMD_PUBLIC IDeckLinkInputCallback : public IUnknown
  564. {
  565. public:
  566. virtual HRESULT VideoInputFormatChanged (/* in */ BMDVideoInputFormatChangedEvents notificationEvents, /* in */ IDeckLinkDisplayMode* newDisplayMode, /* in */ BMDDetectedVideoInputFormatFlags detectedSignalFlags) = 0;
  567. virtual HRESULT VideoInputFrameArrived (/* in */ IDeckLinkVideoInputFrame* videoFrame, /* in */ IDeckLinkAudioInputPacket* audioPacket) = 0;
  568. protected:
  569. virtual ~IDeckLinkInputCallback () {} // call Release method to drop reference count
  570. };
  571. /* Interface IDeckLinkEncoderInputCallback - Frame arrival callback. */
  572. class BMD_PUBLIC IDeckLinkEncoderInputCallback : public IUnknown
  573. {
  574. public:
  575. virtual HRESULT VideoInputSignalChanged (/* in */ BMDVideoInputFormatChangedEvents notificationEvents, /* in */ IDeckLinkDisplayMode* newDisplayMode, /* in */ BMDDetectedVideoInputFormatFlags detectedSignalFlags) = 0;
  576. virtual HRESULT VideoPacketArrived (/* in */ IDeckLinkEncoderVideoPacket* videoPacket) = 0;
  577. virtual HRESULT AudioPacketArrived (/* in */ IDeckLinkEncoderAudioPacket* audioPacket) = 0;
  578. protected:
  579. virtual ~IDeckLinkEncoderInputCallback () {} // call Release method to drop reference count
  580. };
  581. /* Interface IDeckLinkMemoryAllocator - Memory allocator for video frames. */
  582. class BMD_PUBLIC IDeckLinkMemoryAllocator : public IUnknown
  583. {
  584. public:
  585. virtual HRESULT AllocateBuffer (/* in */ uint32_t bufferSize, /* out */ void** allocatedBuffer) = 0;
  586. virtual HRESULT ReleaseBuffer (/* in */ void* buffer) = 0;
  587. virtual HRESULT Commit (void) = 0;
  588. virtual HRESULT Decommit (void) = 0;
  589. };
  590. /* Interface IDeckLinkAudioOutputCallback - Optional callback to allow audio samples to be pulled as required. */
  591. class BMD_PUBLIC IDeckLinkAudioOutputCallback : public IUnknown
  592. {
  593. public:
  594. virtual HRESULT RenderAudioSamples (/* in */ bool preroll) = 0;
  595. };
  596. /* Interface IDeckLinkIterator - Enumerates installed DeckLink hardware */
  597. class BMD_PUBLIC IDeckLinkIterator : public IUnknown
  598. {
  599. public:
  600. virtual HRESULT Next (/* out */ IDeckLink** deckLinkInstance) = 0;
  601. };
  602. /* Interface IDeckLinkAPIInformation - DeckLinkAPI attribute interface */
  603. class BMD_PUBLIC IDeckLinkAPIInformation : public IUnknown
  604. {
  605. public:
  606. virtual HRESULT GetFlag (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ bool* value) = 0;
  607. virtual HRESULT GetInt (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ int64_t* value) = 0;
  608. virtual HRESULT GetFloat (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ double* value) = 0;
  609. virtual HRESULT GetString (/* in */ BMDDeckLinkAPIInformationID cfgID, /* out */ const char** value) = 0;
  610. protected:
  611. virtual ~IDeckLinkAPIInformation () {} // call Release method to drop reference count
  612. };
  613. /* Interface IDeckLinkOutput - Created by QueryInterface from IDeckLink. */
  614. class BMD_PUBLIC IDeckLinkOutput : public IUnknown
  615. {
  616. public:
  617. virtual HRESULT DoesSupportVideoMode (/* in */ BMDVideoConnection connection /* If a value of bmdVideoConnectionUnspecified is specified, the caller does not care about the connection */, /* in */ BMDDisplayMode requestedMode, /* in */ BMDPixelFormat requestedPixelFormat, /* in */ BMDVideoOutputConversionMode conversionMode, /* in */ BMDSupportedVideoModeFlags flags, /* out */ BMDDisplayMode* actualMode, /* out */ bool* supported) = 0;
  618. virtual HRESULT GetDisplayMode (/* in */ BMDDisplayMode displayMode, /* out */ IDeckLinkDisplayMode** resultDisplayMode) = 0;
  619. virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator** iterator) = 0;
  620. virtual HRESULT SetScreenPreviewCallback (/* in */ IDeckLinkScreenPreviewCallback* previewCallback) = 0;
  621. /* Video Output */
  622. virtual HRESULT EnableVideoOutput (/* in */ BMDDisplayMode displayMode, /* in */ BMDVideoOutputFlags flags) = 0;
  623. virtual HRESULT DisableVideoOutput (void) = 0;
  624. virtual HRESULT SetVideoOutputFrameMemoryAllocator (/* in */ IDeckLinkMemoryAllocator* theAllocator) = 0;
  625. 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;
  626. virtual HRESULT CreateAncillaryData (/* in */ BMDPixelFormat pixelFormat, /* out */ IDeckLinkVideoFrameAncillary** outBuffer) = 0; // Use of IDeckLinkVideoFrameAncillaryPackets is preferred
  627. virtual HRESULT DisplayVideoFrameSync (/* in */ IDeckLinkVideoFrame* theFrame) = 0;
  628. virtual HRESULT ScheduleVideoFrame (/* in */ IDeckLinkVideoFrame* theFrame, /* in */ BMDTimeValue displayTime, /* in */ BMDTimeValue displayDuration, /* in */ BMDTimeScale timeScale) = 0;
  629. virtual HRESULT SetScheduledFrameCompletionCallback (/* in */ IDeckLinkVideoOutputCallback* theCallback) = 0;
  630. virtual HRESULT GetBufferedVideoFrameCount (/* out */ uint32_t* bufferedFrameCount) = 0;
  631. /* Audio Output */
  632. virtual HRESULT EnableAudioOutput (/* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount, /* in */ BMDAudioOutputStreamType streamType) = 0;
  633. virtual HRESULT DisableAudioOutput (void) = 0;
  634. virtual HRESULT WriteAudioSamplesSync (/* in */ void* buffer, /* in */ uint32_t sampleFrameCount, /* out */ uint32_t* sampleFramesWritten) = 0;
  635. virtual HRESULT BeginAudioPreroll (void) = 0;
  636. virtual HRESULT EndAudioPreroll (void) = 0;
  637. virtual HRESULT ScheduleAudioSamples (/* in */ void* buffer, /* in */ uint32_t sampleFrameCount, /* in */ BMDTimeValue streamTime, /* in */ BMDTimeScale timeScale, /* out */ uint32_t* sampleFramesWritten) = 0;
  638. virtual HRESULT GetBufferedAudioSampleFrameCount (/* out */ uint32_t* bufferedSampleFrameCount) = 0;
  639. virtual HRESULT FlushBufferedAudioSamples (void) = 0;
  640. virtual HRESULT SetAudioCallback (/* in */ IDeckLinkAudioOutputCallback* theCallback) = 0;
  641. /* Output Control */
  642. virtual HRESULT StartScheduledPlayback (/* in */ BMDTimeValue playbackStartTime, /* in */ BMDTimeScale timeScale, /* in */ double playbackSpeed) = 0;
  643. virtual HRESULT StopScheduledPlayback (/* in */ BMDTimeValue stopPlaybackAtTime, /* out */ BMDTimeValue* actualStopTime, /* in */ BMDTimeScale timeScale) = 0;
  644. virtual HRESULT IsScheduledPlaybackRunning (/* out */ bool* active) = 0;
  645. virtual HRESULT GetScheduledStreamTime (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue* streamTime, /* out */ double* playbackSpeed) = 0;
  646. virtual HRESULT GetReferenceStatus (/* out */ BMDReferenceStatus* referenceStatus) = 0;
  647. /* Hardware Timing */
  648. virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue* hardwareTime, /* out */ BMDTimeValue* timeInFrame, /* out */ BMDTimeValue* ticksPerFrame) = 0;
  649. virtual HRESULT GetFrameCompletionReferenceTimestamp (/* in */ IDeckLinkVideoFrame* theFrame, /* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue* frameCompletionTimestamp) = 0;
  650. protected:
  651. virtual ~IDeckLinkOutput () {} // call Release method to drop reference count
  652. };
  653. /* Interface IDeckLinkInput - Created by QueryInterface from IDeckLink. */
  654. class BMD_PUBLIC IDeckLinkInput : public IUnknown
  655. {
  656. public:
  657. virtual HRESULT DoesSupportVideoMode (/* in */ BMDVideoConnection connection /* If a value of bmdVideoConnectionUnspecified is specified, the caller does not care about the connection */, /* in */ BMDDisplayMode requestedMode, /* in */ BMDPixelFormat requestedPixelFormat, /* in */ BMDVideoInputConversionMode conversionMode, /* in */ BMDSupportedVideoModeFlags flags, /* out */ BMDDisplayMode* actualMode, /* out */ bool* supported) = 0;
  658. virtual HRESULT GetDisplayMode (/* in */ BMDDisplayMode displayMode, /* out */ IDeckLinkDisplayMode** resultDisplayMode) = 0;
  659. virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator** iterator) = 0;
  660. virtual HRESULT SetScreenPreviewCallback (/* in */ IDeckLinkScreenPreviewCallback* previewCallback) = 0;
  661. /* Video Input */
  662. virtual HRESULT EnableVideoInput (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags) = 0;
  663. virtual HRESULT DisableVideoInput (void) = 0;
  664. virtual HRESULT GetAvailableVideoFrameCount (/* out */ uint32_t* availableFrameCount) = 0;
  665. virtual HRESULT SetVideoInputFrameMemoryAllocator (/* in */ IDeckLinkMemoryAllocator* theAllocator) = 0;
  666. /* Audio Input */
  667. virtual HRESULT EnableAudioInput (/* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount) = 0;
  668. virtual HRESULT DisableAudioInput (void) = 0;
  669. virtual HRESULT GetAvailableAudioSampleFrameCount (/* out */ uint32_t* availableSampleFrameCount) = 0;
  670. /* Input Control */
  671. virtual HRESULT StartStreams (void) = 0;
  672. virtual HRESULT StopStreams (void) = 0;
  673. virtual HRESULT PauseStreams (void) = 0;
  674. virtual HRESULT FlushStreams (void) = 0;
  675. virtual HRESULT SetCallback (/* in */ IDeckLinkInputCallback* theCallback) = 0;
  676. /* Hardware Timing */
  677. virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue* hardwareTime, /* out */ BMDTimeValue* timeInFrame, /* out */ BMDTimeValue* ticksPerFrame) = 0;
  678. protected:
  679. virtual ~IDeckLinkInput () {} // call Release method to drop reference count
  680. };
  681. /* Interface IDeckLinkHDMIInputEDID - Created by QueryInterface from IDeckLink. Releasing all references will restore EDID to default */
  682. class BMD_PUBLIC IDeckLinkHDMIInputEDID : public IUnknown
  683. {
  684. public:
  685. virtual HRESULT SetInt (/* in */ BMDDeckLinkHDMIInputEDIDID cfgID, /* in */ int64_t value) = 0;
  686. virtual HRESULT GetInt (/* in */ BMDDeckLinkHDMIInputEDIDID cfgID, /* out */ int64_t* value) = 0;
  687. virtual HRESULT WriteToEDID (void) = 0;
  688. protected:
  689. virtual ~IDeckLinkHDMIInputEDID () {} // call Release method to drop reference count
  690. };
  691. /* Interface IDeckLinkEncoderInput - Created by QueryInterface from IDeckLink. */
  692. class BMD_PUBLIC IDeckLinkEncoderInput : public IUnknown
  693. {
  694. public:
  695. virtual HRESULT DoesSupportVideoMode (/* in */ BMDVideoConnection connection /* If a value of bmdVideoConnectionUnspecified is specified, the caller does not care about the connection */, /* in */ BMDDisplayMode requestedMode, /* in */ BMDPixelFormat requestedCodec, /* in */ uint32_t requestedCodecProfile, /* in */ BMDSupportedVideoModeFlags flags, /* out */ bool* supported) = 0;
  696. virtual HRESULT GetDisplayMode (/* in */ BMDDisplayMode displayMode, /* out */ IDeckLinkDisplayMode** resultDisplayMode) = 0;
  697. virtual HRESULT GetDisplayModeIterator (/* out */ IDeckLinkDisplayModeIterator** iterator) = 0;
  698. /* Video Input */
  699. virtual HRESULT EnableVideoInput (/* in */ BMDDisplayMode displayMode, /* in */ BMDPixelFormat pixelFormat, /* in */ BMDVideoInputFlags flags) = 0;
  700. virtual HRESULT DisableVideoInput (void) = 0;
  701. virtual HRESULT GetAvailablePacketsCount (/* out */ uint32_t* availablePacketsCount) = 0;
  702. virtual HRESULT SetMemoryAllocator (/* in */ IDeckLinkMemoryAllocator* theAllocator) = 0;
  703. /* Audio Input */
  704. virtual HRESULT EnableAudioInput (/* in */ BMDAudioFormat audioFormat, /* in */ BMDAudioSampleRate sampleRate, /* in */ BMDAudioSampleType sampleType, /* in */ uint32_t channelCount) = 0;
  705. virtual HRESULT DisableAudioInput (void) = 0;
  706. virtual HRESULT GetAvailableAudioSampleFrameCount (/* out */ uint32_t* availableSampleFrameCount) = 0;
  707. /* Input Control */
  708. virtual HRESULT StartStreams (void) = 0;
  709. virtual HRESULT StopStreams (void) = 0;
  710. virtual HRESULT PauseStreams (void) = 0;
  711. virtual HRESULT FlushStreams (void) = 0;
  712. virtual HRESULT SetCallback (/* in */ IDeckLinkEncoderInputCallback* theCallback) = 0;
  713. /* Hardware Timing */
  714. virtual HRESULT GetHardwareReferenceClock (/* in */ BMDTimeScale desiredTimeScale, /* out */ BMDTimeValue* hardwareTime, /* out */ BMDTimeValue* timeInFrame, /* out */ BMDTimeValue* ticksPerFrame) = 0;
  715. protected:
  716. virtual ~IDeckLinkEncoderInput () {} // call Release method to drop reference count
  717. };
  718. /* Interface IDeckLinkVideoFrame - Interface to encapsulate a video frame; can be caller-implemented. */
  719. class BMD_PUBLIC IDeckLinkVideoFrame : public IUnknown
  720. {
  721. public:
  722. virtual long GetWidth (void) = 0;
  723. virtual long GetHeight (void) = 0;
  724. virtual long GetRowBytes (void) = 0;
  725. virtual BMDPixelFormat GetPixelFormat (void) = 0;
  726. virtual BMDFrameFlags GetFlags (void) = 0;
  727. virtual HRESULT GetBytes (/* out */ void** buffer) = 0;
  728. virtual HRESULT GetTimecode (/* in */ BMDTimecodeFormat format, /* out */ IDeckLinkTimecode** timecode) = 0;
  729. virtual HRESULT GetAncillaryData (/* out */ IDeckLinkVideoFrameAncillary** ancillary) = 0; // Use of IDeckLinkVideoFrameAncillaryPackets is preferred
  730. protected:
  731. virtual ~IDeckLinkVideoFrame () {} // call Release method to drop reference count
  732. };
  733. /* Interface IDeckLinkMutableVideoFrame - Created by IDeckLinkOutput::CreateVideoFrame. */
  734. class BMD_PUBLIC IDeckLinkMutableVideoFrame : public IDeckLinkVideoFrame
  735. {
  736. public:
  737. virtual HRESULT SetFlags (/* in */ BMDFrameFlags newFlags) = 0;
  738. virtual HRESULT SetTimecode (/* in */ BMDTimecodeFormat format, /* in */ IDeckLinkTimecode* timecode) = 0;
  739. 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;
  740. virtual HRESULT SetAncillaryData (/* in */ IDeckLinkVideoFrameAncillary* ancillary) = 0;
  741. virtual HRESULT SetTimecodeUserBits (/* in */ BMDTimecodeFormat format, /* in */ BMDTimecodeUserBits userBits) = 0;
  742. protected:
  743. virtual ~IDeckLinkMutableVideoFrame () {} // call Release method to drop reference count
  744. };
  745. /* Interface IDeckLinkVideoFrame3DExtensions - Optional interface implemented on IDeckLinkVideoFrame to support 3D frames */
  746. class BMD_PUBLIC IDeckLinkVideoFrame3DExtensions : public IUnknown
  747. {
  748. public:
  749. virtual BMDVideo3DPackingFormat Get3DPackingFormat (void) = 0;
  750. virtual HRESULT GetFrameForRightEye (/* out */ IDeckLinkVideoFrame** rightEyeFrame) = 0;
  751. protected:
  752. virtual ~IDeckLinkVideoFrame3DExtensions () {} // call Release method to drop reference count
  753. };
  754. /* Interface IDeckLinkVideoFrameMetadataExtensions - Optional interface implemented on IDeckLinkVideoFrame to support frame metadata such as HDR information */
  755. class BMD_PUBLIC IDeckLinkVideoFrameMetadataExtensions : public IUnknown
  756. {
  757. public:
  758. virtual HRESULT GetInt (/* in */ BMDDeckLinkFrameMetadataID metadataID, /* out */ int64_t* value) = 0;
  759. virtual HRESULT GetFloat (/* in */ BMDDeckLinkFrameMetadataID metadataID, /* out */ double* value) = 0;
  760. virtual HRESULT GetFlag (/* in */ BMDDeckLinkFrameMetadataID metadataID, /* out */ bool* value) = 0;
  761. virtual HRESULT GetString (/* in */ BMDDeckLinkFrameMetadataID metadataID, /* out */ const char** value) = 0;
  762. virtual HRESULT GetBytes (/* in */ BMDDeckLinkFrameMetadataID metadataID, /* out */ void* buffer /* optional */, /* in, out */ uint32_t* bufferSize) = 0;
  763. protected:
  764. virtual ~IDeckLinkVideoFrameMetadataExtensions () {} // call Release method to drop reference count
  765. };
  766. /* Interface IDeckLinkVideoInputFrame - Provided by the IDeckLinkVideoInput frame arrival callback. */
  767. class BMD_PUBLIC IDeckLinkVideoInputFrame : public IDeckLinkVideoFrame
  768. {
  769. public:
  770. virtual HRESULT GetStreamTime (/* out */ BMDTimeValue* frameTime, /* out */ BMDTimeValue* frameDuration, /* in */ BMDTimeScale timeScale) = 0;
  771. virtual HRESULT GetHardwareReferenceTimestamp (/* in */ BMDTimeScale timeScale, /* out */ BMDTimeValue* frameTime, /* out */ BMDTimeValue* frameDuration) = 0;
  772. protected:
  773. virtual ~IDeckLinkVideoInputFrame () {} // call Release method to drop reference count
  774. };
  775. /* Interface IDeckLinkAncillaryPacket - On output, user needs to implement this interface */
  776. class BMD_PUBLIC IDeckLinkAncillaryPacket : public IUnknown
  777. {
  778. public:
  779. 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;
  780. virtual uint8_t GetDID (void) = 0;
  781. virtual uint8_t GetSDID (void) = 0;
  782. virtual uint32_t GetLineNumber (void) = 0; // On output, zero is auto
  783. virtual uint8_t GetDataStreamIndex (void) = 0; // Usually zero. Can only be 1 if non-SD and the first data stream is completely full
  784. protected:
  785. virtual ~IDeckLinkAncillaryPacket () {} // call Release method to drop reference count
  786. };
  787. /* Interface IDeckLinkAncillaryPacketIterator - Enumerates ancillary packets */
  788. class BMD_PUBLIC IDeckLinkAncillaryPacketIterator : public IUnknown
  789. {
  790. public:
  791. virtual HRESULT Next (/* out */ IDeckLinkAncillaryPacket** packet) = 0;
  792. protected:
  793. virtual ~IDeckLinkAncillaryPacketIterator () {} // call Release method to drop reference count
  794. };
  795. /* Interface IDeckLinkVideoFrameAncillaryPackets - Obtained through QueryInterface on an IDeckLinkVideoFrame object. */
  796. class BMD_PUBLIC IDeckLinkVideoFrameAncillaryPackets : public IUnknown
  797. {
  798. public:
  799. virtual HRESULT GetPacketIterator (/* out */ IDeckLinkAncillaryPacketIterator** iterator) = 0;
  800. virtual HRESULT GetFirstPacketByID (/* in */ uint8_t DID, /* in */ uint8_t SDID, /* out */ IDeckLinkAncillaryPacket** packet) = 0;
  801. virtual HRESULT AttachPacket (/* in */ IDeckLinkAncillaryPacket* packet) = 0; // Implement IDeckLinkAncillaryPacket to output your own
  802. virtual HRESULT DetachPacket (/* in */ IDeckLinkAncillaryPacket* packet) = 0;
  803. virtual HRESULT DetachAllPackets (void) = 0;
  804. protected:
  805. virtual ~IDeckLinkVideoFrameAncillaryPackets () {} // call Release method to drop reference count
  806. };
  807. /* Interface IDeckLinkVideoFrameAncillary - Use of IDeckLinkVideoFrameAncillaryPackets is preferred. Obtained through QueryInterface on an IDeckLinkVideoFrame object. */
  808. class BMD_PUBLIC IDeckLinkVideoFrameAncillary : public IUnknown
  809. {
  810. public:
  811. 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
  812. virtual BMDPixelFormat GetPixelFormat (void) = 0;
  813. virtual BMDDisplayMode GetDisplayMode (void) = 0;
  814. protected:
  815. virtual ~IDeckLinkVideoFrameAncillary () {} // call Release method to drop reference count
  816. };
  817. /* Interface IDeckLinkEncoderPacket - Interface to encapsulate an encoded packet. */
  818. class BMD_PUBLIC IDeckLinkEncoderPacket : public IUnknown
  819. {
  820. public:
  821. virtual HRESULT GetBytes (/* out */ void** buffer) = 0;
  822. virtual long GetSize (void) = 0;
  823. virtual HRESULT GetStreamTime (/* out */ BMDTimeValue* frameTime, /* in */ BMDTimeScale timeScale) = 0;
  824. virtual BMDPacketType GetPacketType (void) = 0;
  825. protected:
  826. virtual ~IDeckLinkEncoderPacket () {} // call Release method to drop reference count
  827. };
  828. /* Interface IDeckLinkEncoderVideoPacket - Provided by the IDeckLinkEncoderInput video packet arrival callback. */
  829. class BMD_PUBLIC IDeckLinkEncoderVideoPacket : public IDeckLinkEncoderPacket
  830. {
  831. public:
  832. virtual BMDPixelFormat GetPixelFormat (void) = 0;
  833. virtual HRESULT GetHardwareReferenceTimestamp (/* in */ BMDTimeScale timeScale, /* out */ BMDTimeValue* frameTime, /* out */ BMDTimeValue* frameDuration) = 0;
  834. virtual HRESULT GetTimecode (/* in */ BMDTimecodeFormat format, /* out */ IDeckLinkTimecode** timecode) = 0;
  835. protected:
  836. virtual ~IDeckLinkEncoderVideoPacket () {} // call Release method to drop reference count
  837. };
  838. /* Interface IDeckLinkEncoderAudioPacket - Provided by the IDeckLinkEncoderInput audio packet arrival callback. */
  839. class BMD_PUBLIC IDeckLinkEncoderAudioPacket : public IDeckLinkEncoderPacket
  840. {
  841. public:
  842. virtual BMDAudioFormat GetAudioFormat (void) = 0;
  843. protected:
  844. virtual ~IDeckLinkEncoderAudioPacket () {} // call Release method to drop reference count
  845. };
  846. /* Interface IDeckLinkH265NALPacket - Obtained through QueryInterface on an IDeckLinkEncoderVideoPacket object */
  847. class BMD_PUBLIC IDeckLinkH265NALPacket : public IDeckLinkEncoderVideoPacket
  848. {
  849. public:
  850. virtual HRESULT GetUnitType (/* out */ uint8_t* unitType) = 0;
  851. virtual HRESULT GetBytesNoPrefix (/* out */ void** buffer) = 0;
  852. virtual long GetSizeNoPrefix (void) = 0;
  853. protected:
  854. virtual ~IDeckLinkH265NALPacket () {} // call Release method to drop reference count
  855. };
  856. /* Interface IDeckLinkAudioInputPacket - Provided by the IDeckLinkInput callback. */
  857. class BMD_PUBLIC IDeckLinkAudioInputPacket : public IUnknown
  858. {
  859. public:
  860. virtual long GetSampleFrameCount (void) = 0;
  861. virtual HRESULT GetBytes (/* out */ void** buffer) = 0;
  862. virtual HRESULT GetPacketTime (/* out */ BMDTimeValue* packetTime, /* in */ BMDTimeScale timeScale) = 0;
  863. protected:
  864. virtual ~IDeckLinkAudioInputPacket () {} // call Release method to drop reference count
  865. };
  866. /* Interface IDeckLinkScreenPreviewCallback - Screen preview callback */
  867. class BMD_PUBLIC IDeckLinkScreenPreviewCallback : public IUnknown
  868. {
  869. public:
  870. virtual HRESULT DrawFrame (/* in */ IDeckLinkVideoFrame* theFrame) = 0;
  871. protected:
  872. virtual ~IDeckLinkScreenPreviewCallback () {} // call Release method to drop reference count
  873. };
  874. /* Interface IDeckLinkGLScreenPreviewHelper - Created with CoCreateInstance on platforms with native COM support or from CreateOpenGLScreenPreviewHelper on other platforms. */
  875. class BMD_PUBLIC IDeckLinkGLScreenPreviewHelper : public IUnknown
  876. {
  877. public:
  878. /* Methods must be called with OpenGL context set */
  879. virtual HRESULT InitializeGL (void) = 0;
  880. virtual HRESULT PaintGL (void) = 0;
  881. virtual HRESULT SetFrame (/* in */ IDeckLinkVideoFrame* theFrame) = 0;
  882. virtual HRESULT Set3DPreviewFormat (/* in */ BMD3DPreviewFormat previewFormat) = 0;
  883. protected:
  884. virtual ~IDeckLinkGLScreenPreviewHelper () {} // call Release method to drop reference count
  885. };
  886. /* Interface IDeckLinkNotificationCallback - DeckLink Notification Callback Interface */
  887. class BMD_PUBLIC IDeckLinkNotificationCallback : public IUnknown
  888. {
  889. public:
  890. virtual HRESULT Notify (/* in */ BMDNotifications topic, /* in */ uint64_t param1, /* in */ uint64_t param2) = 0;
  891. };
  892. /* Interface IDeckLinkNotification - DeckLink Notification interface */
  893. class BMD_PUBLIC IDeckLinkNotification : public IUnknown
  894. {
  895. public:
  896. virtual HRESULT Subscribe (/* in */ BMDNotifications topic, /* in */ IDeckLinkNotificationCallback* theCallback) = 0;
  897. virtual HRESULT Unsubscribe (/* in */ BMDNotifications topic, /* in */ IDeckLinkNotificationCallback* theCallback) = 0;
  898. protected:
  899. virtual ~IDeckLinkNotification () {} // call Release method to drop reference count
  900. };
  901. /* Interface IDeckLinkProfileAttributes - Created by QueryInterface from an IDeckLinkProfile, or from IDeckLink. When queried from IDeckLink, interrogates the active profile */
  902. class BMD_PUBLIC IDeckLinkProfileAttributes : public IUnknown
  903. {
  904. public:
  905. virtual HRESULT GetFlag (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ bool* value) = 0;
  906. virtual HRESULT GetInt (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ int64_t* value) = 0;
  907. virtual HRESULT GetFloat (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ double* value) = 0;
  908. virtual HRESULT GetString (/* in */ BMDDeckLinkAttributeID cfgID, /* out */ const char** value) = 0;
  909. protected:
  910. virtual ~IDeckLinkProfileAttributes () {} // call Release method to drop reference count
  911. };
  912. /* Interface IDeckLinkProfileIterator - Enumerates IDeckLinkProfile interfaces */
  913. class BMD_PUBLIC IDeckLinkProfileIterator : public IUnknown
  914. {
  915. public:
  916. virtual HRESULT Next (/* out */ IDeckLinkProfile** profile) = 0;
  917. protected:
  918. virtual ~IDeckLinkProfileIterator () {} // call Release method to drop reference count
  919. };
  920. /* Interface IDeckLinkProfile - Represents the active profile when queried from IDeckLink */
  921. class BMD_PUBLIC IDeckLinkProfile : public IUnknown
  922. {
  923. public:
  924. virtual HRESULT GetDevice (/* out */ IDeckLink** device) = 0; // Device affected when this profile becomes active
  925. virtual HRESULT IsActive (/* out */ bool* isActive) = 0;
  926. virtual HRESULT SetActive (void) = 0; // Activating a profile will also change the profile on all devices enumerated by GetPeers. Activation is not complete until IDeckLinkProfileCallback::ProfileActivated is called
  927. virtual HRESULT GetPeers (/* out */ IDeckLinkProfileIterator** profileIterator) = 0; // Profiles of other devices activated with this profile
  928. protected:
  929. virtual ~IDeckLinkProfile () {} // call Release method to drop reference count
  930. };
  931. /* Interface IDeckLinkProfileCallback - Receive notifications about profiles related to this device */
  932. class BMD_PUBLIC IDeckLinkProfileCallback : public IUnknown
  933. {
  934. public:
  935. virtual HRESULT ProfileChanging (/* in */ IDeckLinkProfile* profileToBeActivated, /* in */ bool streamsWillBeForcedToStop) = 0; // Called before this device changes profile. User has an opportunity for teardown if streamsWillBeForcedToStop
  936. virtual HRESULT ProfileActivated (/* in */ IDeckLinkProfile* activatedProfile) = 0; // Called after this device has been activated with a new profile
  937. protected:
  938. virtual ~IDeckLinkProfileCallback () {} // call Release method to drop reference count
  939. };
  940. /* Interface IDeckLinkProfileManager - Created by QueryInterface from IDeckLink when a device has multiple optional profiles */
  941. class BMD_PUBLIC IDeckLinkProfileManager : public IUnknown
  942. {
  943. public:
  944. virtual HRESULT GetProfiles (/* out */ IDeckLinkProfileIterator** profileIterator) = 0; // All available profiles for this device
  945. virtual HRESULT GetProfile (/* in */ BMDProfileID profileID, /* out */ IDeckLinkProfile** profile) = 0;
  946. virtual HRESULT SetCallback (/* in */ IDeckLinkProfileCallback* callback) = 0;
  947. protected:
  948. virtual ~IDeckLinkProfileManager () {} // call Release method to drop reference count
  949. };
  950. /* Interface IDeckLinkStatus - DeckLink Status interface */
  951. class BMD_PUBLIC IDeckLinkStatus : public IUnknown
  952. {
  953. public:
  954. virtual HRESULT GetFlag (/* in */ BMDDeckLinkStatusID statusID, /* out */ bool* value) = 0;
  955. virtual HRESULT GetInt (/* in */ BMDDeckLinkStatusID statusID, /* out */ int64_t* value) = 0;
  956. virtual HRESULT GetFloat (/* in */ BMDDeckLinkStatusID statusID, /* out */ double* value) = 0;
  957. virtual HRESULT GetString (/* in */ BMDDeckLinkStatusID statusID, /* out */ const char** value) = 0;
  958. virtual HRESULT GetBytes (/* in */ BMDDeckLinkStatusID statusID, /* out */ void* buffer, /* in, out */ uint32_t* bufferSize) = 0;
  959. protected:
  960. virtual ~IDeckLinkStatus () {} // call Release method to drop reference count
  961. };
  962. /* Interface IDeckLinkKeyer - DeckLink Keyer interface */
  963. class BMD_PUBLIC IDeckLinkKeyer : public IUnknown
  964. {
  965. public:
  966. virtual HRESULT Enable (/* in */ bool isExternal) = 0;
  967. virtual HRESULT SetLevel (/* in */ uint8_t level) = 0;
  968. virtual HRESULT RampUp (/* in */ uint32_t numberOfFrames) = 0;
  969. virtual HRESULT RampDown (/* in */ uint32_t numberOfFrames) = 0;
  970. virtual HRESULT Disable (void) = 0;
  971. protected:
  972. virtual ~IDeckLinkKeyer () {} // call Release method to drop reference count
  973. };
  974. /* Interface IDeckLinkVideoConversion - Created with CoCreateInstance. */
  975. class BMD_PUBLIC IDeckLinkVideoConversion : public IUnknown
  976. {
  977. public:
  978. virtual HRESULT ConvertFrame (/* in */ IDeckLinkVideoFrame* srcFrame, /* in */ IDeckLinkVideoFrame* dstFrame) = 0;
  979. protected:
  980. virtual ~IDeckLinkVideoConversion () {} // call Release method to drop reference count
  981. };
  982. /* Interface IDeckLinkDeviceNotificationCallback - DeckLink device arrival/removal notification callbacks */
  983. class BMD_PUBLIC IDeckLinkDeviceNotificationCallback : public IUnknown
  984. {
  985. public:
  986. virtual HRESULT DeckLinkDeviceArrived (/* in */ IDeckLink* deckLinkDevice) = 0;
  987. virtual HRESULT DeckLinkDeviceRemoved (/* in */ IDeckLink* deckLinkDevice) = 0;
  988. protected:
  989. virtual ~IDeckLinkDeviceNotificationCallback () {} // call Release method to drop reference count
  990. };
  991. /* Interface IDeckLinkDiscovery - DeckLink device discovery */
  992. class BMD_PUBLIC IDeckLinkDiscovery : public IUnknown
  993. {
  994. public:
  995. virtual HRESULT InstallDeviceNotifications (/* in */ IDeckLinkDeviceNotificationCallback* deviceNotificationCallback) = 0;
  996. virtual HRESULT UninstallDeviceNotifications (void) = 0;
  997. protected:
  998. virtual ~IDeckLinkDiscovery () {} // call Release method to drop reference count
  999. };
  1000. /* Functions */
  1001. extern "C" {
  1002. IDeckLinkIterator* BMD_PUBLIC CreateDeckLinkIteratorInstance(void);
  1003. IDeckLinkDiscovery* BMD_PUBLIC CreateDeckLinkDiscoveryInstance(void);
  1004. IDeckLinkAPIInformation* BMD_PUBLIC CreateDeckLinkAPIInformationInstance(void);
  1005. IDeckLinkGLScreenPreviewHelper* BMD_PUBLIC CreateOpenGLScreenPreviewHelper(void);
  1006. IDeckLinkVideoConversion* BMD_PUBLIC CreateVideoConversionInstance(void);
  1007. IDeckLinkVideoFrameAncillaryPackets* BMD_PUBLIC CreateVideoFrameAncillaryPacketsInstance(void); // For use when creating a custom IDeckLinkVideoFrame without wrapping IDeckLinkOutput::CreateVideoFrame
  1008. }
  1009. #endif /* defined(__cplusplus) */
  1010. #endif /* defined(BMD_DECKLINKAPI_H) */