amstream: Avoid the forward declaration of the DirectDrawMediaStream_Vtbl.

This commit is contained in:
Michael Stefaniuc 2011-08-16 10:13:31 +02:00 committed by Alexandre Julliard
parent aba87e0fe5
commit 2b55b5b663
1 changed files with 26 additions and 26 deletions

View File

@ -52,7 +52,6 @@ typedef struct {
} IDirectDrawMediaStreamImpl; } IDirectDrawMediaStreamImpl;
static const struct IMediaStreamVtbl MediaStream_Vtbl; static const struct IMediaStreamVtbl MediaStream_Vtbl;
static const struct IDirectDrawMediaStreamVtbl DirectDrawMediaStream_Vtbl;
HRESULT MediaStream_create(IMultiMediaStream* Parent, const MSPID* pPurposeId, STREAM_TYPE StreamType, IMediaStream** ppMediaStream) HRESULT MediaStream_create(IMultiMediaStream* Parent, const MSPID* pPurposeId, STREAM_TYPE StreamType, IMediaStream** ppMediaStream)
{ {
@ -194,31 +193,6 @@ static const struct IMediaStreamVtbl MediaStream_Vtbl =
IMediaStreamImpl_SendEndOfStream IMediaStreamImpl_SendEndOfStream
}; };
HRESULT DirectDrawMediaStream_create(IMultiMediaStream* Parent, const MSPID* pPurposeId, STREAM_TYPE StreamType, IMediaStream** ppMediaStream)
{
IDirectDrawMediaStreamImpl* object;
TRACE("(%p,%s,%p)\n", Parent, debugstr_guid(pPurposeId), ppMediaStream);
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IMediaStreamImpl));
if (!object)
{
ERR("Out of memory\n");
return E_OUTOFMEMORY;
}
object->IDirectDrawMediaStream_iface.lpVtbl = &DirectDrawMediaStream_Vtbl;
object->ref = 1;
object->Parent = Parent;
object->PurposeId = *pPurposeId;
object->StreamType = StreamType;
*ppMediaStream = (IMediaStream*)&object->IDirectDrawMediaStream_iface;
return S_OK;
}
static inline IDirectDrawMediaStreamImpl *impl_from_IDirectDrawMediaStream(IDirectDrawMediaStream *iface) static inline IDirectDrawMediaStreamImpl *impl_from_IDirectDrawMediaStream(IDirectDrawMediaStream *iface)
{ {
return CONTAINING_RECORD(iface, IDirectDrawMediaStreamImpl, IDirectDrawMediaStream_iface); return CONTAINING_RECORD(iface, IDirectDrawMediaStreamImpl, IDirectDrawMediaStream_iface);
@ -322,3 +296,29 @@ static const struct IDirectDrawMediaStreamVtbl DirectDrawMediaStream_Vtbl =
IDirectDrawMediaStreamImpl_GetTimePerFrame IDirectDrawMediaStreamImpl_GetTimePerFrame
}; };
#undef XCAST #undef XCAST
HRESULT DirectDrawMediaStream_create(IMultiMediaStream *Parent, const MSPID *pPurposeId,
STREAM_TYPE StreamType, IMediaStream **ppMediaStream)
{
IDirectDrawMediaStreamImpl *object;
TRACE("(%p,%s,%p)\n", Parent, debugstr_guid(pPurposeId), ppMediaStream);
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IMediaStreamImpl));
if (!object)
{
ERR("Out of memory\n");
return E_OUTOFMEMORY;
}
object->IDirectDrawMediaStream_iface.lpVtbl = &DirectDrawMediaStream_Vtbl;
object->ref = 1;
object->Parent = Parent;
object->PurposeId = *pPurposeId;
object->StreamType = StreamType;
*ppMediaStream = (IMediaStream*)&object->IDirectDrawMediaStream_iface;
return S_OK;
}