DeckLinkAPI_v11_4.idl 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /* -LICENSE-START-
  2. ** Copyright (c) 2019 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_v11_4.idl */
  28. // Enumeration Mapping
  29. /* Interface IDeckLinkOutput_v11_4 - Created by QueryInterface from IDeckLink. */
  30. [
  31. object,
  32. uuid(065A0F6C-C508-4D0D-B919-F5EB0EBFC96B),
  33. local,
  34. helpstring("Created by QueryInterface from IDeckLink.")
  35. ] interface IDeckLinkOutput_v11_4 : IUnknown
  36. {
  37. HRESULT DoesSupportVideoMode ([in] BMDVideoConnection connection /* If a value of 0 is specified, the caller does not care about the connection */, [in] BMDDisplayMode requestedMode, [in] BMDPixelFormat requestedPixelFormat, [in] BMDSupportedVideoModeFlags flags, [out] BMDDisplayMode* actualMode, [out] BOOL* supported);
  38. HRESULT GetDisplayMode ([in] BMDDisplayMode displayMode, [out] IDeckLinkDisplayMode** resultDisplayMode);
  39. HRESULT GetDisplayModeIterator ([out] IDeckLinkDisplayModeIterator** iterator);
  40. HRESULT SetScreenPreviewCallback ([in] IDeckLinkScreenPreviewCallback* previewCallback);
  41. /* Video Output */
  42. HRESULT EnableVideoOutput ([in] BMDDisplayMode displayMode, [in] BMDVideoOutputFlags flags);
  43. HRESULT DisableVideoOutput (void);
  44. HRESULT SetVideoOutputFrameMemoryAllocator ([in] IDeckLinkMemoryAllocator* theAllocator);
  45. HRESULT CreateVideoFrame ([in] int width, [in] int height, [in] int rowBytes, [in] BMDPixelFormat pixelFormat, [in] BMDFrameFlags flags, [out] IDeckLinkMutableVideoFrame** outFrame);
  46. HRESULT CreateAncillaryData ([in] BMDPixelFormat pixelFormat, [out] IDeckLinkVideoFrameAncillary** outBuffer); // Use of IDeckLinkVideoFrameAncillaryPackets is preferred
  47. HRESULT DisplayVideoFrameSync ([in] IDeckLinkVideoFrame* theFrame);
  48. HRESULT ScheduleVideoFrame ([in] IDeckLinkVideoFrame* theFrame, [in] BMDTimeValue displayTime, [in] BMDTimeValue displayDuration, [in] BMDTimeScale timeScale);
  49. HRESULT SetScheduledFrameCompletionCallback ([in] IDeckLinkVideoOutputCallback* theCallback);
  50. HRESULT GetBufferedVideoFrameCount ([out] unsigned int* bufferedFrameCount);
  51. /* Audio Output */
  52. HRESULT EnableAudioOutput ([in] BMDAudioSampleRate sampleRate, [in] BMDAudioSampleType sampleType, [in] unsigned int channelCount, [in] BMDAudioOutputStreamType streamType);
  53. HRESULT DisableAudioOutput (void);
  54. HRESULT WriteAudioSamplesSync ([in] void* buffer, [in] unsigned int sampleFrameCount, [out] unsigned int* sampleFramesWritten);
  55. HRESULT BeginAudioPreroll (void);
  56. HRESULT EndAudioPreroll (void);
  57. HRESULT ScheduleAudioSamples ([in] void* buffer, [in] unsigned int sampleFrameCount, [in] BMDTimeValue streamTime, [in] BMDTimeScale timeScale, [out] unsigned int* sampleFramesWritten);
  58. HRESULT GetBufferedAudioSampleFrameCount ([out] unsigned int* bufferedSampleFrameCount);
  59. HRESULT FlushBufferedAudioSamples (void);
  60. HRESULT SetAudioCallback ([in] IDeckLinkAudioOutputCallback* theCallback);
  61. /* Output Control */
  62. HRESULT StartScheduledPlayback ([in] BMDTimeValue playbackStartTime, [in] BMDTimeScale timeScale, [in] double playbackSpeed);
  63. HRESULT StopScheduledPlayback ([in] BMDTimeValue stopPlaybackAtTime, [out] BMDTimeValue* actualStopTime, [in] BMDTimeScale timeScale);
  64. HRESULT IsScheduledPlaybackRunning ([out] BOOL* active);
  65. HRESULT GetScheduledStreamTime ([in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue* streamTime, [out] double* playbackSpeed);
  66. HRESULT GetReferenceStatus ([out] BMDReferenceStatus* referenceStatus);
  67. /* Hardware Timing */
  68. HRESULT GetHardwareReferenceClock ([in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue* hardwareTime, [out] BMDTimeValue* timeInFrame, [out] BMDTimeValue* ticksPerFrame);
  69. HRESULT GetFrameCompletionReferenceTimestamp ([in] IDeckLinkVideoFrame* theFrame, [in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue* frameCompletionTimestamp);
  70. };
  71. /* Interface IDeckLinkInput_v11_4 - Created by QueryInterface from IDeckLink. */
  72. [
  73. object,
  74. uuid(2A88CF76-F494-4216-A7EF-DC74EEB83882),
  75. helpstring("Created by QueryInterface from IDeckLink.")
  76. ] interface IDeckLinkInput_v11_4 : IUnknown
  77. {
  78. HRESULT DoesSupportVideoMode ([in] BMDVideoConnection connection /* If a value of 0 is specified, the caller does not care about the connection */, [in] BMDDisplayMode requestedMode, [in] BMDPixelFormat requestedPixelFormat, [in] BMDSupportedVideoModeFlags flags, [out] BOOL* supported);
  79. HRESULT GetDisplayMode ([in] BMDDisplayMode displayMode, [out] IDeckLinkDisplayMode** resultDisplayMode);
  80. HRESULT GetDisplayModeIterator ([out] IDeckLinkDisplayModeIterator** iterator);
  81. HRESULT SetScreenPreviewCallback ([in] IDeckLinkScreenPreviewCallback* previewCallback);
  82. /* Video Input */
  83. HRESULT EnableVideoInput ([in] BMDDisplayMode displayMode, [in] BMDPixelFormat pixelFormat, [in] BMDVideoInputFlags flags);
  84. HRESULT DisableVideoInput (void);
  85. HRESULT GetAvailableVideoFrameCount ([out] unsigned int* availableFrameCount);
  86. HRESULT SetVideoInputFrameMemoryAllocator ([in] IDeckLinkMemoryAllocator* theAllocator);
  87. /* Audio Input */
  88. HRESULT EnableAudioInput ([in] BMDAudioSampleRate sampleRate, [in] BMDAudioSampleType sampleType, [in] unsigned int channelCount);
  89. HRESULT DisableAudioInput (void);
  90. HRESULT GetAvailableAudioSampleFrameCount ([out] unsigned int* availableSampleFrameCount);
  91. /* Input Control */
  92. HRESULT StartStreams (void);
  93. HRESULT StopStreams (void);
  94. HRESULT PauseStreams (void);
  95. HRESULT FlushStreams (void);
  96. HRESULT SetCallback ([in] IDeckLinkInputCallback* theCallback);
  97. /* Hardware Timing */
  98. HRESULT GetHardwareReferenceClock ([in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue* hardwareTime, [out] BMDTimeValue* timeInFrame, [out] BMDTimeValue* ticksPerFrame);
  99. };