2007-05-26 11:22:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
import "unknwn.idl";
|
|
|
|
|
|
|
|
cpp_quote("DEFINE_GUID(MSPID_PrimaryVideo, 0xA35FF56A, 0x9FDA, 0x11D0, 0x8F, 0xDF, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0x9D);")
|
|
|
|
cpp_quote("DEFINE_GUID(MSPID_PrimaryAudio, 0xA35FF56B, 0x9FDA, 0x11D0, 0x8F, 0xDF, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0x9D);")
|
|
|
|
|
|
|
|
cpp_quote("#define MS_ERROR_CODE(x) MAKE_HRESULT(1, FACILITY_ITF, (x) + 0x400)")
|
|
|
|
cpp_quote("#define MS_SUCCESS_CODE(x) MAKE_HRESULT(0, FACILITY_ITF, x)")
|
|
|
|
cpp_quote("#define MS_S_PENDING MS_SUCCESS_CODE(1)")
|
|
|
|
cpp_quote("#define MS_S_NOUPDATE MS_SUCCESS_CODE(2)")
|
|
|
|
cpp_quote("#define MS_S_ENDOFSTREAM MS_SUCCESS_CODE(3)")
|
|
|
|
cpp_quote("#define MS_E_SAMPLEALLOC MS_ERROR_CODE(1)")
|
|
|
|
cpp_quote("#define MS_E_PURPOSEID MS_ERROR_CODE(2)")
|
|
|
|
cpp_quote("#define MS_E_NOSTREAM MS_ERROR_CODE(3)")
|
|
|
|
cpp_quote("#define MS_E_NOSEEKING MS_ERROR_CODE(4)")
|
|
|
|
cpp_quote("#define MS_E_INCOMPATIBLE MS_ERROR_CODE(5)")
|
|
|
|
cpp_quote("#define MS_E_BUSY MS_ERROR_CODE(6)")
|
|
|
|
cpp_quote("#define MS_E_NOTINIT MS_ERROR_CODE(7)")
|
|
|
|
cpp_quote("#define MS_E_SOURCEALREADYDEFINED MS_ERROR_CODE(8)")
|
|
|
|
cpp_quote("#define MS_E_INVALIDSTREAMTYPE MS_ERROR_CODE(9)")
|
|
|
|
cpp_quote("#define MS_E_NOTRUNNING MS_ERROR_CODE(10)")
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-19 23:21:45 +00:00
|
|
|
// FIXME HACK remove the // for two cpp_quote
|
2007-05-26 11:26:23 +00:00
|
|
|
cpp_quote("#if 0");
|
2007-05-26 11:22:58 +00:00
|
|
|
typedef LPVOID PAPCFUNC;
|
2007-05-26 11:26:23 +00:00
|
|
|
cpp_quote("#endif");
|
2007-05-26 11:22:58 +00:00
|
|
|
|
|
|
|
cpp_quote("#if(_WIN32_WINNT < 0x0400)")
|
|
|
|
cpp_quote("typedef void (__stdcall * PAPCFUNC)(DWORD_PTR dwParam);")
|
|
|
|
cpp_quote("#endif")
|
|
|
|
|
|
|
|
typedef LONGLONG STREAM_TIME;
|
|
|
|
|
|
|
|
typedef GUID MSPID;
|
|
|
|
typedef REFGUID REFMSPID;
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
MMSSF_HASCLOCK = 0x00000001,
|
|
|
|
MMSSF_SUPPORTSEEK = 0x00000002,
|
|
|
|
MMSSF_ASYNCHRONOUS = 0x00000004
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
STREAMTYPE_READ = 0,
|
|
|
|
STREAMTYPE_WRITE = 1,
|
|
|
|
STREAMTYPE_TRANSFORM= 2
|
|
|
|
} STREAM_TYPE;
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
SSUPDATE_ASYNC = 0x00000001,
|
|
|
|
SSUPDATE_CONTINUOUS = 0x00000002
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
COMPSTAT_NOUPDATEOK = 0x00000001,
|
|
|
|
COMPSTAT_WAIT = 0x00000002,
|
|
|
|
COMPSTAT_ABORT = 0x00000004
|
|
|
|
} COMPLETION_STATUS_FLAGS;
|
|
|
|
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
STREAMSTATE_STOP = 0,
|
|
|
|
STREAMSTATE_RUN = 1
|
|
|
|
} STREAM_STATE;
|
|
|
|
|
|
|
|
interface IMultiMediaStream;
|
|
|
|
interface IMediaStream;
|
|
|
|
interface IStreamSample;
|
|
|
|
|
|
|
|
[
|
|
|
|
object,
|
|
|
|
local,
|
|
|
|
uuid(B502D1BC-9A57-11d0-8FDE-00C04FD9189D),
|
|
|
|
pointer_default(unique)
|
|
|
|
]
|
|
|
|
interface IMultiMediaStream : IUnknown
|
|
|
|
{
|
|
|
|
HRESULT GetInformation([out] DWORD *pdwFlags, [out] STREAM_TYPE *pStreamType);
|
|
|
|
HRESULT GetMediaStream([in] REFMSPID idPurpose, [out] IMediaStream **ppMediaStream);
|
|
|
|
HRESULT EnumMediaStreams([in] long Index, [out] IMediaStream **ppMediaStream);
|
|
|
|
HRESULT GetState([out] STREAM_STATE *pCurrentState);
|
|
|
|
HRESULT SetState([in] STREAM_STATE NewState);
|
|
|
|
HRESULT GetTime([out] STREAM_TIME *pCurrentTime);
|
|
|
|
HRESULT GetDuration([out] STREAM_TIME *pDuration);
|
|
|
|
HRESULT Seek([in] STREAM_TIME SeekTime);
|
|
|
|
HRESULT GetEndOfStreamEventHandle([out] HANDLE *phEOS);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
object,
|
|
|
|
uuid(B502D1BD-9A57-11d0-8FDE-00C04FD9189D),
|
|
|
|
pointer_default(unique)
|
|
|
|
]
|
|
|
|
interface IMediaStream : IUnknown
|
|
|
|
{
|
|
|
|
HRESULT GetMultiMediaStream([out] IMultiMediaStream **ppMultiMediaStream);
|
|
|
|
HRESULT GetInformation([out] MSPID *pPurposeId, [out] STREAM_TYPE *pType);
|
|
|
|
HRESULT SetSameFormat([in] IMediaStream *pStreamThatHasDesiredFormat, [in] DWORD dwFlags);
|
|
|
|
HRESULT AllocateSample([in] DWORD dwFlags, [out] IStreamSample **ppSample);
|
|
|
|
HRESULT CreateSharedSample([in] IStreamSample *pExistingSample, [in] DWORD dwFlags, [out] IStreamSample **ppNewSample);
|
|
|
|
HRESULT SendEndOfStream(DWORD dwFlags);
|
|
|
|
};
|
|
|
|
|
|
|
|
[
|
|
|
|
object,
|
|
|
|
local,
|
|
|
|
uuid(B502D1BE-9A57-11d0-8FDE-00C04FD9189D),
|
|
|
|
pointer_default(unique)
|
|
|
|
]
|
|
|
|
|
|
|
|
interface IStreamSample : IUnknown
|
|
|
|
{
|
|
|
|
HRESULT GetMediaStream([in] IMediaStream **ppMediaStream);
|
|
|
|
HRESULT GetSampleTimes([out] STREAM_TIME * pStartTime, [out] STREAM_TIME * pEndTime, [out] STREAM_TIME * pCurrentTime);
|
|
|
|
HRESULT SetSampleTimes([in] const STREAM_TIME *pStartTime, [in] const STREAM_TIME *pEndTime);
|
|
|
|
HRESULT Update([in] DWORD dwFlags, [in] HANDLE hEvent, [in] PAPCFUNC pfnAPC, [in] DWORD_PTR dwAPCData);
|
|
|
|
HRESULT CompletionStatus( [in] DWORD dwFlags, [in] DWORD dwMilliseconds);
|
|
|
|
};
|
|
|
|
|