blob: 0d917909ca7471d7bb456dd988e86f3fdde2f708 [file] [log] [blame]
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
import "mfobjects.idl";
typedef [v1_enum] enum MF_SOURCE_READER_FLAG {
MF_SOURCE_READERF_ERROR = 0x00000001,
MF_SOURCE_READERF_ENDOFSTREAM = 0x00000002,
MF_SOURCE_READERF_NEWSTREAM = 0x00000004,
MF_SOURCE_READERF_NATIVEMEDIATYPECHANGED = 0x00000010,
MF_SOURCE_READERF_CURRENTMEDIATYPECHANGED = 0x00000020,
MF_SOURCE_READERF_STREAMTICK = 0x00000100
} MF_SOURCE_READER_FLAG;
typedef struct _MF_SINK_WRITER_STATISTICS {
DWORD cb;
LONGLONG llLastTimestampReceived;
LONGLONG llLastTimestampEncoded;
LONGLONG llLastTimestampProcessed;
LONGLONG llLastStreamTickReceived;
LONGLONG llLastSinkSampleRequest;
QWORD qwNumSamplesReceived;
QWORD qwNumSamplesEncoded;
QWORD qwNumSamplesProcessed;
QWORD qwNumStreamTicksReceived;
DWORD dwByteCountQueued;
QWORD qwByteCountProcessed;
DWORD dwNumOutstandingSinkSampleRequests;
DWORD dwAverageSampleRateReceived;
DWORD dwAverageSampleRateEncoded;
DWORD dwAverageSampleRateProcessed;
} MF_SINK_WRITER_STATISTICS;
enum {
MF_SOURCE_READER_INVALID_STREAM_INDEX = 0xffffffff,
MF_SOURCE_READER_ALL_STREAMS = 0xfffffffe,
MF_SOURCE_READER_ANY_STREAM = 0xfffffffe,
MF_SOURCE_READER_FIRST_AUDIO_STREAM = 0xfffffffd,
MF_SOURCE_READER_FIRST_VIDEO_STREAM = 0xfffffffc,
MF_SOURCE_READER_MEDIASOURCE = 0xffffffff,
};
[
object,
uuid(70ae66f2-c809-4e4f-8915-bdcb406b7993),
local
]
interface IMFSourceReader : IUnknown
{
HRESULT GetStreamSelection([in] DWORD dwStreamIndex, [out] BOOL *pfSelected);
HRESULT SetStreamSelection([in] DWORD dwStreamIndex, [in] BOOL fSelected);
HRESULT GetNativeMediaType([in] DWORD dwStreamIndex, [in] DWORD dwMediaTypeIndex, [out] IMFMediaType **ppMediaType);
HRESULT GetCurrentMediaType([in] DWORD dwStreamIndex, [out] IMFMediaType **ppMediaType);
HRESULT SetCurrentMediaType([in] DWORD dwStreamIndex, [in, out] DWORD *pdwReserved, [in] IMFMediaType *pMediaType);
HRESULT SetCurrentPosition([in] REFGUID guidTimeFormat, [in] REFPROPVARIANT varPosition);
HRESULT ReadSample([in] DWORD dwStreamIndex, [in] DWORD dwControlFlags, [out] DWORD *pdwActualStreamIndex,
[out] DWORD *pdwStreamFlags, [out] LONGLONG *pllTimestamp, [out] IMFSample **ppSample);
HRESULT Flush([in] DWORD dwStreamIndex);
HRESULT GetServiceForStream([in] DWORD dwStreamIndex, [in] REFGUID guidService, [in] REFIID riid, [out] LPVOID *ppvObject);
HRESULT GetPresentationAttribute([in] DWORD dwStreamIndex, [in] REFGUID guidAttribute, [out] PROPVARIANT *pvarAttribute);
}
[
object,
uuid(3137f1cd-fe5e-4805-a5d8-fb477448cb3d),
local
]
interface IMFSinkWriter : IUnknown
{
HRESULT AddStream([in] IMFMediaType *pTargetMediaType, [out] DWORD *pdwStreamIndex);
HRESULT SetInputMediaType([in] DWORD dwStreamIndex, [in] IMFMediaType *pInputMediaType,
[in] IMFAttributes *pEncodingParameters );
HRESULT BeginWriting();
HRESULT WriteSample([in] DWORD dwStreamIndex, [in] IMFSample *pSample);
HRESULT SendStreamTick([in] DWORD dwStreamIndex, [in] LONGLONG llTimestamp);
HRESULT PlaceMarker([in] DWORD dwStreamIndex, [in] LPVOID pvContext);
HRESULT NotifyEndOfSegment([in] DWORD dwStreamIndex);
HRESULT Flush([in] DWORD dwStreamIndex);
HRESULT Finalize();
HRESULT GetServiceForStream([in] DWORD dwStreamIndex, [in] REFGUID guidService,
[in] REFIID riid, [out] LPVOID *ppvObject);
HRESULT GetStatistics([in] DWORD dwStreamIndex, [out] MF_SINK_WRITER_STATISTICS *pStats);
}
cpp_quote("EXTERN_GUID( MF_SOURCE_READER_MEDIASOURCE_CHARACTERISTICS, 0x6d23f5c8,0xc5d7,0x4a9b,0x99,0x71,0x5d,0x11,0xf8,0xbc,0xa8,0x80);")
cpp_quote("HRESULT WINAPI MFCreateSinkWriterFromMediaSink(IMFMediaSink *pMediaSink,IMFAttributes *pAttributes,IMFSinkWriter **ppSinkWriter);")
cpp_quote("HRESULT WINAPI MFCreateSinkWriterFromURL(LPCWSTR pwszOutputURL,IMFByteStream *pByteStream,IMFAttributes *pAttributes,IMFSinkWriter **ppSinkWriter);")
cpp_quote("HRESULT WINAPI MFCreateSourceReaderFromByteStream(IMFByteStream *pByteStream,IMFAttributes *pAttributes,IMFSourceReader **ppSourceReader);")
cpp_quote("HRESULT WINAPI MFCreateSourceReaderFromMediaSource(IMFMediaSource *pMediaSource,IMFAttributes *pAttributes,IMFSourceReader **ppSourceReader);")
cpp_quote("HRESULT WINAPI MFCreateSourceReaderFromURL(LPCWSTR pwszURL,IMFAttributes *pAttributes,IMFSourceReader **ppSourceReader);")