Commit badb5d55 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

amstream: Use proper constructor name for ddraw mediastream.

parent 375ab889
...@@ -368,7 +368,11 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream ...@@ -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)) if (SUCCEEDED(hr))
{ {
pNewStreams = CoTaskMemRealloc(This->pStreams, (This->nbStreams+1) * sizeof(IMediaStream*)); pNewStreams = CoTaskMemRealloc(This->pStreams, (This->nbStreams+1) * sizeof(IMediaStream*));
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN; HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN;
HRESULT AMAudioData_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 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; STREAM_TYPE StreamType, IMediaStream **ppMediaStream) DECLSPEC_HIDDEN;
#endif /* __AMSTREAM_PRIVATE_INCLUDED__ */ #endif /* __AMSTREAM_PRIVATE_INCLUDED__ */
...@@ -45,6 +45,7 @@ static inline IDirectDrawMediaStreamImpl *impl_from_IDirectDrawMediaStream(IDire ...@@ -45,6 +45,7 @@ static inline IDirectDrawMediaStreamImpl *impl_from_IDirectDrawMediaStream(IDire
return CONTAINING_RECORD(iface, IDirectDrawMediaStreamImpl, IDirectDrawMediaStream_iface); return CONTAINING_RECORD(iface, IDirectDrawMediaStreamImpl, IDirectDrawMediaStream_iface);
} }
/*** IUnknown methods ***/
static HRESULT WINAPI IDirectDrawMediaStreamImpl_QueryInterface(IDirectDrawMediaStream *iface, static HRESULT WINAPI IDirectDrawMediaStreamImpl_QueryInterface(IDirectDrawMediaStream *iface,
REFIID riid, void **ppv) REFIID riid, void **ppv)
{ {
...@@ -153,6 +154,7 @@ static HRESULT WINAPI IDirectDrawMediaStreamImpl_SendEndOfStream(IDirectDrawMedi ...@@ -153,6 +154,7 @@ static HRESULT WINAPI IDirectDrawMediaStreamImpl_SendEndOfStream(IDirectDrawMedi
return S_FALSE; return S_FALSE;
} }
/*** IDirectDrawMediaStream methods ***/
static HRESULT WINAPI IDirectDrawMediaStreamImpl_GetFormat(IDirectDrawMediaStream *iface, static HRESULT WINAPI IDirectDrawMediaStreamImpl_GetFormat(IDirectDrawMediaStream *iface,
DDSURFACEDESC *pDDSDCurrent, IDirectDrawPalette **ppDirectDrawPalette, DDSURFACEDESC *pDDSDCurrent, IDirectDrawPalette **ppDirectDrawPalette,
DDSURFACEDESC *pDDSDDesired, DWORD *pdwFlags) DDSURFACEDESC *pDDSDDesired, DWORD *pdwFlags)
...@@ -207,15 +209,18 @@ static HRESULT WINAPI IDirectDrawMediaStreamImpl_GetTimePerFrame(IDirectDrawMedi ...@@ -207,15 +209,18 @@ static HRESULT WINAPI IDirectDrawMediaStreamImpl_GetTimePerFrame(IDirectDrawMedi
static const struct IDirectDrawMediaStreamVtbl DirectDrawMediaStream_Vtbl = static const struct IDirectDrawMediaStreamVtbl DirectDrawMediaStream_Vtbl =
{ {
/*** IUnknown methods ***/
IDirectDrawMediaStreamImpl_QueryInterface, IDirectDrawMediaStreamImpl_QueryInterface,
IDirectDrawMediaStreamImpl_AddRef, IDirectDrawMediaStreamImpl_AddRef,
IDirectDrawMediaStreamImpl_Release, IDirectDrawMediaStreamImpl_Release,
/*** IMediaStream methods ***/
IDirectDrawMediaStreamImpl_GetMultiMediaStream, IDirectDrawMediaStreamImpl_GetMultiMediaStream,
IDirectDrawMediaStreamImpl_GetInformation, IDirectDrawMediaStreamImpl_GetInformation,
IDirectDrawMediaStreamImpl_SetSameFormat, IDirectDrawMediaStreamImpl_SetSameFormat,
IDirectDrawMediaStreamImpl_AllocateSample, IDirectDrawMediaStreamImpl_AllocateSample,
IDirectDrawMediaStreamImpl_CreateSharedSample, IDirectDrawMediaStreamImpl_CreateSharedSample,
IDirectDrawMediaStreamImpl_SendEndOfStream, IDirectDrawMediaStreamImpl_SendEndOfStream,
/*** IDirectDrawMediaStream methods ***/
IDirectDrawMediaStreamImpl_GetFormat, IDirectDrawMediaStreamImpl_GetFormat,
IDirectDrawMediaStreamImpl_SetFormat, IDirectDrawMediaStreamImpl_SetFormat,
IDirectDrawMediaStreamImpl_GetDirectDraw, IDirectDrawMediaStreamImpl_GetDirectDraw,
...@@ -224,7 +229,7 @@ static const struct IDirectDrawMediaStreamVtbl DirectDrawMediaStream_Vtbl = ...@@ -224,7 +229,7 @@ static const struct IDirectDrawMediaStreamVtbl DirectDrawMediaStream_Vtbl =
IDirectDrawMediaStreamImpl_GetTimePerFrame IDirectDrawMediaStreamImpl_GetTimePerFrame
}; };
HRESULT mediastream_create(IMultiMediaStream *Parent, const MSPID *pPurposeId, HRESULT ddrawmediastream_create(IMultiMediaStream *Parent, const MSPID *pPurposeId,
STREAM_TYPE StreamType, IMediaStream **ppMediaStream) STREAM_TYPE StreamType, IMediaStream **ppMediaStream)
{ {
IDirectDrawMediaStreamImpl *object; IDirectDrawMediaStreamImpl *object;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment