adding correct mmstream.idl

svn path=/trunk/; revision=26901
This commit is contained in:
Magnus Olsen 2007-05-26 11:22:58 +00:00
parent a74a1a7af1
commit 42b522ea77
5 changed files with 136 additions and 772 deletions

View file

@ -1,6 +1,9 @@
<directory name="reactos">
<xi:include href="reactos/reactos.rbuild" />
</directory>
<directory name="dxsdk">
<xi:include href="dxsdk/dxsdk.rbuild" />
</directory>
<directory name="psdk">
<xi:include href="psdk/psdk.rbuild" />
</directory>

View file

@ -0,0 +1,3 @@
<module name="dxsdk" type="idlheader">
<file>mmstream.idl</file>
</module>

View file

@ -0,0 +1,130 @@
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)")
// FIXME HACK remove the // for two cpp_quote
#ifndef DX_IDL_HACK
typedef LPVOID PAPCFUNC;
#endif
cpp_quote("#if(_WIN32_WINNT < 0x0400)")
cpp_quote("#define DX_IDL_HACK")
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);
};

View file

@ -1,588 +0,0 @@
/*** Autogenerated by WIDL 0.3.0 from include\psdk\mmstream.idl - Do not edit ***/
#include <rpc.h>
#include <rpcndr.h>
#ifndef __WIDL_INCLUDE_PSDK_MMSTREAM_H
#define __WIDL_INCLUDE_PSDK_MMSTREAM_H
#ifdef __cplusplus
extern "C" {
#endif
#include <unknwn.h>
#define MS_ERROR_CODE(x) MAKE_HRESULT(1, FACILITY_ITF, (x) + 0x400)
#define MS_SUCCESS_CODE(x) MAKE_HRESULT(0, FACILITY_ITF, x)
#define MS_S_PENDING MS_SUCCESS_CODE(1)
#define MS_S_NOUPDATE MS_SUCCESS_CODE(2)
#define MS_S_ENDOFSTREAM MS_SUCCESS_CODE(3)
#define MS_E_SAMPLEALLOC MS_ERROR_CODE(1)
#define MS_E_PURPOSEID MS_ERROR_CODE(2)
#define MS_E_NOSTREAM MS_ERROR_CODE(3)
#define MS_E_NOSEEKING MS_ERROR_CODE(4)
#define MS_E_INCOMPATIBLE MS_ERROR_CODE(5)
#define MS_E_BUSY MS_ERROR_CODE(6)
#define MS_E_NOTINIT MS_ERROR_CODE(7)
#define MS_E_SOURCEALREADYDEFINED MS_ERROR_CODE(8)
#define MS_E_INVALIDSTREAMTYPE MS_ERROR_CODE(9)
#define MS_E_NOTRUNNING MS_ERROR_CODE(10)
DEFINE_GUID(MSPID_PrimaryVideo, 0xa35ff56a, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
DEFINE_GUID(MSPID_PrimaryAudio, 0xa35ff56b, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
#if 0
typedef void *PAPCFUNC;
#endif
typedef LONGLONG STREAM_TIME;
typedef GUID MSPID;
typedef REFGUID REFMSPID;
typedef enum {
STREAMTYPE_READ = 0,
STREAMTYPE_WRITE = 1,
STREAMTYPE_TRANSFORM = 2
} STREAM_TYPE;
typedef enum {
STREAMSTATE_STOP = 0,
STREAMSTATE_RUN = 1
} STREAM_STATE;
typedef enum {
COMPSTAT_NOUPDATEOK = 0x1,
COMPSTAT_WAIT = 0x2,
COMPSTAT_ABORT = 0x4
} COMPLETION_STATUS_FLAGS;
enum {
MMSSF_HASCLOCK = 0x1,
MMSSF_SUPPORTSEEK = 0x2,
MMSSF_ASYNCHRONOUS = 0x4
};
enum {
SSUPDATE_ASYNC = 0x1,
SSUPDATE_CONTINUOUS = 0x2
};
#ifndef __IMultiMediaStream_FWD_DEFINED__
#define __IMultiMediaStream_FWD_DEFINED__
typedef interface IMultiMediaStream IMultiMediaStream;
#endif
#ifndef __IMediaStream_FWD_DEFINED__
#define __IMediaStream_FWD_DEFINED__
typedef interface IMediaStream IMediaStream;
#endif
#ifndef __IStreamSample_FWD_DEFINED__
#define __IStreamSample_FWD_DEFINED__
typedef interface IStreamSample IStreamSample;
#endif
/*****************************************************************************
* IMultiMediaStream interface
*/
#ifndef __IMultiMediaStream_INTERFACE_DEFINED__
#define __IMultiMediaStream_INTERFACE_DEFINED__
DEFINE_GUID(IID_IMultiMediaStream, 0xb502d1bc, 0x9a57, 0x11d0, 0x8f,0xde, 0x00,0xc0,0x4f,0xd9,0x18,0x9d);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IMultiMediaStream : public IUnknown
{
virtual HRESULT STDMETHODCALLTYPE GetInformation(
DWORD* pdwFlags,
STREAM_TYPE* pStreamType) = 0;
virtual HRESULT STDMETHODCALLTYPE GetMediaStream(
REFMSPID idPurpose,
IMediaStream** ppMediaStream) = 0;
virtual HRESULT STDMETHODCALLTYPE EnumMediaStreams(
long Index,
IMediaStream** ppMediaStream) = 0;
virtual HRESULT STDMETHODCALLTYPE GetState(
STREAM_STATE* pCurrentState) = 0;
virtual HRESULT STDMETHODCALLTYPE SetState(
STREAM_STATE NewState) = 0;
virtual HRESULT STDMETHODCALLTYPE GetTime(
STREAM_TIME* pCurrentTime) = 0;
virtual HRESULT STDMETHODCALLTYPE GetDuration(
STREAM_TIME* pDuration) = 0;
virtual HRESULT STDMETHODCALLTYPE Seek(
STREAM_TIME SeekTime) = 0;
virtual HRESULT STDMETHODCALLTYPE GetEndOfStreamEventHandle(
HANDLE* phEOS) = 0;
};
#else
typedef struct IMultiMediaStreamVtbl {
BEGIN_INTERFACE
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IMultiMediaStream* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IMultiMediaStream* This);
ULONG (STDMETHODCALLTYPE *Release)(
IMultiMediaStream* This);
/*** IMultiMediaStream methods ***/
HRESULT (STDMETHODCALLTYPE *GetInformation)(
IMultiMediaStream* This,
DWORD* pdwFlags,
STREAM_TYPE* pStreamType);
HRESULT (STDMETHODCALLTYPE *GetMediaStream)(
IMultiMediaStream* This,
REFMSPID idPurpose,
IMediaStream** ppMediaStream);
HRESULT (STDMETHODCALLTYPE *EnumMediaStreams)(
IMultiMediaStream* This,
long Index,
IMediaStream** ppMediaStream);
HRESULT (STDMETHODCALLTYPE *GetState)(
IMultiMediaStream* This,
STREAM_STATE* pCurrentState);
HRESULT (STDMETHODCALLTYPE *SetState)(
IMultiMediaStream* This,
STREAM_STATE NewState);
HRESULT (STDMETHODCALLTYPE *GetTime)(
IMultiMediaStream* This,
STREAM_TIME* pCurrentTime);
HRESULT (STDMETHODCALLTYPE *GetDuration)(
IMultiMediaStream* This,
STREAM_TIME* pDuration);
HRESULT (STDMETHODCALLTYPE *Seek)(
IMultiMediaStream* This,
STREAM_TIME SeekTime);
HRESULT (STDMETHODCALLTYPE *GetEndOfStreamEventHandle)(
IMultiMediaStream* This,
HANDLE* phEOS);
END_INTERFACE
} IMultiMediaStreamVtbl;
interface IMultiMediaStream {
const IMultiMediaStreamVtbl* lpVtbl;
};
#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IMultiMediaStream_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IMultiMediaStream_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IMultiMediaStream_Release(p) (p)->lpVtbl->Release(p)
/*** IMultiMediaStream methods ***/
#define IMultiMediaStream_GetInformation(p,a,b) (p)->lpVtbl->GetInformation(p,a,b)
#define IMultiMediaStream_GetMediaStream(p,a,b) (p)->lpVtbl->GetMediaStream(p,a,b)
#define IMultiMediaStream_EnumMediaStreams(p,a,b) (p)->lpVtbl->EnumMediaStreams(p,a,b)
#define IMultiMediaStream_GetState(p,a) (p)->lpVtbl->GetState(p,a)
#define IMultiMediaStream_SetState(p,a) (p)->lpVtbl->SetState(p,a)
#define IMultiMediaStream_GetTime(p,a) (p)->lpVtbl->GetTime(p,a)
#define IMultiMediaStream_GetDuration(p,a) (p)->lpVtbl->GetDuration(p,a)
#define IMultiMediaStream_Seek(p,a) (p)->lpVtbl->Seek(p,a)
#define IMultiMediaStream_GetEndOfStreamEventHandle(p,a) (p)->lpVtbl->GetEndOfStreamEventHandle(p,a)
#endif
#endif
HRESULT CALLBACK IMultiMediaStream_GetInformation_Proxy(
IMultiMediaStream* This,
DWORD* pdwFlags,
STREAM_TYPE* pStreamType);
void __RPC_STUB IMultiMediaStream_GetInformation_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMultiMediaStream_GetMediaStream_Proxy(
IMultiMediaStream* This,
REFMSPID idPurpose,
IMediaStream** ppMediaStream);
void __RPC_STUB IMultiMediaStream_GetMediaStream_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMultiMediaStream_EnumMediaStreams_Proxy(
IMultiMediaStream* This,
long Index,
IMediaStream** ppMediaStream);
void __RPC_STUB IMultiMediaStream_EnumMediaStreams_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMultiMediaStream_GetState_Proxy(
IMultiMediaStream* This,
STREAM_STATE* pCurrentState);
void __RPC_STUB IMultiMediaStream_GetState_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMultiMediaStream_SetState_Proxy(
IMultiMediaStream* This,
STREAM_STATE NewState);
void __RPC_STUB IMultiMediaStream_SetState_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMultiMediaStream_GetTime_Proxy(
IMultiMediaStream* This,
STREAM_TIME* pCurrentTime);
void __RPC_STUB IMultiMediaStream_GetTime_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMultiMediaStream_GetDuration_Proxy(
IMultiMediaStream* This,
STREAM_TIME* pDuration);
void __RPC_STUB IMultiMediaStream_GetDuration_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMultiMediaStream_Seek_Proxy(
IMultiMediaStream* This,
STREAM_TIME SeekTime);
void __RPC_STUB IMultiMediaStream_Seek_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMultiMediaStream_GetEndOfStreamEventHandle_Proxy(
IMultiMediaStream* This,
HANDLE* phEOS);
void __RPC_STUB IMultiMediaStream_GetEndOfStreamEventHandle_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IMultiMediaStream_INTERFACE_DEFINED__ */
/*****************************************************************************
* IMediaStream interface
*/
#ifndef __IMediaStream_INTERFACE_DEFINED__
#define __IMediaStream_INTERFACE_DEFINED__
DEFINE_GUID(IID_IMediaStream, 0xb502d1bd, 0x9a57, 0x11d0, 0x8f,0xde, 0x00,0xc0,0x4f,0xd9,0x18,0x9d);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IMediaStream : public IUnknown
{
virtual HRESULT STDMETHODCALLTYPE GetMultiMediaStream(
IMultiMediaStream** ppMultiMediaStream) = 0;
virtual HRESULT STDMETHODCALLTYPE GetInformation(
MSPID* pPurposeId,
STREAM_TYPE* pType) = 0;
virtual HRESULT STDMETHODCALLTYPE SetSameFormat(
IMediaStream* pStreamThatHasDesiredFormat,
DWORD dwFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE AllocateSample(
DWORD dwFlags,
IStreamSample** ppSample) = 0;
virtual HRESULT STDMETHODCALLTYPE CreateSharedSample(
IStreamSample* pExistingSample,
DWORD dwFlags,
IStreamSample** ppNewSample) = 0;
virtual HRESULT STDMETHODCALLTYPE SendEndOfStream(
DWORD dwFlags) = 0;
};
#else
typedef struct IMediaStreamVtbl {
BEGIN_INTERFACE
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IMediaStream* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IMediaStream* This);
ULONG (STDMETHODCALLTYPE *Release)(
IMediaStream* This);
/*** IMediaStream methods ***/
HRESULT (STDMETHODCALLTYPE *GetMultiMediaStream)(
IMediaStream* This,
IMultiMediaStream** ppMultiMediaStream);
HRESULT (STDMETHODCALLTYPE *GetInformation)(
IMediaStream* This,
MSPID* pPurposeId,
STREAM_TYPE* pType);
HRESULT (STDMETHODCALLTYPE *SetSameFormat)(
IMediaStream* This,
IMediaStream* pStreamThatHasDesiredFormat,
DWORD dwFlags);
HRESULT (STDMETHODCALLTYPE *AllocateSample)(
IMediaStream* This,
DWORD dwFlags,
IStreamSample** ppSample);
HRESULT (STDMETHODCALLTYPE *CreateSharedSample)(
IMediaStream* This,
IStreamSample* pExistingSample,
DWORD dwFlags,
IStreamSample** ppNewSample);
HRESULT (STDMETHODCALLTYPE *SendEndOfStream)(
IMediaStream* This,
DWORD dwFlags);
END_INTERFACE
} IMediaStreamVtbl;
interface IMediaStream {
const IMediaStreamVtbl* lpVtbl;
};
#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IMediaStream_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IMediaStream_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IMediaStream_Release(p) (p)->lpVtbl->Release(p)
/*** IMediaStream methods ***/
#define IMediaStream_GetMultiMediaStream(p,a) (p)->lpVtbl->GetMultiMediaStream(p,a)
#define IMediaStream_GetInformation(p,a,b) (p)->lpVtbl->GetInformation(p,a,b)
#define IMediaStream_SetSameFormat(p,a,b) (p)->lpVtbl->SetSameFormat(p,a,b)
#define IMediaStream_AllocateSample(p,a,b) (p)->lpVtbl->AllocateSample(p,a,b)
#define IMediaStream_CreateSharedSample(p,a,b,c) (p)->lpVtbl->CreateSharedSample(p,a,b,c)
#define IMediaStream_SendEndOfStream(p,a) (p)->lpVtbl->SendEndOfStream(p,a)
#endif
#endif
HRESULT CALLBACK IMediaStream_GetMultiMediaStream_Proxy(
IMediaStream* This,
IMultiMediaStream** ppMultiMediaStream);
void __RPC_STUB IMediaStream_GetMultiMediaStream_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMediaStream_GetInformation_Proxy(
IMediaStream* This,
MSPID* pPurposeId,
STREAM_TYPE* pType);
void __RPC_STUB IMediaStream_GetInformation_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMediaStream_SetSameFormat_Proxy(
IMediaStream* This,
IMediaStream* pStreamThatHasDesiredFormat,
DWORD dwFlags);
void __RPC_STUB IMediaStream_SetSameFormat_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMediaStream_AllocateSample_Proxy(
IMediaStream* This,
DWORD dwFlags,
IStreamSample** ppSample);
void __RPC_STUB IMediaStream_AllocateSample_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMediaStream_CreateSharedSample_Proxy(
IMediaStream* This,
IStreamSample* pExistingSample,
DWORD dwFlags,
IStreamSample** ppNewSample);
void __RPC_STUB IMediaStream_CreateSharedSample_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMediaStream_SendEndOfStream_Proxy(
IMediaStream* This,
DWORD dwFlags);
void __RPC_STUB IMediaStream_SendEndOfStream_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IMediaStream_INTERFACE_DEFINED__ */
/*****************************************************************************
* IStreamSample interface
*/
#ifndef __IStreamSample_INTERFACE_DEFINED__
#define __IStreamSample_INTERFACE_DEFINED__
DEFINE_GUID(IID_IStreamSample, 0xb502d1be, 0x9a57, 0x11d0, 0x8f,0xde, 0x00,0xc0,0x4f,0xd9,0x18,0x9d);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IStreamSample : public IUnknown
{
virtual HRESULT STDMETHODCALLTYPE GetMediaStream(
IMediaStream** ppMediaStream) = 0;
virtual HRESULT STDMETHODCALLTYPE GetSampleTimes(
STREAM_TIME* pStartTime,
STREAM_TIME* pEndTime,
STREAM_TIME* pCurrentTime) = 0;
virtual HRESULT STDMETHODCALLTYPE SetSampleTimes(
const STREAM_TIME* pStartTime,
const STREAM_TIME* pEndTime) = 0;
virtual HRESULT STDMETHODCALLTYPE Update(
DWORD dwFlags,
HANDLE hEvent,
PAPCFUNC pfnAPC,
DWORD dwAPCData) = 0;
virtual HRESULT STDMETHODCALLTYPE CompletionStatus(
DWORD dwFlags,
DWORD dwMilliseconds) = 0;
};
#else
typedef struct IStreamSampleVtbl {
BEGIN_INTERFACE
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IStreamSample* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IStreamSample* This);
ULONG (STDMETHODCALLTYPE *Release)(
IStreamSample* This);
/*** IStreamSample methods ***/
HRESULT (STDMETHODCALLTYPE *GetMediaStream)(
IStreamSample* This,
IMediaStream** ppMediaStream);
HRESULT (STDMETHODCALLTYPE *GetSampleTimes)(
IStreamSample* This,
STREAM_TIME* pStartTime,
STREAM_TIME* pEndTime,
STREAM_TIME* pCurrentTime);
HRESULT (STDMETHODCALLTYPE *SetSampleTimes)(
IStreamSample* This,
const STREAM_TIME* pStartTime,
const STREAM_TIME* pEndTime);
HRESULT (STDMETHODCALLTYPE *Update)(
IStreamSample* This,
DWORD dwFlags,
HANDLE hEvent,
PAPCFUNC pfnAPC,
DWORD dwAPCData);
HRESULT (STDMETHODCALLTYPE *CompletionStatus)(
IStreamSample* This,
DWORD dwFlags,
DWORD dwMilliseconds);
END_INTERFACE
} IStreamSampleVtbl;
interface IStreamSample {
const IStreamSampleVtbl* lpVtbl;
};
#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IStreamSample_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IStreamSample_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IStreamSample_Release(p) (p)->lpVtbl->Release(p)
/*** IStreamSample methods ***/
#define IStreamSample_GetMediaStream(p,a) (p)->lpVtbl->GetMediaStream(p,a)
#define IStreamSample_GetSampleTimes(p,a,b,c) (p)->lpVtbl->GetSampleTimes(p,a,b,c)
#define IStreamSample_SetSampleTimes(p,a,b) (p)->lpVtbl->SetSampleTimes(p,a,b)
#define IStreamSample_Update(p,a,b,c,d) (p)->lpVtbl->Update(p,a,b,c,d)
#define IStreamSample_CompletionStatus(p,a,b) (p)->lpVtbl->CompletionStatus(p,a,b)
#endif
#endif
HRESULT CALLBACK IStreamSample_GetMediaStream_Proxy(
IStreamSample* This,
IMediaStream** ppMediaStream);
void __RPC_STUB IStreamSample_GetMediaStream_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IStreamSample_GetSampleTimes_Proxy(
IStreamSample* This,
STREAM_TIME* pStartTime,
STREAM_TIME* pEndTime,
STREAM_TIME* pCurrentTime);
void __RPC_STUB IStreamSample_GetSampleTimes_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IStreamSample_SetSampleTimes_Proxy(
IStreamSample* This,
const STREAM_TIME* pStartTime,
const STREAM_TIME* pEndTime);
void __RPC_STUB IStreamSample_SetSampleTimes_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IStreamSample_Update_Proxy(
IStreamSample* This,
DWORD dwFlags,
HANDLE hEvent,
PAPCFUNC pfnAPC,
DWORD dwAPCData);
void __RPC_STUB IStreamSample_Update_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IStreamSample_CompletionStatus_Proxy(
IStreamSample* This,
DWORD dwFlags,
DWORD dwMilliseconds);
void __RPC_STUB IStreamSample_CompletionStatus_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IStreamSample_INTERFACE_DEFINED__ */
/* Begin additional prototypes for all interfaces */
/* End additional prototypes */
#ifdef __cplusplus
}
#endif
#endif /* __WIDL_INCLUDE_PSDK_MMSTREAM_H */

