DeckLinkAPI_v7_3.idl 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. /* Forward Declarations */
  28. interface IDeckLinkInputCallback_v7_3;
  29. interface IDeckLinkOutput_v7_3;
  30. interface IDeckLinkInput_v7_3;
  31. interface IDeckLinkVideoInputFrame_v7_3;
  32. /* End Forward Declarations */
  33. /* Interface IDeckLinkInputCallback - Frame arrival callback. */
  34. [
  35. object,
  36. uuid(FD6F311D-4D00-444B-9ED4-1F25B5730AD0),
  37. helpstring("Frame arrival callback.")
  38. ] interface IDeckLinkInputCallback_v7_3 : IUnknown
  39. {
  40. HRESULT VideoInputFormatChanged([in] BMDVideoInputFormatChangedEvents notificationEvents, [in] IDeckLinkDisplayMode_v7_6 *newDisplayMode, [in] BMDDetectedVideoInputFormatFlags detectedSignalFlags);
  41. HRESULT VideoInputFrameArrived([in] IDeckLinkVideoInputFrame_v7_3 *videoFrame, [in] IDeckLinkAudioInputPacket *audioPacket);
  42. };
  43. /* End Interface IDeckLinkInputCallback */
  44. /* Interface IDeckLinkOutput - Created by QueryInterface from IDeckLink. */
  45. [
  46. object,
  47. uuid(271C65E3-C323-4344-A30F-D908BCB20AA3),
  48. local,
  49. helpstring("Created by QueryInterface from IDeckLink.")
  50. ] interface IDeckLinkOutput_v7_3 : IUnknown
  51. {
  52. HRESULT DoesSupportVideoMode(BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, [out] BMDDisplayModeSupport_v10_11 *result);
  53. HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator_v7_6 **iterator);
  54. HRESULT SetScreenPreviewCallback([in] IDeckLinkScreenPreviewCallback *previewCallback);
  55. /* Video Output */
  56. HRESULT EnableVideoOutput(BMDDisplayMode displayMode, BMDVideoOutputFlags flags);
  57. HRESULT DisableVideoOutput(void);
  58. HRESULT SetVideoOutputFrameMemoryAllocator([in] IDeckLinkMemoryAllocator *theAllocator);
  59. HRESULT CreateVideoFrame(int width, int height, int rowBytes, BMDPixelFormat pixelFormat, BMDFrameFlags flags, [out] IDeckLinkMutableVideoFrame_v7_6 **outFrame);
  60. HRESULT CreateAncillaryData(BMDPixelFormat pixelFormat, [out] IDeckLinkVideoFrameAncillary **outBuffer);
  61. HRESULT DisplayVideoFrameSync([in] IDeckLinkVideoFrame_v7_6 *theFrame);
  62. HRESULT ScheduleVideoFrame([in] IDeckLinkVideoFrame_v7_6 *theFrame, BMDTimeValue displayTime, BMDTimeValue displayDuration, BMDTimeScale timeScale);
  63. HRESULT SetScheduledFrameCompletionCallback([in] IDeckLinkVideoOutputCallback *theCallback);
  64. HRESULT GetBufferedVideoFrameCount([out] unsigned int *bufferedFrameCount);
  65. /* Audio Output */
  66. HRESULT EnableAudioOutput(BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, unsigned int channelCount, BMDAudioOutputStreamType streamType);
  67. HRESULT DisableAudioOutput(void);
  68. HRESULT WriteAudioSamplesSync([in] void *buffer, unsigned int sampleFrameCount, [out] unsigned int *sampleFramesWritten);
  69. HRESULT BeginAudioPreroll(void);
  70. HRESULT EndAudioPreroll(void);
  71. HRESULT ScheduleAudioSamples([in] void *buffer, unsigned int sampleFrameCount, BMDTimeValue streamTime, BMDTimeScale timeScale, [out] unsigned int *sampleFramesWritten);
  72. HRESULT GetBufferedAudioSampleFrameCount([out] unsigned int *bufferedSampleFrameCount);
  73. HRESULT FlushBufferedAudioSamples(void);
  74. HRESULT SetAudioCallback([in] IDeckLinkAudioOutputCallback *theCallback);
  75. /* Output Control */
  76. HRESULT StartScheduledPlayback(BMDTimeValue playbackStartTime, BMDTimeScale timeScale, double playbackSpeed);
  77. HRESULT StopScheduledPlayback(BMDTimeValue stopPlaybackAtTime, [out] BMDTimeValue *actualStopTime, BMDTimeScale timeScale);
  78. HRESULT IsScheduledPlaybackRunning([out] BOOL *active);
  79. HRESULT GetHardwareReferenceClock(BMDTimeScale desiredTimeScale, [out] BMDTimeValue *elapsedTimeSinceSchedulerBegan);
  80. };
  81. /* End Interface IDeckLinkOutput */
  82. /* Interface IDeckLinkInput - Created by QueryInterface from IDeckLink. */
  83. [
  84. object,
  85. uuid(4973F012-9925-458C-871C-18774CDBBECB),
  86. helpstring("Created by QueryInterface from IDeckLink.")
  87. ] interface IDeckLinkInput_v7_3 : IUnknown
  88. {
  89. HRESULT DoesSupportVideoMode(BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, [out] BMDDisplayModeSupport_v10_11 *result);
  90. HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator_v7_6 **iterator);
  91. HRESULT SetScreenPreviewCallback([in] IDeckLinkScreenPreviewCallback *previewCallback);
  92. /* Video Input */
  93. HRESULT EnableVideoInput(BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, BMDVideoInputFlags flags);
  94. HRESULT DisableVideoInput(void);
  95. HRESULT GetAvailableVideoFrameCount([out] unsigned int *availableFrameCount);
  96. /* Audio Input */
  97. HRESULT EnableAudioInput(BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, unsigned int channelCount);
  98. HRESULT DisableAudioInput(void);
  99. HRESULT GetAvailableAudioSampleFrameCount([out] unsigned int *availableSampleFrameCount);
  100. /* Input Control */
  101. HRESULT StartStreams(void);
  102. HRESULT StopStreams(void);
  103. HRESULT PauseStreams(void);
  104. HRESULT FlushStreams(void);
  105. HRESULT SetCallback([in] IDeckLinkInputCallback_v7_3 *theCallback);
  106. };
  107. /* End Interface IDeckLinkInput */
  108. /* Interface IDeckLinkVideoInputFrame - Provided by the IDeckLinkVideoInput frame arrival callback. */
  109. [
  110. object,
  111. uuid(CF317790-2894-11DE-8C30-0800200C9A66),
  112. local,
  113. helpstring("Provided by the IDeckLinkVideoInput frame arrival callback.")
  114. ] interface IDeckLinkVideoInputFrame_v7_3 : IDeckLinkVideoFrame_v7_6
  115. {
  116. HRESULT GetStreamTime([out] BMDTimeValue *frameTime, [out] BMDTimeValue *frameDuration, BMDTimeScale timeScale);
  117. };
  118. /* End Interface IDeckLinkVideoInputFrame */