diff options
author | mcasas <mcasas@chromium.org> | 2014-10-02 05:56:20 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-02 12:56:39 +0000 |
commit | f4d3924394da5c682e0184028c5b3a72e899b0e0 (patch) | |
tree | e8a929f9c63d37ce83da75fc9c9b34e29f97deca /third_party | |
parent | bbbdcec8301e5ff9b8273e3e27ff7426d9dacfa7 (diff) | |
download | chromium_src-f4d3924394da5c682e0184028c5b3a72e899b0e0.zip chromium_src-f4d3924394da5c682e0184028c5b3a72e899b0e0.tar.gz chromium_src-f4d3924394da5c682e0184028c5b3a72e899b0e0.tar.bz2 |
Win Video Capture: Add Blackmagic DeckLink SDK Win files to the existing third_party folder
BUG=417315
Review URL: https://codereview.chromium.org/599173002
Cr-Commit-Position: refs/heads/master@{#297818}
Diffstat (limited to 'third_party')
17 files changed, 3050 insertions, 3 deletions
diff --git a/third_party/decklink/README.chromium b/third_party/decklink/README.chromium index 0bc3b46..2b306e0 100644 --- a/third_party/decklink/README.chromium +++ b/third_party/decklink/README.chromium @@ -17,6 +17,6 @@ The SHA-512 sum, for security reasons, as generated by shasum: Local Modifications: - The original library contains code for Linux, Windows and Mac. Here only the -code under original folder Mac is included. -- Deleted everything except the folder Mac/include/, which is copied here as -mac/include/. +code under original folder Mac and Win are included. +- Deleted everything except the folders Mac/include/, which is copied here as +mac/include/, and Win/include, which is copied here as win/include. diff --git a/third_party/decklink/win/include/DeckLinkAPI.idl b/third_party/decklink/win/include/DeckLinkAPI.idl new file mode 100644 index 0000000..b2cf356e --- /dev/null +++ b/third_party/decklink/win/include/DeckLinkAPI.idl @@ -0,0 +1,831 @@ +/* -LICENSE-START- +** Copyright (c) 2014 Blackmagic Design +** +** Permission is hereby granted, free of charge, to any person or organization +** obtaining a copy of the software and accompanying documentation covered by +** this license (the "Software") to use, reproduce, display, distribute, +** execute, and transmit the Software, and to prepare derivative works of the +** Software, and to permit third-parties to whom the Software is furnished to +** do so, all subject to the following: +** +** The copyright notices in the Software and this entire statement, including +** the above license grant, this restriction and the following disclaimer, +** must be included in all copies of the Software, in whole or in part, and +** all derivative works of the Software, unless such copies or derivative +** works are solely in the form of machine-executable object code generated by +** a source language processor. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +** -LICENSE-END- +*/ + + +#ifndef BMD_CONST + #if defined(_MSC_VER) + #define BMD_CONST __declspec(selectany) static const + #else + #define BMD_CONST static const + #endif +#endif + +/* DeckLink API */ + +import "unknwn.idl"; + +[uuid(D864517A-EDD5-466D-867D-C819F1C052BB), +version(1.0), helpstring("DeckLink API Library")] +library DeckLinkAPI +{ + +#include "DeckLinkAPITypes.idl" +#include "DeckLinkAPIModes.idl" +#include "DeckLinkAPIDiscovery.idl" +#include "DeckLinkAPIConfiguration.idl" +#include "DeckLinkAPIDeckControl.idl" +#include "DeckLinkAPIStreaming.idl" + +// Type Declarations + + +// Enumeration Mapping + +cpp_quote("typedef unsigned long BMDFrameFlags;") +cpp_quote("typedef unsigned long BMDVideoInputFlags;") +cpp_quote("typedef unsigned long BMDVideoInputFormatChangedEvents;") +cpp_quote("typedef unsigned long BMDDetectedVideoInputFormatFlags;") +cpp_quote("typedef unsigned long BMDDeckLinkCapturePassthroughMode;") +cpp_quote("typedef unsigned long BMDAnalogVideoFlags;") +cpp_quote("typedef unsigned long BMDDeviceBusyState;") +cpp_quote("#if 0") +typedef enum _BMDFrameFlags BMDFrameFlags; +typedef enum _BMDVideoInputFlags BMDVideoInputFlags; +typedef enum _BMDVideoInputFormatChangedEvents BMDVideoInputFormatChangedEvents; +typedef enum _BMDDetectedVideoInputFormatFlags BMDDetectedVideoInputFormatFlags; +typedef enum _BMDDeckLinkCapturePassthroughMode BMDDeckLinkCapturePassthroughMode; +typedef enum _BMDAnalogVideoFlags BMDAnalogVideoFlags; +typedef enum _BMDDeviceBusyState BMDDeviceBusyState; +cpp_quote("#endif") + +/* Enum BMDVideoOutputFlags - Flags to control the output of ancillary data along with video. */ + +typedef [v1_enum] enum _BMDVideoOutputFlags { + bmdVideoOutputFlagDefault = 0, + bmdVideoOutputVANC = 1 << 0, + bmdVideoOutputVITC = 1 << 1, + bmdVideoOutputRP188 = 1 << 2, + bmdVideoOutputDualStream3D = 1 << 4 +} BMDVideoOutputFlags; + +/* Enum BMDFrameFlags - Frame flags */ + +[v1_enum] enum _BMDFrameFlags { + bmdFrameFlagDefault = 0, + bmdFrameFlagFlipVertical = 1 << 0, + + /* Flags that are applicable only to instances of IDeckLinkVideoInputFrame */ + + bmdFrameHasNoInputSource = 1 << 31 +}; + +/* Enum BMDVideoInputFlags - Flags applicable to video input */ + +[v1_enum] enum _BMDVideoInputFlags { + bmdVideoInputFlagDefault = 0, + bmdVideoInputEnableFormatDetection = 1 << 0, + bmdVideoInputDualStream3D = 1 << 1 +}; + +/* Enum BMDVideoInputFormatChangedEvents - Bitmask passed to the VideoInputFormatChanged notification to identify the properties of the input signal that have changed */ + +[v1_enum] enum _BMDVideoInputFormatChangedEvents { + bmdVideoInputDisplayModeChanged = 1 << 0, + bmdVideoInputFieldDominanceChanged = 1 << 1, + bmdVideoInputColorspaceChanged = 1 << 2 +}; + +/* Enum BMDDetectedVideoInputFormatFlags - Flags passed to the VideoInputFormatChanged notification to describe the detected video input signal */ + +[v1_enum] enum _BMDDetectedVideoInputFormatFlags { + bmdDetectedVideoInputYCbCr422 = 1 << 0, + bmdDetectedVideoInputRGB444 = 1 << 1 +}; + +/* Enum BMDDeckLinkCapturePassthroughMode - Enumerates whether the video output is electrically connected to the video input or if the clean switching mode is enabled */ + +[v1_enum] enum _BMDDeckLinkCapturePassthroughMode { + bmdDeckLinkCapturePassthroughModeDirect = /* 'pdir' */ 0x70646972, + bmdDeckLinkCapturePassthroughModeCleanSwitch = /* 'pcln' */ 0x70636C6E +}; + +/* Enum BMDOutputFrameCompletionResult - Frame Completion Callback */ + +typedef [v1_enum] enum _BMDOutputFrameCompletionResult { + bmdOutputFrameCompleted, + bmdOutputFrameDisplayedLate, + bmdOutputFrameDropped, + bmdOutputFrameFlushed +} BMDOutputFrameCompletionResult; + +/* Enum BMDReferenceStatus - GenLock input status */ + +typedef [v1_enum] enum _BMDReferenceStatus { + bmdReferenceNotSupportedByHardware = 1 << 0, + bmdReferenceLocked = 1 << 1 +} BMDReferenceStatus; + +/* Enum BMDAudioSampleRate - Audio sample rates supported for output/input */ + +typedef [v1_enum] enum _BMDAudioSampleRate { + bmdAudioSampleRate48kHz = 48000 +} BMDAudioSampleRate; + +/* Enum BMDAudioSampleType - Audio sample sizes supported for output/input */ + +typedef [v1_enum] enum _BMDAudioSampleType { + bmdAudioSampleType16bitInteger = 16, + bmdAudioSampleType32bitInteger = 32 +} BMDAudioSampleType; + +/* Enum BMDAudioOutputStreamType - Audio output stream type */ + +typedef [v1_enum] enum _BMDAudioOutputStreamType { + bmdAudioOutputStreamContinuous, + bmdAudioOutputStreamContinuousDontResample, + bmdAudioOutputStreamTimestamped +} BMDAudioOutputStreamType; + +/* Enum BMDDisplayModeSupport - Output mode supported flags */ + +typedef [v1_enum] enum _BMDDisplayModeSupport { + bmdDisplayModeNotSupported = 0, + bmdDisplayModeSupported, + bmdDisplayModeSupportedWithConversion +} BMDDisplayModeSupport; + +/* Enum BMDTimecodeFormat - Timecode formats for frame metadata */ + +typedef [v1_enum] enum _BMDTimecodeFormat { + bmdTimecodeRP188VITC1 = /* 'rpv1' */ 0x72707631, // RP188 timecode where DBB1 equals VITC1 (line 9) + bmdTimecodeRP188VITC2 = /* 'rp12' */ 0x72703132, // RP188 timecode where DBB1 equals VITC2 (line 571) + bmdTimecodeRP188LTC = /* 'rplt' */ 0x72706C74, // RP188 timecode where DBB1 equals LTC (line 10) + bmdTimecodeRP188Any = /* 'rp18' */ 0x72703138, // For capture: return the first valid timecode in {VITC1, LTC ,VITC2} - For playback: set the timecode as VITC1 + bmdTimecodeVITC = /* 'vitc' */ 0x76697463, + bmdTimecodeVITCField2 = /* 'vit2' */ 0x76697432, + bmdTimecodeSerial = /* 'seri' */ 0x73657269 +} BMDTimecodeFormat; + +/* Enum BMDAnalogVideoFlags - Analog video display flags */ + +[v1_enum] enum _BMDAnalogVideoFlags { + bmdAnalogVideoFlagCompositeSetup75 = 1 << 0, + bmdAnalogVideoFlagComponentBetacamLevels = 1 << 1 +}; + +/* Enum BMDAudioConnection - Audio connection types */ + +typedef [v1_enum] enum _BMDAudioConnection { + bmdAudioConnectionEmbedded = /* 'embd' */ 0x656D6264, + bmdAudioConnectionAESEBU = /* 'aes ' */ 0x61657320, + bmdAudioConnectionAnalog = /* 'anlg' */ 0x616E6C67, + bmdAudioConnectionAnalogXLR = /* 'axlr' */ 0x61786C72, + bmdAudioConnectionAnalogRCA = /* 'arca' */ 0x61726361 +} BMDAudioConnection; + +/* Enum BMDAudioOutputAnalogAESSwitch - Audio output Analog/AESEBU switch */ + +typedef [v1_enum] enum _BMDAudioOutputAnalogAESSwitch { + bmdAudioOutputSwitchAESEBU = /* 'aes ' */ 0x61657320, + bmdAudioOutputSwitchAnalog = /* 'anlg' */ 0x616E6C67 +} BMDAudioOutputAnalogAESSwitch; + +/* Enum BMDVideoOutputConversionMode - Video/audio conversion mode */ + +typedef [v1_enum] enum _BMDVideoOutputConversionMode { + bmdNoVideoOutputConversion = /* 'none' */ 0x6E6F6E65, + bmdVideoOutputLetterboxDownconversion = /* 'ltbx' */ 0x6C746278, + bmdVideoOutputAnamorphicDownconversion = /* 'amph' */ 0x616D7068, + bmdVideoOutputHD720toHD1080Conversion = /* '720c' */ 0x37323063, + bmdVideoOutputHardwareLetterboxDownconversion = /* 'HWlb' */ 0x48576C62, + bmdVideoOutputHardwareAnamorphicDownconversion = /* 'HWam' */ 0x4857616D, + bmdVideoOutputHardwareCenterCutDownconversion = /* 'HWcc' */ 0x48576363, + bmdVideoOutputHardware720p1080pCrossconversion = /* 'xcap' */ 0x78636170, + bmdVideoOutputHardwareAnamorphic720pUpconversion = /* 'ua7p' */ 0x75613770, + bmdVideoOutputHardwareAnamorphic1080iUpconversion = /* 'ua1i' */ 0x75613169, + bmdVideoOutputHardwareAnamorphic149To720pUpconversion = /* 'u47p' */ 0x75343770, + bmdVideoOutputHardwareAnamorphic149To1080iUpconversion = /* 'u41i' */ 0x75343169, + bmdVideoOutputHardwarePillarbox720pUpconversion = /* 'up7p' */ 0x75703770, + bmdVideoOutputHardwarePillarbox1080iUpconversion = /* 'up1i' */ 0x75703169 +} BMDVideoOutputConversionMode; + +/* Enum BMDVideoInputConversionMode - Video input conversion mode */ + +typedef [v1_enum] enum _BMDVideoInputConversionMode { + bmdNoVideoInputConversion = /* 'none' */ 0x6E6F6E65, + bmdVideoInputLetterboxDownconversionFromHD1080 = /* '10lb' */ 0x31306C62, + bmdVideoInputAnamorphicDownconversionFromHD1080 = /* '10am' */ 0x3130616D, + bmdVideoInputLetterboxDownconversionFromHD720 = /* '72lb' */ 0x37326C62, + bmdVideoInputAnamorphicDownconversionFromHD720 = /* '72am' */ 0x3732616D, + bmdVideoInputLetterboxUpconversion = /* 'lbup' */ 0x6C627570, + bmdVideoInputAnamorphicUpconversion = /* 'amup' */ 0x616D7570 +} BMDVideoInputConversionMode; + +/* Enum BMDVideo3DPackingFormat - Video 3D packing format */ + +typedef [v1_enum] enum _BMDVideo3DPackingFormat { + bmdVideo3DPackingSidebySideHalf = /* 'sbsh' */ 0x73627368, + bmdVideo3DPackingLinebyLine = /* 'lbyl' */ 0x6C62796C, + bmdVideo3DPackingTopAndBottom = /* 'tabo' */ 0x7461626F, + bmdVideo3DPackingFramePacking = /* 'frpk' */ 0x6672706B, + bmdVideo3DPackingLeftOnly = /* 'left' */ 0x6C656674, + bmdVideo3DPackingRightOnly = /* 'righ' */ 0x72696768 +} BMDVideo3DPackingFormat; + +/* Enum BMDIdleVideoOutputOperation - Video output operation when not playing video */ + +typedef [v1_enum] enum _BMDIdleVideoOutputOperation { + bmdIdleVideoOutputBlack = /* 'blac' */ 0x626C6163, + bmdIdleVideoOutputLastFrame = /* 'lafa' */ 0x6C616661, + bmdIdleVideoOutputDesktop = /* 'desk' */ 0x6465736B +} BMDIdleVideoOutputOperation; + +/* Enum BMDDeckLinkAttributeID - DeckLink Attribute ID */ + +typedef [v1_enum] enum _BMDDeckLinkAttributeID { + + /* Flags */ + + BMDDeckLinkSupportsInternalKeying = /* 'keyi' */ 0x6B657969, + BMDDeckLinkSupportsExternalKeying = /* 'keye' */ 0x6B657965, + BMDDeckLinkSupportsHDKeying = /* 'keyh' */ 0x6B657968, + BMDDeckLinkSupportsInputFormatDetection = /* 'infd' */ 0x696E6664, + BMDDeckLinkHasReferenceInput = /* 'hrin' */ 0x6872696E, + BMDDeckLinkHasSerialPort = /* 'hspt' */ 0x68737074, + BMDDeckLinkHasAnalogVideoOutputGain = /* 'avog' */ 0x61766F67, + BMDDeckLinkCanOnlyAdjustOverallVideoOutputGain = /* 'ovog' */ 0x6F766F67, + BMDDeckLinkHasVideoInputAntiAliasingFilter = /* 'aafl' */ 0x6161666C, + BMDDeckLinkHasBypass = /* 'byps' */ 0x62797073, + BMDDeckLinkSupportsDesktopDisplay = /* 'extd' */ 0x65787464, + BMDDeckLinkSupportsClockTimingAdjustment = /* 'ctad' */ 0x63746164, + BMDDeckLinkSupportsFullDuplex = /* 'fdup' */ 0x66647570, + BMDDeckLinkSupportsFullFrameReferenceInputTimingOffset = /* 'frin' */ 0x6672696E, + + /* Integers */ + + BMDDeckLinkMaximumAudioChannels = /* 'mach' */ 0x6D616368, + BMDDeckLinkNumberOfSubDevices = /* 'nsbd' */ 0x6E736264, + BMDDeckLinkSubDeviceIndex = /* 'subi' */ 0x73756269, + BMDDeckLinkPersistentID = /* 'peid' */ 0x70656964, + BMDDeckLinkTopologicalID = /* 'toid' */ 0x746F6964, + BMDDeckLinkVideoOutputConnections = /* 'vocn' */ 0x766F636E, + BMDDeckLinkVideoInputConnections = /* 'vicn' */ 0x7669636E, + BMDDeckLinkDeviceBusyState = /* 'dbst' */ 0x64627374, + BMDDeckLinkVideoIOSupport = /* 'vios' */ 0x76696F73, // Returns a BMDVideoIOSupport bit field + + /* Floats */ + + BMDDeckLinkVideoInputGainMinimum = /* 'vigm' */ 0x7669676D, + BMDDeckLinkVideoInputGainMaximum = /* 'vigx' */ 0x76696778, + BMDDeckLinkVideoOutputGainMinimum = /* 'vogm' */ 0x766F676D, + BMDDeckLinkVideoOutputGainMaximum = /* 'vogx' */ 0x766F6778, + + /* Strings */ + + BMDDeckLinkSerialPortDeviceName = /* 'slpn' */ 0x736C706E +} BMDDeckLinkAttributeID; + +/* Enum BMDDeckLinkAPIInformationID - DeckLinkAPI information ID */ + +typedef [v1_enum] enum _BMDDeckLinkAPIInformationID { + BMDDeckLinkAPIVersion = /* 'vers' */ 0x76657273 +} BMDDeckLinkAPIInformationID; + +/* Enum BMDDeviceBusyState - Current device busy state */ + +[v1_enum] enum _BMDDeviceBusyState { + bmdDeviceCaptureBusy = 1 << 0, + bmdDevicePlaybackBusy = 1 << 1, + bmdDeviceSerialPortBusy = 1 << 2 +}; + +/* Enum BMDVideoIOSupport - Device video input/output support */ + +typedef [v1_enum] enum _BMDVideoIOSupport { + bmdDeviceSupportsCapture = 1 << 0, + bmdDeviceSupportsPlayback = 1 << 1 +} BMDVideoIOSupport; + +/* Enum BMD3DPreviewFormat - Linked Frame preview format */ + +typedef [v1_enum] enum _BMD3DPreviewFormat { + bmd3DPreviewFormatDefault = /* 'defa' */ 0x64656661, + bmd3DPreviewFormatLeftOnly = /* 'left' */ 0x6C656674, + bmd3DPreviewFormatRightOnly = /* 'righ' */ 0x72696768, + bmd3DPreviewFormatSideBySide = /* 'side' */ 0x73696465, + bmd3DPreviewFormatTopBottom = /* 'topb' */ 0x746F7062 +} BMD3DPreviewFormat; + +/* Enum BMDNotifications - Events that can be subscribed through IDeckLinkNotification */ + +typedef [v1_enum] enum _BMDNotifications { + bmdPreferencesChanged = /* 'pref' */ 0x70726566 +} BMDNotifications; + +// Forward Declarations + +interface IDeckLinkVideoOutputCallback; +interface IDeckLinkInputCallback; +interface IDeckLinkMemoryAllocator; +interface IDeckLinkAudioOutputCallback; +interface IDeckLinkIterator; +interface IDeckLinkAPIInformation; +interface IDeckLinkOutput; +interface IDeckLinkInput; +interface IDeckLinkVideoFrame; +interface IDeckLinkMutableVideoFrame; +interface IDeckLinkVideoFrame3DExtensions; +interface IDeckLinkVideoInputFrame; +interface IDeckLinkVideoFrameAncillary; +interface IDeckLinkAudioInputPacket; +interface IDeckLinkScreenPreviewCallback; +interface IDeckLinkGLScreenPreviewHelper; +interface IDeckLinkDX9ScreenPreviewHelper; +interface IDeckLinkNotificationCallback; +interface IDeckLinkNotification; +interface IDeckLinkAttributes; +interface IDeckLinkKeyer; +interface IDeckLinkVideoConversion; +interface IDeckLinkDeviceNotificationCallback; +interface IDeckLinkDiscovery; + +/* Interface IDeckLinkVideoOutputCallback - Frame completion callback. */ + +[ + object, + uuid(20AA5225-1958-47CB-820B-80A8D521A6EE), + helpstring("Frame completion callback.") +] interface IDeckLinkVideoOutputCallback : IUnknown +{ + HRESULT ScheduledFrameCompleted([in] IDeckLinkVideoFrame *completedFrame, [in] BMDOutputFrameCompletionResult result); + HRESULT ScheduledPlaybackHasStopped(void); +}; + +/* Interface IDeckLinkInputCallback - Frame arrival callback. */ + +[ + object, + uuid(DD04E5EC-7415-42AB-AE4A-E80C4DFC044A), + helpstring("Frame arrival callback.") +] interface IDeckLinkInputCallback : IUnknown +{ + HRESULT VideoInputFormatChanged([in] BMDVideoInputFormatChangedEvents notificationEvents, [in] IDeckLinkDisplayMode *newDisplayMode, [in] BMDDetectedVideoInputFormatFlags detectedSignalFlags); + HRESULT VideoInputFrameArrived([in] IDeckLinkVideoInputFrame* videoFrame, [in] IDeckLinkAudioInputPacket* audioPacket); +}; + +/* Interface IDeckLinkMemoryAllocator - Memory allocator for video frames. */ + +[ + object, + uuid(B36EB6E7-9D29-4AA8-92EF-843B87A289E8), + local, + helpstring("Memory allocator for video frames.") +] interface IDeckLinkMemoryAllocator : IUnknown +{ + HRESULT AllocateBuffer([in] unsigned long bufferSize, [out] void **allocatedBuffer); + HRESULT ReleaseBuffer([in] void *buffer); + + HRESULT Commit(void); + HRESULT Decommit(void); +}; + +/* Interface IDeckLinkAudioOutputCallback - Optional callback to allow audio samples to be pulled as required. */ + +[ + object, + uuid(403C681B-7F46-4A12-B993-2BB127084EE6), + local, + helpstring("Optional callback to allow audio samples to be pulled as required.") +] interface IDeckLinkAudioOutputCallback : IUnknown +{ + HRESULT RenderAudioSamples([in] BOOL preroll); +}; + +/* Interface IDeckLinkIterator - enumerates installed DeckLink hardware */ + +[ + object, + uuid(50FB36CD-3063-4B73-BDBB-958087F2D8BA), + helpstring("enumerates installed DeckLink hardware") +] interface IDeckLinkIterator : IUnknown +{ + HRESULT Next([out] IDeckLink **deckLinkInstance); +}; + +/* Interface IDeckLinkAPIInformation - DeckLinkAPI attribute interface */ + +[ + object, + uuid(7BEA3C68-730D-4322-AF34-8A7152B532A4), + helpstring("DeckLinkAPI attribute interface") +] interface IDeckLinkAPIInformation : IUnknown +{ + HRESULT GetFlag([in] BMDDeckLinkAPIInformationID cfgID, [out] BOOL *value); + HRESULT GetInt([in] BMDDeckLinkAPIInformationID cfgID, [out] LONGLONG *value); + HRESULT GetFloat([in] BMDDeckLinkAPIInformationID cfgID, [out] double *value); + HRESULT GetString([in] BMDDeckLinkAPIInformationID cfgID, [out] BSTR *value); +}; + +/* Interface IDeckLinkOutput - Created by QueryInterface from IDeckLink. */ + +[ + object, + uuid(CC5C8A6E-3F2F-4B3A-87EA-FD78AF300564), + local, + helpstring("Created by QueryInterface from IDeckLink.") +] interface IDeckLinkOutput : IUnknown +{ + HRESULT DoesSupportVideoMode([in] BMDDisplayMode displayMode, [in] BMDPixelFormat pixelFormat, [in] BMDVideoOutputFlags flags, [out] BMDDisplayModeSupport *result, [out] IDeckLinkDisplayMode **resultDisplayMode); + HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator **iterator); + + HRESULT SetScreenPreviewCallback([in] IDeckLinkScreenPreviewCallback *previewCallback); + + /* Video Output */ + + HRESULT EnableVideoOutput([in] BMDDisplayMode displayMode, [in] BMDVideoOutputFlags flags); + HRESULT DisableVideoOutput(void); + + HRESULT SetVideoOutputFrameMemoryAllocator([in] IDeckLinkMemoryAllocator *theAllocator); + HRESULT CreateVideoFrame([in] long width, [in] long height, [in] long rowBytes, [in] BMDPixelFormat pixelFormat, [in] BMDFrameFlags flags, [out] IDeckLinkMutableVideoFrame **outFrame); + HRESULT CreateAncillaryData([in] BMDPixelFormat pixelFormat, [out] IDeckLinkVideoFrameAncillary **outBuffer); + + HRESULT DisplayVideoFrameSync([in] IDeckLinkVideoFrame *theFrame); + HRESULT ScheduleVideoFrame([in] IDeckLinkVideoFrame *theFrame, [in] BMDTimeValue displayTime, [in] BMDTimeValue displayDuration, [in] BMDTimeScale timeScale); + HRESULT SetScheduledFrameCompletionCallback([in] IDeckLinkVideoOutputCallback *theCallback); + HRESULT GetBufferedVideoFrameCount([out] unsigned long *bufferedFrameCount); + + /* Audio Output */ + + HRESULT EnableAudioOutput([in] BMDAudioSampleRate sampleRate, [in] BMDAudioSampleType sampleType, [in] unsigned long channelCount, [in] BMDAudioOutputStreamType streamType); + HRESULT DisableAudioOutput(void); + + HRESULT WriteAudioSamplesSync([in] void *buffer, [in] unsigned long sampleFrameCount, [out] unsigned long *sampleFramesWritten); + + HRESULT BeginAudioPreroll(void); + HRESULT EndAudioPreroll(void); + HRESULT ScheduleAudioSamples([in] void *buffer, [in] unsigned long sampleFrameCount, [in] BMDTimeValue streamTime, [in] BMDTimeScale timeScale, [out] unsigned long *sampleFramesWritten); + + HRESULT GetBufferedAudioSampleFrameCount([out] unsigned long *bufferedSampleFrameCount); + HRESULT FlushBufferedAudioSamples(void); + + HRESULT SetAudioCallback([in] IDeckLinkAudioOutputCallback *theCallback); + + /* Output Control */ + + HRESULT StartScheduledPlayback([in] BMDTimeValue playbackStartTime, [in] BMDTimeScale timeScale, [in] double playbackSpeed); + HRESULT StopScheduledPlayback([in] BMDTimeValue stopPlaybackAtTime, [out] BMDTimeValue *actualStopTime, [in] BMDTimeScale timeScale); + HRESULT IsScheduledPlaybackRunning([out] BOOL *active); + HRESULT GetScheduledStreamTime([in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue *streamTime, [out] double *playbackSpeed); + HRESULT GetReferenceStatus([out] BMDReferenceStatus *referenceStatus); + + /* Hardware Timing */ + + HRESULT GetHardwareReferenceClock([in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue *hardwareTime, [out] BMDTimeValue *timeInFrame, [out] BMDTimeValue *ticksPerFrame); + HRESULT GetFrameCompletionReferenceTimestamp([in] IDeckLinkVideoFrame *theFrame, [in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue *frameCompletionTimestamp); +}; + +/* Interface IDeckLinkInput - Created by QueryInterface from IDeckLink. */ + +[ + object, + uuid(AF22762B-DFAC-4846-AA79-FA8883560995), + helpstring("Created by QueryInterface from IDeckLink.") +] interface IDeckLinkInput : IUnknown +{ + HRESULT DoesSupportVideoMode([in] BMDDisplayMode displayMode, [in] BMDPixelFormat pixelFormat, [in] BMDVideoInputFlags flags, [out] BMDDisplayModeSupport *result, [out] IDeckLinkDisplayMode **resultDisplayMode); + HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator **iterator); + + HRESULT SetScreenPreviewCallback([in] IDeckLinkScreenPreviewCallback *previewCallback); + + /* Video Input */ + + HRESULT EnableVideoInput([in] BMDDisplayMode displayMode, [in] BMDPixelFormat pixelFormat, [in] BMDVideoInputFlags flags); + HRESULT DisableVideoInput(void); + HRESULT GetAvailableVideoFrameCount([out] unsigned long *availableFrameCount); + HRESULT SetVideoInputFrameMemoryAllocator([in] IDeckLinkMemoryAllocator *theAllocator); + + /* Audio Input */ + + HRESULT EnableAudioInput([in] BMDAudioSampleRate sampleRate, [in] BMDAudioSampleType sampleType, [in] unsigned long channelCount); + HRESULT DisableAudioInput(void); + HRESULT GetAvailableAudioSampleFrameCount([out] unsigned long *availableSampleFrameCount); + + /* Input Control */ + + HRESULT StartStreams(void); + HRESULT StopStreams(void); + HRESULT PauseStreams(void); + HRESULT FlushStreams(void); + HRESULT SetCallback([in] IDeckLinkInputCallback *theCallback); + + /* Hardware Timing */ + + HRESULT GetHardwareReferenceClock([in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue *hardwareTime, [out] BMDTimeValue *timeInFrame, [out] BMDTimeValue *ticksPerFrame); +}; + +/* Interface IDeckLinkVideoFrame - Interface to encapsulate a video frame; can be caller-implemented. */ + +[ + object, + uuid(3F716FE0-F023-4111-BE5D-EF4414C05B17), + local, + helpstring("Interface to encapsulate a video frame; can be caller-implemented.") +] interface IDeckLinkVideoFrame : IUnknown +{ + long GetWidth(void); + long GetHeight(void); + long GetRowBytes(void); + BMDPixelFormat GetPixelFormat(void); + BMDFrameFlags GetFlags(void); + HRESULT GetBytes([out] void **buffer); + + HRESULT GetTimecode([in] BMDTimecodeFormat format, [out] IDeckLinkTimecode **timecode); + HRESULT GetAncillaryData([out] IDeckLinkVideoFrameAncillary **ancillary); +}; + +/* Interface IDeckLinkMutableVideoFrame - Created by IDeckLinkOutput::CreateVideoFrame. */ + +[ + object, + uuid(69E2639F-40DA-4E19-B6F2-20ACE815C390), + local, + helpstring("Created by IDeckLinkOutput::CreateVideoFrame.") +] interface IDeckLinkMutableVideoFrame : IDeckLinkVideoFrame +{ + HRESULT SetFlags([in] BMDFrameFlags newFlags); + + HRESULT SetTimecode([in] BMDTimecodeFormat format, [in] IDeckLinkTimecode *timecode); + HRESULT SetTimecodeFromComponents([in] BMDTimecodeFormat format, [in] unsigned char hours, [in] unsigned char minutes, [in] unsigned char seconds, [in] unsigned char frames, [in] BMDTimecodeFlags flags); + HRESULT SetAncillaryData([in] IDeckLinkVideoFrameAncillary *ancillary); + HRESULT SetTimecodeUserBits([in] BMDTimecodeFormat format, [in] BMDTimecodeUserBits userBits); +}; + +/* Interface IDeckLinkVideoFrame3DExtensions - Optional interface implemented on IDeckLinkVideoFrame to support 3D frames */ + +[ + object, + uuid(DA0F7E4A-EDC7-48A8-9CDD-2DB51C729CD7), + local, + helpstring("Optional interface implemented on IDeckLinkVideoFrame to support 3D frames") +] interface IDeckLinkVideoFrame3DExtensions : IUnknown +{ + BMDVideo3DPackingFormat Get3DPackingFormat(void); + HRESULT GetFrameForRightEye([out] IDeckLinkVideoFrame* *rightEyeFrame); +}; + +/* Interface IDeckLinkVideoInputFrame - Provided by the IDeckLinkVideoInput frame arrival callback. */ + +[ + object, + uuid(05CFE374-537C-4094-9A57-680525118F44), + local, + helpstring("Provided by the IDeckLinkVideoInput frame arrival callback.") +] interface IDeckLinkVideoInputFrame : IDeckLinkVideoFrame +{ + HRESULT GetStreamTime([out] BMDTimeValue *frameTime, [out] BMDTimeValue *frameDuration, [in] BMDTimeScale timeScale); + HRESULT GetHardwareReferenceTimestamp([in] BMDTimeScale timeScale, [out] BMDTimeValue *frameTime, [out] BMDTimeValue *frameDuration); +}; + +/* Interface IDeckLinkVideoFrameAncillary - Obtained through QueryInterface() on an IDeckLinkVideoFrame object. */ + +[ + object, + uuid(732E723C-D1A4-4E29-9E8E-4A88797A0004), + local, + helpstring("Obtained through QueryInterface() on an IDeckLinkVideoFrame object.") +] interface IDeckLinkVideoFrameAncillary : IUnknown +{ + + HRESULT GetBufferForVerticalBlankingLine([in] unsigned long lineNumber, [out] void **buffer); + BMDPixelFormat GetPixelFormat(void); + BMDDisplayMode GetDisplayMode(void); +}; + +/* Interface IDeckLinkAudioInputPacket - Provided by the IDeckLinkInput callback. */ + +[ + object, + uuid(E43D5870-2894-11DE-8C30-0800200C9A66), + local, + helpstring("Provided by the IDeckLinkInput callback.") +] interface IDeckLinkAudioInputPacket : IUnknown +{ + long GetSampleFrameCount(void); + HRESULT GetBytes([out] void **buffer); + HRESULT GetPacketTime([out] BMDTimeValue *packetTime, [in] BMDTimeScale timeScale); +}; + +/* Interface IDeckLinkScreenPreviewCallback - Screen preview callback */ + +[ + object, + uuid(B1D3F49A-85FE-4C5D-95C8-0B5D5DCCD438), + local, + helpstring("Screen preview callback") +] interface IDeckLinkScreenPreviewCallback : IUnknown +{ + HRESULT DrawFrame([in] IDeckLinkVideoFrame *theFrame); +}; + +/* Interface IDeckLinkGLScreenPreviewHelper - Created with CoCreateInstance(). */ + +[ + object, + uuid(504E2209-CAC7-4C1A-9FB4-C5BB6274D22F), + local, + helpstring("Created with CoCreateInstance().") +] interface IDeckLinkGLScreenPreviewHelper : IUnknown +{ + + /* Methods must be called with OpenGL context set */ + + HRESULT InitializeGL(void); + HRESULT PaintGL(void); + HRESULT SetFrame([in] IDeckLinkVideoFrame *theFrame); + HRESULT Set3DPreviewFormat([in] BMD3DPreviewFormat previewFormat); +}; + +/* Interface IDeckLinkDX9ScreenPreviewHelper - Created with CoCreateInstance(). */ + +[ + object, + uuid(2094B522-D1A1-40C0-9AC7-1C012218EF02), + local, + helpstring("Created with CoCreateInstance().") +] interface IDeckLinkDX9ScreenPreviewHelper : IUnknown +{ + HRESULT Initialize([in] void *device); + HRESULT Render([in] RECT *rc); + HRESULT SetFrame([in] IDeckLinkVideoFrame *theFrame); + HRESULT Set3DPreviewFormat([in] BMD3DPreviewFormat previewFormat); +}; + +/* Interface IDeckLinkNotificationCallback - DeckLink Notification Callback Interface */ + +[ + object, + uuid(b002a1ec-070d-4288-8289-bd5d36e5ff0d), + local, + helpstring("DeckLink Notification Callback Interface") +] interface IDeckLinkNotificationCallback : IUnknown +{ + HRESULT Notify([in] BMDNotifications topic, [in] ULONGLONG param1, [in] ULONGLONG param2); +}; + +/* Interface IDeckLinkNotification - DeckLink Notification interface */ + +[ + object, + uuid(0a1fb207-e215-441b-9b19-6fa1575946c5), + local, + helpstring("DeckLink Notification interface") +] interface IDeckLinkNotification : IUnknown +{ + HRESULT Subscribe([in] BMDNotifications topic, [in] IDeckLinkNotificationCallback *theCallback); + HRESULT Unsubscribe([in] BMDNotifications topic, [in] IDeckLinkNotificationCallback *theCallback); +}; + +/* Interface IDeckLinkAttributes - DeckLink Attribute interface */ + +[ + object, + uuid(ABC11843-D966-44CB-96E2-A1CB5D3135C4), + local, + helpstring("DeckLink Attribute interface") +] interface IDeckLinkAttributes : IUnknown +{ + HRESULT GetFlag([in] BMDDeckLinkAttributeID cfgID, [out] BOOL *value); + HRESULT GetInt([in] BMDDeckLinkAttributeID cfgID, [out] LONGLONG *value); + HRESULT GetFloat([in] BMDDeckLinkAttributeID cfgID, [out] double *value); + HRESULT GetString([in] BMDDeckLinkAttributeID cfgID, [out] BSTR *value); +}; + +/* Interface IDeckLinkKeyer - DeckLink Keyer interface */ + +[ + object, + uuid(89AFCAF5-65F8-421E-98F7-96FE5F5BFBA3), + local, + helpstring("DeckLink Keyer interface") +] interface IDeckLinkKeyer : IUnknown +{ + HRESULT Enable([in] BOOL isExternal); + HRESULT SetLevel([in] unsigned char level); + HRESULT RampUp([in] unsigned long numberOfFrames); + HRESULT RampDown([in] unsigned long numberOfFrames); + HRESULT Disable(void); +}; + +/* Interface IDeckLinkVideoConversion - Created with CoCreateInstance(). */ + +[ + object, + uuid(3BBCB8A2-DA2C-42D9-B5D8-88083644E99A), + local, + helpstring("Created with CoCreateInstance().") +] interface IDeckLinkVideoConversion : IUnknown +{ + HRESULT ConvertFrame([in] IDeckLinkVideoFrame* srcFrame, [in] IDeckLinkVideoFrame* dstFrame); +}; + +/* Interface IDeckLinkDeviceNotificationCallback - DeckLink device arrival/removal notification callbacks */ + +[ + object, + uuid(4997053B-0ADF-4CC8-AC70-7A50C4BE728F), + helpstring("DeckLink device arrival/removal notification callbacks") +] interface IDeckLinkDeviceNotificationCallback : IUnknown +{ + HRESULT DeckLinkDeviceArrived([in] IDeckLink* deckLinkDevice); + HRESULT DeckLinkDeviceRemoved([in] IDeckLink* deckLinkDevice); +}; + +/* Interface IDeckLinkDiscovery - DeckLink device discovery */ + +[ + object, + uuid(CDBF631C-BC76-45FA-B44D-C55059BC6101), + helpstring("DeckLink device discovery") +] interface IDeckLinkDiscovery : IUnknown +{ + HRESULT InstallDeviceNotifications([in] IDeckLinkDeviceNotificationCallback* deviceNotificationCallback); + HRESULT UninstallDeviceNotifications(void); +}; + +/* Coclasses */ + +importlib("stdole2.tlb"); + +[ + uuid(1F2E109A-8F4F-49E4-9203-135595CB6FA5), + helpstring("CDeckLinkIterator Class") +] coclass CDeckLinkIterator +{ + [default] interface IDeckLinkIterator; +}; + +[ + uuid(263CA19F-ED09-482E-9F9D-84005783A237), + helpstring("CDeckLinkAPIInformation Class") +] coclass CDeckLinkAPIInformation +{ + [default] interface IDeckLinkAPIInformation; +}; + +[ + uuid(F63E77C7-B655-4A4A-9AD0-3CA85D394343), + helpstring("CDeckLinkGLScreenPreviewHelper Class") +] coclass CDeckLinkGLScreenPreviewHelper +{ + [default] interface IDeckLinkGLScreenPreviewHelper; +}; + +[ + uuid(CC010023-E01D-4525-9D59-80C8AB3DC7A0), + helpstring("CDeckLinkDX9ScreenPreviewHelper Class") +] coclass CDeckLinkDX9ScreenPreviewHelper +{ + [default] interface IDeckLinkDX9ScreenPreviewHelper; +}; + +[ + uuid(7DBBBB11-5B7B-467D-AEA4-CEA468FD368C), + helpstring("CDeckLinkVideoConversion Class") +] coclass CDeckLinkVideoConversion +{ + [default] interface IDeckLinkVideoConversion; +}; + +[ + uuid(1073A05C-D885-47E9-B3C6-129B3F9F648B), + helpstring("CDeckLinkDiscovery Class") +] coclass CDeckLinkDiscovery +{ + [default] interface IDeckLinkDiscovery; +}; + + +// import deprecated interfaces +#include "DeckLinkAPI_v9_9.idl" +#include "DeckLinkAPI_v9_2.idl" +#include "DeckLinkAPI_v8_1.idl" +#include "DeckLinkAPI_v8_0.idl" +#include "DeckLinkAPI_v7_9.idl" +#include "DeckLinkAPI_v7_6.idl" +#include "DeckLinkAPI_v7_3.idl" +#include "DeckLinkAPI_v7_1.idl" +}; diff --git a/third_party/decklink/win/include/DeckLinkAPIConfiguration.idl b/third_party/decklink/win/include/DeckLinkAPIConfiguration.idl new file mode 100644 index 0000000..80b090c --- /dev/null +++ b/third_party/decklink/win/include/DeckLinkAPIConfiguration.idl @@ -0,0 +1,175 @@ +/* -LICENSE-START- +** Copyright (c) 2014 Blackmagic Design +** +** Permission is hereby granted, free of charge, to any person or organization +** obtaining a copy of the software and accompanying documentation covered by +** this license (the "Software") to use, reproduce, display, distribute, +** execute, and transmit the Software, and to prepare derivative works of the +** Software, and to permit third-parties to whom the Software is furnished to +** do so, all subject to the following: +** +** The copyright notices in the Software and this entire statement, including +** the above license grant, this restriction and the following disclaimer, +** must be included in all copies of the Software, in whole or in part, and +** all derivative works of the Software, unless such copies or derivative +** works are solely in the form of machine-executable object code generated by +** a source language processor. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +** -LICENSE-END- +*/ + + +#ifndef BMD_CONST + #if defined(_MSC_VER) + #define BMD_CONST __declspec(selectany) static const + #else + #define BMD_CONST static const + #endif +#endif + +// Type Declarations + + +// Enumeration Mapping + +cpp_quote("#if 0") +cpp_quote("#endif") + +/* Enum BMDDeckLinkConfigurationID - DeckLink Configuration ID */ + +typedef [v1_enum] enum _BMDDeckLinkConfigurationID { + + /* Serial port Flags */ + + bmdDeckLinkConfigSwapSerialRxTx = /* 'ssrt' */ 0x73737274, + + /* Video Input/Output Flags */ + + bmdDeckLinkConfigUse1080pNotPsF = /* 'fpro' */ 0x6670726F, + + /* Video Input/Output Integers */ + + bmdDeckLinkConfigHDMI3DPackingFormat = /* '3dpf' */ 0x33647066, + bmdDeckLinkConfigBypass = /* 'byps' */ 0x62797073, + bmdDeckLinkConfigClockTimingAdjustment = /* 'ctad' */ 0x63746164, + + /* Audio Input/Output Flags */ + + bmdDeckLinkConfigAnalogAudioConsumerLevels = /* 'aacl' */ 0x6161636C, + + /* Video output flags */ + + bmdDeckLinkConfigFieldFlickerRemoval = /* 'fdfr' */ 0x66646672, + bmdDeckLinkConfigHD1080p24ToHD1080i5994Conversion = /* 'to59' */ 0x746F3539, + bmdDeckLinkConfig444SDIVideoOutput = /* '444o' */ 0x3434346F, + bmdDeckLinkConfig3GBpsVideoOutput = /* '3gbs' */ 0x33676273, + bmdDeckLinkConfigBlackVideoOutputDuringCapture = /* 'bvoc' */ 0x62766F63, + bmdDeckLinkConfigLowLatencyVideoOutput = /* 'llvo' */ 0x6C6C766F, + + /* Video Output Integers */ + + bmdDeckLinkConfigVideoOutputConnection = /* 'vocn' */ 0x766F636E, + bmdDeckLinkConfigVideoOutputConversionMode = /* 'vocm' */ 0x766F636D, + bmdDeckLinkConfigAnalogVideoOutputFlags = /* 'avof' */ 0x61766F66, + bmdDeckLinkConfigReferenceInputTimingOffset = /* 'glot' */ 0x676C6F74, + bmdDeckLinkConfigVideoOutputIdleOperation = /* 'voio' */ 0x766F696F, + bmdDeckLinkConfigDefaultVideoOutputMode = /* 'dvom' */ 0x64766F6D, + bmdDeckLinkConfigDefaultVideoOutputModeFlags = /* 'dvof' */ 0x64766F66, + + /* Video Output Floats */ + + bmdDeckLinkConfigVideoOutputComponentLumaGain = /* 'oclg' */ 0x6F636C67, + bmdDeckLinkConfigVideoOutputComponentChromaBlueGain = /* 'occb' */ 0x6F636362, + bmdDeckLinkConfigVideoOutputComponentChromaRedGain = /* 'occr' */ 0x6F636372, + bmdDeckLinkConfigVideoOutputCompositeLumaGain = /* 'oilg' */ 0x6F696C67, + bmdDeckLinkConfigVideoOutputCompositeChromaGain = /* 'oicg' */ 0x6F696367, + bmdDeckLinkConfigVideoOutputSVideoLumaGain = /* 'oslg' */ 0x6F736C67, + bmdDeckLinkConfigVideoOutputSVideoChromaGain = /* 'oscg' */ 0x6F736367, + + /* Video Input Flags */ + + bmdDeckLinkConfigVideoInputScanning = /* 'visc' */ 0x76697363, // Applicable to H264 Pro Recorder only + bmdDeckLinkConfigUseDedicatedLTCInput = /* 'dltc' */ 0x646C7463, // Use timecode from LTC input instead of SDI stream + + /* Video Input Integers */ + + bmdDeckLinkConfigVideoInputConnection = /* 'vicn' */ 0x7669636E, + bmdDeckLinkConfigAnalogVideoInputFlags = /* 'avif' */ 0x61766966, + bmdDeckLinkConfigVideoInputConversionMode = /* 'vicm' */ 0x7669636D, + bmdDeckLinkConfig32PulldownSequenceInitialTimecodeFrame = /* 'pdif' */ 0x70646966, + bmdDeckLinkConfigVANCSourceLine1Mapping = /* 'vsl1' */ 0x76736C31, + bmdDeckLinkConfigVANCSourceLine2Mapping = /* 'vsl2' */ 0x76736C32, + bmdDeckLinkConfigVANCSourceLine3Mapping = /* 'vsl3' */ 0x76736C33, + bmdDeckLinkConfigCapturePassThroughMode = /* 'cptm' */ 0x6370746D, + + /* Video Input Floats */ + + bmdDeckLinkConfigVideoInputComponentLumaGain = /* 'iclg' */ 0x69636C67, + bmdDeckLinkConfigVideoInputComponentChromaBlueGain = /* 'iccb' */ 0x69636362, + bmdDeckLinkConfigVideoInputComponentChromaRedGain = /* 'iccr' */ 0x69636372, + bmdDeckLinkConfigVideoInputCompositeLumaGain = /* 'iilg' */ 0x69696C67, + bmdDeckLinkConfigVideoInputCompositeChromaGain = /* 'iicg' */ 0x69696367, + bmdDeckLinkConfigVideoInputSVideoLumaGain = /* 'islg' */ 0x69736C67, + bmdDeckLinkConfigVideoInputSVideoChromaGain = /* 'iscg' */ 0x69736367, + + /* Audio Input Integers */ + + bmdDeckLinkConfigAudioInputConnection = /* 'aicn' */ 0x6169636E, + + /* Audio Input Floats */ + + bmdDeckLinkConfigAnalogAudioInputScaleChannel1 = /* 'ais1' */ 0x61697331, + bmdDeckLinkConfigAnalogAudioInputScaleChannel2 = /* 'ais2' */ 0x61697332, + bmdDeckLinkConfigAnalogAudioInputScaleChannel3 = /* 'ais3' */ 0x61697333, + bmdDeckLinkConfigAnalogAudioInputScaleChannel4 = /* 'ais4' */ 0x61697334, + bmdDeckLinkConfigDigitalAudioInputScale = /* 'dais' */ 0x64616973, + + /* Audio Output Integers */ + + bmdDeckLinkConfigAudioOutputAESAnalogSwitch = /* 'aoaa' */ 0x616F6161, + + /* Audio Output Floats */ + + bmdDeckLinkConfigAnalogAudioOutputScaleChannel1 = /* 'aos1' */ 0x616F7331, + bmdDeckLinkConfigAnalogAudioOutputScaleChannel2 = /* 'aos2' */ 0x616F7332, + bmdDeckLinkConfigAnalogAudioOutputScaleChannel3 = /* 'aos3' */ 0x616F7333, + bmdDeckLinkConfigAnalogAudioOutputScaleChannel4 = /* 'aos4' */ 0x616F7334, + bmdDeckLinkConfigDigitalAudioOutputScale = /* 'daos' */ 0x64616F73 +} BMDDeckLinkConfigurationID; + +// Forward Declarations + +interface IDeckLinkConfiguration; + +/* Interface IDeckLinkConfiguration - DeckLink Configuration interface */ + +[ + object, + uuid(C679A35B-610C-4D09-B748-1D0478100FC0), + local, + helpstring("DeckLink Configuration interface") +] interface IDeckLinkConfiguration : IUnknown +{ + HRESULT SetFlag([in] BMDDeckLinkConfigurationID cfgID, [in] BOOL value); + HRESULT GetFlag([in] BMDDeckLinkConfigurationID cfgID, [out] BOOL *value); + HRESULT SetInt([in] BMDDeckLinkConfigurationID cfgID, [in] LONGLONG value); + HRESULT GetInt([in] BMDDeckLinkConfigurationID cfgID, [out] LONGLONG *value); + HRESULT SetFloat([in] BMDDeckLinkConfigurationID cfgID, [in] double value); + HRESULT GetFloat([in] BMDDeckLinkConfigurationID cfgID, [out] double *value); + HRESULT SetString([in] BMDDeckLinkConfigurationID cfgID, [in] BSTR value); + HRESULT GetString([in] BMDDeckLinkConfigurationID cfgID, [out] BSTR *value); + HRESULT WriteConfigurationToPreferences(void); +}; + +/* Coclasses */ + +importlib("stdole2.tlb"); + + diff --git a/third_party/decklink/win/include/DeckLinkAPIDeckControl.idl b/third_party/decklink/win/include/DeckLinkAPIDeckControl.idl new file mode 100644 index 0000000..7786d43 --- /dev/null +++ b/third_party/decklink/win/include/DeckLinkAPIDeckControl.idl @@ -0,0 +1,206 @@ +/* -LICENSE-START- +** Copyright (c) 2014 Blackmagic Design +** +** Permission is hereby granted, free of charge, to any person or organization +** obtaining a copy of the software and accompanying documentation covered by +** this license (the "Software") to use, reproduce, display, distribute, +** execute, and transmit the Software, and to prepare derivative works of the +** Software, and to permit third-parties to whom the Software is furnished to +** do so, all subject to the following: +** +** The copyright notices in the Software and this entire statement, including +** the above license grant, this restriction and the following disclaimer, +** must be included in all copies of the Software, in whole or in part, and +** all derivative works of the Software, unless such copies or derivative +** works are solely in the form of machine-executable object code generated by +** a source language processor. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +** -LICENSE-END- +*/ + + +#ifndef BMD_CONST + #if defined(_MSC_VER) + #define BMD_CONST __declspec(selectany) static const + #else + #define BMD_CONST static const + #endif +#endif + +// Type Declarations + + +// Enumeration Mapping + +cpp_quote("typedef unsigned long BMDDeckControlStatusFlags;") +cpp_quote("typedef unsigned long BMDDeckControlExportModeOpsFlags;") +cpp_quote("#if 0") +typedef enum _BMDDeckControlStatusFlags BMDDeckControlStatusFlags; +typedef enum _BMDDeckControlExportModeOpsFlags BMDDeckControlExportModeOpsFlags; +cpp_quote("#endif") + +/* Enum BMDDeckControlMode - DeckControl mode */ + +typedef [v1_enum] enum _BMDDeckControlMode { + bmdDeckControlNotOpened = /* 'ntop' */ 0x6E746F70, + bmdDeckControlVTRControlMode = /* 'vtrc' */ 0x76747263, + bmdDeckControlExportMode = /* 'expm' */ 0x6578706D, + bmdDeckControlCaptureMode = /* 'capm' */ 0x6361706D +} BMDDeckControlMode; + +/* Enum BMDDeckControlEvent - DeckControl event */ + +typedef [v1_enum] enum _BMDDeckControlEvent { + bmdDeckControlAbortedEvent = /* 'abte' */ 0x61627465, // This event is triggered when a capture or edit-to-tape operation is aborted. + + /* Export-To-Tape events */ + + bmdDeckControlPrepareForExportEvent = /* 'pfee' */ 0x70666565, // This event is triggered a few frames before reaching the in-point. IDeckLinkInput::StartScheduledPlayback() should be called at this point. + bmdDeckControlExportCompleteEvent = /* 'exce' */ 0x65786365, // This event is triggered a few frames after reaching the out-point. At this point, it is safe to stop playback. + + /* Capture events */ + + bmdDeckControlPrepareForCaptureEvent = /* 'pfce' */ 0x70666365, // This event is triggered a few frames before reaching the in-point. The serial timecode attached to IDeckLinkVideoInputFrames is now valid. + bmdDeckControlCaptureCompleteEvent = /* 'ccev' */ 0x63636576 // This event is triggered a few frames after reaching the out-point. +} BMDDeckControlEvent; + +/* Enum BMDDeckControlVTRControlState - VTR Control state */ + +typedef [v1_enum] enum _BMDDeckControlVTRControlState { + bmdDeckControlNotInVTRControlMode = /* 'nvcm' */ 0x6E76636D, + bmdDeckControlVTRControlPlaying = /* 'vtrp' */ 0x76747270, + bmdDeckControlVTRControlRecording = /* 'vtrr' */ 0x76747272, + bmdDeckControlVTRControlStill = /* 'vtra' */ 0x76747261, + bmdDeckControlVTRControlShuttleForward = /* 'vtsf' */ 0x76747366, + bmdDeckControlVTRControlShuttleReverse = /* 'vtsr' */ 0x76747372, + bmdDeckControlVTRControlJogForward = /* 'vtjf' */ 0x76746A66, + bmdDeckControlVTRControlJogReverse = /* 'vtjr' */ 0x76746A72, + bmdDeckControlVTRControlStopped = /* 'vtro' */ 0x7674726F +} BMDDeckControlVTRControlState; + +/* Enum BMDDeckControlStatusFlags - Deck Control status flags */ + +[v1_enum] enum _BMDDeckControlStatusFlags { + bmdDeckControlStatusDeckConnected = 1 << 0, + bmdDeckControlStatusRemoteMode = 1 << 1, + bmdDeckControlStatusRecordInhibited = 1 << 2, + bmdDeckControlStatusCassetteOut = 1 << 3 +}; + +/* Enum BMDDeckControlExportModeOpsFlags - Export mode flags */ + +[v1_enum] enum _BMDDeckControlExportModeOpsFlags { + bmdDeckControlExportModeInsertVideo = 1 << 0, + bmdDeckControlExportModeInsertAudio1 = 1 << 1, + bmdDeckControlExportModeInsertAudio2 = 1 << 2, + bmdDeckControlExportModeInsertAudio3 = 1 << 3, + bmdDeckControlExportModeInsertAudio4 = 1 << 4, + bmdDeckControlExportModeInsertAudio5 = 1 << 5, + bmdDeckControlExportModeInsertAudio6 = 1 << 6, + bmdDeckControlExportModeInsertAudio7 = 1 << 7, + bmdDeckControlExportModeInsertAudio8 = 1 << 8, + bmdDeckControlExportModeInsertAudio9 = 1 << 9, + bmdDeckControlExportModeInsertAudio10 = 1 << 10, + bmdDeckControlExportModeInsertAudio11 = 1 << 11, + bmdDeckControlExportModeInsertAudio12 = 1 << 12, + bmdDeckControlExportModeInsertTimeCode = 1 << 13, + bmdDeckControlExportModeInsertAssemble = 1 << 14, + bmdDeckControlExportModeInsertPreview = 1 << 15, + bmdDeckControlUseManualExport = 1 << 16 +}; + +/* Enum BMDDeckControlError - Deck Control error */ + +typedef [v1_enum] enum _BMDDeckControlError { + bmdDeckControlNoError = /* 'noer' */ 0x6E6F6572, + bmdDeckControlModeError = /* 'moer' */ 0x6D6F6572, + bmdDeckControlMissedInPointError = /* 'mier' */ 0x6D696572, + bmdDeckControlDeckTimeoutError = /* 'dter' */ 0x64746572, + bmdDeckControlCommandFailedError = /* 'cfer' */ 0x63666572, + bmdDeckControlDeviceAlreadyOpenedError = /* 'dalo' */ 0x64616C6F, + bmdDeckControlFailedToOpenDeviceError = /* 'fder' */ 0x66646572, + bmdDeckControlInLocalModeError = /* 'lmer' */ 0x6C6D6572, + bmdDeckControlEndOfTapeError = /* 'eter' */ 0x65746572, + bmdDeckControlUserAbortError = /* 'uaer' */ 0x75616572, + bmdDeckControlNoTapeInDeckError = /* 'nter' */ 0x6E746572, + bmdDeckControlNoVideoFromCardError = /* 'nvfc' */ 0x6E766663, + bmdDeckControlNoCommunicationError = /* 'ncom' */ 0x6E636F6D, + bmdDeckControlBufferTooSmallError = /* 'btsm' */ 0x6274736D, + bmdDeckControlBadChecksumError = /* 'chks' */ 0x63686B73, + bmdDeckControlUnknownError = /* 'uner' */ 0x756E6572 +} BMDDeckControlError; + +// Forward Declarations + +interface IDeckLinkDeckControlStatusCallback; +interface IDeckLinkDeckControl; + +/* Interface IDeckLinkDeckControlStatusCallback - Deck control state change callback. */ + +[ + object, + uuid(53436FFB-B434-4906-BADC-AE3060FFE8EF), + helpstring("Deck control state change callback.") +] interface IDeckLinkDeckControlStatusCallback : IUnknown +{ + HRESULT TimecodeUpdate([in] BMDTimecodeBCD currentTimecode); + HRESULT VTRControlStateChanged([in] BMDDeckControlVTRControlState newState, [in] BMDDeckControlError error); + HRESULT DeckControlEventReceived([in] BMDDeckControlEvent event, [in] BMDDeckControlError error); + HRESULT DeckControlStatusChanged([in] BMDDeckControlStatusFlags flags, [in] unsigned long mask); +}; + +/* Interface IDeckLinkDeckControl - Deck Control main interface */ + +[ + object, + uuid(8E1C3ACE-19C7-4E00-8B92-D80431D958BE), + helpstring("Deck Control main interface") +] interface IDeckLinkDeckControl : IUnknown +{ + HRESULT Open([in] BMDTimeScale timeScale, [in] BMDTimeValue timeValue, [in] BOOL timecodeIsDropFrame, [out] BMDDeckControlError *error); + HRESULT Close([in] BOOL standbyOn); + HRESULT GetCurrentState([out] BMDDeckControlMode *mode, [out] BMDDeckControlVTRControlState *vtrControlState, [out] BMDDeckControlStatusFlags *flags); + HRESULT SetStandby([in] BOOL standbyOn); + HRESULT SendCommand([in] unsigned char *inBuffer, [in] unsigned long inBufferSize, [out] unsigned char *outBuffer, [out] unsigned long *outDataSize, [in] unsigned long outBufferSize, [out] BMDDeckControlError *error); + HRESULT Play([out] BMDDeckControlError *error); + HRESULT Stop([out] BMDDeckControlError *error); + HRESULT TogglePlayStop([out] BMDDeckControlError *error); + HRESULT Eject([out] BMDDeckControlError *error); + HRESULT GoToTimecode([in] BMDTimecodeBCD timecode, [out] BMDDeckControlError *error); + HRESULT FastForward([in] BOOL viewTape, [out] BMDDeckControlError *error); + HRESULT Rewind([in] BOOL viewTape, [out] BMDDeckControlError *error); + HRESULT StepForward([out] BMDDeckControlError *error); + HRESULT StepBack([out] BMDDeckControlError *error); + HRESULT Jog([in] double rate, [out] BMDDeckControlError *error); + HRESULT Shuttle([in] double rate, [out] BMDDeckControlError *error); + HRESULT GetTimecodeString([out] BSTR *currentTimeCode, [out] BMDDeckControlError *error); + HRESULT GetTimecode([out] IDeckLinkTimecode **currentTimecode, [out] BMDDeckControlError *error); + HRESULT GetTimecodeBCD([out] BMDTimecodeBCD *currentTimecode, [out] BMDDeckControlError *error); + HRESULT SetPreroll([in] unsigned long prerollSeconds); + HRESULT GetPreroll([out] unsigned long *prerollSeconds); + HRESULT SetExportOffset([in] long exportOffsetFields); + HRESULT GetExportOffset([out] long *exportOffsetFields); + HRESULT GetManualExportOffset([out] long *deckManualExportOffsetFields); + HRESULT SetCaptureOffset([in] long captureOffsetFields); + HRESULT GetCaptureOffset([out] long *captureOffsetFields); + HRESULT StartExport([in] BMDTimecodeBCD inTimecode, [in] BMDTimecodeBCD outTimecode, [in] BMDDeckControlExportModeOpsFlags exportModeOps, [out] BMDDeckControlError *error); + HRESULT StartCapture([in] BOOL useVITC, [in] BMDTimecodeBCD inTimecode, [in] BMDTimecodeBCD outTimecode, [out] BMDDeckControlError *error); + HRESULT GetDeviceID([out] unsigned short *deviceId, [out] BMDDeckControlError *error); + HRESULT Abort(void); + HRESULT CrashRecordStart([out] BMDDeckControlError *error); + HRESULT CrashRecordStop([out] BMDDeckControlError *error); + HRESULT SetCallback([in] IDeckLinkDeckControlStatusCallback *callback); +}; + +/* Coclasses */ + +importlib("stdole2.tlb"); + + diff --git a/third_party/decklink/win/include/DeckLinkAPIDiscovery.idl b/third_party/decklink/win/include/DeckLinkAPIDiscovery.idl new file mode 100644 index 0000000..d9a4480 --- /dev/null +++ b/third_party/decklink/win/include/DeckLinkAPIDiscovery.idl @@ -0,0 +1,65 @@ +/* -LICENSE-START- +** Copyright (c) 2014 Blackmagic Design +** +** Permission is hereby granted, free of charge, to any person or organization +** obtaining a copy of the software and accompanying documentation covered by +** this license (the "Software") to use, reproduce, display, distribute, +** execute, and transmit the Software, and to prepare derivative works of the +** Software, and to permit third-parties to whom the Software is furnished to +** do so, all subject to the following: +** +** The copyright notices in the Software and this entire statement, including +** the above license grant, this restriction and the following disclaimer, +** must be included in all copies of the Software, in whole or in part, and +** all derivative works of the Software, unless such copies or derivative +** works are solely in the form of machine-executable object code generated by +** a source language processor. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +** -LICENSE-END- +*/ + + +#ifndef BMD_CONST + #if defined(_MSC_VER) + #define BMD_CONST __declspec(selectany) static const + #else + #define BMD_CONST static const + #endif +#endif + +// Type Declarations + + +// Enumeration Mapping + +cpp_quote("#if 0") +cpp_quote("#endif") + +// Forward Declarations + +interface IDeckLink; + +/* Interface IDeckLink - represents a DeckLink device */ + +[ + object, + uuid(C418FBDD-0587-48ED-8FE5-640F0A14AF91), + helpstring("represents a DeckLink device") +] interface IDeckLink : IUnknown +{ + HRESULT GetModelName([out] BSTR *modelName); + HRESULT GetDisplayName([out] BSTR *displayName); +}; + +/* Coclasses */ + +importlib("stdole2.tlb"); + + diff --git a/third_party/decklink/win/include/DeckLinkAPIModes.idl b/third_party/decklink/win/include/DeckLinkAPIModes.idl new file mode 100644 index 0000000..8fc8afc --- /dev/null +++ b/third_party/decklink/win/include/DeckLinkAPIModes.idl @@ -0,0 +1,177 @@ +/* -LICENSE-START- +** Copyright (c) 2014 Blackmagic Design +** +** Permission is hereby granted, free of charge, to any person or organization +** obtaining a copy of the software and accompanying documentation covered by +** this license (the "Software") to use, reproduce, display, distribute, +** execute, and transmit the Software, and to prepare derivative works of the +** Software, and to permit third-parties to whom the Software is furnished to +** do so, all subject to the following: +** +** The copyright notices in the Software and this entire statement, including +** the above license grant, this restriction and the following disclaimer, +** must be included in all copies of the Software, in whole or in part, and +** all derivative works of the Software, unless such copies or derivative +** works are solely in the form of machine-executable object code generated by +** a source language processor. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +** -LICENSE-END- +*/ + + +#ifndef BMD_CONST + #if defined(_MSC_VER) + #define BMD_CONST __declspec(selectany) static const + #else + #define BMD_CONST static const + #endif +#endif + +// Type Declarations + + +// Enumeration Mapping + +cpp_quote("typedef unsigned long BMDDisplayModeFlags;") +cpp_quote("#if 0") +typedef enum _BMDDisplayModeFlags BMDDisplayModeFlags; +cpp_quote("#endif") + +/* Enum BMDDisplayMode - Video display modes */ + +typedef [v1_enum] enum _BMDDisplayMode { + + /* SD Modes */ + + bmdModeNTSC = /* 'ntsc' */ 0x6E747363, + bmdModeNTSC2398 = /* 'nt23' */ 0x6E743233, // 3:2 pulldown + bmdModePAL = /* 'pal ' */ 0x70616C20, + bmdModeNTSCp = /* 'ntsp' */ 0x6E747370, + bmdModePALp = /* 'palp' */ 0x70616C70, + + /* HD 1080 Modes */ + + bmdModeHD1080p2398 = /* '23ps' */ 0x32337073, + bmdModeHD1080p24 = /* '24ps' */ 0x32347073, + bmdModeHD1080p25 = /* 'Hp25' */ 0x48703235, + bmdModeHD1080p2997 = /* 'Hp29' */ 0x48703239, + bmdModeHD1080p30 = /* 'Hp30' */ 0x48703330, + bmdModeHD1080i50 = /* 'Hi50' */ 0x48693530, + bmdModeHD1080i5994 = /* 'Hi59' */ 0x48693539, + bmdModeHD1080i6000 = /* 'Hi60' */ 0x48693630, // N.B. This _really_ is 60.00 Hz. + bmdModeHD1080p50 = /* 'Hp50' */ 0x48703530, + bmdModeHD1080p5994 = /* 'Hp59' */ 0x48703539, + bmdModeHD1080p6000 = /* 'Hp60' */ 0x48703630, // N.B. This _really_ is 60.00 Hz. + + /* HD 720 Modes */ + + bmdModeHD720p50 = /* 'hp50' */ 0x68703530, + bmdModeHD720p5994 = /* 'hp59' */ 0x68703539, + bmdModeHD720p60 = /* 'hp60' */ 0x68703630, + + /* 2k Modes */ + + bmdMode2k2398 = /* '2k23' */ 0x326B3233, + bmdMode2k24 = /* '2k24' */ 0x326B3234, + bmdMode2k25 = /* '2k25' */ 0x326B3235, + + /* DCI Modes (output only) */ + + bmdMode2kDCI2398 = /* '2d23' */ 0x32643233, + bmdMode2kDCI24 = /* '2d24' */ 0x32643234, + bmdMode2kDCI25 = /* '2d25' */ 0x32643235, + + /* 4k Modes */ + + bmdMode4K2160p2398 = /* '4k23' */ 0x346B3233, + bmdMode4K2160p24 = /* '4k24' */ 0x346B3234, + bmdMode4K2160p25 = /* '4k25' */ 0x346B3235, + bmdMode4K2160p2997 = /* '4k29' */ 0x346B3239, + bmdMode4K2160p30 = /* '4k30' */ 0x346B3330, + + /* DCI Modes (output only) */ + + bmdMode4kDCI2398 = /* '4d23' */ 0x34643233, + bmdMode4kDCI24 = /* '4d24' */ 0x34643234, + bmdMode4kDCI25 = /* '4d25' */ 0x34643235, + + /* Special Modes */ + + bmdModeUnknown = /* 'iunk' */ 0x69756E6B +} BMDDisplayMode; + +/* Enum BMDFieldDominance - Video field dominance */ + +typedef [v1_enum] enum _BMDFieldDominance { + bmdUnknownFieldDominance = 0, + bmdLowerFieldFirst = /* 'lowr' */ 0x6C6F7772, + bmdUpperFieldFirst = /* 'uppr' */ 0x75707072, + bmdProgressiveFrame = /* 'prog' */ 0x70726F67, + bmdProgressiveSegmentedFrame = /* 'psf ' */ 0x70736620 +} BMDFieldDominance; + +/* Enum BMDPixelFormat - Video pixel formats supported for output/input */ + +typedef [v1_enum] enum _BMDPixelFormat { + bmdFormat8BitYUV = /* '2vuy' */ 0x32767579, + bmdFormat10BitYUV = /* 'v210' */ 0x76323130, + bmdFormat8BitARGB = 32, + bmdFormat8BitBGRA = /* 'BGRA' */ 0x42475241, + bmdFormat10BitRGB = /* 'r210' */ 0x72323130, // Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10 + bmdFormat10BitRGBXLE = /* 'R10l' */ 0x5231306C, // Little-endian 10-bit RGB with SMPTE video levels (64-940) + bmdFormat10BitRGBX = /* 'R10b' */ 0x52313062 // Big-endian 10-bit RGB with SMPTE video levels (64-940) +} BMDPixelFormat; + +/* Enum BMDDisplayModeFlags - Flags to describe the characteristics of an IDeckLinkDisplayMode. */ + +[v1_enum] enum _BMDDisplayModeFlags { + bmdDisplayModeSupports3D = 1 << 0, + bmdDisplayModeColorspaceRec601 = 1 << 1, + bmdDisplayModeColorspaceRec709 = 1 << 2 +}; + +// Forward Declarations + +interface IDeckLinkDisplayModeIterator; +interface IDeckLinkDisplayMode; + +/* Interface IDeckLinkDisplayModeIterator - enumerates over supported input/output display modes. */ + +[ + object, + uuid(9C88499F-F601-4021-B80B-032E4EB41C35), + helpstring("enumerates over supported input/output display modes.") +] interface IDeckLinkDisplayModeIterator : IUnknown +{ + HRESULT Next([out] IDeckLinkDisplayMode **deckLinkDisplayMode); +}; + +/* Interface IDeckLinkDisplayMode - represents a display mode */ + +[ + object, + uuid(3EB2C1AB-0A3D-4523-A3AD-F40D7FB14E78), + helpstring("represents a display mode") +] interface IDeckLinkDisplayMode : IUnknown +{ + HRESULT GetName([out] BSTR *name); + BMDDisplayMode GetDisplayMode(void); + long GetWidth(void); + long GetHeight(void); + HRESULT GetFrameRate([out] BMDTimeValue *frameDuration, [out] BMDTimeScale *timeScale); + BMDFieldDominance GetFieldDominance(void); + BMDDisplayModeFlags GetFlags(void); +}; + +/* Coclasses */ + +importlib("stdole2.tlb"); + + diff --git a/third_party/decklink/win/include/DeckLinkAPIStreaming.idl b/third_party/decklink/win/include/DeckLinkAPIStreaming.idl new file mode 100644 index 0000000..686fee6 --- /dev/null +++ b/third_party/decklink/win/include/DeckLinkAPIStreaming.idl @@ -0,0 +1,364 @@ +/* -LICENSE-START- +** Copyright (c) 2014 Blackmagic Design +** +** Permission is hereby granted, free of charge, to any person or organization +** obtaining a copy of the software and accompanying documentation covered by +** this license (the "Software") to use, reproduce, display, distribute, +** execute, and transmit the Software, and to prepare derivative works of the +** Software, and to permit third-parties to whom the Software is furnished to +** do so, all subject to the following: +** +** The copyright notices in the Software and this entire statement, including +** the above license grant, this restriction and the following disclaimer, +** must be included in all copies of the Software, in whole or in part, and +** all derivative works of the Software, unless such copies or derivative +** works are solely in the form of machine-executable object code generated by +** a source language processor. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +** -LICENSE-END- +*/ + + +#ifndef BMD_CONST + #if defined(_MSC_VER) + #define BMD_CONST __declspec(selectany) static const + #else + #define BMD_CONST static const + #endif +#endif + +// Type Declarations + + +// Enumeration Mapping + +cpp_quote("#if 0") +cpp_quote("#endif") + +/* Enum BMDStreamingDeviceMode - Device modes */ + +typedef [v1_enum] enum _BMDStreamingDeviceMode { + bmdStreamingDeviceIdle = /* 'idle' */ 0x69646C65, + bmdStreamingDeviceEncoding = /* 'enco' */ 0x656E636F, + bmdStreamingDeviceStopping = /* 'stop' */ 0x73746F70, + bmdStreamingDeviceUnknown = /* 'munk' */ 0x6D756E6B +} BMDStreamingDeviceMode; + +/* Enum BMDStreamingEncodingFrameRate - Encoded frame rates */ + +typedef [v1_enum] enum _BMDStreamingEncodingFrameRate { + + /* Interlaced rates */ + + bmdStreamingEncodedFrameRate50i = /* 'e50i' */ 0x65353069, + bmdStreamingEncodedFrameRate5994i = /* 'e59i' */ 0x65353969, + bmdStreamingEncodedFrameRate60i = /* 'e60i' */ 0x65363069, + + /* Progressive rates */ + + bmdStreamingEncodedFrameRate2398p = /* 'e23p' */ 0x65323370, + bmdStreamingEncodedFrameRate24p = /* 'e24p' */ 0x65323470, + bmdStreamingEncodedFrameRate25p = /* 'e25p' */ 0x65323570, + bmdStreamingEncodedFrameRate2997p = /* 'e29p' */ 0x65323970, + bmdStreamingEncodedFrameRate30p = /* 'e30p' */ 0x65333070, + bmdStreamingEncodedFrameRate50p = /* 'e50p' */ 0x65353070, + bmdStreamingEncodedFrameRate5994p = /* 'e59p' */ 0x65353970, + bmdStreamingEncodedFrameRate60p = /* 'e60p' */ 0x65363070 +} BMDStreamingEncodingFrameRate; + +/* Enum BMDStreamingEncodingSupport - Output encoding mode supported flag */ + +typedef [v1_enum] enum _BMDStreamingEncodingSupport { + bmdStreamingEncodingModeNotSupported = 0, + bmdStreamingEncodingModeSupported, + bmdStreamingEncodingModeSupportedWithChanges +} BMDStreamingEncodingSupport; + +/* Enum BMDStreamingVideoCodec - Video codecs */ + +typedef [v1_enum] enum _BMDStreamingVideoCodec { + bmdStreamingVideoCodecH264 = /* 'H264' */ 0x48323634 +} BMDStreamingVideoCodec; + +/* Enum BMDStreamingH264Profile - H264 encoding profile */ + +typedef [v1_enum] enum _BMDStreamingH264Profile { + bmdStreamingH264ProfileHigh = /* 'high' */ 0x68696768, + bmdStreamingH264ProfileMain = /* 'main' */ 0x6D61696E, + bmdStreamingH264ProfileBaseline = /* 'base' */ 0x62617365 +} BMDStreamingH264Profile; + +/* Enum BMDStreamingH264Level - H264 encoding level */ + +typedef [v1_enum] enum _BMDStreamingH264Level { + bmdStreamingH264Level12 = /* 'lv12' */ 0x6C763132, + bmdStreamingH264Level13 = /* 'lv13' */ 0x6C763133, + bmdStreamingH264Level2 = /* 'lv2 ' */ 0x6C763220, + bmdStreamingH264Level21 = /* 'lv21' */ 0x6C763231, + bmdStreamingH264Level22 = /* 'lv22' */ 0x6C763232, + bmdStreamingH264Level3 = /* 'lv3 ' */ 0x6C763320, + bmdStreamingH264Level31 = /* 'lv31' */ 0x6C763331, + bmdStreamingH264Level32 = /* 'lv32' */ 0x6C763332, + bmdStreamingH264Level4 = /* 'lv4 ' */ 0x6C763420, + bmdStreamingH264Level41 = /* 'lv41' */ 0x6C763431, + bmdStreamingH264Level42 = /* 'lv42' */ 0x6C763432 +} BMDStreamingH264Level; + +/* Enum BMDStreamingH264EntropyCoding - H264 entropy coding */ + +typedef [v1_enum] enum _BMDStreamingH264EntropyCoding { + bmdStreamingH264EntropyCodingCAVLC = /* 'EVLC' */ 0x45564C43, + bmdStreamingH264EntropyCodingCABAC = /* 'EBAC' */ 0x45424143 +} BMDStreamingH264EntropyCoding; + +/* Enum BMDStreamingAudioCodec - Audio codecs */ + +typedef [v1_enum] enum _BMDStreamingAudioCodec { + bmdStreamingAudioCodecAAC = /* 'AAC ' */ 0x41414320 +} BMDStreamingAudioCodec; + +/* Enum BMDStreamingEncodingModePropertyID - Encoding mode properties */ + +typedef [v1_enum] enum _BMDStreamingEncodingModePropertyID { + + /* Integers, Video Properties */ + + bmdStreamingEncodingPropertyVideoFrameRate = /* 'vfrt' */ 0x76667274, // Uses values of type BMDStreamingEncodingFrameRate + bmdStreamingEncodingPropertyVideoBitRateKbps = /* 'vbrt' */ 0x76627274, + + /* Integers, H264 Properties */ + + bmdStreamingEncodingPropertyH264Profile = /* 'hprf' */ 0x68707266, + bmdStreamingEncodingPropertyH264Level = /* 'hlvl' */ 0x686C766C, + bmdStreamingEncodingPropertyH264EntropyCoding = /* 'hent' */ 0x68656E74, + + /* Flags, H264 Properties */ + + bmdStreamingEncodingPropertyH264HasBFrames = /* 'hBfr' */ 0x68426672, + + /* Integers, Audio Properties */ + + bmdStreamingEncodingPropertyAudioCodec = /* 'acdc' */ 0x61636463, + bmdStreamingEncodingPropertyAudioSampleRate = /* 'asrt' */ 0x61737274, + bmdStreamingEncodingPropertyAudioChannelCount = /* 'achc' */ 0x61636863, + bmdStreamingEncodingPropertyAudioBitRateKbps = /* 'abrt' */ 0x61627274 +} BMDStreamingEncodingModePropertyID; + +// Forward Declarations + +interface IBMDStreamingDeviceNotificationCallback; +interface IBMDStreamingH264InputCallback; +interface IBMDStreamingDiscovery; +interface IBMDStreamingVideoEncodingMode; +interface IBMDStreamingMutableVideoEncodingMode; +interface IBMDStreamingVideoEncodingModePresetIterator; +interface IBMDStreamingDeviceInput; +interface IBMDStreamingH264NALPacket; +interface IBMDStreamingAudioPacket; +interface IBMDStreamingMPEG2TSPacket; +interface IBMDStreamingH264NALParser; + +/* Interface IBMDStreamingDeviceNotificationCallback - Device notification callbacks. */ + +[ + object, + uuid(F9531D64-3305-4B29-A387-7F74BB0D0E84), + helpstring("Device notification callbacks.") +] interface IBMDStreamingDeviceNotificationCallback : IUnknown +{ + HRESULT StreamingDeviceArrived([in] IDeckLink* device); + HRESULT StreamingDeviceRemoved([in] IDeckLink* device); + HRESULT StreamingDeviceModeChanged([in] IDeckLink* device, [in] BMDStreamingDeviceMode mode); +}; + +/* Interface IBMDStreamingH264InputCallback - H264 input callbacks. */ + +[ + object, + uuid(823C475F-55AE-46F9-890C-537CC5CEDCCA), + helpstring("H264 input callbacks.") +] interface IBMDStreamingH264InputCallback : IUnknown +{ + HRESULT H264NALPacketArrived([in] IBMDStreamingH264NALPacket* nalPacket); + HRESULT H264AudioPacketArrived([in] IBMDStreamingAudioPacket* audioPacket); + HRESULT MPEG2TSPacketArrived([in] IBMDStreamingMPEG2TSPacket* tsPacket); + HRESULT H264VideoInputConnectorScanningChanged(void); + HRESULT H264VideoInputConnectorChanged(void); + HRESULT H264VideoInputModeChanged(void); +}; + +/* Interface IBMDStreamingDiscovery - Installs device notifications */ + +[ + object, + uuid(2C837444-F989-4D87-901A-47C8A36D096D), + helpstring("Installs device notifications") +] interface IBMDStreamingDiscovery : IUnknown +{ + HRESULT InstallDeviceNotifications([in] IBMDStreamingDeviceNotificationCallback* theCallback); + HRESULT UninstallDeviceNotifications(void); +}; + +/* Interface IBMDStreamingVideoEncodingMode - Represents an encoded video mode. */ + +[ + object, + uuid(1AB8035B-CD13-458D-B6DF-5E8F7C2141D9), + helpstring("Represents an encoded video mode.") +] interface IBMDStreamingVideoEncodingMode : IUnknown +{ + HRESULT GetName([out] BSTR *name); + unsigned int GetPresetID(void); + unsigned int GetSourcePositionX(void); + unsigned int GetSourcePositionY(void); + unsigned int GetSourceWidth(void); + unsigned int GetSourceHeight(void); + unsigned int GetDestWidth(void); + unsigned int GetDestHeight(void); + HRESULT GetFlag([in] BMDStreamingEncodingModePropertyID cfgID, [out] BOOL* value); + HRESULT GetInt([in] BMDStreamingEncodingModePropertyID cfgID, [out] LONGLONG* value); + HRESULT GetFloat([in] BMDStreamingEncodingModePropertyID cfgID, [out] double* value); + HRESULT GetString([in] BMDStreamingEncodingModePropertyID cfgID, [out] BSTR *value); + HRESULT CreateMutableVideoEncodingMode([out] IBMDStreamingMutableVideoEncodingMode** newEncodingMode); // Creates a mutable copy of the encoding mode +}; + +/* Interface IBMDStreamingMutableVideoEncodingMode - Represents a mutable encoded video mode. */ + +[ + object, + uuid(19BF7D90-1E0A-400D-B2C6-FFC4E78AD49D), + helpstring("Represents a mutable encoded video mode.") +] interface IBMDStreamingMutableVideoEncodingMode : IBMDStreamingVideoEncodingMode +{ + HRESULT SetSourceRect([in] unsigned long posX, [in] unsigned long posY, [in] unsigned long width, [in] unsigned long height); + HRESULT SetDestSize([in] unsigned long width, [in] unsigned long height); + HRESULT SetFlag([in] BMDStreamingEncodingModePropertyID cfgID, [in] BOOL value); + HRESULT SetInt([in] BMDStreamingEncodingModePropertyID cfgID, [in] LONGLONG value); + HRESULT SetFloat([in] BMDStreamingEncodingModePropertyID cfgID, [in] double value); + HRESULT SetString([in] BMDStreamingEncodingModePropertyID cfgID, [in] BSTR value); +}; + +/* Interface IBMDStreamingVideoEncodingModePresetIterator - Enumerates encoding mode presets */ + +[ + object, + uuid(7AC731A3-C950-4AD0-804A-8377AA51C6C4), + helpstring("Enumerates encoding mode presets") +] interface IBMDStreamingVideoEncodingModePresetIterator : IUnknown +{ + HRESULT Next([out] IBMDStreamingVideoEncodingMode** videoEncodingMode); +}; + +/* Interface IBMDStreamingDeviceInput - Created by QueryInterface from IDeckLink */ + +[ + object, + uuid(24B6B6EC-1727-44BB-9818-34FF086ACF98), + helpstring("Created by QueryInterface from IDeckLink") +] interface IBMDStreamingDeviceInput : IUnknown +{ + + /* Input modes */ + + HRESULT DoesSupportVideoInputMode([in] BMDDisplayMode inputMode, [out] BOOL* result); + HRESULT GetVideoInputModeIterator([out] IDeckLinkDisplayModeIterator** iterator); + HRESULT SetVideoInputMode([in] BMDDisplayMode inputMode); + HRESULT GetCurrentDetectedVideoInputMode([out] BMDDisplayMode* detectedMode); + + /* Capture modes */ + + HRESULT GetVideoEncodingMode([out] IBMDStreamingVideoEncodingMode** encodingMode); + HRESULT GetVideoEncodingModePresetIterator([in] BMDDisplayMode inputMode, [out] IBMDStreamingVideoEncodingModePresetIterator** iterator); + HRESULT DoesSupportVideoEncodingMode([in] BMDDisplayMode inputMode, [in] IBMDStreamingVideoEncodingMode* encodingMode, [out] BMDStreamingEncodingSupport* result, [out] IBMDStreamingVideoEncodingMode** changedEncodingMode); + HRESULT SetVideoEncodingMode([in] IBMDStreamingVideoEncodingMode* encodingMode); + + /* Input control */ + + HRESULT StartCapture(void); + HRESULT StopCapture(void); + HRESULT SetCallback([in] IUnknown* theCallback); +}; + +/* Interface IBMDStreamingH264NALPacket - Represent an H.264 NAL packet */ + +[ + object, + uuid(E260E955-14BE-4395-9775-9F02CC0A9D89), + helpstring("Represent an H.264 NAL packet") +] interface IBMDStreamingH264NALPacket : IUnknown +{ + long GetPayloadSize(void); + HRESULT GetBytes([out] void** buffer); + HRESULT GetBytesWithSizePrefix([out] void** buffer); // Contains a 32-bit unsigned big endian size prefix + HRESULT GetDisplayTime([in] ULONGLONG requestedTimeScale, [out] ULONGLONG* displayTime); + HRESULT GetPacketIndex([out] unsigned long* packetIndex); // Deprecated +}; + +/* Interface IBMDStreamingAudioPacket - Represents a chunk of audio data */ + +[ + object, + uuid(D9EB5902-1AD2-43F4-9E2C-3CFA50B5EE19), + helpstring("Represents a chunk of audio data") +] interface IBMDStreamingAudioPacket : IUnknown +{ + BMDStreamingAudioCodec GetCodec(void); + long GetPayloadSize(void); + HRESULT GetBytes([out] void** buffer); + HRESULT GetPlayTime([in] ULONGLONG requestedTimeScale, [out] ULONGLONG* playTime); + HRESULT GetPacketIndex([out] unsigned long* packetIndex); // Deprecated +}; + +/* Interface IBMDStreamingMPEG2TSPacket - Represent an MPEG2 Transport Stream packet */ + +[ + object, + uuid(91810D1C-4FB3-4AAA-AE56-FA301D3DFA4C), + helpstring("Represent an MPEG2 Transport Stream packet") +] interface IBMDStreamingMPEG2TSPacket : IUnknown +{ + long GetPayloadSize(void); + HRESULT GetBytes([out] void** buffer); +}; + +/* Interface IBMDStreamingH264NALParser - For basic NAL parsing */ + +[ + object, + uuid(5867F18C-5BFA-4CCC-B2A7-9DFD140417D2), + helpstring("For basic NAL parsing") +] interface IBMDStreamingH264NALParser : IUnknown +{ + HRESULT IsNALSequenceParameterSet([in] IBMDStreamingH264NALPacket* nal); + HRESULT IsNALPictureParameterSet([in] IBMDStreamingH264NALPacket* nal); + HRESULT GetProfileAndLevelFromSPS([in] IBMDStreamingH264NALPacket* nal, [out] unsigned long* profileIdc, [out] unsigned long* profileCompatability, [out] unsigned long* levelIdc); +}; + +/* Coclasses */ + +importlib("stdole2.tlb"); + +[ + uuid(0CAA31F6-8A26-40B0-86A4-BF58DCCA710C), + helpstring("CBMDStreamingDiscovery Class") +] coclass CBMDStreamingDiscovery +{ + [default] interface IBMDStreamingDiscovery; +}; + +[ + uuid(7753EFBD-951C-407C-97A5-23C737B73B52), + helpstring("CBMDStreamingH264NALParser Class") +] coclass CBMDStreamingH264NALParser +{ + [default] interface IBMDStreamingH264NALParser; +}; + + diff --git a/third_party/decklink/win/include/DeckLinkAPITypes.idl b/third_party/decklink/win/include/DeckLinkAPITypes.idl new file mode 100644 index 0000000..d0a9596 --- /dev/null +++ b/third_party/decklink/win/include/DeckLinkAPITypes.idl @@ -0,0 +1,92 @@ +/* -LICENSE-START- +** Copyright (c) 2014 Blackmagic Design +** +** Permission is hereby granted, free of charge, to any person or organization +** obtaining a copy of the software and accompanying documentation covered by +** this license (the "Software") to use, reproduce, display, distribute, +** execute, and transmit the Software, and to prepare derivative works of the +** Software, and to permit third-parties to whom the Software is furnished to +** do so, all subject to the following: +** +** The copyright notices in the Software and this entire statement, including +** the above license grant, this restriction and the following disclaimer, +** must be included in all copies of the Software, in whole or in part, and +** all derivative works of the Software, unless such copies or derivative +** works are solely in the form of machine-executable object code generated by +** a source language processor. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +** -LICENSE-END- +*/ + + +#ifndef BMD_CONST + #if defined(_MSC_VER) + #define BMD_CONST __declspec(selectany) static const + #else + #define BMD_CONST static const + #endif +#endif + +// Type Declarations + +typedef LONGLONG BMDTimeValue; +typedef LONGLONG BMDTimeScale; +typedef unsigned long BMDTimecodeBCD; +typedef unsigned long BMDTimecodeUserBits; + +// Enumeration Mapping + +cpp_quote("typedef unsigned long BMDTimecodeFlags;") +cpp_quote("#if 0") +typedef enum _BMDTimecodeFlags BMDTimecodeFlags; +cpp_quote("#endif") + +/* Enum BMDTimecodeFlags - Timecode flags */ + +[v1_enum] enum _BMDTimecodeFlags { + bmdTimecodeFlagDefault = 0, + bmdTimecodeIsDropFrame = 1 << 0 +}; + +/* Enum BMDVideoConnection - Video connection types */ + +typedef [v1_enum] enum _BMDVideoConnection { + bmdVideoConnectionSDI = 1 << 0, + bmdVideoConnectionHDMI = 1 << 1, + bmdVideoConnectionOpticalSDI = 1 << 2, + bmdVideoConnectionComponent = 1 << 3, + bmdVideoConnectionComposite = 1 << 4, + bmdVideoConnectionSVideo = 1 << 5 +} BMDVideoConnection; + +// Forward Declarations + +interface IDeckLinkTimecode; + +/* Interface IDeckLinkTimecode - Used for video frame timecode representation. */ + +[ + object, + uuid(BC6CFBD3-8317-4325-AC1C-1216391E9340), + helpstring("Used for video frame timecode representation.") +] interface IDeckLinkTimecode : IUnknown +{ + BMDTimecodeBCD GetBCD(void); + HRESULT GetComponents([out] unsigned char *hours, [out] unsigned char *minutes, [out] unsigned char *seconds, [out] unsigned char *frames); + HRESULT GetString([out] BSTR *timecode); + BMDTimecodeFlags GetFlags(void); + HRESULT GetTimecodeUserBits([out] BMDTimecodeUserBits *userBits); +}; + +/* Coclasses */ + +importlib("stdole2.tlb"); + + diff --git a/third_party/decklink/win/include/DeckLinkAPIVersion.h b/third_party/decklink/win/include/DeckLinkAPIVersion.h new file mode 100644 index 0000000..1084b02 --- /dev/null +++ b/third_party/decklink/win/include/DeckLinkAPIVersion.h @@ -0,0 +1,37 @@ +/* -LICENSE-START- + * ** Copyright (c) 2014 Blackmagic Design + * ** + * ** Permission is hereby granted, free of charge, to any person or organization + * ** obtaining a copy of the software and accompanying documentation covered by + * ** this license (the "Software") to use, reproduce, display, distribute, + * ** execute, and transmit the Software, and to prepare derivative works of the + * ** Software, and to permit third-parties to whom the Software is furnished to + * ** do so, all subject to the following: + * ** + * ** The copyright notices in the Software and this entire statement, including + * ** the above license grant, this restriction and the following disclaimer, + * ** must be included in all copies of the Software, in whole or in part, and + * ** all derivative works of the Software, unless such copies or derivative + * ** works are solely in the form of machine-executable object code generated by + * ** a source language processor. + * ** + * ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * ** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT + * ** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE + * ** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, + * ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * ** DEALINGS IN THE SOFTWARE. + * ** -LICENSE-END- + * */ + +/* DeckLinkAPIVersion.h */ + +#ifndef __DeckLink_API_Verison_h__ +#define __DeckLink_API_Version_h__ + +#define BLACKMAGIC_DECKLINK_API_VERSION 0x0a010400 +#define BLACKMAGIC_DECKLINK_API_VERSION_STRING "10.1.4" + +#endif // __DeckLink_API_Version_h__ + diff --git a/third_party/decklink/win/include/DeckLinkAPI_v7_1.idl b/third_party/decklink/win/include/DeckLinkAPI_v7_1.idl new file mode 100644 index 0000000..017b565 --- /dev/null +++ b/third_party/decklink/win/include/DeckLinkAPI_v7_1.idl @@ -0,0 +1,160 @@ +/* -LICENSE-START- +** Copyright (c) 2009 Blackmagic Design +** +** Permission is hereby granted, free of charge, to any person or organization +** obtaining a copy of the software and accompanying documentation covered by +** this license (the "Software") to use, reproduce, display, distribute, +** execute, and transmit the Software, and to prepare derivative works of the +** Software, and to permit third-parties to whom the Software is furnished to +** do so, all subject to the following: +** +** The copyright notices in the Software and this entire statement, including +** the above license grant, this restriction and the following disclaimer, +** must be included in all copies of the Software, in whole or in part, and +** all derivative works of the Software, unless such copies or derivative +** works are solely in the form of machine-executable object code generated by +** a source language processor. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +** -LICENSE-END- +*/ +/* DeckLinkAPI_v7_1.idl */ + + interface IDeckLinkDisplayModeIterator_v7_1; + interface IDeckLinkDisplayMode_v7_1; + interface IDeckLinkVideoFrame_v7_1; + interface IDeckLinkVideoInputFrame_v7_1; + interface IDeckLinkAudioInputPacket_v7_1; + + [object, uuid(B28131B6-59AC-4857-B5AC-CD75D5883E2F), + helpstring("IDeckLinkDisplayModeIterator_v7_1 enumerates over supported input/output display modes.")] + interface IDeckLinkDisplayModeIterator_v7_1 : IUnknown + { + HRESULT Next ([out] IDeckLinkDisplayMode_v7_1** deckLinkDisplayMode); + }; + + + [object, uuid(AF0CD6D5-8376-435E-8433-54F9DD530AC3), + helpstring("IDeckLinkDisplayMode_v7_1 represents a display mode")] + interface IDeckLinkDisplayMode_v7_1 : IUnknown + { + HRESULT GetName ([out] BSTR* name); + BMDDisplayMode GetDisplayMode (); + long GetWidth (); + long GetHeight (); + HRESULT GetFrameRate ([out] BMDTimeValue *frameDuration, [out] BMDTimeScale *timeScale); + }; + + [object, uuid(EBD01AFA-E4B0-49C6-A01D-EDB9D1B55FD9), + helpstring("IDeckLinkVideoOutputCallback. Frame completion callback.")] + interface IDeckLinkVideoOutputCallback_v7_1 : IUnknown + { + HRESULT ScheduledFrameCompleted ([in] IDeckLinkVideoFrame_v7_1* completedFrame, [in] BMDOutputFrameCompletionResult result); + }; + + [object, uuid(7F94F328-5ED4-4E9F-9729-76A86BDC99CC), + helpstring("IDeckLinkInputCallback_v7_1. Frame arrival callback.")] + interface IDeckLinkInputCallback_v7_1 : IUnknown + { + HRESULT VideoInputFrameArrived ([in] IDeckLinkVideoInputFrame_v7_1* videoFrame, [in] IDeckLinkAudioInputPacket_v7_1* audioPacket); + }; + + + [object, uuid(AE5B3E9B-4E1E-4535-B6E8-480FF52F6CE5), local, + helpstring("IDeckLinkOutput_v7_1. Created by QueryInterface from IDeckLink.")] + interface IDeckLinkOutput_v7_1 : IUnknown + { + HRESULT DoesSupportVideoMode (BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, [out] BMDDisplayModeSupport *result); + HRESULT GetDisplayModeIterator ([out] IDeckLinkDisplayModeIterator_v7_1 **iterator); + + // Video output + HRESULT EnableVideoOutput (BMDDisplayMode displayMode); + HRESULT DisableVideoOutput (); + + HRESULT SetVideoOutputFrameMemoryAllocator ([in] IDeckLinkMemoryAllocator* theAllocator); + HRESULT CreateVideoFrame (long width, long height, long rowBytes, BMDPixelFormat pixelFormat, BMDFrameFlags flags, IDeckLinkVideoFrame_v7_1** outFrame); + HRESULT CreateVideoFrameFromBuffer (void* buffer, long width, long height, long rowBytes, BMDPixelFormat pixelFormat, BMDFrameFlags flags, IDeckLinkVideoFrame_v7_1** outFrame); + + HRESULT DisplayVideoFrameSync (IDeckLinkVideoFrame_v7_1* theFrame); + HRESULT ScheduleVideoFrame (IDeckLinkVideoFrame_v7_1* theFrame, BMDTimeValue displayTime, BMDTimeValue displayDuration, BMDTimeScale timeScale); + HRESULT SetScheduledFrameCompletionCallback ([in] IDeckLinkVideoOutputCallback_v7_1* theCallback); + + // Audio output + HRESULT EnableAudioOutput (BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, unsigned long channelCount); + HRESULT DisableAudioOutput (); + + HRESULT WriteAudioSamplesSync (void* buffer, unsigned long sampleFrameCount, [out] unsigned long *sampleFramesWritten); + + HRESULT BeginAudioPreroll (); + HRESULT EndAudioPreroll (); + HRESULT ScheduleAudioSamples (void* buffer, unsigned long sampleFrameCount, BMDTimeValue streamTime, BMDTimeScale timeScale, [out] unsigned long *sampleFramesWritten); + + HRESULT GetBufferedAudioSampleFrameCount ( [out] unsigned long *bufferedSampleCount); + HRESULT FlushBufferedAudioSamples (); + + HRESULT SetAudioCallback ( [in] IDeckLinkAudioOutputCallback* theCallback); + + // Output control + HRESULT StartScheduledPlayback (BMDTimeValue playbackStartTime, BMDTimeScale timeScale, double playbackSpeed); + HRESULT StopScheduledPlayback (BMDTimeValue stopPlaybackAtTime, BMDTimeValue *actualStopTime, BMDTimeScale timeScale); + HRESULT GetHardwareReferenceClock (BMDTimeScale desiredTimeScale, BMDTimeValue *elapsedTimeSinceSchedulerBegan); + }; + + [object, uuid(2B54EDEF-5B32-429F-BA11-BB990596EACD), + helpstring("IDeckLinkInput_v7_1. Created by QueryInterface from IDeckLink.")] + interface IDeckLinkInput_v7_1 : IUnknown + { + HRESULT DoesSupportVideoMode (BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, [out] BMDDisplayModeSupport *result); + HRESULT GetDisplayModeIterator ([out] IDeckLinkDisplayModeIterator_v7_1 **iterator); + + // Video input + HRESULT EnableVideoInput (BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, BMDVideoInputFlags flags); + HRESULT DisableVideoInput (); + + // Audio input + HRESULT EnableAudioInput (BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, unsigned long channelCount); + HRESULT DisableAudioInput (); + HRESULT ReadAudioSamples (void* buffer, unsigned long sampleFrameCount, [out] unsigned long *sampleFramesRead, [out] BMDTimeValue *audioPacketTime, BMDTimeScale timeScale); + HRESULT GetBufferedAudioSampleFrameCount ( [out] unsigned long *bufferedSampleCount); + + // Input control + HRESULT StartStreams (); + HRESULT StopStreams (); + HRESULT PauseStreams (); + HRESULT SetCallback ([in] IDeckLinkInputCallback_v7_1* theCallback); + }; + + [object, uuid(333F3A10-8C2D-43CF-B79D-46560FEEA1CE), local, + helpstring("IDeckLinkVideoFrame_v7_1. Created by IDeckLinkVideoOutput::CreateVideoFrame.")] + interface IDeckLinkVideoFrame_v7_1 : IUnknown + { + long GetWidth (); + long GetHeight (); + long GetRowBytes (); + BMDPixelFormat GetPixelFormat (); + BMDFrameFlags GetFlags (); + HRESULT GetBytes (void* *buffer); + }; + + [object, uuid(C8B41D95-8848-40EE-9B37-6E3417FB114B), local, + helpstring("IDeckLinkVideoInputFrame_v7_1. Provided by the IDeckLinkVideoInput frame arrival callback.")] + interface IDeckLinkVideoInputFrame_v7_1 : IDeckLinkVideoFrame_v7_1 + { + HRESULT GetFrameTime (BMDTimeValue *frameTime, BMDTimeValue *frameDuration, BMDTimeScale timeScale); + }; + + [object, uuid(C86DE4F6-A29F-42E3-AB3A-1363E29F0788), local, + helpstring("IDeckLinkAudioInputPacket_v7_1. Provided by the IDeckLinkInput callback.")] + interface IDeckLinkAudioInputPacket_v7_1 : IUnknown + { + long GetSampleCount (); + HRESULT GetBytes (void* *buffer); + HRESULT GetAudioPacketTime (BMDTimeValue *packetTime, BMDTimeScale timeScale); + }; + diff --git a/third_party/decklink/win/include/DeckLinkAPI_v7_3.idl b/third_party/decklink/win/include/DeckLinkAPI_v7_3.idl new file mode 100644 index 0000000..da367d6 --- /dev/null +++ b/third_party/decklink/win/include/DeckLinkAPI_v7_3.idl @@ -0,0 +1,157 @@ +/* -LICENSE-START- +** Copyright (c) 2009 Blackmagic Design +** +** Permission is hereby granted, free of charge, to any person or organization +** obtaining a copy of the software and accompanying documentation covered by +** this license (the "Software") to use, reproduce, display, distribute, +** execute, and transmit the Software, and to prepare derivative works of the +** Software, and to permit third-parties to whom the Software is furnished to +** do so, all subject to the following: +** +** The copyright notices in the Software and this entire statement, including +** the above license grant, this restriction and the following disclaimer, +** must be included in all copies of the Software, in whole or in part, and +** all derivative works of the Software, unless such copies or derivative +** works are solely in the form of machine-executable object code generated by +** a source language processor. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +** -LICENSE-END- +*/ + +/* Forward Declarations */ + +interface IDeckLinkInputCallback_v7_3; +interface IDeckLinkOutput_v7_3; +interface IDeckLinkInput_v7_3; +interface IDeckLinkVideoInputFrame_v7_3; + +/* End Forward Declarations */ + + +/* Interface IDeckLinkInputCallback - Frame arrival callback. */ + +[ + object, + uuid(FD6F311D-4D00-444B-9ED4-1F25B5730AD0), + helpstring("Frame arrival callback.") +] interface IDeckLinkInputCallback_v7_3 : IUnknown +{ + HRESULT VideoInputFormatChanged([in] BMDVideoInputFormatChangedEvents notificationEvents, [in] IDeckLinkDisplayMode_v7_6 *newDisplayMode, [in] BMDDetectedVideoInputFormatFlags detectedSignalFlags); + HRESULT VideoInputFrameArrived([in] IDeckLinkVideoInputFrame_v7_3 *videoFrame, [in] IDeckLinkAudioInputPacket *audioPacket); +}; + +/* End Interface IDeckLinkInputCallback */ + + +/* Interface IDeckLinkOutput - Created by QueryInterface from IDeckLink. */ + +[ + object, + uuid(271C65E3-C323-4344-A30F-D908BCB20AA3), + local, + helpstring("Created by QueryInterface from IDeckLink.") +] interface IDeckLinkOutput_v7_3 : IUnknown +{ + HRESULT DoesSupportVideoMode(BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, [out] BMDDisplayModeSupport *result); + HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator_v7_6 **iterator); + + HRESULT SetScreenPreviewCallback([in] IDeckLinkScreenPreviewCallback *previewCallback); + + /* Video Output */ + + HRESULT EnableVideoOutput(BMDDisplayMode displayMode, BMDVideoOutputFlags flags); + HRESULT DisableVideoOutput(void); + + HRESULT SetVideoOutputFrameMemoryAllocator([in] IDeckLinkMemoryAllocator *theAllocator); + HRESULT CreateVideoFrame(long width, long height, long rowBytes, BMDPixelFormat pixelFormat, BMDFrameFlags flags, [out] IDeckLinkMutableVideoFrame_v7_6 **outFrame); + HRESULT CreateAncillaryData(BMDPixelFormat pixelFormat, [out] IDeckLinkVideoFrameAncillary **outBuffer); + + HRESULT DisplayVideoFrameSync([in] IDeckLinkVideoFrame_v7_6 *theFrame); + HRESULT ScheduleVideoFrame([in] IDeckLinkVideoFrame_v7_6 *theFrame, BMDTimeValue displayTime, BMDTimeValue displayDuration, BMDTimeScale timeScale); + HRESULT SetScheduledFrameCompletionCallback([in] IDeckLinkVideoOutputCallback *theCallback); + HRESULT GetBufferedVideoFrameCount([out] unsigned long *bufferedFrameCount); + + /* Audio Output */ + + HRESULT EnableAudioOutput(BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, unsigned long channelCount, BMDAudioOutputStreamType streamType); + HRESULT DisableAudioOutput(void); + + HRESULT WriteAudioSamplesSync([in] void *buffer, unsigned long sampleFrameCount, [out] unsigned long *sampleFramesWritten); + + HRESULT BeginAudioPreroll(void); + HRESULT EndAudioPreroll(void); + HRESULT ScheduleAudioSamples([in] void *buffer, unsigned long sampleFrameCount, BMDTimeValue streamTime, BMDTimeScale timeScale, [out] unsigned long *sampleFramesWritten); + + HRESULT GetBufferedAudioSampleFrameCount([out] unsigned long *bufferedSampleFrameCount); + HRESULT FlushBufferedAudioSamples(void); + + HRESULT SetAudioCallback([in] IDeckLinkAudioOutputCallback *theCallback); + + /* Output Control */ + + HRESULT StartScheduledPlayback(BMDTimeValue playbackStartTime, BMDTimeScale timeScale, double playbackSpeed); + HRESULT StopScheduledPlayback(BMDTimeValue stopPlaybackAtTime, [out] BMDTimeValue *actualStopTime, BMDTimeScale timeScale); + HRESULT IsScheduledPlaybackRunning([out] BOOL *active); + HRESULT GetHardwareReferenceClock(BMDTimeScale desiredTimeScale, [out] BMDTimeValue *elapsedTimeSinceSchedulerBegan); +}; + +/* End Interface IDeckLinkOutput */ + +/* Interface IDeckLinkInput - Created by QueryInterface from IDeckLink. */ + +[ + object, + uuid(4973F012-9925-458C-871C-18774CDBBECB), + helpstring("Created by QueryInterface from IDeckLink.") +] interface IDeckLinkInput_v7_3 : IUnknown +{ + HRESULT DoesSupportVideoMode(BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, [out] BMDDisplayModeSupport *result); + HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator_v7_6 **iterator); + + HRESULT SetScreenPreviewCallback([in] IDeckLinkScreenPreviewCallback *previewCallback); + + /* Video Input */ + + HRESULT EnableVideoInput(BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, BMDVideoInputFlags flags); + HRESULT DisableVideoInput(void); + HRESULT GetAvailableVideoFrameCount([out] unsigned long *availableFrameCount); + + /* Audio Input */ + + HRESULT EnableAudioInput(BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, unsigned long channelCount); + HRESULT DisableAudioInput(void); + HRESULT GetAvailableAudioSampleFrameCount([out] unsigned long *availableSampleFrameCount); + + /* Input Control */ + + HRESULT StartStreams(void); + HRESULT StopStreams(void); + HRESULT PauseStreams(void); + HRESULT FlushStreams(void); + HRESULT SetCallback([in] IDeckLinkInputCallback_v7_3 *theCallback); +}; + +/* End Interface IDeckLinkInput */ + + +/* Interface IDeckLinkVideoInputFrame - Provided by the IDeckLinkVideoInput frame arrival callback. */ + +[ + object, + uuid(CF317790-2894-11DE-8C30-0800200C9A66), + local, + helpstring("Provided by the IDeckLinkVideoInput frame arrival callback.") +] interface IDeckLinkVideoInputFrame_v7_3 : IDeckLinkVideoFrame_v7_6 +{ + HRESULT GetStreamTime([out] BMDTimeValue *frameTime, [out] BMDTimeValue *frameDuration, BMDTimeScale timeScale); +}; + +/* End Interface IDeckLinkVideoInputFrame */ + diff --git a/third_party/decklink/win/include/DeckLinkAPI_v7_6.idl b/third_party/decklink/win/include/DeckLinkAPI_v7_6.idl new file mode 100644 index 0000000..271801c --- /dev/null +++ b/third_party/decklink/win/include/DeckLinkAPI_v7_6.idl @@ -0,0 +1,396 @@ +/* -LICENSE-START- +** Copyright (c) 2009 Blackmagic Design +** +** Permission is hereby granted, free of charge, to any person or organization +** obtaining a copy of the software and accompanying documentation covered by +** this license (the "Software") to use, reproduce, display, distribute, +** execute, and transmit the Software, and to prepare derivative works of the +** Software, and to permit third-parties to whom the Software is furnished to +** do so, all subject to the following: +** +** The copyright notices in the Software and this entire statement, including +** the above license grant, this restriction and the following disclaimer, +** must be included in all copies of the Software, in whole or in part, and +** all derivative works of the Software, unless such copies or derivative +** works are solely in the form of machine-executable object code generated by +** a source language processor. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +** -LICENSE-END- +*/ + +/* Enum BMDVideoConnection - Video connection types */ + +typedef [v1_enum] enum _BMDVideoConnection_v7_6 { + bmdVideoConnectionSDI_v7_6 = /* 'sdi ' */ 0x73646920, + bmdVideoConnectionHDMI_v7_6 = /* 'hdmi' */ 0x68646D69, + bmdVideoConnectionOpticalSDI_v7_6 = /* 'opti' */ 0x6F707469, + bmdVideoConnectionComponent_v7_6 = /* 'cpnt' */ 0x63706E74, + bmdVideoConnectionComposite_v7_6 = /* 'cmst' */ 0x636D7374, + bmdVideoConnectionSVideo_v7_6 = /* 'svid' */ 0x73766964 +} BMDVideoConnection_v7_6; + + + +/* Forward Declarations */ + +interface IDeckLinkDisplayModeIterator_v7_6; +interface IDeckLinkDisplayMode_v7_6; +interface IDeckLinkOutput_v7_6; +interface IDeckLinkInput_v7_6; +interface IDeckLinkTimecode_v7_6; +interface IDeckLinkVideoFrame_v7_6; +interface IDeckLinkMutableVideoFrame_v7_6; +interface IDeckLinkVideoInputFrame_v7_6; +interface IDeckLinkScreenPreviewCallback_v7_6; +interface IDeckLinkGLScreenPreviewHelper_v7_6; +interface IDeckLinkVideoConversion_v7_6; +interface IDeckLinkConfiguration_v7_6; + + +/* Interface IDeckLinkVideoOutputCallback - Frame completion callback. */ + +[ + object, + uuid(E763A626-4A3C-49D1-BF13-E7AD3692AE52), + helpstring("Frame completion callback.") +] interface IDeckLinkVideoOutputCallback_v7_6 : IUnknown +{ + HRESULT ScheduledFrameCompleted([in] IDeckLinkVideoFrame_v7_6 *completedFrame, [in] BMDOutputFrameCompletionResult result); + HRESULT ScheduledPlaybackHasStopped(void); +}; + + +/* Interface IDeckLinkInputCallback - Frame arrival callback. */ + +[ + object, + uuid(31D28EE7-88B6-4CB1-897A-CDBF79A26414), + helpstring("Frame arrival callback.") +] interface IDeckLinkInputCallback_v7_6 : IUnknown +{ + HRESULT VideoInputFormatChanged([in] BMDVideoInputFormatChangedEvents notificationEvents, [in] IDeckLinkDisplayMode_v7_6 *newDisplayMode, [in] BMDDetectedVideoInputFormatFlags detectedSignalFlags); + HRESULT VideoInputFrameArrived([in] IDeckLinkVideoInputFrame_v7_6* videoFrame, [in] IDeckLinkAudioInputPacket* audioPacket); +}; + + +/* Interface IDeckLinkDisplayModeIterator - enumerates over supported input/output display modes. */ + +[ + object, + uuid(455D741F-1779-4800-86F5-0B5D13D79751), + helpstring("enumerates over supported input/output display modes.") +] interface IDeckLinkDisplayModeIterator_v7_6 : IUnknown +{ + HRESULT Next([out] IDeckLinkDisplayMode_v7_6 **deckLinkDisplayMode); +}; + + +/* Interface IDeckLinkDisplayMode - represents a display mode */ + +[ + object, + uuid(87451E84-2B7E-439E-A629-4393EA4A8550), + helpstring("represents a display mode") +] interface IDeckLinkDisplayMode_v7_6 : IUnknown +{ + HRESULT GetName([out] BSTR *name); + BMDDisplayMode GetDisplayMode(void); + long GetWidth(void); + long GetHeight(void); + HRESULT GetFrameRate([out] BMDTimeValue *frameDuration, [out] BMDTimeScale *timeScale); + BMDFieldDominance GetFieldDominance(void); +}; + + +/* Interface IDeckLinkOutput - Created by QueryInterface from IDeckLink. */ + +[ + object, + uuid(29228142-EB8C-4141-A621-F74026450955), + local, + helpstring("Created by QueryInterface from IDeckLink.") +] interface IDeckLinkOutput_v7_6 : IUnknown +{ + HRESULT DoesSupportVideoMode(BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, [out] BMDDisplayModeSupport *result); + HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator_v7_6 **iterator); + + HRESULT SetScreenPreviewCallback([in] IDeckLinkScreenPreviewCallback_v7_6 *previewCallback); + + /* Video Output */ + + HRESULT EnableVideoOutput(BMDDisplayMode displayMode, BMDVideoOutputFlags flags); + HRESULT DisableVideoOutput(void); + + HRESULT SetVideoOutputFrameMemoryAllocator([in] IDeckLinkMemoryAllocator *theAllocator); + HRESULT CreateVideoFrame(long width, long height, long rowBytes, BMDPixelFormat pixelFormat, BMDFrameFlags flags, [out] IDeckLinkMutableVideoFrame_v7_6 **outFrame); + HRESULT CreateAncillaryData(BMDPixelFormat pixelFormat, [out] IDeckLinkVideoFrameAncillary **outBuffer); + + HRESULT DisplayVideoFrameSync([in] IDeckLinkVideoFrame_v7_6 *theFrame); + HRESULT ScheduleVideoFrame([in] IDeckLinkVideoFrame_v7_6 *theFrame, BMDTimeValue displayTime, BMDTimeValue displayDuration, BMDTimeScale timeScale); + HRESULT SetScheduledFrameCompletionCallback([in] IDeckLinkVideoOutputCallback_v7_6 *theCallback); + HRESULT GetBufferedVideoFrameCount([out] unsigned long *bufferedFrameCount); + + /* Audio Output */ + + HRESULT EnableAudioOutput(BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, unsigned long channelCount, BMDAudioOutputStreamType streamType); + HRESULT DisableAudioOutput(void); + + HRESULT WriteAudioSamplesSync([in] void *buffer, unsigned long sampleFrameCount, [out] unsigned long *sampleFramesWritten); + + HRESULT BeginAudioPreroll(void); + HRESULT EndAudioPreroll(void); + HRESULT ScheduleAudioSamples([in] void *buffer, unsigned long sampleFrameCount, BMDTimeValue streamTime, BMDTimeScale timeScale, [out] unsigned long *sampleFramesWritten); + + HRESULT GetBufferedAudioSampleFrameCount([out] unsigned long *bufferedSampleFrameCount); + HRESULT FlushBufferedAudioSamples(void); + + HRESULT SetAudioCallback([in] IDeckLinkAudioOutputCallback *theCallback); + + /* Output Control */ + + HRESULT StartScheduledPlayback(BMDTimeValue playbackStartTime, BMDTimeScale timeScale, double playbackSpeed); + HRESULT StopScheduledPlayback(BMDTimeValue stopPlaybackAtTime, [out] BMDTimeValue *actualStopTime, BMDTimeScale timeScale); + HRESULT IsScheduledPlaybackRunning([out] BOOL *active); + HRESULT GetScheduledStreamTime(BMDTimeScale desiredTimeScale, [out] BMDTimeValue *streamTime, [out] double *playbackSpeed); + + /* Hardware Timing */ + + HRESULT GetHardwareReferenceClock(BMDTimeScale desiredTimeScale, [out] BMDTimeValue *hardwareTime, [out] BMDTimeValue *timeInFrame, [out] BMDTimeValue *ticksPerFrame); +}; + + +/* Interface IDeckLinkInput - Created by QueryInterface from IDeckLink. */ + +[ + object, + uuid(300C135A-9F43-48E2-9906-6D7911D93CF1), + helpstring("Created by QueryInterface from IDeckLink.") +] interface IDeckLinkInput_v7_6 : IUnknown +{ + HRESULT DoesSupportVideoMode(BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, [out] BMDDisplayModeSupport *result); + HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator_v7_6 **iterator); + + HRESULT SetScreenPreviewCallback([in] IDeckLinkScreenPreviewCallback_v7_6 *previewCallback); + + /* Video Input */ + + HRESULT EnableVideoInput(BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, BMDVideoInputFlags flags); + HRESULT DisableVideoInput(void); + HRESULT GetAvailableVideoFrameCount([out] unsigned long *availableFrameCount); + + /* Audio Input */ + + HRESULT EnableAudioInput(BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, unsigned long channelCount); + HRESULT DisableAudioInput(void); + HRESULT GetAvailableAudioSampleFrameCount([out] unsigned long *availableSampleFrameCount); + + /* Input Control */ + + HRESULT StartStreams(void); + HRESULT StopStreams(void); + HRESULT PauseStreams(void); + HRESULT FlushStreams(void); + HRESULT SetCallback([in] IDeckLinkInputCallback_v7_6 *theCallback); + + /* Hardware Timing */ + + HRESULT GetHardwareReferenceClock(BMDTimeScale desiredTimeScale, [out] BMDTimeValue *hardwareTime, [out] BMDTimeValue *timeInFrame, [out] BMDTimeValue *ticksPerFrame); +}; + + +/* Interface IDeckLinkTimecode_v7_6 - Used for video frame timecode representation. */ + +[ + object, + uuid(EFB9BCA6-A521-44F7-BD69-2332F24D9EE6), + helpstring("Used for video frame timecode representation.") +] interface IDeckLinkTimecode_v7_6 : IUnknown +{ + BMDTimecodeBCD GetBCD(void); + HRESULT GetComponents([out] unsigned char *hours, [out] unsigned char *minutes, [out] unsigned char *seconds, [out] unsigned char *frames); + HRESULT GetString([out] BSTR *timecode); + BMDTimecodeFlags GetFlags(void); +}; + + +/* Interface IDeckLinkVideoFrame - Interface to encapsulate a video frame; can be caller-implemented. */ + +[ + object, + uuid(A8D8238E-6B18-4196-99E1-5AF717B83D32), + local, + helpstring("Interface to encapsulate a video frame; can be caller-implemented.") +] interface IDeckLinkVideoFrame_v7_6 : IUnknown +{ + long GetWidth(void); + long GetHeight(void); + long GetRowBytes(void); + BMDPixelFormat GetPixelFormat(void); + BMDFrameFlags GetFlags(void); + HRESULT GetBytes([out] void **buffer); + + HRESULT GetTimecode(BMDTimecodeFormat format, [out] IDeckLinkTimecode_v7_6 **timecode); + HRESULT GetAncillaryData([out] IDeckLinkVideoFrameAncillary **ancillary); +}; + + +/* Interface IDeckLinkMutableVideoFrame - Created by IDeckLinkOutput::CreateVideoFrame. */ + +[ + object, + uuid(46FCEE00-B4E6-43D0-91C0-023A7FCEB34F), + local, + helpstring("Created by IDeckLinkOutput::CreateVideoFrame.") +] interface IDeckLinkMutableVideoFrame_v7_6 : IDeckLinkVideoFrame_v7_6 +{ + HRESULT SetFlags(BMDFrameFlags newFlags); + + HRESULT SetTimecode(BMDTimecodeFormat format, [in] IDeckLinkTimecode_v7_6 *timecode); + HRESULT SetTimecodeFromComponents(BMDTimecodeFormat format, unsigned char hours, unsigned char minutes, unsigned char seconds, unsigned char frames, BMDTimecodeFlags flags); + HRESULT SetAncillaryData([in] IDeckLinkVideoFrameAncillary *ancillary); +}; + + +/* Interface IDeckLinkVideoInputFrame - Provided by the IDeckLinkVideoInput frame arrival callback. */ + +[ + object, + uuid(9A74FA41-AE9F-47AC-8CF4-01F42DD59965), + local, + helpstring("Provided by the IDeckLinkVideoInput frame arrival callback.") +] interface IDeckLinkVideoInputFrame_v7_6 : IDeckLinkVideoFrame_v7_6 +{ + HRESULT GetStreamTime([out] BMDTimeValue *frameTime, [out] BMDTimeValue *frameDuration, BMDTimeScale timeScale); + HRESULT GetHardwareReferenceTimestamp(BMDTimeScale timeScale, [out] BMDTimeValue *frameTime, [out] BMDTimeValue *frameDuration); +}; + + +/* Interface IDeckLinkScreenPreviewCallback - Screen preview callback */ + +[ + object, + uuid(373F499D-4B4D-4518-AD22-6354E5A5825E), + local, + helpstring("Screen preview callback") +] interface IDeckLinkScreenPreviewCallback_v7_6 : IUnknown +{ + HRESULT DrawFrame([in] IDeckLinkVideoFrame_v7_6 *theFrame); +}; + + +/* Interface IDeckLinkGLScreenPreviewHelper - Created with CoCreateInstance(). */ + +[ + object, + uuid(BA575CD9-A15E-497B-B2C2-F9AFE7BE4EBA), + local, + helpstring("Created with CoCreateInstance().") +] interface IDeckLinkGLScreenPreviewHelper_v7_6 : IUnknown +{ + + /* Methods must be called with OpenGL context set */ + + HRESULT InitializeGL(void); + HRESULT PaintGL(void); + HRESULT SetFrame([in] IDeckLinkVideoFrame_v7_6 *theFrame); +}; + + +/* Interface IDeckLinkVideoConversion - Created with CoCreateInstance(). */ + +[ + object, + uuid(3EB504C9-F97D-40FE-A158-D407D48CB53B), + local, + helpstring("Created with CoCreateInstance().") +] interface IDeckLinkVideoConversion_v7_6 : IUnknown +{ + HRESULT ConvertFrame([in] IDeckLinkVideoFrame_v7_6* srcFrame, [in] IDeckLinkVideoFrame_v7_6* dstFrame); +}; + +/* Interface IDeckLinkConfiguration_v7_6 - Created by QueryInterface from IDeckLink. */ + +[ + object, + uuid(B8EAD569-B764-47F0-A73F-AE40DF6CBF10), + helpstring("Created by QueryInterface from IDeckLink.") +] interface IDeckLinkConfiguration_v7_6 : IUnknown +{ + HRESULT GetConfigurationValidator([out] IDeckLinkConfiguration_v7_6 **configObject); + HRESULT WriteConfigurationToPreferences(void); + + /* Video Output Configuration */ + + HRESULT SetVideoOutputFormat([in] BMDVideoConnection_v7_6 videoOutputConnection); + HRESULT IsVideoOutputActive([in] BMDVideoConnection_v7_6 videoOutputConnection, [out] BOOL *active); + + HRESULT SetAnalogVideoOutputFlags([in] BMDAnalogVideoFlags analogVideoFlags); + HRESULT GetAnalogVideoOutputFlags([out] BMDAnalogVideoFlags *analogVideoFlags); + + HRESULT EnableFieldFlickerRemovalWhenPaused([in] BOOL enable); + HRESULT IsEnabledFieldFlickerRemovalWhenPaused([out] BOOL *enabled); + + HRESULT Set444And3GBpsVideoOutput([in] BOOL enable444VideoOutput, [in] BOOL enable3GbsOutput); + HRESULT Get444And3GBpsVideoOutput([out] BOOL *is444VideoOutputEnabled, [out] BOOL *threeGbsOutputEnabled); + + HRESULT SetVideoOutputConversionMode([in] BMDVideoOutputConversionMode conversionMode); + HRESULT GetVideoOutputConversionMode([out] BMDVideoOutputConversionMode *conversionMode); + + HRESULT Set_HD1080p24_to_HD1080i5994_Conversion([in] BOOL enable); + HRESULT Get_HD1080p24_to_HD1080i5994_Conversion([out] BOOL *enabled); + + /* Video Input Configuration */ + + HRESULT SetVideoInputFormat([in] BMDVideoConnection_v7_6 videoInputFormat); + HRESULT GetVideoInputFormat([out] BMDVideoConnection_v7_6 *videoInputFormat); + + HRESULT SetAnalogVideoInputFlags([in] BMDAnalogVideoFlags analogVideoFlags); + HRESULT GetAnalogVideoInputFlags([out] BMDAnalogVideoFlags *analogVideoFlags); + + HRESULT SetVideoInputConversionMode([in] BMDVideoInputConversionMode conversionMode); + HRESULT GetVideoInputConversionMode([out] BMDVideoInputConversionMode *conversionMode); + + HRESULT SetBlackVideoOutputDuringCapture([in] BOOL blackOutInCapture); + HRESULT GetBlackVideoOutputDuringCapture([out] BOOL *blackOutInCapture); + + HRESULT Set32PulldownSequenceInitialTimecodeFrame([in] unsigned long aFrameTimecode); + HRESULT Get32PulldownSequenceInitialTimecodeFrame([out] unsigned long *aFrameTimecode); + + HRESULT SetVancSourceLineMapping([in] unsigned long activeLine1VANCsource, [in] unsigned long activeLine2VANCsource, [in] unsigned long activeLine3VANCsource); + HRESULT GetVancSourceLineMapping([out] unsigned long *activeLine1VANCsource, [out] unsigned long *activeLine2VANCsource, [out] unsigned long *activeLine3VANCsource); + + /* Audio Input Configuration */ + + HRESULT SetAudioInputFormat([in] BMDAudioConnection audioInputFormat); + HRESULT GetAudioInputFormat([out] BMDAudioConnection *audioInputFormat); +}; + + + +/* Coclasses */ + +importlib("stdole2.tlb"); + +[ + uuid(D398CEE7-4434-4CA3-9BA6-5AE34556B905), + helpstring("CDeckLinkGLScreenPreviewHelper Class (DeckLink API v7.6)") +] coclass CDeckLinkGLScreenPreviewHelper_v7_6 +{ + [default] interface IDeckLinkGLScreenPreviewHelper_v7_6; +}; + +[ + uuid(FFA84F77-73BE-4FB7-B03E-B5E44B9F759B), + helpstring("CDeckLinkVideoConversion Class (DeckLink API v7.6)") +] coclass CDeckLinkVideoConversion_v7_6 +{ + [default] interface IDeckLinkVideoConversion_v7_6; +}; + diff --git a/third_party/decklink/win/include/DeckLinkAPI_v7_9.idl b/third_party/decklink/win/include/DeckLinkAPI_v7_9.idl new file mode 100644 index 0000000..5e57b14 --- /dev/null +++ b/third_party/decklink/win/include/DeckLinkAPI_v7_9.idl @@ -0,0 +1,69 @@ +/* -LICENSE-START- +** Copyright (c) 2010 Blackmagic Design +** +** Permission is hereby granted, free of charge, to any person or organization +** obtaining a copy of the software and accompanying documentation covered by +** this license (the "Software") to use, reproduce, display, distribute, +** execute, and transmit the Software, and to prepare derivative works of the +** Software, and to permit third-parties to whom the Software is furnished to +** do so, all subject to the following: +** +** The copyright notices in the Software and this entire statement, including +** the above license grant, this restriction and the following disclaimer, +** must be included in all copies of the Software, in whole or in part, and +** all derivative works of the Software, unless such copies or derivative +** works are solely in the form of machine-executable object code generated by +** a source language processor. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +** -LICENSE-END- +*/ +/* DeckLinkAPI_v7_9.idl */ + +/* Interface IDeckLinkDeckControl_v7_9 - Deck Control main interface */ + +[ + object, + uuid(A4D81043-0619-42B7-8ED6-602D29041DF7), + helpstring("Deck Control main interface") +] interface IDeckLinkDeckControl_v7_9 : IUnknown +{ + HRESULT Open([in] BMDTimeScale timeScale, [in] BMDTimeValue timeValue, [in] BOOL timecodeIsDropFrame, [out] BMDDeckControlError *error); + HRESULT Close([in] BOOL standbyOn); + HRESULT GetCurrentState([out] BMDDeckControlMode *mode, [out] BMDDeckControlVTRControlState *vtrControlState, [out] BMDDeckControlStatusFlags *flags); + HRESULT SetStandby([in] BOOL standbyOn); + HRESULT Play([out] BMDDeckControlError *error); + HRESULT Stop([out] BMDDeckControlError *error); + HRESULT TogglePlayStop([out] BMDDeckControlError *error); + HRESULT Eject([out] BMDDeckControlError *error); + HRESULT GoToTimecode([in] BMDTimecodeBCD timecode, [out] BMDDeckControlError *error); + HRESULT FastForward([in] BOOL viewTape, [out] BMDDeckControlError *error); + HRESULT Rewind([in] BOOL viewTape, [out] BMDDeckControlError *error); + HRESULT StepForward([out] BMDDeckControlError *error); + HRESULT StepBack([out] BMDDeckControlError *error); + HRESULT Jog([in] double rate, [out] BMDDeckControlError *error); + HRESULT Shuttle([in] double rate, [out] BMDDeckControlError *error); + HRESULT GetTimecodeString([out] BSTR *currentTimeCode, [out] BMDDeckControlError *error); + HRESULT GetTimecode([out] IDeckLinkTimecode **currentTimecode, [out] BMDDeckControlError *error); + HRESULT GetTimecodeBCD([out] BMDTimecodeBCD *currentTimecode, [out] BMDDeckControlError *error); + HRESULT SetPreroll([in] unsigned long prerollSeconds); + HRESULT GetPreroll([out] unsigned long *prerollSeconds); + HRESULT SetExportOffset([in] long exportOffsetFields); + HRESULT GetExportOffset([out] long *exportOffsetFields); + HRESULT GetManualExportOffset([out] long *deckManualExportOffsetFields); + HRESULT SetCaptureOffset([in] long captureOffsetFields); + HRESULT GetCaptureOffset([out] long *captureOffsetFields); + HRESULT StartExport([in] BMDTimecodeBCD inTimecode, [in] BMDTimecodeBCD outTimecode, [in] BMDDeckControlExportModeOpsFlags exportModeOps, [out] BMDDeckControlError *error); + HRESULT StartCapture([in] BOOL useVITC, [in] BMDTimecodeBCD inTimecode, [in] BMDTimecodeBCD outTimecode, [out] BMDDeckControlError *error); + HRESULT GetDeviceID([out] unsigned short *deviceId, [out] BMDDeckControlError *error); + HRESULT Abort(void); + HRESULT CrashRecordStart([out] BMDDeckControlError *error); + HRESULT CrashRecordStop([out] BMDDeckControlError *error); + HRESULT SetCallback([in] IDeckLinkDeckControlStatusCallback *callback); +}; diff --git a/third_party/decklink/win/include/DeckLinkAPI_v8_0.idl b/third_party/decklink/win/include/DeckLinkAPI_v8_0.idl new file mode 100644 index 0000000..079f60b --- /dev/null +++ b/third_party/decklink/win/include/DeckLinkAPI_v8_0.idl @@ -0,0 +1,62 @@ +/* -LICENSE-START- +** Copyright (c) 2011 Blackmagic Design +** +** Permission is hereby granted, free of charge, to any person or organization +** obtaining a copy of the software and accompanying documentation covered by +** this license (the "Software") to use, reproduce, display, distribute, +** execute, and transmit the Software, and to prepare derivative works of the +** Software, and to permit third-parties to whom the Software is furnished to +** do so, all subject to the following: +** +** The copyright notices in the Software and this entire statement, including +** the above license grant, this restriction and the following disclaimer, +** must be included in all copies of the Software, in whole or in part, and +** all derivative works of the Software, unless such copies or derivative +** works are solely in the form of machine-executable object code generated by +** a source language processor. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +** -LICENSE-END- +*/ +/* DeckLinkAPI_v8_0.idl */ + +/* Interface IDeckLink_v8_0 - represents a DeckLink device */ + +[ + object, + uuid(62BFF75D-6569-4E55-8D4D-66AA03829ABC), + helpstring("represents a DeckLink device") +] interface IDeckLink_v8_0 : IUnknown +{ + HRESULT GetModelName([out] BSTR *modelName); +}; + +/* Interface IDeckLinkIterator_v8_0 - enumerates installed DeckLink hardware */ + +[ + object, + uuid(74E936FC-CC28-4A67-81A0-1E94E52D4E69), + helpstring("enumerates installed DeckLink hardware") +] interface IDeckLinkIterator_v8_0 : IUnknown +{ + HRESULT Next([out] IDeckLink_v8_0 **deckLinkInstance); +}; + + +/* Coclasses */ + +importlib("stdole2.tlb"); + +[ + uuid(D9EDA3B3-2887-41FA-B724-017CF1EB1D37), + helpstring("CDeckLinkIterator Class (DeckLink API v8.0)") +] coclass CDeckLinkIterator_v8_0 +{ + [default] interface IDeckLinkIterator_v8_0; +}; diff --git a/third_party/decklink/win/include/DeckLinkAPI_v8_1.idl b/third_party/decklink/win/include/DeckLinkAPI_v8_1.idl new file mode 100644 index 0000000..cdf9286 --- /dev/null +++ b/third_party/decklink/win/include/DeckLinkAPI_v8_1.idl @@ -0,0 +1,101 @@ +/* -LICENSE-START- +** Copyright (c) 2011 Blackmagic Design +** +** Permission is hereby granted, free of charge, to any person or organization +** obtaining a copy of the software and accompanying documentation covered by +** this license (the "Software") to use, reproduce, display, distribute, +** execute, and transmit the Software, and to prepare derivative works of the +** Software, and to permit third-parties to whom the Software is furnished to +** do so, all subject to the following: +** +** The copyright notices in the Software and this entire statement, including +** the above license grant, this restriction and the following disclaimer, +** must be included in all copies of the Software, in whole or in part, and +** all derivative works of the Software, unless such copies or derivative +** works are solely in the form of machine-executable object code generated by +** a source language processor. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +** -LICENSE-END- +*/ +/* DeckLinkAPI_v8_1.idl */ + +/* Enum BMDDeckControlVTRControlState_v8_1 - VTR Control state */ + +typedef [v1_enum] enum _BMDDeckControlVTRControlState_v8_1 { + bmdDeckControlNotInVTRControlMode_v8_1 = /* 'nvcm' */ 0x6E76636D, + bmdDeckControlVTRControlPlaying_v8_1 = /* 'vtrp' */ 0x76747270, + bmdDeckControlVTRControlRecording_v8_1 = /* 'vtrr' */ 0x76747272, + bmdDeckControlVTRControlStill_v8_1 = /* 'vtra' */ 0x76747261, + bmdDeckControlVTRControlSeeking_v8_1 = /* 'vtrs' */ 0x76747273, + bmdDeckControlVTRControlStopped_v8_1 = /* 'vtro' */ 0x7674726F +} BMDDeckControlVTRControlState_v8_1; + + +interface IDeckLinkDeckControlStatusCallback; +interface IDeckLinkDeckControl; + +/* Interface IDeckLinkDeckControlStatusCallback_v8_1 - Deck control state change callback. */ + +[ + object, + uuid(E5F693C1-4283-4716-B18F-C1431521955B), + helpstring("Deck control state change callback.") +] interface IDeckLinkDeckControlStatusCallback_v8_1 : IUnknown +{ + HRESULT TimecodeUpdate([in] BMDTimecodeBCD currentTimecode); + HRESULT VTRControlStateChanged([in] BMDDeckControlVTRControlState_v8_1 newState, [in] BMDDeckControlError error); + HRESULT DeckControlEventReceived([in] BMDDeckControlEvent event, [in] BMDDeckControlError error); + HRESULT DeckControlStatusChanged([in] BMDDeckControlStatusFlags flags, [in] unsigned long mask); +}; + +/* Interface IDeckLinkDeckControl - Deck Control main interface */ + +[ + object, + uuid(522A9E39-0F3C-4742-94EE-D80DE335DA1D), + helpstring("Deck Control main interface") +] interface IDeckLinkDeckControl_v8_1 : IUnknown +{ + HRESULT Open([in] BMDTimeScale timeScale, [in] BMDTimeValue timeValue, [in] BOOL timecodeIsDropFrame, [out] BMDDeckControlError *error); + HRESULT Close([in] BOOL standbyOn); + HRESULT GetCurrentState([out] BMDDeckControlMode *mode, [out] BMDDeckControlVTRControlState_v8_1 *vtrControlState, [out] BMDDeckControlStatusFlags *flags); + HRESULT SetStandby([in] BOOL standbyOn); + HRESULT SendCommand([in] unsigned char *inBuffer, [in] unsigned long inBufferSize, [out] unsigned char *outBuffer, [out] unsigned long *outDataSize, [in] unsigned long outBufferSize, [out] BMDDeckControlError *error); + HRESULT Play([out] BMDDeckControlError *error); + HRESULT Stop([out] BMDDeckControlError *error); + HRESULT TogglePlayStop([out] BMDDeckControlError *error); + HRESULT Eject([out] BMDDeckControlError *error); + HRESULT GoToTimecode([in] BMDTimecodeBCD timecode, [out] BMDDeckControlError *error); + HRESULT FastForward([in] BOOL viewTape, [out] BMDDeckControlError *error); + HRESULT Rewind([in] BOOL viewTape, [out] BMDDeckControlError *error); + HRESULT StepForward([out] BMDDeckControlError *error); + HRESULT StepBack([out] BMDDeckControlError *error); + HRESULT Jog([in] double rate, [out] BMDDeckControlError *error); + HRESULT Shuttle([in] double rate, [out] BMDDeckControlError *error); + HRESULT GetTimecodeString([out] BSTR *currentTimeCode, [out] BMDDeckControlError *error); + HRESULT GetTimecode([out] IDeckLinkTimecode **currentTimecode, [out] BMDDeckControlError *error); + HRESULT GetTimecodeBCD([out] BMDTimecodeBCD *currentTimecode, [out] BMDDeckControlError *error); + HRESULT SetPreroll([in] unsigned long prerollSeconds); + HRESULT GetPreroll([out] unsigned long *prerollSeconds); + HRESULT SetExportOffset([in] long exportOffsetFields); + HRESULT GetExportOffset([out] long *exportOffsetFields); + HRESULT GetManualExportOffset([out] long *deckManualExportOffsetFields); + HRESULT SetCaptureOffset([in] long captureOffsetFields); + HRESULT GetCaptureOffset([out] long *captureOffsetFields); + HRESULT StartExport([in] BMDTimecodeBCD inTimecode, [in] BMDTimecodeBCD outTimecode, [in] BMDDeckControlExportModeOpsFlags exportModeOps, [out] BMDDeckControlError *error); + HRESULT StartCapture([in] BOOL useVITC, [in] BMDTimecodeBCD inTimecode, [in] BMDTimecodeBCD outTimecode, [out] BMDDeckControlError *error); + HRESULT GetDeviceID([out] unsigned short *deviceId, [out] BMDDeckControlError *error); + HRESULT Abort(void); + HRESULT CrashRecordStart([out] BMDDeckControlError *error); + HRESULT CrashRecordStop([out] BMDDeckControlError *error); + HRESULT SetCallback([in] IDeckLinkDeckControlStatusCallback_v8_1 *callback); +}; + + diff --git a/third_party/decklink/win/include/DeckLinkAPI_v9_2.idl b/third_party/decklink/win/include/DeckLinkAPI_v9_2.idl new file mode 100644 index 0000000..74ddb68 --- /dev/null +++ b/third_party/decklink/win/include/DeckLinkAPI_v9_2.idl @@ -0,0 +1,68 @@ +/* -LICENSE-START- +** Copyright (c) 2012 Blackmagic Design +** +** Permission is hereby granted, free of charge, to any person or organization +** obtaining a copy of the software and accompanying documentation covered by +** this license (the "Software") to use, reproduce, display, distribute, +** execute, and transmit the Software, and to prepare derivative works of the +** Software, and to permit third-parties to whom the Software is furnished to +** do so, all subject to the following: +** +** The copyright notices in the Software and this entire statement, including +** the above license grant, this restriction and the following disclaimer, +** must be included in all copies of the Software, in whole or in part, and +** all derivative works of the Software, unless such copies or derivative +** works are solely in the form of machine-executable object code generated by +** a source language processor. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +** -LICENSE-END- +*/ + +/* DeckLinkAPI_v9_2.idl */ + + +/* Interface IDeckLinkInput_v9_2 - Created by QueryInterface from IDeckLink. */ + +[ + object, + uuid(6D40EF78-28B9-4E21-990D-95BB7750A04F), + helpstring("Created by QueryInterface from IDeckLink.") +] interface IDeckLinkInput_v9_2 : IUnknown +{ + HRESULT DoesSupportVideoMode([in] BMDDisplayMode displayMode, [in] BMDPixelFormat pixelFormat, [in] BMDVideoInputFlags flags, [out] BMDDisplayModeSupport *result, [out] IDeckLinkDisplayMode **resultDisplayMode); + HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator **iterator); + + HRESULT SetScreenPreviewCallback([in] IDeckLinkScreenPreviewCallback *previewCallback); + + /* Video Input */ + + HRESULT EnableVideoInput([in] BMDDisplayMode displayMode, [in] BMDPixelFormat pixelFormat, [in] BMDVideoInputFlags flags); + HRESULT DisableVideoInput(void); + HRESULT GetAvailableVideoFrameCount([out] unsigned long *availableFrameCount); + + /* Audio Input */ + + HRESULT EnableAudioInput([in] BMDAudioSampleRate sampleRate, [in] BMDAudioSampleType sampleType, [in] unsigned long channelCount); + HRESULT DisableAudioInput(void); + HRESULT GetAvailableAudioSampleFrameCount([out] unsigned long *availableSampleFrameCount); + + /* Input Control */ + + HRESULT StartStreams(void); + HRESULT StopStreams(void); + HRESULT PauseStreams(void); + HRESULT FlushStreams(void); + HRESULT SetCallback([in] IDeckLinkInputCallback *theCallback); + + /* Hardware Timing */ + + HRESULT GetHardwareReferenceClock([in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue *hardwareTime, [out] BMDTimeValue *timeInFrame, [out] BMDTimeValue *ticksPerFrame); +}; + diff --git a/third_party/decklink/win/include/DeckLinkAPI_v9_9.idl b/third_party/decklink/win/include/DeckLinkAPI_v9_9.idl new file mode 100644 index 0000000..f5f5cdc --- /dev/null +++ b/third_party/decklink/win/include/DeckLinkAPI_v9_9.idl @@ -0,0 +1,87 @@ +/* -LICENSE-START- +** Copyright (c) 2012 Blackmagic Design +** +** Permission is hereby granted, free of charge, to any person or organization +** obtaining a copy of the software and accompanying documentation covered by +** this license (the "Software") to use, reproduce, display, distribute, +** execute, and transmit the Software, and to prepare derivative works of the +** Software, and to permit third-parties to whom the Software is furnished to +** do so, all subject to the following: +** +** The copyright notices in the Software and this entire statement, including +** the above license grant, this restriction and the following disclaimer, +** must be included in all copies of the Software, in whole or in part, and +** all derivative works of the Software, unless such copies or derivative +** works are solely in the form of machine-executable object code generated by +** a source language processor. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +** -LICENSE-END- +*/ + +/* DeckLinkAPI_v9_9.idl */ + + +/* Interface IDeckLinkOutput - Created by QueryInterface from IDeckLink. */ + +[ + object, + uuid(A3EF0963-0862-44ED-92A9-EE89ABF431C7), + local, + helpstring("Created by QueryInterface from IDeckLink.") +] interface IDeckLinkOutput_v9_9 : IUnknown +{ + HRESULT DoesSupportVideoMode([in] BMDDisplayMode displayMode, [in] BMDPixelFormat pixelFormat, [in] BMDVideoOutputFlags flags, [out] BMDDisplayModeSupport *result, [out] IDeckLinkDisplayMode **resultDisplayMode); + HRESULT GetDisplayModeIterator([out] IDeckLinkDisplayModeIterator **iterator); + + HRESULT SetScreenPreviewCallback([in] IDeckLinkScreenPreviewCallback *previewCallback); + + /* Video Output */ + + HRESULT EnableVideoOutput([in] BMDDisplayMode displayMode, [in] BMDVideoOutputFlags flags); + HRESULT DisableVideoOutput(void); + + HRESULT SetVideoOutputFrameMemoryAllocator([in] IDeckLinkMemoryAllocator *theAllocator); + HRESULT CreateVideoFrame([in] long width, [in] long height, [in] long rowBytes, [in] BMDPixelFormat pixelFormat, [in] BMDFrameFlags flags, [out] IDeckLinkMutableVideoFrame **outFrame); + HRESULT CreateAncillaryData([in] BMDPixelFormat pixelFormat, [out] IDeckLinkVideoFrameAncillary **outBuffer); + + HRESULT DisplayVideoFrameSync([in] IDeckLinkVideoFrame *theFrame); + HRESULT ScheduleVideoFrame([in] IDeckLinkVideoFrame *theFrame, [in] BMDTimeValue displayTime, [in] BMDTimeValue displayDuration, [in] BMDTimeScale timeScale); + HRESULT SetScheduledFrameCompletionCallback([in] IDeckLinkVideoOutputCallback *theCallback); + HRESULT GetBufferedVideoFrameCount([out] unsigned long *bufferedFrameCount); + + /* Audio Output */ + + HRESULT EnableAudioOutput([in] BMDAudioSampleRate sampleRate, [in] BMDAudioSampleType sampleType, [in] unsigned long channelCount, [in] BMDAudioOutputStreamType streamType); + HRESULT DisableAudioOutput(void); + + HRESULT WriteAudioSamplesSync([in] void *buffer, [in] unsigned long sampleFrameCount, [out] unsigned long *sampleFramesWritten); + + HRESULT BeginAudioPreroll(void); + HRESULT EndAudioPreroll(void); + HRESULT ScheduleAudioSamples([in] void *buffer, [in] unsigned long sampleFrameCount, [in] BMDTimeValue streamTime, [in] BMDTimeScale timeScale, [out] unsigned long *sampleFramesWritten); + + HRESULT GetBufferedAudioSampleFrameCount([out] unsigned long *bufferedSampleFrameCount); + HRESULT FlushBufferedAudioSamples(void); + + HRESULT SetAudioCallback([in] IDeckLinkAudioOutputCallback *theCallback); + + /* Output Control */ + + HRESULT StartScheduledPlayback([in] BMDTimeValue playbackStartTime, [in] BMDTimeScale timeScale, [in] double playbackSpeed); + HRESULT StopScheduledPlayback([in] BMDTimeValue stopPlaybackAtTime, [out] BMDTimeValue *actualStopTime, [in] BMDTimeScale timeScale); + HRESULT IsScheduledPlaybackRunning([out] BOOL *active); + HRESULT GetScheduledStreamTime([in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue *streamTime, [out] double *playbackSpeed); + HRESULT GetReferenceStatus([out] BMDReferenceStatus *referenceStatus); + + /* Hardware Timing */ + + HRESULT GetHardwareReferenceClock([in] BMDTimeScale desiredTimeScale, [out] BMDTimeValue *hardwareTime, [out] BMDTimeValue *timeInFrame, [out] BMDTimeValue *ticksPerFrame); +}; + |