2 ** Copyright (c) 2009 Blackmagic Design
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:
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.
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.
28 /* Forward Declarations */
30 interface IDeckLinkInputCallback_v7_3;
31 interface IDeckLinkOutput_v7_3;
32 interface IDeckLinkInput_v7_3;
33 interface IDeckLinkVideoInputFrame_v7_3;
35 /* End Forward Declarations */
38 /* Interface IDeckLinkInputCallback - Frame arrival callback. */
42 uuid(FD6F311D-4D00-444B-9ED4-1F25B5730AD0),
43 helpstring("Frame arrival callback.")
44 ] interface IDeckLinkInputCallback_v7_3 : IUnknown
46 HRESULT VideoInputFormatChanged([in] BMDVideoInputFormatChangedEvents notificationEvents, [in] IDeckLinkDisplayMode *newDisplayMode, [in] BMDDetectedVideoInputFormatFlags detectedSignalFlags);
47 HRESULT VideoInputFrameArrived([in] IDeckLinkVideoInputFrame_v7_3 *videoFrame, [in] IDeckLinkAudioInputPacket *audioPacket);
50 /* End Interface IDeckLinkInputCallback */
53 /* Interface IDeckLinkOutput - Created by QueryInterface from IDeckLink. */
57 uuid(271C65E3-C323-4344-A30F-D908BCB20AA3),
59 helpstring("Created by QueryInterface from IDeckLink.")
60 ] interface IDeckLinkOutput_v7_3 : IUnknown
62 HRESULT DoesSupportVideoMode(BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, [out] BMDDisplayModeSupport *result);
63 HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator **iterator);
65 HRESULT SetScreenPreviewCallback([in] IDeckLinkScreenPreviewCallback *previewCallback);
69 HRESULT EnableVideoOutput(BMDDisplayMode displayMode, BMDVideoOutputFlags flags);
70 HRESULT DisableVideoOutput(void);
72 HRESULT SetVideoOutputFrameMemoryAllocator([in] IDeckLinkMemoryAllocator *theAllocator);
73 HRESULT CreateVideoFrame(long width, long height, long rowBytes, BMDPixelFormat pixelFormat, BMDFrameFlags flags, [out] IDeckLinkMutableVideoFrame **outFrame);
74 HRESULT CreateAncillaryData(BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, [out] IDeckLinkVideoFrameAncillary **outBuffer);
76 HRESULT DisplayVideoFrameSync([in] IDeckLinkVideoFrame *theFrame);
77 HRESULT ScheduleVideoFrame([in] IDeckLinkVideoFrame *theFrame, BMDTimeValue displayTime, BMDTimeValue displayDuration, BMDTimeScale timeScale);
78 HRESULT SetScheduledFrameCompletionCallback([in] IDeckLinkVideoOutputCallback *theCallback);
79 HRESULT GetBufferedVideoFrameCount([out] unsigned long *bufferedFrameCount);
83 HRESULT EnableAudioOutput(BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, unsigned long channelCount, BMDAudioOutputStreamType streamType);
84 HRESULT DisableAudioOutput(void);
86 HRESULT WriteAudioSamplesSync([in] void *buffer, unsigned long sampleFrameCount, [out] unsigned long *sampleFramesWritten);
88 HRESULT BeginAudioPreroll(void);
89 HRESULT EndAudioPreroll(void);
90 HRESULT ScheduleAudioSamples([in] void *buffer, unsigned long sampleFrameCount, BMDTimeValue streamTime, BMDTimeScale timeScale, [out] unsigned long *sampleFramesWritten);
92 HRESULT GetBufferedAudioSampleFrameCount([out] unsigned long *bufferedSampleFrameCount);
93 HRESULT FlushBufferedAudioSamples(void);
95 HRESULT SetAudioCallback([in] IDeckLinkAudioOutputCallback *theCallback);
99 HRESULT StartScheduledPlayback(BMDTimeValue playbackStartTime, BMDTimeScale timeScale, double playbackSpeed);
100 HRESULT StopScheduledPlayback(BMDTimeValue stopPlaybackAtTime, [out] BMDTimeValue *actualStopTime, BMDTimeScale timeScale);
101 HRESULT IsScheduledPlaybackRunning([out] BOOL *active);
102 HRESULT GetHardwareReferenceClock(BMDTimeScale desiredTimeScale, [out] BMDTimeValue *elapsedTimeSinceSchedulerBegan);
105 /* End Interface IDeckLinkOutput */
107 /* Interface IDeckLinkInput - Created by QueryInterface from IDeckLink. */
111 uuid(4973F012-9925-458C-871C-18774CDBBECB),
112 helpstring("Created by QueryInterface from IDeckLink.")
113 ] interface IDeckLinkInput_v7_3 : IUnknown
115 HRESULT DoesSupportVideoMode(BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, [out] BMDDisplayModeSupport *result);
116 HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator **iterator);
118 HRESULT SetScreenPreviewCallback([in] IDeckLinkScreenPreviewCallback *previewCallback);
122 HRESULT EnableVideoInput(BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, BMDVideoInputFlags flags);
123 HRESULT DisableVideoInput(void);
124 HRESULT GetAvailableVideoFrameCount([out] unsigned long *availableFrameCount);
128 HRESULT EnableAudioInput(BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, unsigned long channelCount);
129 HRESULT DisableAudioInput(void);
130 HRESULT GetAvailableAudioSampleFrameCount([out] unsigned long *availableSampleFrameCount);
134 HRESULT StartStreams(void);
135 HRESULT StopStreams(void);
136 HRESULT PauseStreams(void);
137 HRESULT FlushStreams(void);
138 HRESULT SetCallback([in] IDeckLinkInputCallback_v7_3 *theCallback);
141 /* End Interface IDeckLinkInput */
144 /* Interface IDeckLinkVideoInputFrame - Provided by the IDeckLinkVideoInput frame arrival callback. */
148 uuid(CF317790-2894-11DE-8C30-0800200C9A66),
150 helpstring("Provided by the IDeckLinkVideoInput frame arrival callback.")
151 ] interface IDeckLinkVideoInputFrame_v7_3 : IDeckLinkVideoFrame
153 HRESULT GetStreamTime([out] BMDTimeValue *frameTime, [out] BMDTimeValue *frameDuration, BMDTimeScale timeScale);
156 /* End Interface IDeckLinkVideoInputFrame */