[PSDK] Update wmsdkidl.idl and import some of its related idl files from Wine Staging 2.16. CORE-13762

This commit is contained in:
Amine Khaldi 2017-10-08 10:27:23 +01:00
parent dc0774d8d0
commit c95f8e51d3
10 changed files with 3111 additions and 2 deletions

View file

@ -43,6 +43,7 @@ list(APPEND SOURCE
docobj.idl
docobjectservice.idl
downloadmgr.idl
drmexternals.idl
# dyngraph.idl
endpointvolume.idl
exdisp.idl
@ -58,7 +59,11 @@ list(APPEND SOURCE
indexsrv.idl
inputscope.idl
inseng.idl
mediaobj.idl
metahost.idl
mfidl.idl
mfobjects.idl
mftransform.idl
mimeinfo.idl
mimeole.idl
mlang.idl
@ -124,6 +129,7 @@ list(APPEND SOURCE
wincodec.idl
wincodecsdk.idl
winsxs.idl
wmdrmsdk.idl
wmiutils.idl
wmsbuffer.idl
wmsdkidl.idl

View file

@ -0,0 +1,19 @@
/*
* Copyright 2017 Alistair Leslie-Hughes
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
import "wmdrmsdk.idl";

View file

@ -0,0 +1,242 @@
/*
* Copyright (C) 2002 Alexandre Julliard
* Copyright (C) 2004 Vincent Béron
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
import "unknwn.idl";
import "objidl.idl";
import "strmif.idl";
interface IDMOQualityControl;
interface IDMOVideoOutputOptimizations;
typedef struct _DMOMediaType
{
GUID majortype;
GUID subtype;
BOOL bFixedSizeSamples;
BOOL bTemporalCompression;
ULONG lSampleSize;
GUID formattype;
IUnknown *pUnk;
ULONG cbFormat;
BYTE *pbFormat;
} DMO_MEDIA_TYPE;
/*****************************************************************************
* IEnumDMO interface
*/
[
object,
uuid(2C3CD98A-2BFA-4A53-9C27-5249BA64BA0F),
pointer_default(unique)
]
interface IEnumDMO : IUnknown
{
[local]
HRESULT Next(
[in] DWORD cItemsToFetch,
[out] CLSID *pCLSID,
[out] WCHAR **Names,
[out] DWORD *pcItemsFetched
);
HRESULT Skip(
[in] DWORD cItemsToSkip
);
HRESULT Reset();
HRESULT Clone(
[out] IEnumDMO **ppEnum
);
}
/*****************************************************************************
* IMediaBuffer interface
*/
[
object,
uuid(59eff8b9-938c-4a26-82f2-95cb84cdc837),
local
]
interface IMediaBuffer : IUnknown
{
HRESULT SetLength(
DWORD cbLength
);
HRESULT GetMaxLength(
[out] DWORD *pcbMaxLength
);
HRESULT GetBufferAndLength(
[out] BYTE **ppBuffer,
[out] DWORD *pcbLength
);
}
typedef struct _DMO_OUTPUT_DATA_BUFFER {
IMediaBuffer *pBuffer;
DWORD dwStatus;
REFERENCE_TIME rtTimestamp;
REFERENCE_TIME rtTimelength;
} DMO_OUTPUT_DATA_BUFFER, *PDMO_OUTPUT_DATA_BUFFER;
enum _DMO_INPLACE_PROCESS_FLAGS {
DMO_INPLACE_NORMAL = 0x00000000,
DMO_INPLACE_ZERO = 0x00000001
};
/*****************************************************************************
* IMediaObject interface
*/
[
object,
uuid(d8ad0f58-5494-4102-97c5-ec798e59bcf4),
local
]
interface IMediaObject : IUnknown
{
HRESULT GetStreamCount(
[out] DWORD *pcInputStreams,
[out] DWORD *pcOutputStreams
);
HRESULT GetInputStreamInfo(
DWORD dwInputStreamIndex,
[out] DWORD *pdwFlags
);
HRESULT GetOutputStreamInfo(
DWORD dwOutputStreamIndex,
[out] DWORD *pdwFlags
);
HRESULT GetInputType(
DWORD dwInputStreamIndex,
DWORD dwTypeIndex,
[out] DMO_MEDIA_TYPE *pmt
);
HRESULT GetOutputType(
DWORD dwOutputStreamIndex,
DWORD dwTypeIndex,
[out] DMO_MEDIA_TYPE *pmt
);
HRESULT SetInputType(
DWORD dwInputStreamIndex,
[in] const DMO_MEDIA_TYPE *pmt,
DWORD dwFlags
);
HRESULT SetOutputType(
DWORD dwOutputStreamIndex,
[in] const DMO_MEDIA_TYPE *pmt,
DWORD dwFlags
);
HRESULT GetInputCurrentType(
DWORD dwInputStreamIndex,
[out] DMO_MEDIA_TYPE *pmt
);
HRESULT GetOutputCurrentType(
DWORD dwOutputStreamIndex,
[out] DMO_MEDIA_TYPE *pmt
);
HRESULT GetInputSizeInfo(
DWORD dwInputStreamIndex,
[out] DWORD *pcbSize,
[out] DWORD *pcbMaxLookahead,
[out] DWORD *pcbAlignment
);
HRESULT GetOutputSizeInfo(
DWORD dwOutputStreamIndex,
[out] DWORD *pcbSize,
[out] DWORD *pcbAlignment
);
HRESULT GetInputMaxLatency(
DWORD dwInputStreamIndex,
[out] REFERENCE_TIME *prtMaxLatency
);
HRESULT SetInputMaxLatency(
DWORD dwInputStreamIndex,
REFERENCE_TIME rtMaxLatency
);
HRESULT Flush();
HRESULT Discontinuity(DWORD dwInputStreamIndex);
HRESULT AllocateStreamingResources();
HRESULT FreeStreamingResources();
HRESULT GetInputStatus(
DWORD dwInputStreamIndex,
[out] DWORD *dwFlags
);
HRESULT ProcessInput(
DWORD dwInputStreamIndex,
IMediaBuffer *pBuffer,
DWORD dwFlags,
REFERENCE_TIME rtTimestamp,
REFERENCE_TIME rtTimelength
);
HRESULT ProcessOutput(
DWORD dwFlags,
DWORD cOutputBufferCount,
[in,out] DMO_OUTPUT_DATA_BUFFER *pOutputBuffers,
[out] DWORD *pdwStatus
);
HRESULT Lock(LONG bLock);
};
/*****************************************************************************
* IMediaObjectInPlace interface
*/
[
object,
uuid(651b9ad0-0fc7-4aa9-9538-d89931010741),
local
]
interface IMediaObjectInPlace : IUnknown {
HRESULT Process(
[in] ULONG ulSize,
[in,out] BYTE* pData,
[in] REFERENCE_TIME refTimeStart,
[in] DWORD dwFlags
);
HRESULT Clone(
[out] IMediaObjectInPlace **ppMediaObject
);
HRESULT GetLatency(
[out] REFERENCE_TIME *pLatencyTime
);
}

169
sdk/include/psdk/mfidl.idl Normal file
View file

@ -0,0 +1,169 @@
/*
* Copyright 2016 Michael Müller
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
import "mfobjects.idl";
import "mftransform.idl";
typedef unsigned __int64 TOPOID;
typedef LONGLONG MFTIME;
typedef enum MF_TOPOLOGY_TYPE
{
MF_TOPOLOGY_OUTPUT_NODE,
MF_TOPOLOGY_SOURCESTREAM_NODE,
MF_TOPOLOGY_TRANSFORM_NODE,
MF_TOPOLOGY_TEE_NODE,
MF_TOPOLOGY_MAX = 0xffffffff
} MF_TOPOLOGY_TYPE;
typedef enum _MFCLOCK_STATE
{
MFCLOCK_STATE_INVALID,
MFCLOCK_STATE_RUNNING,
MFCLOCK_STATE_STOPPED,
MFCLOCK_STATE_PAUSED
} MFCLOCK_STATE;
typedef enum MF_OBJECT_TYPE
{
MF_OBJECT_MEDIASOURCE,
MF_OBJECT_BYTESTREAM,
MF_OBJECT_INVALID
} MF_OBJECT_TYPE;
typedef struct _MFCLOCK_PROPERTIES
{
unsigned __int64 qwCorrelationRate;
GUID guidClockId;
DWORD dwClockFlags;
unsigned __int64 qwClockFrequency;
DWORD dwClockTolerance;
DWORD dwClockJitter;
} MFCLOCK_PROPERTIES;
[
object,
uuid(2eb1e945-18b8-4139-9b1a-d5d584818530),
]
interface IMFClock : IUnknown
{
HRESULT GetClockCharacteristics([out] DWORD *characteristics);
HRESULT GetCorrelatedTime([in] DWORD reserved, [out] LONGLONG *clock_time, [out] MFTIME *system_time);
HRESULT GetContinuityKey([out] DWORD *key);
HRESULT GetState([in] DWORD reserved, [out] MFCLOCK_STATE *state);
HRESULT GetProperties([out] MFCLOCK_PROPERTIES *props);
}
[
object,
uuid(83cf873a-f6da-4bc8-823f-bacfd55dc430),
]
interface IMFTopologyNode : IMFAttributes
{
HRESULT SetObject([in] IUnknown *object);
HRESULT GetObject([out] IUnknown **object);
HRESULT GetNodeType([out] MF_TOPOLOGY_TYPE *type);
HRESULT GetTopoNodeID([out] TOPOID *id);
HRESULT SetTopoNodeID([in] TOPOID id);
HRESULT GetInputCount([out] DWORD *count);
HRESULT GetOutputCount([out] DWORD *count);
[local] HRESULT ConnectOutput([in] DWORD output_index, [in] IMFTopologyNode *node, [in] DWORD input_index);
[local] HRESULT DisconnectOutput([in] DWORD index);
HRESULT GetInput([in] DWORD input_index, [out] IMFTopologyNode **node, [out] DWORD *output_index);
HRESULT GetOutput([in] DWORD output_index, [out] IMFTopologyNode **node, [out] DWORD *input_index);
[local] HRESULT SetOutputPrefType([in] DWORD index, [in] IMFMediaType *type);
[local] HRESULT GetOutputPrefType([in] DWORD output_index, [out] IMFMediaType **type);
[call_as(GetOutputPrefType)] HRESULT RemoteGetOutputPrefType([in] DWORD index, [out] DWORD *length,
[out, size_is(, *length)] BYTE **data);
[local] HRESULT SetInputPrefType([in] DWORD index, [in] IMFMediaType *type);
[local] HRESULT GetInputPrefType([in] DWORD index, [out] IMFMediaType **type);
[call_as(GetInputPrefType)] HRESULT RemoteGetInputPrefType([in] DWORD index, [out] DWORD *length,
[out, size_is(, *length)] BYTE **data);
HRESULT CloneFrom([in] IMFTopologyNode *node);
}
[
object,
uuid(83cf873a-f6da-4bc8-823f-bacfd55dc433),
]
interface IMFTopology : IMFAttributes
{
HRESULT GetTopologyID([out] TOPOID *id);
[local] HRESULT AddNode([in] IMFTopologyNode *node);
[local] HRESULT RemoveNode([in] IMFTopologyNode *node);
HRESULT GetNodeCount([out] WORD *nodes);
HRESULT GetNode([in] WORD index, [out] IMFTopologyNode **node);
[local] HRESULT Clear();
HRESULT CloneFrom([in] IMFTopology *topology);
HRESULT GetNodeByID([in] TOPOID id, [out] IMFTopologyNode **node);
HRESULT GetSourceNodeCollection([out] IMFCollection **collection);
HRESULT GetOutputNodeCollection([out] IMFCollection **collection);
}
[
object,
uuid(90377834-21d0-4dee-8214-ba2e3e6c1127),
]
interface IMFMediaSession : IMFMediaEventGenerator
{
HRESULT SetTopology([in] DWORD flags, [in] IMFTopology *topology);
HRESULT ClearTopologies();
HRESULT Start([in, unique] const GUID *format, [in, unique] const PROPVARIANT *start);
HRESULT Pause();
HRESULT Stop();
HRESULT Close();
HRESULT Shutdown();
HRESULT GetClock([out] IMFClock **clock);
HRESULT GetSessionCapabilities([out] DWORD *caps);
HRESULT GetFullTopology([in] DWORD flags, [in] TOPOID id, [out] IMFTopology **topology);
}
[
object,
uuid(fbe5a32d-a497-4b61-bb85-97b1a848a6e3)
]
interface IMFSourceResolver : IUnknown
{
[local] HRESULT CreateObjectFromURL([in] const WCHAR *url, [in] DWORD flags, [in] IPropertyStore *props,
[out] MF_OBJECT_TYPE *obj_type, [out] IUnknown **object);
[local] HRESULT CreateObjectFromByteStream([in] IMFByteStream *stream, [in] const WCHAR *url, [in] DWORD flags,
[in] IPropertyStore *props, [out] MF_OBJECT_TYPE *obj_type, [out] IUnknown **object);
[local] HRESULT BeginCreateObjectFromURL([in] const WCHAR *url, [in] DWORD flags, [in] IPropertyStore *props,
[out] IUnknown **cancel_cookie, [in] IMFAsyncCallback *callback, [in] IUnknown *unk_state);
[call_as(BeginCreateObjectFromURL)] HRESULT RemoteBeginCreateObjectFromURL([in, string] const WCHAR *url,
[in] DWORD flags, [in] IPropertyStore *props, [in] IMFRemoteAsyncCallback *callback);
[local] HRESULT EndCreateObjectFromURL([in] IMFAsyncResult *result, [out] MF_OBJECT_TYPE *obj_type,
[out] IUnknown **object);
[call_as(EndCreateObjectFromURL)] HRESULT RemoteEndCreateObjectFromURL([in] IUnknown *result,
[out] MF_OBJECT_TYPE *obj_type, [out] IUnknown **object);
[local] HRESULT BeginCreateObjectFromByteStream([in] IMFByteStream *stream, [in] const WCHAR *url,
[in] DWORD flags, [in] IPropertyStore *props, [out] IUnknown **cancel_cookie,
[in] IMFAsyncCallback *callback, [in] IUnknown *unk_state);
[call_as(BeginCreateObjectFromByteStream)] HRESULT RemoteBeginCreateObjectFromByteStream([in] IMFByteStream *stream,
[in, unique] const WCHAR *url, [in] DWORD flags, [in, unique] IPropertyStore *props,
[in] IMFRemoteAsyncCallback *callback);
[local] HRESULT EndCreateObjectFromByteStream([in] IMFAsyncResult *result, [out] MF_OBJECT_TYPE *obj_type,
[out] IUnknown **object);
[call_as(EndCreateObjectFromByteStream)] HRESULT RemoteEndCreateObjectFromByteStream([in] IUnknown *result,
[out] MF_OBJECT_TYPE *obj_type, [out] IUnknown **object);
[local] HRESULT CanceObjectCreation([in] IUnknown *cancel_cookie);
}
cpp_quote("HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **session);")
cpp_quote("HRESULT WINAPI MFCreateSourceResolver(IMFSourceResolver **resolver);")
cpp_quote("HRESULT WINAPI MFCreateTopology(IMFTopology **topology);")

View file

@ -0,0 +1,585 @@
/*
* Copyright 2015 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
import "unknwn.idl";
import "propsys.idl";
import "mediaobj.idl";
cpp_quote("#include <mmreg.h>")
#include <mmreg.h>
typedef ULONGLONG QWORD;
typedef enum _MF_ATTRIBUTE_TYPE {
MF_ATTRIBUTE_UINT32 = VT_UI4,
MF_ATTRIBUTE_UINT64 = VT_UI8,
MF_ATTRIBUTE_DOUBLE = VT_R8,
MF_ATTRIBUTE_GUID = VT_CLSID,
MF_ATTRIBUTE_STRING = VT_LPWSTR,
MF_ATTRIBUTE_BLOB = VT_VECTOR | VT_UI1,
MF_ATTRIBUTE_IUNKNOWN = VT_UNKNOWN
} MF_ATTRIBUTE_TYPE;
typedef enum _MF_ATTRIBUTES_MATCH_TYPE {
MF_ATTRIBUTES_MATCH_OUR_ITEMS = 0,
MF_ATTRIBUTES_MATCH_THEIR_ITEMS = 1,
MF_ATTRIBUTES_MATCH_ALL_ITEMS = 2,
MF_ATTRIBUTES_MATCH_INTERSECTION = 3,
MF_ATTRIBUTES_MATCH_SMALLER = 4
} MF_ATTRIBUTES_MATCH_TYPE;
[
object,
uuid(2cd2d921-c447-44a7-a13c-4adabfc247e3)
]
interface IMFAttributes : IUnknown
{
HRESULT GetItem(REFGUID guidKey, [in, out, ptr] PROPVARIANT *pValue);
HRESULT GetItemType(REFGUID guidKey, [out] MF_ATTRIBUTE_TYPE *pType);
HRESULT CompareItem(REFGUID guidKey, REFPROPVARIANT Value, [out] BOOL *pbResult);
HRESULT Compare(IMFAttributes *pTheirs, MF_ATTRIBUTES_MATCH_TYPE MatchType, [out] BOOL *pbResult);
HRESULT GetUINT32(REFGUID guidKey, [out] UINT32 *punValue);
HRESULT GetUINT64(REFGUID guidKey, [out] UINT64 *punValue);
HRESULT GetDouble(REFGUID guidKey, [out] double *pfValue);
HRESULT GetGUID(REFGUID guidKey, [out] GUID *pguidValue);
HRESULT GetStringLength(REFGUID guidKey, [out] UINT32 *pcchLength);
HRESULT GetString(REFGUID guidKey, [out, size_is(cchBufSize)] LPWSTR pwszValue, UINT32 cchBufSize,
[in, out, ptr] UINT32 *pcchLength);
HRESULT GetAllocatedString(REFGUID guidKey, [out, size_is(,*pcchLength+1)] LPWSTR *ppwszValue,
[out] UINT32 *pcchLength);
HRESULT GetBlobSize(REFGUID guidKey, [out] UINT32 *pcbBlobSize);
HRESULT GetBlob(REFGUID guidKey, [out, size_is(cbBufSize)] UINT8 *pBuf, UINT32 cbBufSize,
[in, out, ptr] UINT32 *pcbBlobSize);
HRESULT GetAllocatedBlob(REFGUID guidKey, [out, size_is(,*pcbSize)] UINT8 **ppBuf, [out] UINT32 *pcbSize);
HRESULT GetUnknown(REFGUID guidKey, REFIID riid, [out, iid_is(riid)] LPVOID *ppv);
HRESULT SetItem(REFGUID guidKey, REFPROPVARIANT Value);
HRESULT DeleteItem(REFGUID guidKey);
HRESULT DeleteAllItems();
HRESULT SetUINT32(REFGUID guidKey, UINT32 unValue);
HRESULT SetUINT64(REFGUID guidKey, UINT64 unValue);
HRESULT SetDouble(REFGUID guidKey, double fValue);
HRESULT SetGUID(REFGUID guidKey, REFGUID guidValue);
HRESULT SetString(REFGUID guidKey, [in, string] LPCWSTR wszValue);
HRESULT SetBlob(REFGUID guidKey, [in, size_is(cbBufSize)] const UINT8* pBuf, UINT32 cbBufSize);
HRESULT SetUnknown(REFGUID guidKey, [in] IUnknown *pUnknown);
HRESULT LockStore();
HRESULT UnlockStore();
HRESULT GetCount([out] UINT32 *pcItems);
HRESULT GetItemByIndex(UINT32 unIndex, [out] GUID *pguidKey, [in, out, ptr] PROPVARIANT *pValue);
HRESULT CopyAllItems([in] IMFAttributes *pDest);
}
enum MF_ATTRIBUTE_SERIALIZE_OPTIONS {
MF_ATTRIBUTE_SERIALIZE_UNKNOWN_BYREF = 0x00000001
};
[
object,
uuid(045fa593-8799-42b8-bc8d-8968c6453507),
local
]
interface IMFMediaBuffer : IUnknown
{
HRESULT Lock([out] BYTE **ppbBuffer, [out] DWORD *pcbMaxLength, [out] DWORD *pcbCurrentLength);
HRESULT Unlock();
HRESULT GetCurrentLength([out] DWORD *pcbCurrentLength);
HRESULT SetCurrentLength([in] DWORD cbCurrentLength);
HRESULT GetMaxLength([out] DWORD *pcbMaxLength);
}
[
object,
uuid(c40a00f2-b93a-4d80-ae8c-5a1c634f58e4),
local
]
interface IMFSample : IMFAttributes
{
HRESULT GetSampleFlags([out] DWORD *pdwSampleFlags);
HRESULT SetSampleFlags([in] DWORD dwSampleFlags);
HRESULT GetSampleTime([out] LONGLONG *phnsSampleTime);
HRESULT SetSampleTime([in] LONGLONG hnsSampleTime);
HRESULT GetSampleDuration([out] LONGLONG *phnsSampleDuration);
HRESULT SetSampleDuration([in] LONGLONG hnsSampleDuration);
HRESULT GetBufferCount([out] DWORD *pdwBufferCount);
HRESULT GetBufferByIndex([in] DWORD dwIndex, [out] IMFMediaBuffer **ppBuffer);
HRESULT ConvertToContiguousBuffer([out] IMFMediaBuffer **ppBuffer);
HRESULT AddBuffer([in] IMFMediaBuffer *pBuffer);
HRESULT RemoveBufferByIndex([in] DWORD dwIndex);
HRESULT RemoveAllBuffers();
HRESULT GetTotalLength([out] DWORD *pcbTotalLength);
HRESULT CopyToBuffer([in] IMFMediaBuffer *pBuffer);
}
[
object,
uuid(7dc9d5f9-9ed9-44ec-9bbf-0600bb589fbb),
local
]
interface IMF2DBuffer : IUnknown
{
HRESULT Lock2D([out] BYTE **pbScanline0, [out] LONG *plPitch);
HRESULT Unlock2D();
HRESULT GetScanline0AndPitch([out] BYTE **pbScanline0, [out] LONG *plPitch);
HRESULT IsContiguousFormat([out] BOOL *pfIsContiguous);
HRESULT GetContiguousLength([out] DWORD *pcbLength);
HRESULT ContiguousCopyTo([out, size_is(cbDestBuffer)] BYTE *pbDestBuffer, [in] DWORD cbDestBuffer);
HRESULT ContiguousCopyFrom([in, size_is(cbSrcBuffer)] const BYTE *pbSrcBuffer, [in] DWORD cbSrcBuffer);
}
[
object,
uuid(44ae0fa8-ea31-4109-8d2e-4cae4997c555),
local
]
interface IMFMediaType : IMFAttributes
{
HRESULT GetMajorType([out] GUID *pguidMajorType);
HRESULT IsCompressedFormat([out] BOOL *pfCompressed);
HRESULT IsEqual([in] IMFMediaType *pIMediaType, [out] DWORD *pdwFlags);
HRESULT GetRepresentation([in] GUID guidRepresentation, [out] LPVOID *ppvRepresentation);
HRESULT FreeRepresentation([in] GUID guidRepresentation, [in] LPVOID pvRepresentation);
}
cpp_quote("#define MF_MEDIATYPE_EQUAL_MAJOR_TYPES 0x00000001")
cpp_quote("#define MF_MEDIATYPE_EQUAL_FORMAT_TYPES 0x00000002")
cpp_quote("#define MF_MEDIATYPE_EQUAL_FORMAT_DATA 0x00000004")
cpp_quote("#define MF_MEDIATYPE_EQUAL_FORMAT_USER_DATA 0x00000008")
[
object,
uuid(26a0adc3-ce26-4672-9304-69552edd3faf),
local
]
interface IMFAudioMediaType : IMFMediaType
{
const WAVEFORMATEX *GetAudioFormat();
}
typedef struct {
GUID guidMajorType;
GUID guidSubtype;
} MFT_REGISTER_TYPE_INFO;
typedef enum _MFVideoFlags {
MFVideoFlag_PAD_TO_Mask = 0x00000003,
MFVideoFlag_PAD_TO_None = 0,
MFVideoFlag_PAD_TO_4x3 = 0x00000001,
MFVideoFlag_PAD_TO_16x9 = 0x00000002,
MFVideoFlag_SrcContentHintMask = 0x0000001c,
MFVideoFlag_SrcContentHintNone = 0,
MFVideoFlag_SrcContentHint16x9 = 0x00000004,
MFVideoFlag_SrcContentHint235_1 = 0x00000008,
MFVideoFlag_AnalogProtected = 0x00000020,
MFVideoFlag_DigitallyProtected = 0x00000040,
MFVideoFlag_ProgressiveContent = 0x00000080,
MFVideoFlag_FieldRepeatCountMask = 0x00000700,
MFVideoFlag_FieldRepeatCountShift = 8,
MFVideoFlag_ProgressiveSeqReset = 0x00000800,
MFVideoFlag_PanScanEnabled = 0x00020000,
MFVideoFlag_LowerFieldFirst = 0x00040000,
MFVideoFlag_BottomUpLinearRep = 0x00080000,
MFVideoFlags_DXVASurface = 0x00100000,
MFVideoFlags_RenderTargetSurface = 0x00400000,
MFVideoFlags_ForceQWORD = 0x7fffffff
} MFVideoFlags;
typedef struct _MFRatio {
DWORD Numerator;
DWORD Denominator;
} MFRatio;
typedef struct _MFOffset {
WORD fract;
short value;
} MFOffset;
typedef struct _MFVideoArea {
MFOffset OffsetX;
MFOffset OffsetY;
SIZE Area;
} MFVideoArea;
typedef enum _MFVideoChromaSubsampling {
MFVideoChromaSubsampling_Unknown = 0,
MFVideoChromaSubsampling_ProgressiveChroma = 0x8,
MFVideoChromaSubsampling_Horizontally_Cosited = 0x4,
MFVideoChromaSubsampling_Vertically_Cosited = 0x2,
MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes = 0x1,
MFVideoChromaSubsampling_MPEG2
= MFVideoChromaSubsampling_Horizontally_Cosited
| MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes,
MFVideoChromaSubsampling_MPEG1
= MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes,
MFVideoChromaSubsampling_DV_PAL
= MFVideoChromaSubsampling_Horizontally_Cosited
| MFVideoChromaSubsampling_Vertically_Cosited,
MFVideoChromaSubsampling_Cosited
= MFVideoChromaSubsampling_Horizontally_Cosited
| MFVideoChromaSubsampling_Vertically_Cosited
| MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes,
MFVideoChromaSubsampling_Last = MFVideoChromaSubsampling_Cosited + 1,
MFVideoChromaSubsampling_ForceDWORD = 0x7fffffff
} MFVideoChromaSubsampling;
typedef enum _MFVideoInterlaceMode {
MFVideoInterlace_Unknown = 0,
MFVideoInterlace_Progressive = 2,
MFVideoInterlace_FieldInterleavedUpperFirst = 3,
MFVideoInterlace_FieldInterleavedLowerFirst = 4,
MFVideoInterlace_FieldSingleUpper = 5,
MFVideoInterlace_FieldSingleLower = 6,
MFVideoInterlace_MixedInterlaceOrProgressive = 7,
MFVideoInterlace_Last,
MFVideoInterlace_ForceDWORD = 0x7fffffff
} MFVideoInterlaceMode;
typedef enum _MFVideoTransferFunction {
MFVideoTransFunc_Unknown = 0,
MFVideoTransFunc_10 = 1,
MFVideoTransFunc_18 = 2,
MFVideoTransFunc_20 = 3,
MFVideoTransFunc_22 = 4,
MFVideoTransFunc_709 = 5,
MFVideoTransFunc_240M = 6,
MFVideoTransFunc_sRGB = 7,
MFVideoTransFunc_28 = 8,
MFVideoTransFunc_Log_100 = 9,
MFVideoTransFunc_Log_316 = 10,
MFVideoTransFunc_709_sym = 11,
MFVideoTransFunc_Last,
MFVideoTransFunc_ForceDWORD = 0x7fffffff
} MFVideoTransferFunction;
typedef enum _MFVideoTransferMatrix {
MFVideoTransferMatrix_Unknown = 0,
MFVideoTransferMatrix_BT709 = 1,
MFVideoTransferMatrix_BT601 = 2,
MFVideoTransferMatrix_SMPTE240M = 3,
MFVideoTransferMatrix_Last,
MFVideoTransferMatrix_ForceDWORD = 0x7fffffff
} MFVideoTransferMatrix;
typedef enum _MFVideoPrimaries {
MFVideoPrimaries_Unknown = 0,
MFVideoPrimaries_reserved = 1,
MFVideoPrimaries_BT709 = 2,
MFVideoPrimaries_BT470_2_SysM = 3,
MFVideoPrimaries_BT470_2_SysBG = 4,
MFVideoPrimaries_SMPTE170M = 5,
MFVideoPrimaries_SMPTE240M = 6,
MFVideoPrimaries_EBU3213 = 7,
MFVideoPrimaries_SMPTE_C = 8,
MFVideoPrimaries_Last,
MFVideoPrimaries_ForceDWORD = 0x7fffffff
} MFVideoPrimaries;
typedef enum _MFVideoLighting {
MFVideoLighting_Unknown = 0,
MFVideoLighting_bright = 1,
MFVideoLighting_office = 2,
MFVideoLighting_dim = 3,
MFVideoLighting_dark = 4,
MFVideoLighting_Last,
MFVideoLighting_ForceDWORD = 0x7fffffff
} MFVideoLighting;
typedef enum _MFNominalRange {
MFNominalRange_Unknown = 0,
MFNominalRange_Normal = 1,
MFNominalRange_Wide = 2,
MFNominalRange_0_255 = 1,
MFNominalRange_16_235 = 2,
MFNominalRange_48_208 = 3,
MFNominalRange_64_127 = 4
} MFNominalRange;
typedef struct _MFVideoInfo {
DWORD dwWidth;
DWORD dwHeight;
MFRatio PixelAspectRatio;
MFVideoChromaSubsampling SourceChromaSubsampling;
MFVideoInterlaceMode InterlaceMode;
MFVideoTransferFunction TransferFunction;
MFVideoPrimaries ColorPrimaries;
MFVideoTransferMatrix TransferMatrix;
MFVideoLighting SourceLighting;
MFRatio FramesPerSecond;
MFNominalRange NominalRange;
MFVideoArea GeometricAperture;
MFVideoArea MinimumDisplayAperture;
MFVideoArea PanScanAperture;
unsigned __int64 VideoFlags;
} MFVideoInfo;
typedef struct _MFVideoCompressedInfo {
LONGLONG AvgBitrate;
LONGLONG AvgBitErrorRate;
DWORD MaxKeyFrameSpacing;
} MFVideoCompressedInfo;
typedef struct _MFARGB {
BYTE rgbBlue;
BYTE rgbGreen;
BYTE rgbRed;
BYTE rgbAlpha;
} MFARGB;
typedef struct __MFAYUVSample {
BYTE bCrValue;
BYTE bCbValue;
BYTE bYValue;
BYTE bSampleAlpha8;
} MFAYUVSample;
typedef union _MFPaletteEntry {
MFARGB ARGB;
MFAYUVSample AYCbCr;
} MFPaletteEntry;
typedef struct _MFVideoSurfaceInfo {
DWORD Format;
DWORD PaletteEntries;
MFPaletteEntry Palette[];
} MFVideoSurfaceInfo;
typedef struct _MFVIDEOFORMAT {
DWORD dwSize;
MFVideoInfo videoInfo;
GUID guidFormat;
MFVideoCompressedInfo compressedInfo;
MFVideoSurfaceInfo surfaceInfo;
} MFVIDEOFORMAT;
typedef enum _MFStandardVideoFormat {
MFStdVideoFormat_reserved = 0,
MFStdVideoFormat_NTSC,
MFStdVideoFormat_PAL,
MFStdVideoFormat_DVD_NTSC,
MFStdVideoFormat_DVD_PAL,
MFStdVideoFormat_DV_PAL,
MFStdVideoFormat_DV_NTSC,
MFStdVideoFormat_ATSC_SD480i,
MFStdVideoFormat_ATSC_HD1080i,
MFStdVideoFormat_ATSC_HD720p
} MFStandardVideoFormat;
[
object,
uuid(b99f381f-a8f9-47a2-a5af-ca3a225a3890),
local
]
interface IMFVideoMediaType : IMFMediaType
{
const MFVIDEOFORMAT *GetVideoFormat();
HRESULT GetVideoRepresentation([in] GUID guidRepresentation, [out] LPVOID *ppvRepresentation,
[in] LONG lStride);
}
[
object,
uuid(ac6b7889-0740-4d51-8619-905994a55cc6)
]
interface IMFAsyncResult : IUnknown
{
HRESULT GetState([out] IUnknown **ppunkState);
HRESULT GetStatus();
HRESULT SetStatus([in] HRESULT hrStatus);
HRESULT GetObject([out] IUnknown **ppObject);
[local] IUnknown *GetStateNoAddRef();
}
[
object,
uuid(a27003cf-2354-4f2a-8d6a-ab7cff15437e),
]
interface IMFAsyncCallback : IUnknown
{
HRESULT GetParameters([out] DWORD *pdwFlags, [out] DWORD *pdwQueue);
HRESULT Invoke([in] IMFAsyncResult *pAsyncResult);
}
[
object,
uuid(a27003d0-2354-4f2a-8d6a-ab7cff15437e),
]
interface IMFRemoteAsyncCallback : IUnknown
{
HRESULT Invoke([in] HRESULT hr, [in] IUnknown *pRemoteResult);
}
cpp_quote("#define MFASYNC_FAST_IO_PROCESSING_CALLBACK 0x0001")
cpp_quote("#define MFASYNC_SIGNAL_CALLBACK 0x0002" )
cpp_quote("#define MFASYNC_CALLBACK_QUEUE_UNDEFINED 0x00000000")
cpp_quote("#define MFASYNC_CALLBACK_QUEUE_STANDARD 0x00000001")
cpp_quote("#define MFASYNC_CALLBACK_QUEUE_RT 0x00000002")
cpp_quote("#define MFASYNC_CALLBACK_QUEUE_IO 0x00000003")
cpp_quote("#define MFASYNC_CALLBACK_QUEUE_TIMER 0x00000004")
cpp_quote("#define MFASYNC_CALLBACK_QUEUE_LONG_FUNCTION 0x00000007")
cpp_quote("#define MFASYNC_CALLBACK_QUEUE_PRIVATE_MASK 0xffff0000")
cpp_quote("#define MFASYNC_CALLBACK_QUEUE_ALL 0xffffffff")
typedef DWORD MediaEventType;
[
object,
uuid(df598932-f10c-4e39-bba2-c308f101daa3)
]
interface IMFMediaEvent : IMFAttributes
{
HRESULT GetType([out] MediaEventType *pmet);
HRESULT GetExtendedType([out] GUID *pguidExtendedType);
HRESULT GetStatus([out] HRESULT *phrStatus);
HRESULT GetValue([out] PROPVARIANT *pvValue);
}
[
object,
uuid(2cd0bd52-bcd5-4b89-b62c-eadc0c031e7d)
]
interface IMFMediaEventGenerator : IUnknown
{
HRESULT GetEvent([in] DWORD dwFlags, [out] IMFMediaEvent **ppEvent);
[local] HRESULT BeginGetEvent([in] IMFAsyncCallback *pCallback, [in] IUnknown *punkState);
[call_as(BeginGetEvent)] HRESULT RemoteBeginGetEvent([in] IMFRemoteAsyncCallback *pCallback);
[local] HRESULT EndGetEvent([in] IMFAsyncResult *pResult, [out] IMFMediaEvent **ppEvent);
[call_as(EndGetEvent)] HRESULT RemoteEndGetEvent([in] IUnknown *pResult, [out] DWORD *pcbEvent,
[out, size_is(,*pcbEvent)] BYTE **ppbEvent);
HRESULT QueueEvent([in] MediaEventType met, [in] REFGUID guidExtendedType, [in] HRESULT hrStatus,
[in, unique] const PROPVARIANT *pvValue);
}
typedef enum _MFBYTESTREAM_SEEK_ORIGIN {
msoBegin,
msoCurrent
} MFBYTESTREAM_SEEK_ORIGIN;
[
object,
uuid(ad4c1b00-4bf7-422f-9175-756693d9130d),
]
interface IMFByteStream : IUnknown
{
HRESULT GetCapabilities([out] DWORD *pdwCapabilities);
HRESULT GetLength([out] QWORD *pqwLength);
HRESULT SetLength([in] QWORD qwLength);
HRESULT GetCurrentPosition([out] QWORD *pqwPosition);
HRESULT SetCurrentPosition([in] QWORD qwPosition);
HRESULT IsEndOfStream([out] BOOL *pfEndOfStream);
[local] HRESULT Read([in] BYTE* pb, [in] ULONG cb, [out] ULONG *pcbRead);
[local] HRESULT BeginRead([in] BYTE *pb, [in] ULONG cb, [in] IMFAsyncCallback *pCallback, [in] IUnknown *punkState);
[local] HRESULT EndRead([in] IMFAsyncResult *pResult, [out] ULONG *pcbRead);
[local] HRESULT Write([in] const BYTE *pb, [in] ULONG cb, [out] ULONG *pcbWritten);
[local] HRESULT BeginWrite([in] const BYTE *pb, [in] ULONG cb, [in] IMFAsyncCallback *pCallback, [in] IUnknown *punkState);
[local] HRESULT EndWrite([in] IMFAsyncResult *pResult, [out] ULONG *pcbWritten);
[local] HRESULT Seek([in] MFBYTESTREAM_SEEK_ORIGIN SeekOrigin, [in] LONGLONG llSeekOffset, [in] DWORD dwSeekFlags,
[out] QWORD *pqwCurrentPosition);
HRESULT Flush();
HRESULT Close();
}
cpp_quote("#define MFBYTESTREAM_IS_READABLE 0x00000001")
cpp_quote("#define MFBYTESTREAM_IS_WRITABLE 0x00000002")
cpp_quote("#define MFBYTESTREAM_IS_SEEKABLE 0x00000004")
cpp_quote("#define MFBYTESTREAM_IS_REMOTE 0x00000008")
cpp_quote("#define MFBYTESTREAM_IS_DIRECTORY 0x00000080")
cpp_quote("#define MFBYTESTREAM_HAS_SLOW_SEEK 0x00000100")
cpp_quote("#define MFBYTESTREAM_IS_PARTIALLY_DOWNLOADED 0x00000200")
cpp_quote("#define MFBYTESTREAM_SHARE_WRITE 0x00000400")
cpp_quote("#define MFBYTESTREAM_SEEK_FLAG_CANCEL_PENDING_IO 0x00000001")
cpp_quote("EXTERN_GUID(MF_BYTESTREAM_ORIGIN_NAME, 0xfc358288,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
cpp_quote("EXTERN_GUID(MF_BYTESTREAM_CONTENT_TYPE, 0xfc358289,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
cpp_quote("EXTERN_GUID(MF_BYTESTREAM_DURATION, 0xfc35828a,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
cpp_quote("EXTERN_GUID(MF_BYTESTREAM_LAST_MODIFIED_TIME, 0xfc35828b,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
cpp_quote("EXTERN_GUID(MF_BYTESTREAM_IFO_FILE_URI, 0xfc35828c,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
cpp_quote("EXTERN_GUID(MF_BYTESTREAM_DLNA_PROFILE_ID, 0xfc35828d,0x3cb6,0x460c,0xa4,0x24,0xb6,0x68,0x12,0x60,0x37,0x5a);")
typedef enum MF_FILE_ACCESSMODE {
MF_ACCESSMODE_READ = 1,
MF_ACCESSMODE_WRITE = 2,
MF_ACCESSMODE_READWRITE = 3
} MF_FILE_ACCESSMODE;
typedef enum {
MF_OPENMODE_FAIL_IF_NOT_EXIST = 0,
MF_OPENMODE_FAIL_IF_EXIST = 1,
MF_OPENMODE_RESET_IF_EXIST = 2,
MF_OPENMODE_APPEND_IF_EXIST = 3,
MF_OPENMODE_DELETE_IF_EXIST = 4
} MF_FILE_OPENMODE;
typedef enum {
MF_FILEFLAGS_NONE = 0x00000000,
MF_FILEFLAGS_NOBUFFERING = 0x00000001,
MF_FILEFLAGS_ALLOW_WRITE_SHARING = 0x00000002
} MF_FILE_FLAGS;
[
object,
uuid(5bc8a76b-869a-46a3-9b03-fa218a66aebe)
]
interface IMFCollection : IUnknown
{
HRESULT GetElementCount([out] DWORD *pcElements);
HRESULT GetElement([in] DWORD dwElementIndex, [out] IUnknown **ppUnkElement);
HRESULT AddElement([in] IUnknown *pUnkElement);
HRESULT RemoveElement([in] DWORD dwElementIndex, [out] IUnknown **ppUnkElement);
HRESULT InsertElementAt([in] DWORD dwIndex, [in] IUnknown *pUnknown);
HRESULT RemoveAllElements();
}
[
object,
uuid(7fee9e9a-4a89-47a6-899c-b6a53a70fb67),
pointer_default(unique)
]
interface IMFActivate : IMFAttributes
{
HRESULT ActivateObject([in] REFIID riid, [out, iid_is(riid), retval] void **ppv);
HRESULT ShutdownObject();
HRESULT DetachObject();
}
typedef enum _MF_Plugin_Type {
MF_Plugin_Type_MFT = 0,
MF_Plugin_Type_MediaSource = 1
} MF_Plugin_Type;
[
object,
local,
uuid(5c6c44bf-1db6-435b-9249-e8cd10fdec96),
pointer_default(unique)
]
interface IMFPluginControl : IUnknown
{
HRESULT GetPreferredClsid(DWORD pluginType, LPCWSTR selector, CLSID *clsid);
HRESULT GetPreferredClsidByIndex(DWORD pluginType, DWORD index, LPWSTR *selector, CLSID *clsid);
HRESULT SetPreferredClsid(DWORD pluginType, LPCWSTR selector, const CLSID *clsid);
HRESULT IsDisabled(DWORD pluginType, REFCLSID clsid);
HRESULT GetDisabledByIndex(DWORD pluginType, DWORD index, CLSID *clsid);
HRESULT SetDisabled(DWORD pluginType, REFCLSID clsid, BOOL disabled);
}

View file

@ -0,0 +1,113 @@
/*
* Copyright 2017 Alistair Leslie-Hughes
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
import "mfobjects.idl";
typedef struct _MFT_INPUT_STREAM_INFO
{
LONGLONG hnsMaxLatency;
DWORD dwFlags;
DWORD cbSize;
DWORD cbMaxLookahead;
DWORD cbAlignment;
} MFT_INPUT_STREAM_INFO;
typedef struct _MFT_OUTPUT_STREAM_INFO
{
DWORD dwFlags;
DWORD cbSize;
DWORD cbAlignment;
} MFT_OUTPUT_STREAM_INFO;
typedef struct _MFT_OUTPUT_DATA_BUFFER
{
DWORD dwStreamID;
IMFSample *pSample;
DWORD dwStatus;
IMFCollection *pEvents;
} MFT_OUTPUT_DATA_BUFFER, *PMFT_OUTPUT_DATA_BUFFER;
typedef enum _MFT_MESSAGE_TYPE
{
MFT_MESSAGE_COMMAND_FLUSH = 0x00000000,
MFT_MESSAGE_COMMAND_DRAIN = 0x00000001,
MFT_MESSAGE_SET_D3D_MANAGER = 0x00000002,
MFT_MESSAGE_DROP_SAMPLES = 0x00000003,
MFT_MESSAGE_COMMAND_TICK = 0x00000004,
MFT_MESSAGE_NOTIFY_BEGIN_STREAMING = 0x10000000,
MFT_MESSAGE_NOTIFY_END_STREAMING = 0x10000001,
MFT_MESSAGE_NOTIFY_END_OF_STREAM = 0x10000002,
MFT_MESSAGE_NOTIFY_START_OF_STREAM = 0x10000003,
MFT_MESSAGE_COMMAND_MARKER = 0x20000000
} MFT_MESSAGE_TYPE;
[
object,
uuid(bf94c121-5b05-4e6f-8000-ba598961414d)
]
interface IMFTransform : IUnknown
{
HRESULT GetStreamLimits([out] DWORD *input_minimum, [out] DWORD *input_maximum, [out] DWORD *output_minimum,
[out] DWORD *output_maximum);
HRESULT GetStreamCount([out] DWORD *inputs, [out] DWORD *outputs);
HRESULT GetStreamIDs([in] DWORD input_size, [out,size_is(input_size)] DWORD *inputs,
[in] DWORD output_size, [out,size_is(output_size)] DWORD *outputs);
HRESULT GetInputStreamInfo([in] DWORD id, [out] MFT_INPUT_STREAM_INFO *info);
HRESULT GetOutputStreamInfo([in] DWORD id, [out] MFT_OUTPUT_STREAM_INFO *info);
HRESULT GetAttributes([out] IMFAttributes **attributes);
HRESULT GetInputStreamAttributes([in] DWORD id, [out] IMFAttributes **attributes);
HRESULT GetOutputStreamAttributes([in] DWORD id, [out] IMFAttributes **attributes);
HRESULT DeleteInputStream([in] DWORD id);
HRESULT AddInputStreams([in] DWORD streams, [in] DWORD *ids);
HRESULT GetInputAvailableType([in] DWORD id, [in] DWORD index, [out] IMFMediaType **type);
HRESULT GetOutputAvailableType([in] DWORD id, [in] DWORD index, [out] IMFMediaType **type);
HRESULT SetInputType(DWORD id, [in] IMFMediaType *type, [in] DWORD flags);
HRESULT SetOutputType(DWORD id, [in] IMFMediaType *type, [in] DWORD flags);
HRESULT GetInputCurrentType([in] DWORD id, [out] IMFMediaType **type);
HRESULT GetOutputCurrentType([in] DWORD id, [out] IMFMediaType **type);
HRESULT GetInputStatus([in] DWORD id, [out] DWORD *flags);
HRESULT GetOutputStatus([out] DWORD *flags);
HRESULT SetOutputBounds([in] LONGLONG lower, [in] LONGLONG upper);
HRESULT ProcessEvent([in] DWORD id, [in] IMFMediaEvent *event);
HRESULT ProcessMessage([in] MFT_MESSAGE_TYPE message, [in] ULONG_PTR param);
[local] HRESULT ProcessInput([in] DWORD id, [in] IMFSample *sample, [in] DWORD flags);
[local] HRESULT ProcessOutput([in] DWORD flags, [in] DWORD count, [in,out,size_is(count)] MFT_OUTPUT_DATA_BUFFER *samples,
[out] DWORD *status);
};

1266
sdk/include/psdk/nserror.h Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,81 @@
/*
* Copyright 2017 Alistair Leslie-Hughes
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
import "oaidl.idl";
import "ocidl.idl";
import "mfobjects.idl";
import "mfidl.idl";
typedef struct _DRM_MINIMUM_OUTPUT_PROTECTION_LEVELS
{
WORD wCompressedDigitalVideo;
WORD wUncompressedDigitalVideo;
WORD wAnalogVideo;
WORD wCompressedDigitalAudio;
WORD wUncompressedDigitalAudio;
} DRM_MINIMUM_OUTPUT_PROTECTION_LEVELS;
typedef struct _DRM_VIDEO_OUTPUT_PROTECTION
{
GUID guidId;
BYTE bConfigData;
} DRM_VIDEO_OUTPUT_PROTECTION;
typedef struct _DRM_VIDEO_OUTPUT_PROTECTION_IDS
{
WORD cEntries;
DRM_VIDEO_OUTPUT_PROTECTION *rgVop;
} DRM_VIDEO_OUTPUT_PROTECTION_IDS;
typedef struct _DRM_OPL_OUTPUT_IDS
{
WORD cIds;
GUID *rgIds;
} DRM_OPL_OUTPUT_IDS;
typedef struct __tagDRM_COPY_OPL
{
WORD wMinimumCopyLevel;
DRM_OPL_OUTPUT_IDS oplIdIncludes;
DRM_OPL_OUTPUT_IDS oplIdExcludes;
} DRM_COPY_OPL;
typedef struct __tagDRM_PLAY_OPL
{
DRM_MINIMUM_OUTPUT_PROTECTION_LEVELS minOPL;
DRM_OPL_OUTPUT_IDS oplIdReserved;
DRM_VIDEO_OUTPUT_PROTECTION_IDS vopi;
} DRM_PLAY_OPL;
[
uuid(82435be0-f7c1-4df9-8103-eeabebf3d6e1),
version(1.0)
]
library WMDRMContentEnablerLib
{
importlib("stdole2.tlb");
[
uuid(82435bdf-f7c1-4df9-8103-eeabebf3d6e1)
]
coclass WMDRMContentEnablerActivate
{
[default] interface IPersistStream;
};
};

26
sdk/include/psdk/wmsdk.h Normal file
View file

@ -0,0 +1,26 @@
/*
* Copyright (C) 2016 Austin English
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* Unlikely to ever be needed on Wine, currently unimplemented */
/* #include <winapifamily.h> */
#include "wmsdkidl.h"
/* Currently unimplemented */
/* #include "asferr.h" */
#include "nserror.h"

View file

@ -18,7 +18,7 @@
import "oaidl.idl";
import "wmsbuffer.idl";
/* import "drmexternals.idl"; */
import "drmexternals.idl";
typedef unsigned __int64 QWORD;
@ -183,6 +183,42 @@ typedef enum tagWMT_OFFSET_FORMAT
WMT_OFFSET_FORMAT_100NS_APPROXIMATE
} WMT_OFFSET_FORMAT;
typedef enum WMT_CODEC_INFO_TYPE
{
WMT_CODECINFO_AUDIO = 0,
WMT_CODECINFO_VIDEO = 1,
WMT_CODECINFO_UNKNOWN = 0xFFFFFFFF,
} WMT_CODEC_INFO_TYPE;
typedef enum WMT_PROXY_SETTINGS
{
WMT_PROXY_SETTING_NONE = 0,
WMT_PROXY_SETTING_MANUAL = 1,
WMT_PROXY_SETTING_AUTO = 2,
WMT_PROXY_SETTING_BROWSER = 3,
WMT_PROXY_SETTING_MAX
} WMT_PROXY_SETTINGS;
typedef enum tagWMT_STORAGE_FORMAT
{
WMT_Storage_Format_MP3 = 0,
WMT_Storage_Format_V1 = 1
} WMT_STORAGE_FORMAT;
#include <pshpack2.h>
typedef struct _WMStreamPrioritizationRecord
{
WORD wStreamNumber;
BOOL fMandatory;
} WM_STREAM_PRIORITY_RECORD;
#include <poppack.h>
typedef struct _WM_PORT_NUMBER_RANGE
{
WORD wPortBegin;
WORD wPortEnd;
} WM_PORT_NUMBER_RANGE;
typedef LPCWSTR LPCWSTR_WMSDK_TYPE_SAFE;
[
@ -246,6 +282,43 @@ interface IWMMutualExclusion : IWMStreamList
HRESULT SetType([in] REFGUID guidType);
}
[
object,
uuid(ad694af1-f8d9-42f8-bc47-70311b0c4f9e),
pointer_default(unique),
local
]
interface IWMBandwidthSharing : IWMStreamList
{
HRESULT GetType([out] GUID *guid);
HRESULT SetType([in] REFGUID guid);
HRESULT GetBandwidth(
[out] DWORD *bitrate,
[out] DWORD *buffer);
HRESULT SetBandwidth(
[in] DWORD bitrate,
[in] DWORD buffer);
};
[
object,
uuid(8c1c6090-f9a8-4748-8ec3-dd1108ba1e77),
pointer_default(unique),
local
]
interface IWMStreamPrioritization : IUnknown
{
HRESULT GetPriorityRecords(
[out] WM_STREAM_PRIORITY_RECORD *array,
[in, out] WORD *records);
HRESULT SetPriorityRecords(
[in] WM_STREAM_PRIORITY_RECORD *array,
[in] WORD records);
}
[
object,
uuid(96406Bdc-2b2b-11d3-b36b-00c04f6108ff),
@ -344,6 +417,53 @@ interface IWMProfile : IUnknown
[out] IWMMutualExclusion **ppME);
}
[
object,
uuid(07e72d33-d94e-4be7-8843-60ae5ff7e5f5),
pointer_default(unique),
local
]
interface IWMProfile2 : IWMProfile
{
HRESULT GetProfileID([out] GUID *guid);
}
[
object,
uuid(00ef96cc-a461-4546-8bcd-c9a28f0e06f5),
pointer_default(unique),
local
]
interface IWMProfile3 : IWMProfile2
{
HRESULT GetStorageFormat([out] WMT_STORAGE_FORMAT *storage);
HRESULT SetStorageFormat([in] WMT_STORAGE_FORMAT storage);
HRESULT GetBandwidthSharingCount([out] DWORD *count);
HRESULT GetBandwidthSharing(
[in] DWORD index,
[out] IWMBandwidthSharing **bandwidth);
HRESULT RemoveBandwidthSharing([in] IWMBandwidthSharing *bandwidth);
HRESULT AddBandwidthSharing([in] IWMBandwidthSharing *bandwidth);
HRESULT CreateNewBandwidthSharing([out] IWMBandwidthSharing **bandwidth);
HRESULT GetStreamPrioritization([out] IWMStreamPrioritization **stream);
HRESULT SetStreamPrioritization([in] IWMStreamPrioritization *stream);
HRESULT RemoveStreamPrioritization();
HRESULT CreateNewStreamPrioritization([out] IWMStreamPrioritization **stream);
HRESULT GetExpectedPacketCount(
[in] QWORD duration,
[out] QWORD *packets);
};
[
object,
uuid(d16679f2-6ca0-472d-8d31-2f5d55aee155),
@ -549,7 +669,7 @@ interface IWMReaderAdvanced : IUnknown
[in] BOOL fAllocate);
HRESULT GetAllocateForStream(
[in] WORD dwSreamNum,
[in] WORD dwStreamNum,
[out] BOOL *pfAllocate);
HRESULT GetStatistics(
@ -1016,6 +1136,488 @@ interface IWMWriterAdvanced3 : IWMWriterAdvanced2
HRESULT SetNonBlocking();
}
[
object,
uuid(96406bda-2b2b-11d3-b36b-00c04f6108ff),
pointer_default(unique),
local
]
interface IWMHeaderInfo : IUnknown
{
HRESULT GetAttributeCount(
[in] WORD stream_num,
[out] WORD *attributes );
HRESULT GetAttributeByIndex(
[in] WORD index,
[in, out] WORD *stream_num,
[out, size_is( *name_len )] WCHAR *name,
[in, out] WORD *name_len,
[out] WMT_ATTR_DATATYPE *type,
[out, size_is( *length )] BYTE *value,
[in, out] WORD *length );
HRESULT GetAttributeByName(
[in, out] WORD *stream_num,
[in] LPCWSTR name,
[out] WMT_ATTR_DATATYPE *type,
[out, size_is( *length )] BYTE *value,
[in, out] WORD *length );
HRESULT SetAttribute(
[in] WORD stream_num,
[in] LPCWSTR name,
[in] WMT_ATTR_DATATYPE type,
[in, size_is( length )] const BYTE *value,
[in] WORD length );
HRESULT GetMarkerCount(
[out] WORD *markers );
HRESULT GetMarker(
[in] WORD index,
[out, size_is( *marker_len )] WCHAR *marker_name,
[in, out] WORD *marker_len,
[out] QWORD *marker_time );
HRESULT AddMarker(
[in] LPCWSTR_WMSDK_TYPE_SAFE marker_name,
[in] QWORD marker_time );
HRESULT RemoveMarker(
[in] WORD index );
HRESULT GetScriptCount(
[out] WORD *scripts );
HRESULT GetScript(
[in] WORD index,
[out, size_is( *type_len )] WCHAR *type,
[in, out] WORD *type_len,
[out, size_is( *command_len )] WCHAR *command,
[in, out] WORD *command_len,
[out] QWORD *script_time );
HRESULT AddScript(
[in] LPCWSTR_WMSDK_TYPE_SAFE type,
[in] LPCWSTR_WMSDK_TYPE_SAFE command,
[in] QWORD script_time );
HRESULT RemoveScript(
[in] WORD index );
};
[
object,
uuid(15cf9781-454e-482e-b393-85fae487a810),
pointer_default(unique),
local
]
interface IWMHeaderInfo2 : IWMHeaderInfo
{
HRESULT GetCodecInfoCount(
[out] DWORD *codec_infos );
HRESULT GetCodecInfo(
[in] DWORD index,
[in, out] WORD *name_len,
[out, size_is( *name_len )] WCHAR *name,
[in, out] WORD *description_len,
[out, size_is( *description_len )] WCHAR *description,
[out] WMT_CODEC_INFO_TYPE *codec_type,
[in, out] WORD *codec_info_cnt,
[out, size_is( *codec_info_cnt )] BYTE *codec_info );
};
[
object,
uuid(15cc68e3-27cc-4ecd-b222-3f5d02d80bd5),
pointer_default(unique),
local
]
interface IWMHeaderInfo3 : IWMHeaderInfo2
{
HRESULT GetAttributeCountEx(
[in] WORD stream_num,
[out] WORD *attributes );
HRESULT GetAttributeIndices(
[in] WORD stream_num,
[in] LPCWSTR name,
[in] WORD *lang_index,
[out, size_is( *count )] WORD *indices,
[in, out] WORD *count );
HRESULT GetAttributeByIndexEx(
[in] WORD stream_num,
[in] WORD index,
[out, size_is( *name_len )] LPWSTR name,
[in, out] WORD *name_len,
[out] WMT_ATTR_DATATYPE *type,
[out] WORD *lang_index,
[out, size_is( *data_len )] BYTE *value,
[in, out] DWORD *data_len );
HRESULT ModifyAttribute(
[in] WORD stream_num,
[in] WORD index,
[in] WMT_ATTR_DATATYPE type,
[in] WORD lang_index,
[in, size_is( length )] const BYTE *value,
[in] DWORD length );
HRESULT AddAttribute(
[in] WORD stream_num,
[in] LPCWSTR name,
[out] WORD *index,
[in] WMT_ATTR_DATATYPE type,
[in] WORD lang_index,
[in, size_is( length )] const BYTE *value,
[in] DWORD length );
HRESULT DeleteAttribute(
[in] WORD stream_num,
[in] WORD index );
HRESULT AddCodecInfo(
[in] LPCWSTR_WMSDK_TYPE_SAFE name,
[in] LPCWSTR_WMSDK_TYPE_SAFE description,
[in] WMT_CODEC_INFO_TYPE codec_type,
[in] WORD codec_info_cnt,
[in, size_is( codec_info_cnt )] BYTE *codec_info );
};
[
object,
uuid(96406bec-2b2b-11d3-b36b-00c04f6108ff),
pointer_default(unique),
local
]
interface IWMReaderNetworkConfig : IUnknown
{
HRESULT GetBufferingTime([out] QWORD *buffering_time);
HRESULT SetBufferingTime([in] QWORD buffering_time);
HRESULT GetUDPPortRanges(
[out, size_is( *ranges )] WM_PORT_NUMBER_RANGE *array,
[in, out] DWORD *ranges);
HRESULT SetUDPPortRanges(
[in, size_is( ranges )] WM_PORT_NUMBER_RANGE *array,
[in] DWORD ranges);
HRESULT GetProxySettings(
[in] const WCHAR *protocol,
[out] WMT_PROXY_SETTINGS *proxy);
HRESULT SetProxySettings(
[in] LPCWSTR protocol,
[in] WMT_PROXY_SETTINGS proxy);
HRESULT GetProxyHostName(
[in] const WCHAR *protocol,
[out, size_is( *size )] WCHAR *hostname,
[in, out] DWORD *size);
HRESULT SetProxyHostName(
[in] const WCHAR *protocol,
[in] const WCHAR *hostname);
HRESULT GetProxyPort(
[in] const WCHAR *protocol,
[out] DWORD *port);
HRESULT SetProxyPort(
[in] const WCHAR *protocol,
[in] DWORD port);
HRESULT GetProxyExceptionList(
[in] const WCHAR *protocol,
[out, size_is( *count )] WCHAR *exceptions,
[in, out] DWORD *count);
HRESULT SetProxyExceptionList(
[in] const WCHAR *protocol,
[in] const WCHAR *exceptions);
HRESULT GetProxyBypassForLocal(
[in] const WCHAR *protocol,
[out] BOOL *bypass);
HRESULT SetProxyBypassForLocal(
[in] const WCHAR *protocol,
[in] BOOL bypass);
HRESULT GetForceRerunAutoProxyDetection([out] BOOL *detection);
HRESULT SetForceRerunAutoProxyDetection([in] BOOL detection);
HRESULT GetEnableMulticast([out] BOOL *multicast);
HRESULT SetEnableMulticast([in] BOOL multicast);
HRESULT GetEnableHTTP([out] BOOL *enable);
HRESULT SetEnableHTTP([in] BOOL enable);
HRESULT GetEnableUDP([out] BOOL *enable);
HRESULT SetEnableUDP([in] BOOL enable);
HRESULT GetEnableTCP([out] BOOL *enable);
HRESULT SetEnableTCP([in] BOOL enable);
HRESULT ResetProtocolRollover();
HRESULT GetConnectionBandwidth([out] DWORD *bandwidth);
HRESULT SetConnectionBandwidth([in] DWORD bandwidth);
HRESULT GetNumProtocolsSupported([out] DWORD *protocols);
HRESULT GetSupportedProtocolName(
[in] DWORD protocol_num,
[out, size_is( *size )] WCHAR *protocol,
[in, out] DWORD *size);
HRESULT AddLoggingUrl([in] const WCHAR *url);
HRESULT GetLoggingUrl(
[in] DWORD index,
[out, size_is( *size )] WCHAR *url,
[in, out] DWORD *size);
HRESULT GetLoggingUrlCount([out] DWORD *count);
HRESULT ResetLoggingUrlList();
}
[
object,
uuid(d979a853-042b-4050-8387-c939db22013f),
pointer_default(unique),
local
]
interface IWMReaderNetworkConfig2 : IWMReaderNetworkConfig
{
HRESULT GetEnableContentCaching([out] BOOL *enable);
HRESULT SetEnableContentCaching([in] BOOL enable);
HRESULT GetEnableFastCache([out] BOOL *enable);
HRESULT SetEnableFastCache([in] BOOL enable);
HRESULT GetAcceleratedStreamingDuration([out] QWORD *duration);
HRESULT SetAcceleratedStreamingDuration([in] QWORD duration);
HRESULT GetAutoReconnectLimit([out] DWORD *limit);
HRESULT SetAutoReconnectLimit([in] DWORD limit);
HRESULT GetEnableResends([out] BOOL *enable);
HRESULT SetEnableResends([in] BOOL enable);
HRESULT GetEnableThinning([out] BOOL *enable);
HRESULT SetEnableThinning([in] BOOL enable);
HRESULT GetMaxNetPacketSize([out] DWORD *packet_size);
}
[
object,
uuid(96406bed-2b2b-11d3-b36b-00c04f6108ff),
pointer_default(unique),
local
]
interface IWMReaderStreamClock : IUnknown
{
HRESULT GetTime([in] QWORD *now);
HRESULT SetTimer([in] QWORD when,
[in] void *param,
[out] DWORD *id);
HRESULT KillTimer([in] DWORD id);
}
[
object,
uuid(cdfb97ab-188f-40b3-b643-5b7903975c59),
pointer_default(unique),
local
]
interface IWMPacketSize : IUnknown
{
HRESULT GetMaxPacketSize([out] DWORD *size);
HRESULT SetMaxPacketSize([in] DWORD size);
};
[
object,
uuid(8bfc2b9e-b646-4233-a877-1c6a079669dc),
pointer_default(unique),
local
]
interface IWMPacketSize2 : IWMPacketSize
{
HRESULT GetMinPacketSize([out] DWORD *size);
HRESULT SetMinPacketSize([in] DWORD size);
};
[
object,
uuid(d2827540-3ee7-432c-b14c-dc17f085d3b3),
pointer_default(unique),
local
]
interface IWMDRMReader : IUnknown
{
HRESULT AcquireLicense([in] DWORD flags);
HRESULT CancelLicenseAcquisition();
HRESULT Individualize([in] DWORD flags);
HRESULT CancelIndividualization();
HRESULT MonitorLicenseAcquisition();
HRESULT CancelMonitorLicenseAcquisition();
HRESULT SetDRMProperty(
[in] const WCHAR *name,
[in] WMT_ATTR_DATATYPE type,
[in, size_is( length )] const BYTE *value,
[in] WORD length);
HRESULT GetDRMProperty(
[in] const WCHAR *name,
[out] WMT_ATTR_DATATYPE *type,
[out, size_is( *length )] BYTE *value,
[in, out] WORD *length);
};
[
object,
uuid(befe7a75-9f1d-4075-b9d9-a3c37bda49a0),
pointer_default(unique),
local
]
interface IWMDRMReader2 : IWMDRMReader
{
HRESULT SetEvaluateOutputLevelLicenses([in] BOOL evaluate);
HRESULT GetPlayOutputLevels(
[out, size_is( *length )] DRM_PLAY_OPL *play,
[in, out] DWORD *length,
[out] DWORD *level);
HRESULT GetCopyOutputLevels(
[out, size_is( *length )] DRM_COPY_OPL *copy,
[in, out] DWORD *length,
[out] DWORD *level);
HRESULT TryNextLicense();
};
[
object,
uuid(e08672de-f1e7-4ff4-a0a3-fc4b08e4caf8),
pointer_default(unique),
local
]
interface IWMDRMReader3 : IWMDRMReader2
{
HRESULT GetInclusionList(
[out] GUID **guids,
[out] DWORD *count);
};
[
object,
uuid(bddc4d08-944d-4d52-a612-46c3fda07dd4),
pointer_default( unique ),
local
]
interface IWMReaderAccelerator : IUnknown
{
HRESULT GetCodecInterface(
[in] DWORD output,
[in] REFIID riid,
[out] void **codec);
HRESULT Notify(
[in] DWORD output,
[in] WM_MEDIA_TYPE *subtype);
};
[
object,
uuid(f369e2f0-e081-4fe6-8450-b810b2f410d1),
pointer_default(unique),
local
]
interface IWMReaderTimecode : IUnknown
{
HRESULT GetTimecodeRangeCount(
[in] WORD num,
[out] WORD *count);
HRESULT GetTimecodeRangeBounds(
[in] WORD stream,
[in] WORD range,
[out] DWORD *start_timecode,
[out] DWORD *end_timecode);
};
[
object,
uuid(fdbe5592-81a1-41ea-93bd-735cad1adc05),
pointer_default(unique),
local
]
interface IWMReaderTypeNegotiation : IUnknown
{
HRESULT TryOutputProps(
[in] DWORD output,
[in] IWMOutputMediaProps *props);
};
[
object,
uuid(df683f00-2d49-4d8e-92b7-fb19f6a0dc57),
pointer_default(unique),
local
]
interface IWMLanguageList : IUnknown
{
HRESULT GetLanguageCount(
[out] WORD *count);
HRESULT GetLanguageDetails(
[in] WORD index,
[out, size_is( *length )] WCHAR *language,
[in, out] WORD *length);
HRESULT AddLanguageByRFC1766String(
[in] LPCWSTR_WMSDK_TYPE_SAFE language,
[out] WORD *index);
};
[
object,
uuid(f28c0300-9baa-4477-a846-1744d9cbf533),
pointer_default(unique),
local
]
interface IWMReaderPlaylistBurn : IUnknown
{
HRESULT InitPlaylistBurn(
[in] DWORD count,
[in] LPCWSTR_WMSDK_TYPE_SAFE *filenames,
[in] IWMStatusCallback *callback,
[in] void *context);
HRESULT GetInitResults(
[in] DWORD count,
[out] HRESULT *stat);
HRESULT Cancel();
HRESULT EndPlaylistBurn([in] HRESULT result);
};
cpp_quote("HRESULT WINAPI WMCreateWriter(IUnknown*,IWMWriter**);")
cpp_quote("HRESULT WINAPI WMCreateReader(IUnknown*,DWORD,IWMReader**);")