yolobs-studio/plugins/decklink/win/decklink-sdk/DeckLinkAPIStreaming.idl

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

364 lines
15 KiB
Text
Raw Permalink Normal View History

2016-02-23 23:16:51 +00:00
/* -LICENSE-START-
2020-12-22 17:32:50 +00:00
** Copyright (c) 2020 Blackmagic Design
2016-02-23 23:16:51 +00:00
**
** 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:
2020-12-22 17:32:50 +00:00
**
2016-02-23 23:16:51 +00:00
** 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.
2020-12-22 17:32:50 +00:00
**
2016-02-23 23:16:51 +00:00
** 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 */
2020-12-22 17:32:50 +00:00
typedef [v1_enum] enum _BMDStreamingDeviceMode {
2016-02-23 23:16:51 +00:00
bmdStreamingDeviceIdle = /* 'idle' */ 0x69646C65,
bmdStreamingDeviceEncoding = /* 'enco' */ 0x656E636F,
bmdStreamingDeviceStopping = /* 'stop' */ 0x73746F70,
bmdStreamingDeviceUnknown = /* 'munk' */ 0x6D756E6B
} BMDStreamingDeviceMode;
/* Enum BMDStreamingEncodingFrameRate - Encoded frame rates */
2020-12-22 17:32:50 +00:00
typedef [v1_enum] enum _BMDStreamingEncodingFrameRate {
2016-02-23 23:16:51 +00:00
/* 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 */
2020-12-22 17:32:50 +00:00
typedef [v1_enum] enum _BMDStreamingEncodingSupport {
2016-02-23 23:16:51 +00:00
bmdStreamingEncodingModeNotSupported = 0,
2020-12-22 17:32:50 +00:00
bmdStreamingEncodingModeSupported,
bmdStreamingEncodingModeSupportedWithChanges
2016-02-23 23:16:51 +00:00
} BMDStreamingEncodingSupport;
/* Enum BMDStreamingVideoCodec - Video codecs */
2020-12-22 17:32:50 +00:00
typedef [v1_enum] enum _BMDStreamingVideoCodec {
2016-02-23 23:16:51 +00:00
bmdStreamingVideoCodecH264 = /* 'H264' */ 0x48323634
} BMDStreamingVideoCodec;
/* Enum BMDStreamingH264Profile - H264 encoding profile */
2020-12-22 17:32:50 +00:00
typedef [v1_enum] enum _BMDStreamingH264Profile {
2016-02-23 23:16:51 +00:00
bmdStreamingH264ProfileHigh = /* 'high' */ 0x68696768,
bmdStreamingH264ProfileMain = /* 'main' */ 0x6D61696E,
bmdStreamingH264ProfileBaseline = /* 'base' */ 0x62617365
} BMDStreamingH264Profile;
/* Enum BMDStreamingH264Level - H264 encoding level */
2020-12-22 17:32:50 +00:00
typedef [v1_enum] enum _BMDStreamingH264Level {
2016-02-23 23:16:51 +00:00
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 */
2020-12-22 17:32:50 +00:00
typedef [v1_enum] enum _BMDStreamingH264EntropyCoding {
2016-02-23 23:16:51 +00:00
bmdStreamingH264EntropyCodingCAVLC = /* 'EVLC' */ 0x45564C43,
bmdStreamingH264EntropyCodingCABAC = /* 'EBAC' */ 0x45424143
} BMDStreamingH264EntropyCoding;
/* Enum BMDStreamingAudioCodec - Audio codecs */
2020-12-22 17:32:50 +00:00
typedef [v1_enum] enum _BMDStreamingAudioCodec {
2016-02-23 23:16:51 +00:00
bmdStreamingAudioCodecAAC = /* 'AAC ' */ 0x41414320
} BMDStreamingAudioCodec;
/* Enum BMDStreamingEncodingModePropertyID - Encoding mode properties */
2020-12-22 17:32:50 +00:00
typedef [v1_enum] enum _BMDStreamingEncodingModePropertyID {
2016-02-23 23:16:51 +00:00
/* 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
{
2020-12-22 17:32:50 +00:00
HRESULT StreamingDeviceArrived ([in] IDeckLink* device);
HRESULT StreamingDeviceRemoved ([in] IDeckLink* device);
HRESULT StreamingDeviceModeChanged ([in] IDeckLink* device, [in] BMDStreamingDeviceMode mode);
2016-02-23 23:16:51 +00:00
};
/* Interface IBMDStreamingH264InputCallback - H264 input callbacks. */
[
object,
uuid(823C475F-55AE-46F9-890C-537CC5CEDCCA),
helpstring("H264 input callbacks.")
] interface IBMDStreamingH264InputCallback : IUnknown
{
2020-12-22 17:32:50 +00:00
HRESULT H264NALPacketArrived ([in] IBMDStreamingH264NALPacket* nalPacket);
HRESULT H264AudioPacketArrived ([in] IBMDStreamingAudioPacket* audioPacket);
HRESULT MPEG2TSPacketArrived ([in] IBMDStreamingMPEG2TSPacket* tsPacket);
HRESULT H264VideoInputConnectorScanningChanged (void);
HRESULT H264VideoInputConnectorChanged (void);
HRESULT H264VideoInputModeChanged (void);
2016-02-23 23:16:51 +00:00
};
/* Interface IBMDStreamingDiscovery - Installs device notifications */
[
object,
uuid(2C837444-F989-4D87-901A-47C8A36D096D),
helpstring("Installs device notifications")
] interface IBMDStreamingDiscovery : IUnknown
{
2020-12-22 17:32:50 +00:00
HRESULT InstallDeviceNotifications ([in] IBMDStreamingDeviceNotificationCallback* theCallback);
HRESULT UninstallDeviceNotifications (void);
2016-02-23 23:16:51 +00:00
};
/* Interface IBMDStreamingVideoEncodingMode - Represents an encoded video mode. */
[
object,
uuid(1AB8035B-CD13-458D-B6DF-5E8F7C2141D9),
helpstring("Represents an encoded video mode.")
] interface IBMDStreamingVideoEncodingMode : IUnknown
{
2020-12-22 17:32:50 +00:00
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
2016-02-23 23:16:51 +00:00
};
/* 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
{
2020-12-22 17:32:50 +00:00
HRESULT SetSourceRect ([in] unsigned int posX, [in] unsigned int posY, [in] unsigned int width, [in] unsigned int height);
HRESULT SetDestSize ([in] unsigned int width, [in] unsigned int 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);
2016-02-23 23:16:51 +00:00
};
/* Interface IBMDStreamingVideoEncodingModePresetIterator - Enumerates encoding mode presets */
[
object,
uuid(7AC731A3-C950-4AD0-804A-8377AA51C6C4),
helpstring("Enumerates encoding mode presets")
] interface IBMDStreamingVideoEncodingModePresetIterator : IUnknown
{
2020-12-22 17:32:50 +00:00
HRESULT Next ([out] IBMDStreamingVideoEncodingMode** videoEncodingMode);
2016-02-23 23:16:51 +00:00
};
/* 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 */
2020-12-22 17:32:50 +00:00
HRESULT DoesSupportVideoInputMode ([in] BMDDisplayMode inputMode, [out] BOOL* result);
HRESULT GetVideoInputModeIterator ([out] IDeckLinkDisplayModeIterator** iterator);
HRESULT SetVideoInputMode ([in] BMDDisplayMode inputMode);
HRESULT GetCurrentDetectedVideoInputMode ([out] BMDDisplayMode* detectedMode);
2016-02-23 23:16:51 +00:00
/* Capture modes */
2020-12-22 17:32:50 +00:00
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);
2016-02-23 23:16:51 +00:00
/* Input control */
2020-12-22 17:32:50 +00:00
HRESULT StartCapture (void);
HRESULT StopCapture (void);
HRESULT SetCallback ([in] IUnknown* theCallback);
2016-02-23 23:16:51 +00:00
};
/* 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
{
2020-12-22 17:32:50 +00:00
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 int* packetIndex); // Deprecated
2016-02-23 23:16:51 +00:00
};
/* 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
{
2020-12-22 17:32:50 +00:00
BMDStreamingAudioCodec GetCodec (void);
long GetPayloadSize (void);
HRESULT GetBytes ([out] void** buffer);
HRESULT GetPlayTime ([in] ULONGLONG requestedTimeScale, [out] ULONGLONG* playTime);
HRESULT GetPacketIndex ([out] unsigned int* packetIndex); // Deprecated
2016-02-23 23:16:51 +00:00
};
/* 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
{
2020-12-22 17:32:50 +00:00
long GetPayloadSize (void);
HRESULT GetBytes ([out] void** buffer);
2016-02-23 23:16:51 +00:00
};
/* Interface IBMDStreamingH264NALParser - For basic NAL parsing */
[
object,
uuid(5867F18C-5BFA-4CCC-B2A7-9DFD140417D2),
helpstring("For basic NAL parsing")
] interface IBMDStreamingH264NALParser : IUnknown
{
2020-12-22 17:32:50 +00:00
HRESULT IsNALSequenceParameterSet ([in] IBMDStreamingH264NALPacket* nal);
HRESULT IsNALPictureParameterSet ([in] IBMDStreamingH264NALPacket* nal);
HRESULT GetProfileAndLevelFromSPS ([in] IBMDStreamingH264NALPacket* nal, [out] unsigned int* profileIdc, [out] unsigned int* profileCompatability, [out] unsigned int* levelIdc);
2016-02-23 23:16:51 +00:00
};
/* Coclasses */
2017-04-19 19:54:15 +00:00
importlib("stdole2.tlb");
2016-02-23 23:16:51 +00:00
[
2019-07-27 12:47:10 +00:00
uuid(23A4EDF5-A0E5-432C-94EF-3BABB5F81C82),
2016-02-23 23:16:51 +00:00
helpstring("CBMDStreamingDiscovery Class")
] coclass CBMDStreamingDiscovery
{
[default] interface IBMDStreamingDiscovery;
};
[
uuid(7753EFBD-951C-407C-97A5-23C737B73B52),
helpstring("CBMDStreamingH264NALParser Class")
] coclass CBMDStreamingH264NALParser
{
[default] interface IBMDStreamingH264NALParser;
};
2017-04-19 19:54:15 +00:00