View file

@ -1,184 +0,0 @@
/*
* Copyright 2004 Christian Costa
*
* 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";
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)")
cpp_quote("DEFINE_GUID(MSPID_PrimaryVideo, 0xa35ff56a, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);")
cpp_quote("DEFINE_GUID(MSPID_PrimaryAudio, 0xa35ff56b, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);")
cpp_quote("#if 0")
typedef void* PAPCFUNC;
cpp_quote("#endif")
typedef LONGLONG STREAM_TIME;
typedef GUID MSPID;
typedef REFGUID REFMSPID;
typedef enum {
STREAMTYPE_READ = 0,
STREAMTYPE_WRITE = 1,
STREAMTYPE_TRANSFORM = 2
} STREAM_TYPE;
typedef enum {
STREAMSTATE_STOP = 0,
STREAMSTATE_RUN = 1
} STREAM_STATE;
typedef enum {
COMPSTAT_NOUPDATEOK = 0x00000001,
COMPSTAT_WAIT = 0x00000002,
COMPSTAT_ABORT = 0x00000004
} COMPLETION_STATUS_FLAGS;
enum {
MMSSF_HASCLOCK = 0x00000001,
MMSSF_SUPPORTSEEK = 0x00000002,
MMSSF_ASYNCHRONOUS = 0x00000004
};
enum {
SSUPDATE_ASYNC = 0x00000001,
SSUPDATE_CONTINUOUS = 0x00000002
};
interface IMultiMediaStream;
interface IMediaStream;
interface IStreamSample;
[
object,
local,
uuid(B502D1BC-9A57-11d0-8FDE-00C04FD9189D),
pointer_default(unique)
]
interface IMultiMediaStream : IUnknown {
HRESULT GetInformation(
[out, optional] DWORD *pdwFlags,
[out, optional] 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, optional] MSPID *pPurposeId,
[out, optional] 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, optional] STREAM_TIME * pStartTime,
[out, optional] STREAM_TIME * pEndTime,
[out, optional] STREAM_TIME * pCurrentTime);
HRESULT SetSampleTimes(
[in, optional] const STREAM_TIME *pStartTime,
[in, optional] const STREAM_TIME *pEndTime);
HRESULT Update(
[in] DWORD dwFlags,
[in, optional] HANDLE hEvent,
[in, optional] PAPCFUNC pfnAPC,
[in, optional] DWORD dwAPCData);
HRESULT CompletionStatus(
[in] DWORD dwFlags,
[in, optional] DWORD dwMilliseconds);
}