amstream: Use proper constructor name for ddraw mediastream.

This commit is contained in:
Christian Costa 2012-04-23 21:44:19 +02:00 committed by Alexandre Julliard
parent 375ab889d8
commit badb5d555d
3 changed files with 12 additions and 3 deletions

View File

@ -368,7 +368,11 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream
}
}
hr = mediastream_create((IMultiMediaStream*)iface, PurposeId, This->StreamType, &pStream);
if (IsEqualGUID(PurposeId, &MSPID_PrimaryVideo))
hr = ddrawmediastream_create((IMultiMediaStream*)iface, PurposeId, This->StreamType, &pStream);
else
/* FIXME: should call audiomediastream_create instead */
hr = ddrawmediastream_create((IMultiMediaStream*)iface, PurposeId, This->StreamType, &pStream);
if (SUCCEEDED(hr))
{
pNewStreams = CoTaskMemRealloc(This->pStreams, (This->nbStreams+1) * sizeof(IMediaStream*));

View File

@ -35,7 +35,7 @@
HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN;
HRESULT AMAudioData_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN;
HRESULT MediaStreamFilter_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN;
HRESULT mediastream_create(IMultiMediaStream *Parent, const MSPID *pPurposeId,
HRESULT ddrawmediastream_create(IMultiMediaStream *Parent, const MSPID *pPurposeId,
STREAM_TYPE StreamType, IMediaStream **ppMediaStream) DECLSPEC_HIDDEN;
#endif /* __AMSTREAM_PRIVATE_INCLUDED__ */

View File

@ -45,6 +45,7 @@ static inline IDirectDrawMediaStreamImpl *impl_from_IDirectDrawMediaStream(IDire
return CONTAINING_RECORD(iface, IDirectDrawMediaStreamImpl, IDirectDrawMediaStream_iface);
}
/*** IUnknown methods ***/
static HRESULT WINAPI IDirectDrawMediaStreamImpl_QueryInterface(IDirectDrawMediaStream *iface,
REFIID riid, void **ppv)
{
@ -153,6 +154,7 @@ static HRESULT WINAPI IDirectDrawMediaStreamImpl_SendEndOfStream(IDirectDrawMedi
return S_FALSE;
}
/*** IDirectDrawMediaStream methods ***/
static HRESULT WINAPI IDirectDrawMediaStreamImpl_GetFormat(IDirectDrawMediaStream *iface,
DDSURFACEDESC *pDDSDCurrent, IDirectDrawPalette **ppDirectDrawPalette,
DDSURFACEDESC *pDDSDDesired, DWORD *pdwFlags)
@ -207,15 +209,18 @@ static HRESULT WINAPI IDirectDrawMediaStreamImpl_GetTimePerFrame(IDirectDrawMedi
static const struct IDirectDrawMediaStreamVtbl DirectDrawMediaStream_Vtbl =
{
/*** IUnknown methods ***/
IDirectDrawMediaStreamImpl_QueryInterface,
IDirectDrawMediaStreamImpl_AddRef,
IDirectDrawMediaStreamImpl_Release,
/*** IMediaStream methods ***/
IDirectDrawMediaStreamImpl_GetMultiMediaStream,
IDirectDrawMediaStreamImpl_GetInformation,
IDirectDrawMediaStreamImpl_SetSameFormat,
IDirectDrawMediaStreamImpl_AllocateSample,
IDirectDrawMediaStreamImpl_CreateSharedSample,
IDirectDrawMediaStreamImpl_SendEndOfStream,
/*** IDirectDrawMediaStream methods ***/
IDirectDrawMediaStreamImpl_GetFormat,
IDirectDrawMediaStreamImpl_SetFormat,
IDirectDrawMediaStreamImpl_GetDirectDraw,
@ -224,7 +229,7 @@ static const struct IDirectDrawMediaStreamVtbl DirectDrawMediaStream_Vtbl =
IDirectDrawMediaStreamImpl_GetTimePerFrame
};
HRESULT mediastream_create(IMultiMediaStream *Parent, const MSPID *pPurposeId,
HRESULT ddrawmediastream_create(IMultiMediaStream *Parent, const MSPID *pPurposeId,
STREAM_TYPE StreamType, IMediaStream **ppMediaStream)
{
IDirectDrawMediaStreamImpl *object;