DeckLinkAPI_v10_11.idl 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  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. /* DeckLinkAPI_v10_11.idl */
  28. // Enumeration Mapping
  29. /* Enum BMDDisplayModeSupport_v10_11 - Output mode supported flags */
  30. typedef [v1_enum] enum _BMDDisplayModeSupport_v10_11 {
  31. bmdDisplayModeNotSupported_v10_11 = 0,
  32. bmdDisplayModeSupported_v10_11,
  33. bmdDisplayModeSupportedWithConversion_v10_11
  34. } BMDDisplayModeSupport_v10_11;
  35. /* Enum BMDDuplexMode - Duplex for configurable ports */
  36. typedef [v1_enum] enum _BMDDuplexMode_v10_11 {
  37. bmdDuplexModeFull_v10_11 = /* 'fdup' */ 0x66647570,
  38. bmdDuplexModeHalf_v10_11 = /* 'hdup' */ 0x68647570
  39. } BMDDuplexMode_v10_11;
  40. /* Enum BMDDeckLinkConfigurationID - DeckLink Configuration ID */
  41. typedef [v1_enum] enum _BMDDeckLinkConfigurationID_v10_11 {
  42. /* Video Input/Output Integers */
  43. bmdDeckLinkConfigDuplexMode_v10_11 = /* 'dupx' */ 0x64757078,
  44. } BMDDeckLinkConfigurationID_v10_11;
  45. /* Enum BMDDeckLinkAttributeID - DeckLink Attribute ID */
  46. typedef [v1_enum] enum _BMDDeckLinkAttributeID_v10_11 {
  47. /* Flags */
  48. BMDDeckLinkSupportsDuplexModeConfiguration_v10_11 = /* 'dupx' */ 0x64757078,
  49. BMDDeckLinkSupportsHDKeying_v10_11 = /* 'keyh' */ 0x6B657968,
  50. /* Integers */
  51. BMDDeckLinkPairedDevicePersistentID_v10_11 = /* 'ppid' */ 0x70706964,
  52. BMDDeckLinkSupportsFullDuplex_v10_11 = /* 'fdup' */ 0x66647570,
  53. } BMDDeckLinkAttributeID_v10_11;
  54. typedef [v1_enum] enum _BMDDeckLinkStatusID_v10_11 {
  55. bmdDeckLinkStatusDuplexMode_v10_11 = /* 'dupx' */ 0x64757078,
  56. } BMDDeckLinkStatusID_v10_11;
  57. /* Enum BMDDuplexStatus - Duplex status of the device */
  58. typedef [v1_enum] enum _BMDDuplexStatus_v10_11 {
  59. bmdDuplexFullDuplex_v10_11 = /* 'fdup' */ 0x66647570,
  60. bmdDuplexHalfDuplex_v10_11 = /* 'hdup' */ 0x68647570,
  61. bmdDuplexSimplex_v10_11 = /* 'splx' */ 0x73706C78,
  62. bmdDuplexInactive_v10_11 = /* 'inac' */ 0x696E6163
  63. } BMDDuplexStatus_v10_11;
  64. // Forward Declarations
  65. interface IDeckLinkConfiguration_v10_11;
  66. interface IDeckLinkAttributes_v10_11;
  67. interface IDeckLinkNotification_v10_11;
  68. /* Interface IDeckLinkConfiguration_v10_11 - DeckLink Configuration interface */
  69. [
  70. object,
  71. uuid(EF90380B-4AE5-4346-9077-E288E149F129),
  72. local,
  73. helpstring("DeckLink Configuration interface")
  74. ] interface IDeckLinkConfiguration_v10_11 : IUnknown
  75. {
  76. HRESULT SetFlag([in] BMDDeckLinkConfigurationID cfgID, [in] BOOL value);
  77. HRESULT GetFlag([in] BMDDeckLinkConfigurationID cfgID, [out] BOOL *value);
  78. HRESULT SetInt([in] BMDDeckLinkConfigurationID cfgID, [in] LONGLONG value);
  79. HRESULT GetInt([in] BMDDeckLinkConfigurationID cfgID, [out] LONGLONG *value);
  80. HRESULT SetFloat([in] BMDDeckLinkConfigurationID cfgID, [in] double value);
  81. HRESULT GetFloat([in] BMDDeckLinkConfigurationID cfgID, [out] double *value);
  82. HRESULT SetString([in] BMDDeckLinkConfigurationID cfgID, [in] BSTR value);
  83. HRESULT GetString([in] BMDDeckLinkConfigurationID cfgID, [out] BSTR *value);
  84. HRESULT WriteConfigurationToPreferences(void);
  85. };
  86. /* Interface IDeckLinkAttributes_v10_11 - DeckLink Attribute interface */
  87. [
  88. object,
  89. uuid(ABC11843-D966-44CB-96E2-A1CB5D3135C4),
  90. local,
  91. helpstring("DeckLink Attribute interface")
  92. ] interface IDeckLinkAttributes_v10_11 : IUnknown
  93. {
  94. HRESULT GetFlag([in] BMDDeckLinkAttributeID cfgID, [out] BOOL *value);
  95. HRESULT GetInt([in] BMDDeckLinkAttributeID cfgID, [out] LONGLONG *value);
  96. HRESULT GetFloat([in] BMDDeckLinkAttributeID cfgID, [out] double *value);
  97. HRESULT GetString([in] BMDDeckLinkAttributeID cfgID, [out] BSTR *value);
  98. };
  99. /* Interface IDeckLinkOutput_v10_11 - DeckLink output interface. */
  100. [
  101. object,
  102. uuid(CC5C8A6E-3F2F-4B3A-87EA-FD78AF300564),
  103. local,
  104. helpstring("Created by QueryInterface from IDeckLink.")
  105. ] interface IDeckLinkOutput_v10_11 : IUnknown
  106. {
  107. HRESULT DoesSupportVideoMode([in] BMDDisplayMode displayMode, [in] BMDPixelFormat pixelFormat, [in] BMDVideoOutputFlags flags, [out] BMDDisplayModeSupport_v10_11 *result, [out] IDeckLinkDisplayMode **resultDisplayMode);
  108. HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator **iterator);
  109. HRESULT SetScreenPreviewCallback([in] IDeckLinkScreenPreviewCallback *previewCallback);
  110. /* Video Output */
  111. HRESULT EnableVideoOutput([in] BMDDisplayMode displayMode, [in] BMDVideoOutputFlags flags);
  112. HRESULT DisableVideoOutput(void);
  113. HRESULT SetVideoOutputFrameMemoryAllocator([in] IDeckLinkMemoryAllocator *theAllocator);
  114. HRESULT CreateVideoFrame([in] int width, [in] int height, [in] int rowBytes, [in] BMDPixelFormat pixelFormat, [in] BMDFrameFlags flags, [out] IDeckLinkMutableVideoFrame **outFrame);
  115. HRESULT CreateAncillaryData([in] BMDPixelFormat pixelFormat, [out] IDeckLinkVideoFrameAncillary **outBuffer);
  116. HRESULT DisplayVideoFrameSync([in] IDeckLinkVideoFrame *theFrame);
  117. HRESULT ScheduleVideoFrame([in] IDeckLinkVideoFrame *theFrame, [in] BMDTimeValue displayTime, [in] BMDTimeValue displayDuration, [in] BMDTimeScale timeScale);
  118. HRESULT SetScheduledFrameCompletionCallback([in] IDeckLinkVideoOutputCallback *theCallback);
  119. HRESULT GetBufferedVideoFrameCount([out] unsigned int *bufferedFrameCount);
  120. /* Audio Output */
  121. HRESULT EnableAudioOutput([in] BMDAudioSampleRate sampleRate, [in] BMDAudioSampleType sampleType, [in] unsigned int channelCount, [in] BMDAudioOutputStreamType streamType);
  122. HRESULT DisableAudioOutput(void);
  123. HRESULT WriteAudioSamplesSync([in] void *buffer, [in] unsigned int sampleFrameCount, [out] unsigned int *sampleFramesWritten);
  124. HRESULT BeginAudioPreroll(void);
  125. HRESULT EndAudioPreroll(void);
  126. HRESULT ScheduleAudioSamples([in] void *buffer, [in] unsigned int sampleFrameCount, [in] BMDTimeValue streamTime, [in] BMDTimeScale timeScale, [out] unsigned int *sampleFramesWritten);
  127. HRESULT GetBufferedAudioSampleFrameCount([out] unsigned int *bufferedSampleFrameCount);
  128. HRESULT FlushBufferedAudioSamples(void);
  129. HRESULT SetAudioCallback([in] IDeckLinkAudioOutputCallback *theCallback);
  130. /* Output Control */
  131. HRESULT StartScheduledPlayback([in] BMDTimeValue playbackStartTime, [in] BMDTimeScale timeScale, [in] double playbackSpeed);
  132. HRESULT StopScheduledPlayback([in] BMDTimeValue stopPlaybackAtTime, [out] BMDTimeValue *actualStopTime, [in] BMDTimeScale timeScale);
  133. HRESULT IsScheduledPlaybackRunning([out] BOOL *active);
  134. HRESULT GetScheduledStreamTime([in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue *streamTime, [out] double *playbackSpeed);
  135. HRESULT GetReferenceStatus([out] BMDReferenceStatus *referenceStatus);
  136. /* Hardware Timing */
  137. HRESULT GetHardwareReferenceClock([in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue *hardwareTime, [out] BMDTimeValue *timeInFrame, [out] BMDTimeValue *ticksPerFrame);
  138. HRESULT GetFrameCompletionReferenceTimestamp([in] IDeckLinkVideoFrame *theFrame, [in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue *frameCompletionTimestamp);
  139. };
  140. /* Interface IDeckLinkInput_v10_11 - DeckLink input interface. */
  141. [
  142. object,
  143. uuid(AF22762B-DFAC-4846-AA79-FA8883560995),
  144. helpstring("Created by QueryInterface from IDeckLink.")
  145. ] interface IDeckLinkInput_v10_11 : IUnknown
  146. {
  147. HRESULT DoesSupportVideoMode([in] BMDDisplayMode displayMode, [in] BMDPixelFormat pixelFormat, [in] BMDVideoInputFlags flags, [out] BMDDisplayModeSupport_v10_11 *result, [out] IDeckLinkDisplayMode **resultDisplayMode);
  148. HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator **iterator);
  149. HRESULT SetScreenPreviewCallback([in] IDeckLinkScreenPreviewCallback *previewCallback);
  150. /* Video Input */
  151. HRESULT EnableVideoInput([in] BMDDisplayMode displayMode, [in] BMDPixelFormat pixelFormat, [in] BMDVideoInputFlags flags);
  152. HRESULT DisableVideoInput(void);
  153. HRESULT GetAvailableVideoFrameCount([out] unsigned int *availableFrameCount);
  154. HRESULT SetVideoInputFrameMemoryAllocator([in] IDeckLinkMemoryAllocator *theAllocator);
  155. /* Audio Input */
  156. HRESULT EnableAudioInput([in] BMDAudioSampleRate sampleRate, [in] BMDAudioSampleType sampleType, [in] unsigned int channelCount);
  157. HRESULT DisableAudioInput(void);
  158. HRESULT GetAvailableAudioSampleFrameCount([out] unsigned int *availableSampleFrameCount);
  159. /* Input Control */
  160. HRESULT StartStreams(void);
  161. HRESULT StopStreams(void);
  162. HRESULT PauseStreams(void);
  163. HRESULT FlushStreams(void);
  164. HRESULT SetCallback([in] IDeckLinkInputCallback *theCallback);
  165. /* Hardware Timing */
  166. HRESULT GetHardwareReferenceClock([in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue *hardwareTime, [out] BMDTimeValue *timeInFrame, [out] BMDTimeValue *ticksPerFrame);
  167. };
  168. /* Interface IDeckLinkEncoderInput_v10_11 - Created by QueryInterface from IDeckLink. */
  169. [
  170. object,
  171. uuid(270587DA-6B7D-42E7-A1F0-6D853F581185),
  172. helpstring("Created by QueryInterface from IDeckLink.")
  173. ] interface IDeckLinkEncoderInput_v10_11 : IUnknown
  174. {
  175. HRESULT DoesSupportVideoMode([in] BMDDisplayMode displayMode, [in] BMDPixelFormat pixelFormat, [in] BMDVideoInputFlags flags, [out] BMDDisplayModeSupport_v10_11 *result, [out] IDeckLinkDisplayMode **resultDisplayMode);
  176. HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator **iterator);
  177. /* Video Input */
  178. HRESULT EnableVideoInput([in] BMDDisplayMode displayMode, [in] BMDPixelFormat pixelFormat, [in] BMDVideoInputFlags flags);
  179. HRESULT DisableVideoInput(void);
  180. HRESULT GetAvailablePacketsCount([out] unsigned int *availablePacketsCount);
  181. HRESULT SetMemoryAllocator([in] IDeckLinkMemoryAllocator *theAllocator);
  182. /* Audio Input */
  183. HRESULT EnableAudioInput([in] BMDAudioFormat audioFormat, [in] BMDAudioSampleRate sampleRate, [in] BMDAudioSampleType sampleType, [in] unsigned int channelCount);
  184. HRESULT DisableAudioInput(void);
  185. HRESULT GetAvailableAudioSampleFrameCount([out] unsigned int *availableSampleFrameCount);
  186. /* Input Control */
  187. HRESULT StartStreams(void);
  188. HRESULT StopStreams(void);
  189. HRESULT PauseStreams(void);
  190. HRESULT FlushStreams(void);
  191. HRESULT SetCallback([in] IDeckLinkEncoderInputCallback *theCallback);
  192. /* Hardware Timing */
  193. HRESULT GetHardwareReferenceClock([in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue *hardwareTime, [out] BMDTimeValue *timeInFrame, [out] BMDTimeValue *ticksPerFrame);
  194. };
  195. /* Interface IDeckLinkNotification_v10_11 - DeckLink Notification interface */
  196. [
  197. object,
  198. uuid(0A1FB207-E215-441B-9B19-6FA1575946C5),
  199. local,
  200. helpstring("DeckLink Notification interface")
  201. ] interface IDeckLinkNotification_v10_11 : IUnknown
  202. {
  203. HRESULT Subscribe([in] BMDNotifications topic, [in] IDeckLinkNotificationCallback *theCallback);
  204. HRESULT Unsubscribe([in] BMDNotifications topic, [in] IDeckLinkNotificationCallback *theCallback);
  205. };
  206. importlib("stdole2.tlb");
  207. [
  208. uuid(87D2693F-8D4A-45C7-B43F-10ACBA25E68F),
  209. helpstring("CDeckLinkIterator_v10_11 Class")
  210. ] coclass CDeckLinkIterator_v10_11
  211. {
  212. [default] interface IDeckLinkIterator;
  213. };
  214. [
  215. uuid(652615D4-26CD-4514-B161-2FD5072ED008),
  216. helpstring("CDeckLinkDiscovery_v10_11 Class")
  217. ] coclass CDeckLinkDiscovery_v10_11
  218. {
  219. [default] interface IDeckLinkDiscovery;
  220. };