DeckLinkAPI_v7_1.idl 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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. /* DeckLinkAPI_v7_1.idl */
  28. interface IDeckLinkDisplayModeIterator_v7_1;
  29. interface IDeckLinkDisplayMode_v7_1;
  30. interface IDeckLinkVideoFrame_v7_1;
  31. interface IDeckLinkVideoInputFrame_v7_1;
  32. interface IDeckLinkAudioInputPacket_v7_1;
  33. [object, uuid(B28131B6-59AC-4857-B5AC-CD75D5883E2F),
  34. helpstring("IDeckLinkDisplayModeIterator_v7_1 enumerates over supported input/output display modes.")]
  35. interface IDeckLinkDisplayModeIterator_v7_1 : IUnknown
  36. {
  37. HRESULT Next ([out] IDeckLinkDisplayMode_v7_1** deckLinkDisplayMode);
  38. };
  39. [object, uuid(AF0CD6D5-8376-435E-8433-54F9DD530AC3),
  40. helpstring("IDeckLinkDisplayMode_v7_1 represents a display mode")]
  41. interface IDeckLinkDisplayMode_v7_1 : IUnknown
  42. {
  43. HRESULT GetName ([out] BSTR* name);
  44. BMDDisplayMode GetDisplayMode ();
  45. long GetWidth ();
  46. long GetHeight ();
  47. HRESULT GetFrameRate ([out] BMDTimeValue *frameDuration, [out] BMDTimeScale *timeScale);
  48. };
  49. [object, uuid(EBD01AFA-E4B0-49C6-A01D-EDB9D1B55FD9),
  50. helpstring("IDeckLinkVideoOutputCallback. Frame completion callback.")]
  51. interface IDeckLinkVideoOutputCallback_v7_1 : IUnknown
  52. {
  53. HRESULT ScheduledFrameCompleted ([in] IDeckLinkVideoFrame_v7_1* completedFrame, [in] BMDOutputFrameCompletionResult result);
  54. };
  55. [object, uuid(7F94F328-5ED4-4E9F-9729-76A86BDC99CC),
  56. helpstring("IDeckLinkInputCallback_v7_1. Frame arrival callback.")]
  57. interface IDeckLinkInputCallback_v7_1 : IUnknown
  58. {
  59. HRESULT VideoInputFrameArrived ([in] IDeckLinkVideoInputFrame_v7_1* videoFrame, [in] IDeckLinkAudioInputPacket_v7_1* audioPacket);
  60. };
  61. [object, uuid(AE5B3E9B-4E1E-4535-B6E8-480FF52F6CE5), local,
  62. helpstring("IDeckLinkOutput_v7_1. Created by QueryInterface from IDeckLink.")]
  63. interface IDeckLinkOutput_v7_1 : IUnknown
  64. {
  65. HRESULT DoesSupportVideoMode (BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, [out] BMDDisplayModeSupport_v10_11 *result);
  66. HRESULT GetDisplayModeIterator ([out] IDeckLinkDisplayModeIterator_v7_1 **iterator);
  67. // Video output
  68. HRESULT EnableVideoOutput (BMDDisplayMode displayMode);
  69. HRESULT DisableVideoOutput ();
  70. HRESULT SetVideoOutputFrameMemoryAllocator ([in] IDeckLinkMemoryAllocator* theAllocator);
  71. HRESULT CreateVideoFrame (int width, int height, int rowBytes, BMDPixelFormat pixelFormat, BMDFrameFlags flags, IDeckLinkVideoFrame_v7_1** outFrame);
  72. HRESULT CreateVideoFrameFromBuffer (void* buffer, int width, int height, int rowBytes, BMDPixelFormat pixelFormat, BMDFrameFlags flags, IDeckLinkVideoFrame_v7_1** outFrame);
  73. HRESULT DisplayVideoFrameSync (IDeckLinkVideoFrame_v7_1* theFrame);
  74. HRESULT ScheduleVideoFrame (IDeckLinkVideoFrame_v7_1* theFrame, BMDTimeValue displayTime, BMDTimeValue displayDuration, BMDTimeScale timeScale);
  75. HRESULT SetScheduledFrameCompletionCallback ([in] IDeckLinkVideoOutputCallback_v7_1* theCallback);
  76. // Audio output
  77. HRESULT EnableAudioOutput (BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, unsigned int channelCount);
  78. HRESULT DisableAudioOutput ();
  79. HRESULT WriteAudioSamplesSync (void* buffer, unsigned int sampleFrameCount, [out] unsigned int *sampleFramesWritten);
  80. HRESULT BeginAudioPreroll ();
  81. HRESULT EndAudioPreroll ();
  82. HRESULT ScheduleAudioSamples (void* buffer, unsigned int sampleFrameCount, BMDTimeValue streamTime, BMDTimeScale timeScale, [out] unsigned int *sampleFramesWritten);
  83. HRESULT GetBufferedAudioSampleFrameCount ( [out] unsigned int *bufferedSampleCount);
  84. HRESULT FlushBufferedAudioSamples ();
  85. HRESULT SetAudioCallback ( [in] IDeckLinkAudioOutputCallback* theCallback);
  86. // Output control
  87. HRESULT StartScheduledPlayback (BMDTimeValue playbackStartTime, BMDTimeScale timeScale, double playbackSpeed);
  88. HRESULT StopScheduledPlayback (BMDTimeValue stopPlaybackAtTime, BMDTimeValue *actualStopTime, BMDTimeScale timeScale);
  89. HRESULT GetHardwareReferenceClock (BMDTimeScale desiredTimeScale, BMDTimeValue *elapsedTimeSinceSchedulerBegan);
  90. };
  91. [object, uuid(2B54EDEF-5B32-429F-BA11-BB990596EACD),
  92. helpstring("IDeckLinkInput_v7_1. Created by QueryInterface from IDeckLink.")]
  93. interface IDeckLinkInput_v7_1 : IUnknown
  94. {
  95. HRESULT DoesSupportVideoMode (BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, [out] BMDDisplayModeSupport_v10_11 *result);
  96. HRESULT GetDisplayModeIterator ([out] IDeckLinkDisplayModeIterator_v7_1 **iterator);
  97. // Video input
  98. HRESULT EnableVideoInput (BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, BMDVideoInputFlags flags);
  99. HRESULT DisableVideoInput ();
  100. // Audio input
  101. HRESULT EnableAudioInput (BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, unsigned int channelCount);
  102. HRESULT DisableAudioInput ();
  103. HRESULT ReadAudioSamples (void* buffer, unsigned int sampleFrameCount, [out] unsigned int *sampleFramesRead, [out] BMDTimeValue *audioPacketTime, BMDTimeScale timeScale);
  104. HRESULT GetBufferedAudioSampleFrameCount ( [out] unsigned int *bufferedSampleCount);
  105. // Input control
  106. HRESULT StartStreams ();
  107. HRESULT StopStreams ();
  108. HRESULT PauseStreams ();
  109. HRESULT SetCallback ([in] IDeckLinkInputCallback_v7_1* theCallback);
  110. };
  111. [object, uuid(333F3A10-8C2D-43CF-B79D-46560FEEA1CE), local,
  112. helpstring("IDeckLinkVideoFrame_v7_1. Created by IDeckLinkVideoOutput::CreateVideoFrame.")]
  113. interface IDeckLinkVideoFrame_v7_1 : IUnknown
  114. {
  115. long GetWidth ();
  116. long GetHeight ();
  117. long GetRowBytes ();
  118. BMDPixelFormat GetPixelFormat ();
  119. BMDFrameFlags GetFlags ();
  120. HRESULT GetBytes (void* *buffer);
  121. };
  122. [object, uuid(C8B41D95-8848-40EE-9B37-6E3417FB114B), local,
  123. helpstring("IDeckLinkVideoInputFrame_v7_1. Provided by the IDeckLinkVideoInput frame arrival callback.")]
  124. interface IDeckLinkVideoInputFrame_v7_1 : IDeckLinkVideoFrame_v7_1
  125. {
  126. HRESULT GetFrameTime (BMDTimeValue *frameTime, BMDTimeValue *frameDuration, BMDTimeScale timeScale);
  127. };
  128. [object, uuid(C86DE4F6-A29F-42E3-AB3A-1363E29F0788), local,
  129. helpstring("IDeckLinkAudioInputPacket_v7_1. Provided by the IDeckLinkInput callback.")]
  130. interface IDeckLinkAudioInputPacket_v7_1 : IUnknown
  131. {
  132. long GetSampleCount ();
  133. HRESULT GetBytes (void* *buffer);
  134. HRESULT GetAudioPacketTime (BMDTimeValue *packetTime, BMDTimeScale timeScale);
  135. };