2 ** Copyright (c) 2009 Blackmagic Design
\r
4 ** Permission is hereby granted, free of charge, to any person or organization
\r
5 ** obtaining a copy of the software and accompanying documentation covered by
\r
6 ** this license (the "Software") to use, reproduce, display, distribute,
\r
7 ** execute, and transmit the Software, and to prepare derivative works of the
\r
8 ** Software, and to permit third-parties to whom the Software is furnished to
\r
9 ** do so, all subject to the following:
\r
11 ** The copyright notices in the Software and this entire statement, including
\r
12 ** the above license grant, this restriction and the following disclaimer,
\r
13 ** must be included in all copies of the Software, in whole or in part, and
\r
14 ** all derivative works of the Software, unless such copies or derivative
\r
15 ** works are solely in the form of machine-executable object code generated by
\r
16 ** a source language processor.
\r
18 ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
19 ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
\r
20 ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
\r
21 ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
\r
22 ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
\r
23 ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
\r
24 ** DEALINGS IN THE SOFTWARE.
\r
27 /* DeckLinkAPI_v7_1.idl */
\r
29 interface IDeckLinkDisplayModeIterator_v7_1;
\r
30 interface IDeckLinkDisplayMode_v7_1;
\r
31 interface IDeckLinkVideoFrame_v7_1;
\r
32 interface IDeckLinkVideoInputFrame_v7_1;
\r
33 interface IDeckLinkAudioInputPacket_v7_1;
\r
35 [object, uuid(B28131B6-59AC-4857-B5AC-CD75D5883E2F),
\r
36 helpstring("IDeckLinkDisplayModeIterator_v7_1 enumerates over supported input/output display modes.")]
\r
37 interface IDeckLinkDisplayModeIterator_v7_1 : IUnknown
\r
39 HRESULT Next ([out] IDeckLinkDisplayMode_v7_1** deckLinkDisplayMode);
\r
43 [object, uuid(AF0CD6D5-8376-435E-8433-54F9DD530AC3),
\r
44 helpstring("IDeckLinkDisplayMode_v7_1 represents a display mode")]
\r
45 interface IDeckLinkDisplayMode_v7_1 : IUnknown
\r
47 HRESULT GetName ([out] BSTR* name);
\r
48 BMDDisplayMode GetDisplayMode ();
\r
51 HRESULT GetFrameRate ([out] BMDTimeValue *frameDuration, [out] BMDTimeScale *timeScale);
\r
54 [object, uuid(EBD01AFA-E4B0-49C6-A01D-EDB9D1B55FD9),
\r
55 helpstring("IDeckLinkVideoOutputCallback. Frame completion callback.")]
\r
56 interface IDeckLinkVideoOutputCallback_v7_1 : IUnknown
\r
58 HRESULT ScheduledFrameCompleted ([in] IDeckLinkVideoFrame_v7_1* completedFrame, [in] BMDOutputFrameCompletionResult result);
\r
61 [object, uuid(7F94F328-5ED4-4E9F-9729-76A86BDC99CC),
\r
62 helpstring("IDeckLinkInputCallback_v7_1. Frame arrival callback.")]
\r
63 interface IDeckLinkInputCallback_v7_1 : IUnknown
\r
65 HRESULT VideoInputFrameArrived ([in] IDeckLinkVideoInputFrame_v7_1* videoFrame, [in] IDeckLinkAudioInputPacket_v7_1* audioPacket);
\r
69 [object, uuid(AE5B3E9B-4E1E-4535-B6E8-480FF52F6CE5), local,
\r
70 helpstring("IDeckLinkOutput_v7_1. Created by QueryInterface from IDeckLink.")]
\r
71 interface IDeckLinkOutput_v7_1 : IUnknown
\r
73 HRESULT DoesSupportVideoMode (BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, [out] BMDDisplayModeSupport *result);
\r
74 HRESULT GetDisplayModeIterator ([out] IDeckLinkDisplayModeIterator_v7_1 **iterator);
\r
77 HRESULT EnableVideoOutput (BMDDisplayMode displayMode);
\r
78 HRESULT DisableVideoOutput ();
\r
80 HRESULT SetVideoOutputFrameMemoryAllocator ([in] IDeckLinkMemoryAllocator* theAllocator);
\r
81 HRESULT CreateVideoFrame (long width, long height, long rowBytes, BMDPixelFormat pixelFormat, BMDFrameFlags flags, IDeckLinkVideoFrame_v7_1** outFrame);
\r
82 HRESULT CreateVideoFrameFromBuffer (void* buffer, long width, long height, long rowBytes, BMDPixelFormat pixelFormat, BMDFrameFlags flags, IDeckLinkVideoFrame_v7_1** outFrame);
\r
84 HRESULT DisplayVideoFrameSync (IDeckLinkVideoFrame_v7_1* theFrame);
\r
85 HRESULT ScheduleVideoFrame (IDeckLinkVideoFrame_v7_1* theFrame, BMDTimeValue displayTime, BMDTimeValue displayDuration, BMDTimeScale timeScale);
\r
86 HRESULT SetScheduledFrameCompletionCallback ([in] IDeckLinkVideoOutputCallback_v7_1* theCallback);
\r
89 HRESULT EnableAudioOutput (BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, unsigned long channelCount);
\r
90 HRESULT DisableAudioOutput ();
\r
92 HRESULT WriteAudioSamplesSync (void* buffer, unsigned long sampleFrameCount, [out] unsigned long *sampleFramesWritten);
\r
94 HRESULT BeginAudioPreroll ();
\r
95 HRESULT EndAudioPreroll ();
\r
96 HRESULT ScheduleAudioSamples (void* buffer, unsigned long sampleFrameCount, BMDTimeValue streamTime, BMDTimeScale timeScale, [out] unsigned long *sampleFramesWritten);
\r
98 HRESULT GetBufferedAudioSampleFrameCount ( [out] unsigned long *bufferedSampleCount);
\r
99 HRESULT FlushBufferedAudioSamples ();
\r
101 HRESULT SetAudioCallback ( [in] IDeckLinkAudioOutputCallback* theCallback);
\r
104 HRESULT StartScheduledPlayback (BMDTimeValue playbackStartTime, BMDTimeScale timeScale, double playbackSpeed);
\r
105 HRESULT StopScheduledPlayback (BMDTimeValue stopPlaybackAtTime, BMDTimeValue *actualStopTime, BMDTimeScale timeScale);
\r
106 HRESULT GetHardwareReferenceClock (BMDTimeScale desiredTimeScale, BMDTimeValue *elapsedTimeSinceSchedulerBegan);
\r
109 [object, uuid(2B54EDEF-5B32-429F-BA11-BB990596EACD),
\r
110 helpstring("IDeckLinkInput_v7_1. Created by QueryInterface from IDeckLink.")]
\r
111 interface IDeckLinkInput_v7_1 : IUnknown
\r
113 HRESULT DoesSupportVideoMode (BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, [out] BMDDisplayModeSupport *result);
\r
114 HRESULT GetDisplayModeIterator ([out] IDeckLinkDisplayModeIterator_v7_1 **iterator);
\r
117 HRESULT EnableVideoInput (BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, BMDVideoInputFlags flags);
\r
118 HRESULT DisableVideoInput ();
\r
121 HRESULT EnableAudioInput (BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, unsigned long channelCount);
\r
122 HRESULT DisableAudioInput ();
\r
123 HRESULT ReadAudioSamples (void* buffer, unsigned long sampleFrameCount, [out] unsigned long *sampleFramesRead, [out] BMDTimeValue *audioPacketTime, BMDTimeScale timeScale);
\r
124 HRESULT GetBufferedAudioSampleFrameCount ( [out] unsigned long *bufferedSampleCount);
\r
127 HRESULT StartStreams ();
\r
128 HRESULT StopStreams ();
\r
129 HRESULT PauseStreams ();
\r
130 HRESULT SetCallback ([in] IDeckLinkInputCallback_v7_1* theCallback);
\r
133 [object, uuid(333F3A10-8C2D-43CF-B79D-46560FEEA1CE), local,
\r
134 helpstring("IDeckLinkVideoFrame_v7_1. Created by IDeckLinkVideoOutput::CreateVideoFrame.")]
\r
135 interface IDeckLinkVideoFrame_v7_1 : IUnknown
\r
139 long GetRowBytes ();
\r
140 BMDPixelFormat GetPixelFormat ();
\r
141 BMDFrameFlags GetFlags ();
\r
142 HRESULT GetBytes (void* *buffer);
\r
145 [object, uuid(C8B41D95-8848-40EE-9B37-6E3417FB114B), local,
\r
146 helpstring("IDeckLinkVideoInputFrame_v7_1. Provided by the IDeckLinkVideoInput frame arrival callback.")]
\r
147 interface IDeckLinkVideoInputFrame_v7_1 : IDeckLinkVideoFrame_v7_1
\r
149 HRESULT GetFrameTime (BMDTimeValue *frameTime, BMDTimeValue *frameDuration, BMDTimeScale timeScale);
\r
152 [object, uuid(C86DE4F6-A29F-42E3-AB3A-1363E29F0788), local,
\r
153 helpstring("IDeckLinkAudioInputPacket_v7_1. Provided by the IDeckLinkInput callback.")]
\r
154 interface IDeckLinkAudioInputPacket_v7_1 : IUnknown
\r
156 long GetSampleCount ();
\r
157 HRESULT GetBytes (void* *buffer);
\r
158 HRESULT GetAudioPacketTime (BMDTimeValue *packetTime, BMDTimeScale timeScale);
\r