DeckLinkAPI_v7_6.idl 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  1. /* -LICENSE-START-
  2. ** Copyright (c) 2009 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. /* Enum BMDVideoConnection - Video connection types */
  28. typedef [v1_enum] enum _BMDVideoConnection_v7_6 {
  29. bmdVideoConnectionSDI_v7_6 = /* 'sdi ' */ 0x73646920,
  30. bmdVideoConnectionHDMI_v7_6 = /* 'hdmi' */ 0x68646D69,
  31. bmdVideoConnectionOpticalSDI_v7_6 = /* 'opti' */ 0x6F707469,
  32. bmdVideoConnectionComponent_v7_6 = /* 'cpnt' */ 0x63706E74,
  33. bmdVideoConnectionComposite_v7_6 = /* 'cmst' */ 0x636D7374,
  34. bmdVideoConnectionSVideo_v7_6 = /* 'svid' */ 0x73766964
  35. } BMDVideoConnection_v7_6;
  36. /* Forward Declarations */
  37. interface IDeckLinkDisplayModeIterator_v7_6;
  38. interface IDeckLinkDisplayMode_v7_6;
  39. interface IDeckLinkOutput_v7_6;
  40. interface IDeckLinkInput_v7_6;
  41. interface IDeckLinkTimecode_v7_6;
  42. interface IDeckLinkVideoFrame_v7_6;
  43. interface IDeckLinkMutableVideoFrame_v7_6;
  44. interface IDeckLinkVideoInputFrame_v7_6;
  45. interface IDeckLinkScreenPreviewCallback_v7_6;
  46. interface IDeckLinkGLScreenPreviewHelper_v7_6;
  47. interface IDeckLinkVideoConversion_v7_6;
  48. interface IDeckLinkConfiguration_v7_6;
  49. /* Interface IDeckLinkVideoOutputCallback - Frame completion callback. */
  50. [
  51. object,
  52. uuid(E763A626-4A3C-49D1-BF13-E7AD3692AE52),
  53. helpstring("Frame completion callback.")
  54. ] interface IDeckLinkVideoOutputCallback_v7_6 : IUnknown
  55. {
  56. HRESULT ScheduledFrameCompleted([in] IDeckLinkVideoFrame_v7_6 *completedFrame, [in] BMDOutputFrameCompletionResult result);
  57. HRESULT ScheduledPlaybackHasStopped(void);
  58. };
  59. /* Interface IDeckLinkInputCallback - Frame arrival callback. */
  60. [
  61. object,
  62. uuid(31D28EE7-88B6-4CB1-897A-CDBF79A26414),
  63. helpstring("Frame arrival callback.")
  64. ] interface IDeckLinkInputCallback_v7_6 : IUnknown
  65. {
  66. HRESULT VideoInputFormatChanged([in] BMDVideoInputFormatChangedEvents notificationEvents, [in] IDeckLinkDisplayMode_v7_6 *newDisplayMode, [in] BMDDetectedVideoInputFormatFlags detectedSignalFlags);
  67. HRESULT VideoInputFrameArrived([in] IDeckLinkVideoInputFrame_v7_6* videoFrame, [in] IDeckLinkAudioInputPacket* audioPacket);
  68. };
  69. /* Interface IDeckLinkDisplayModeIterator - enumerates over supported input/output display modes. */
  70. [
  71. object,
  72. uuid(455D741F-1779-4800-86F5-0B5D13D79751),
  73. helpstring("enumerates over supported input/output display modes.")
  74. ] interface IDeckLinkDisplayModeIterator_v7_6 : IUnknown
  75. {
  76. HRESULT Next([out] IDeckLinkDisplayMode_v7_6 **deckLinkDisplayMode);
  77. };
  78. /* Interface IDeckLinkDisplayMode - represents a display mode */
  79. [
  80. object,
  81. uuid(87451E84-2B7E-439E-A629-4393EA4A8550),
  82. helpstring("represents a display mode")
  83. ] interface IDeckLinkDisplayMode_v7_6 : IUnknown
  84. {
  85. HRESULT GetName([out] BSTR *name);
  86. BMDDisplayMode GetDisplayMode(void);
  87. long GetWidth(void);
  88. long GetHeight(void);
  89. HRESULT GetFrameRate([out] BMDTimeValue *frameDuration, [out] BMDTimeScale *timeScale);
  90. BMDFieldDominance GetFieldDominance(void);
  91. };
  92. /* Interface IDeckLinkOutput - Created by QueryInterface from IDeckLink. */
  93. [
  94. object,
  95. uuid(29228142-EB8C-4141-A621-F74026450955),
  96. local,
  97. helpstring("Created by QueryInterface from IDeckLink.")
  98. ] interface IDeckLinkOutput_v7_6 : IUnknown
  99. {
  100. HRESULT DoesSupportVideoMode(BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, [out] BMDDisplayModeSupport_v10_11 *result);
  101. HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator_v7_6 **iterator);
  102. HRESULT SetScreenPreviewCallback([in] IDeckLinkScreenPreviewCallback_v7_6 *previewCallback);
  103. /* Video Output */
  104. HRESULT EnableVideoOutput(BMDDisplayMode displayMode, BMDVideoOutputFlags flags);
  105. HRESULT DisableVideoOutput(void);
  106. HRESULT SetVideoOutputFrameMemoryAllocator([in] IDeckLinkMemoryAllocator *theAllocator);
  107. HRESULT CreateVideoFrame(int width, int height, int rowBytes, BMDPixelFormat pixelFormat, BMDFrameFlags flags, [out] IDeckLinkMutableVideoFrame_v7_6 **outFrame);
  108. HRESULT CreateAncillaryData(BMDPixelFormat pixelFormat, [out] IDeckLinkVideoFrameAncillary **outBuffer);
  109. HRESULT DisplayVideoFrameSync([in] IDeckLinkVideoFrame_v7_6 *theFrame);
  110. HRESULT ScheduleVideoFrame([in] IDeckLinkVideoFrame_v7_6 *theFrame, BMDTimeValue displayTime, BMDTimeValue displayDuration, BMDTimeScale timeScale);
  111. HRESULT SetScheduledFrameCompletionCallback([in] IDeckLinkVideoOutputCallback_v7_6 *theCallback);
  112. HRESULT GetBufferedVideoFrameCount([out] unsigned int *bufferedFrameCount);
  113. /* Audio Output */
  114. HRESULT EnableAudioOutput(BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, unsigned int channelCount, BMDAudioOutputStreamType streamType);
  115. HRESULT DisableAudioOutput(void);
  116. HRESULT WriteAudioSamplesSync([in] void *buffer, unsigned int sampleFrameCount, [out] unsigned int *sampleFramesWritten);
  117. HRESULT BeginAudioPreroll(void);
  118. HRESULT EndAudioPreroll(void);
  119. HRESULT ScheduleAudioSamples([in] void *buffer, unsigned int sampleFrameCount, BMDTimeValue streamTime, BMDTimeScale timeScale, [out] unsigned int *sampleFramesWritten);
  120. HRESULT GetBufferedAudioSampleFrameCount([out] unsigned int *bufferedSampleFrameCount);
  121. HRESULT FlushBufferedAudioSamples(void);
  122. HRESULT SetAudioCallback([in] IDeckLinkAudioOutputCallback *theCallback);
  123. /* Output Control */
  124. HRESULT StartScheduledPlayback(BMDTimeValue playbackStartTime, BMDTimeScale timeScale, double playbackSpeed);
  125. HRESULT StopScheduledPlayback(BMDTimeValue stopPlaybackAtTime, [out] BMDTimeValue *actualStopTime, BMDTimeScale timeScale);
  126. HRESULT IsScheduledPlaybackRunning([out] BOOL *active);
  127. HRESULT GetScheduledStreamTime(BMDTimeScale desiredTimeScale, [out] BMDTimeValue *streamTime, [out] double *playbackSpeed);
  128. /* Hardware Timing */
  129. HRESULT GetHardwareReferenceClock(BMDTimeScale desiredTimeScale, [out] BMDTimeValue *hardwareTime, [out] BMDTimeValue *timeInFrame, [out] BMDTimeValue *ticksPerFrame);
  130. };
  131. /* Interface IDeckLinkInput - Created by QueryInterface from IDeckLink. */
  132. [
  133. object,
  134. uuid(300C135A-9F43-48E2-9906-6D7911D93CF1),
  135. helpstring("Created by QueryInterface from IDeckLink.")
  136. ] interface IDeckLinkInput_v7_6 : IUnknown
  137. {
  138. HRESULT DoesSupportVideoMode(BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, [out] BMDDisplayModeSupport_v10_11 *result);
  139. HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator_v7_6 **iterator);
  140. HRESULT SetScreenPreviewCallback([in] IDeckLinkScreenPreviewCallback_v7_6 *previewCallback);
  141. /* Video Input */
  142. HRESULT EnableVideoInput(BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, BMDVideoInputFlags flags);
  143. HRESULT DisableVideoInput(void);
  144. HRESULT GetAvailableVideoFrameCount([out] unsigned int *availableFrameCount);
  145. /* Audio Input */
  146. HRESULT EnableAudioInput(BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, unsigned int channelCount);
  147. HRESULT DisableAudioInput(void);
  148. HRESULT GetAvailableAudioSampleFrameCount([out] unsigned int *availableSampleFrameCount);
  149. /* Input Control */
  150. HRESULT StartStreams(void);
  151. HRESULT StopStreams(void);
  152. HRESULT PauseStreams(void);
  153. HRESULT FlushStreams(void);
  154. HRESULT SetCallback([in] IDeckLinkInputCallback_v7_6 *theCallback);
  155. /* Hardware Timing */
  156. HRESULT GetHardwareReferenceClock(BMDTimeScale desiredTimeScale, [out] BMDTimeValue *hardwareTime, [out] BMDTimeValue *timeInFrame, [out] BMDTimeValue *ticksPerFrame);
  157. };
  158. /* Interface IDeckLinkTimecode_v7_6 - Used for video frame timecode representation. */
  159. [
  160. object,
  161. uuid(EFB9BCA6-A521-44F7-BD69-2332F24D9EE6),
  162. helpstring("Used for video frame timecode representation.")
  163. ] interface IDeckLinkTimecode_v7_6 : IUnknown
  164. {
  165. BMDTimecodeBCD GetBCD(void);
  166. HRESULT GetComponents([out] unsigned char *hours, [out] unsigned char *minutes, [out] unsigned char *seconds, [out] unsigned char *frames);
  167. HRESULT GetString([out] BSTR *timecode);
  168. BMDTimecodeFlags GetFlags(void);
  169. };
  170. /* Interface IDeckLinkVideoFrame - Interface to encapsulate a video frame; can be caller-implemented. */
  171. [
  172. object,
  173. uuid(A8D8238E-6B18-4196-99E1-5AF717B83D32),
  174. local,
  175. helpstring("Interface to encapsulate a video frame; can be caller-implemented.")
  176. ] interface IDeckLinkVideoFrame_v7_6 : IUnknown
  177. {
  178. long GetWidth(void);
  179. long GetHeight(void);
  180. long GetRowBytes(void);
  181. BMDPixelFormat GetPixelFormat(void);
  182. BMDFrameFlags GetFlags(void);
  183. HRESULT GetBytes([out] void **buffer);
  184. HRESULT GetTimecode(BMDTimecodeFormat format, [out] IDeckLinkTimecode_v7_6 **timecode);
  185. HRESULT GetAncillaryData([out] IDeckLinkVideoFrameAncillary **ancillary);
  186. };
  187. /* Interface IDeckLinkMutableVideoFrame - Created by IDeckLinkOutput::CreateVideoFrame. */
  188. [
  189. object,
  190. uuid(46FCEE00-B4E6-43D0-91C0-023A7FCEB34F),
  191. local,
  192. helpstring("Created by IDeckLinkOutput::CreateVideoFrame.")
  193. ] interface IDeckLinkMutableVideoFrame_v7_6 : IDeckLinkVideoFrame_v7_6
  194. {
  195. HRESULT SetFlags(BMDFrameFlags newFlags);
  196. HRESULT SetTimecode(BMDTimecodeFormat format, [in] IDeckLinkTimecode_v7_6 *timecode);
  197. HRESULT SetTimecodeFromComponents(BMDTimecodeFormat format, unsigned char hours, unsigned char minutes, unsigned char seconds, unsigned char frames, BMDTimecodeFlags flags);
  198. HRESULT SetAncillaryData([in] IDeckLinkVideoFrameAncillary *ancillary);
  199. };
  200. /* Interface IDeckLinkVideoInputFrame - Provided by the IDeckLinkVideoInput frame arrival callback. */
  201. [
  202. object,
  203. uuid(9A74FA41-AE9F-47AC-8CF4-01F42DD59965),
  204. local,
  205. helpstring("Provided by the IDeckLinkVideoInput frame arrival callback.")
  206. ] interface IDeckLinkVideoInputFrame_v7_6 : IDeckLinkVideoFrame_v7_6
  207. {
  208. HRESULT GetStreamTime([out] BMDTimeValue *frameTime, [out] BMDTimeValue *frameDuration, BMDTimeScale timeScale);
  209. HRESULT GetHardwareReferenceTimestamp(BMDTimeScale timeScale, [out] BMDTimeValue *frameTime, [out] BMDTimeValue *frameDuration);
  210. };
  211. /* Interface IDeckLinkScreenPreviewCallback - Screen preview callback */
  212. [
  213. object,
  214. uuid(373F499D-4B4D-4518-AD22-6354E5A5825E),
  215. local,
  216. helpstring("Screen preview callback")
  217. ] interface IDeckLinkScreenPreviewCallback_v7_6 : IUnknown
  218. {
  219. HRESULT DrawFrame([in] IDeckLinkVideoFrame_v7_6 *theFrame);
  220. };
  221. /* Interface IDeckLinkGLScreenPreviewHelper - Created with CoCreateInstance(). */
  222. [
  223. object,
  224. uuid(BA575CD9-A15E-497B-B2C2-F9AFE7BE4EBA),
  225. local,
  226. helpstring("Created with CoCreateInstance().")
  227. ] interface IDeckLinkGLScreenPreviewHelper_v7_6 : IUnknown
  228. {
  229. /* Methods must be called with OpenGL context set */
  230. HRESULT InitializeGL(void);
  231. HRESULT PaintGL(void);
  232. HRESULT SetFrame([in] IDeckLinkVideoFrame_v7_6 *theFrame);
  233. };
  234. /* Interface IDeckLinkVideoConversion - Created with CoCreateInstance(). */
  235. [
  236. object,
  237. uuid(3EB504C9-F97D-40FE-A158-D407D48CB53B),
  238. local,
  239. helpstring("Created with CoCreateInstance().")
  240. ] interface IDeckLinkVideoConversion_v7_6 : IUnknown
  241. {
  242. HRESULT ConvertFrame([in] IDeckLinkVideoFrame_v7_6* srcFrame, [in] IDeckLinkVideoFrame_v7_6* dstFrame);
  243. };
  244. /* Interface IDeckLinkConfiguration_v7_6 - Created by QueryInterface from IDeckLink. */
  245. [
  246. object,
  247. uuid(B8EAD569-B764-47F0-A73F-AE40DF6CBF10),
  248. helpstring("Created by QueryInterface from IDeckLink.")
  249. ] interface IDeckLinkConfiguration_v7_6 : IUnknown
  250. {
  251. HRESULT GetConfigurationValidator([out] IDeckLinkConfiguration_v7_6 **configObject);
  252. HRESULT WriteConfigurationToPreferences(void);
  253. /* Video Output Configuration */
  254. HRESULT SetVideoOutputFormat([in] BMDVideoConnection_v7_6 videoOutputConnection);
  255. HRESULT IsVideoOutputActive([in] BMDVideoConnection_v7_6 videoOutputConnection, [out] BOOL *active);
  256. HRESULT SetAnalogVideoOutputFlags([in] BMDAnalogVideoFlags analogVideoFlags);
  257. HRESULT GetAnalogVideoOutputFlags([out] BMDAnalogVideoFlags *analogVideoFlags);
  258. HRESULT EnableFieldFlickerRemovalWhenPaused([in] BOOL enable);
  259. HRESULT IsEnabledFieldFlickerRemovalWhenPaused([out] BOOL *enabled);
  260. HRESULT Set444And3GBpsVideoOutput([in] BOOL enable444VideoOutput, [in] BOOL enable3GbsOutput);
  261. HRESULT Get444And3GBpsVideoOutput([out] BOOL *is444VideoOutputEnabled, [out] BOOL *threeGbsOutputEnabled);
  262. HRESULT SetVideoOutputConversionMode([in] BMDVideoOutputConversionMode conversionMode);
  263. HRESULT GetVideoOutputConversionMode([out] BMDVideoOutputConversionMode *conversionMode);
  264. HRESULT Set_HD1080p24_to_HD1080i5994_Conversion([in] BOOL enable);
  265. HRESULT Get_HD1080p24_to_HD1080i5994_Conversion([out] BOOL *enabled);
  266. /* Video Input Configuration */
  267. HRESULT SetVideoInputFormat([in] BMDVideoConnection_v7_6 videoInputFormat);
  268. HRESULT GetVideoInputFormat([out] BMDVideoConnection_v7_6 *videoInputFormat);
  269. HRESULT SetAnalogVideoInputFlags([in] BMDAnalogVideoFlags analogVideoFlags);
  270. HRESULT GetAnalogVideoInputFlags([out] BMDAnalogVideoFlags *analogVideoFlags);
  271. HRESULT SetVideoInputConversionMode([in] BMDVideoInputConversionMode conversionMode);
  272. HRESULT GetVideoInputConversionMode([out] BMDVideoInputConversionMode *conversionMode);
  273. HRESULT SetBlackVideoOutputDuringCapture([in] BOOL blackOutInCapture);
  274. HRESULT GetBlackVideoOutputDuringCapture([out] BOOL *blackOutInCapture);
  275. HRESULT Set32PulldownSequenceInitialTimecodeFrame([in] unsigned int aFrameTimecode);
  276. HRESULT Get32PulldownSequenceInitialTimecodeFrame([out] unsigned int *aFrameTimecode);
  277. HRESULT SetVancSourceLineMapping([in] unsigned int activeLine1VANCsource, [in] unsigned int activeLine2VANCsource, [in] unsigned int activeLine3VANCsource);
  278. HRESULT GetVancSourceLineMapping([out] unsigned int *activeLine1VANCsource, [out] unsigned int *activeLine2VANCsource, [out] unsigned int *activeLine3VANCsource);
  279. /* Audio Input Configuration */
  280. HRESULT SetAudioInputFormat([in] BMDAudioConnection_v10_2 audioInputFormat);
  281. HRESULT GetAudioInputFormat([out] BMDAudioConnection_v10_2 *audioInputFormat);
  282. };
  283. /* Coclasses */
  284. importlib("stdole2.tlb");
  285. [
  286. uuid(D398CEE7-4434-4CA3-9BA6-5AE34556B905),
  287. helpstring("CDeckLinkGLScreenPreviewHelper Class (DeckLink API v7.6)")
  288. ] coclass CDeckLinkGLScreenPreviewHelper_v7_6
  289. {
  290. [default] interface IDeckLinkGLScreenPreviewHelper_v7_6;
  291. };
  292. [
  293. uuid(FFA84F77-73BE-4FB7-B03E-B5E44B9F759B),
  294. helpstring("CDeckLinkVideoConversion Class (DeckLink API v7.6)")
  295. ] coclass CDeckLinkVideoConversion_v7_6
  296. {
  297. [default] interface IDeckLinkVideoConversion_v7_6;
  298. };