Author: akhaldi
Date: Tue Jul 21 23:17:39 2015
New Revision: 68515
URL:
http://svn.reactos.org/svn/reactos?rev=68515&view=rev
Log:
[AMSTREAM] Sync with Wine Staging 1.7.47. CORE-9924
Modified:
trunk/reactos/dll/directx/wine/amstream/CMakeLists.txt
trunk/reactos/dll/directx/wine/amstream/amstream.c
trunk/reactos/dll/directx/wine/amstream/amstream_private.h
trunk/reactos/dll/directx/wine/amstream/main.c
trunk/reactos/dll/directx/wine/amstream/mediastream.c
trunk/reactos/dll/directx/wine/amstream/mediastreamfilter.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/directx/wine/amstream/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/amstream/…
==============================================================================
--- trunk/reactos/dll/directx/wine/amstream/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/amstream/CMakeLists.txt [iso-8859-1] Tue Jul 21
23:17:39 2015
@@ -21,6 +21,6 @@
set_module_type(amstream win32dll)
target_link_libraries(amstream strmbase strmiids uuid wine)
-add_importlibs(amstream ole32 msvcrt kernel32 ntdll)
+add_importlibs(amstream ole32 ddraw msvcrt kernel32 ntdll)
add_pch(amstream amstream_private.h SOURCE)
add_cd_file(TARGET amstream DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/dll/directx/wine/amstream/amstream.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/amstream/…
==============================================================================
--- trunk/reactos/dll/directx/wine/amstream/amstream.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/amstream/amstream.c [iso-8859-1] Tue Jul 21 23:17:39
2015
@@ -27,10 +27,10 @@
IGraphBuilder* pFilterGraph;
IMediaSeeking* media_seeking;
IMediaControl* media_control;
- IBaseFilter* media_stream_filter;
+ IMediaStreamFilter *media_stream_filter;
IPin* ipin;
ULONG nbStreams;
- IMediaStream** pStreams;
+ IAMMediaStream **pStreams;
STREAM_TYPE StreamType;
OAEVENT event;
} IAMMultiMediaStreamImpl;
@@ -104,11 +104,12 @@
if (!ref)
{
for(i = 0; i < This->nbStreams; i++)
- IMediaStream_Release(This->pStreams[i]);
+ IAMMediaStream_Release(This->pStreams[i]);
+ CoTaskMemFree(This->pStreams);
if (This->ipin)
IPin_Release(This->ipin);
if (This->media_stream_filter)
- IBaseFilter_Release(This->media_stream_filter);
+ IMediaStreamFilter_Release(This->media_stream_filter);
if (This->media_seeking)
IMediaSeeking_Release(This->media_seeking);
if (This->media_control)
@@ -141,10 +142,10 @@
for (i = 0; i < This->nbStreams; i++)
{
- IMediaStream_GetInformation(This->pStreams[i], &PurposeId, NULL);
+ IAMMediaStream_GetInformation(This->pStreams[i], &PurposeId, NULL);
if (IsEqualIID(&PurposeId, idPurpose))
{
- *ppMediaStream = This->pStreams[i];
+ *ppMediaStream = (IMediaStream*)This->pStreams[i];
IMediaStream_AddRef(*ppMediaStream);
return S_OK;
}
@@ -246,11 +247,11 @@
This->StreamType = StreamType;
hr = IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IMediaSeeking,
(void**)&This->media_seeking);
if (SUCCEEDED(hr))
- IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IMediaControl,
(void**)&This->media_control);
+ hr = IGraphBuilder_QueryInterface(This->pFilterGraph,
&IID_IMediaControl, (void**)&This->media_control);
if (SUCCEEDED(hr))
- hr = CoCreateInstance(&CLSID_MediaStreamFilter, NULL,
CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (LPVOID*)&This->media_stream_filter);
+ hr = CoCreateInstance(&CLSID_MediaStreamFilter, NULL,
CLSCTX_INPROC_SERVER, &IID_IMediaStreamFilter,
(void**)&This->media_stream_filter);
if (SUCCEEDED(hr))
- IGraphBuilder_AddFilter(This->pFilterGraph, This->media_stream_filter,
filternameW);
+ hr = IGraphBuilder_AddFilter(This->pFilterGraph,
(IBaseFilter*)This->media_stream_filter, filternameW);
if (SUCCEEDED(hr))
{
IMediaEventEx* media_event = NULL;
@@ -267,7 +268,7 @@
if (FAILED(hr))
{
if (This->media_stream_filter)
- IBaseFilter_Release(This->media_stream_filter);
+ IMediaStreamFilter_Release(This->media_stream_filter);
This->media_stream_filter = NULL;
if (This->media_seeking)
IMediaSeeking_Release(This->media_seeking);
@@ -303,19 +304,17 @@
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilter(IAMMultiMediaStream* iface,
IMediaStreamFilter** ppFilter)
{
IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface);
- HRESULT hr = S_OK;
TRACE("(%p/%p)->(%p)\n", This, iface, ppFilter);
if (!ppFilter)
return E_POINTER;
- *ppFilter = NULL;
-
- if (This->media_stream_filter)
- hr = IBaseFilter_QueryInterface(This->media_stream_filter,
&IID_IMediaStreamFilter, (LPVOID*)ppFilter);
-
- return hr;
+ *ppFilter = This->media_stream_filter;
+ if (*ppFilter)
+ IMediaStreamFilter_AddRef(*ppFilter);
+
+ return S_OK;
}
static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream* iface,
IUnknown* stream_object, const MSPID* PurposeId,
@@ -323,8 +322,8 @@
{
IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface);
HRESULT hr;
- IMediaStream* pStream;
- IMediaStream** pNewStreams;
+ IAMMediaStream* pStream;
+ IAMMediaStream** pNewStreams;
TRACE("(%p/%p)->(%p,%s,%x,%p)\n", This, iface, stream_object,
debugstr_guid(PurposeId), dwFlags, ppNewStream);
@@ -364,10 +363,10 @@
hr = audiomediastream_create((IMultiMediaStream*)iface, PurposeId,
This->StreamType, &pStream);
if (SUCCEEDED(hr))
{
- pNewStreams = CoTaskMemRealloc(This->pStreams, (This->nbStreams+1) *
sizeof(IMediaStream*));
+ pNewStreams = CoTaskMemRealloc(This->pStreams, (This->nbStreams+1) *
sizeof(IAMMediaStream*));
if (!pNewStreams)
{
- IMediaStream_Release(pStream);
+ IAMMediaStream_Release(pStream);
return E_OUTOFMEMORY;
}
This->pStreams = pNewStreams;
@@ -375,13 +374,13 @@
This->nbStreams++;
if (ppNewStream)
- *ppNewStream = pStream;
+ *ppNewStream = (IMediaStream*)pStream;
}
if (SUCCEEDED(hr))
{
/* Add stream to the media stream filter */
-
IMediaStreamFilter_AddMediaStream((IMediaStreamFilter*)This->media_stream_filter,
(IAMMediaStream*)pStream);
+ IMediaStreamFilter_AddMediaStream(This->media_stream_filter, pStream);
}
return hr;
Modified: trunk/reactos/dll/directx/wine/amstream/amstream_private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/amstream/…
==============================================================================
--- trunk/reactos/dll/directx/wine/amstream/amstream_private.h [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/amstream/amstream_private.h [iso-8859-1] Tue Jul 21
23:17:39 2015
@@ -35,8 +35,8 @@
HRESULT AMAudioData_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN;
HRESULT MediaStreamFilter_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN;
HRESULT ddrawmediastream_create(IMultiMediaStream *Parent, const MSPID *pPurposeId,
- STREAM_TYPE StreamType, IMediaStream **ppMediaStream) DECLSPEC_HIDDEN;
+ STREAM_TYPE StreamType, IAMMediaStream **ppMediaStream) DECLSPEC_HIDDEN;
HRESULT audiomediastream_create(IMultiMediaStream *parent, const MSPID *purpose_id,
- STREAM_TYPE stream_type, IMediaStream **media_stream) DECLSPEC_HIDDEN;
+ STREAM_TYPE stream_type, IAMMediaStream **media_stream) DECLSPEC_HIDDEN;
#endif /* __AMSTREAM_PRIVATE_INCLUDED__ */
Modified: trunk/reactos/dll/directx/wine/amstream/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/amstream/…
==============================================================================
--- trunk/reactos/dll/directx/wine/amstream/main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/amstream/main.c [iso-8859-1] Tue Jul 21 23:17:39 2015
@@ -23,7 +23,6 @@
#include <rpcproxy.h>
static HINSTANCE instance;
-static DWORD dll_ref = 0;
/* For the moment, do nothing here. */
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
@@ -189,7 +188,7 @@
*/
HRESULT WINAPI DllCanUnloadNow(void)
{
- return dll_ref != 0 ? S_FALSE : S_OK;
+ return S_FALSE;
}
/***********************************************************************
Modified: trunk/reactos/dll/directx/wine/amstream/mediastream.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/amstream/…
==============================================================================
--- trunk/reactos/dll/directx/wine/amstream/mediastream.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/amstream/mediastream.c [iso-8859-1] Tue Jul 21 23:17:39
2015
@@ -20,7 +20,11 @@
#include "amstream_private.h"
-static HRESULT ddrawstreamsample_create(IDirectDrawMediaStream *parent,
IDirectDrawStreamSample **ddraw_stream_sample);
+#include <initguid.h>
+DEFINE_GUID(IID_IDirectDraw7,
0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b);
+
+static HRESULT ddrawstreamsample_create(IDirectDrawMediaStream *parent,
IDirectDrawSurface *surface,
+ const RECT *rect, IDirectDrawStreamSample **ddraw_stream_sample);
static HRESULT audiostreamsample_create(IAudioMediaStream *parent, IAudioData
*audio_data, IAudioStreamSample **audio_stream_sample);
typedef struct {
@@ -30,6 +34,7 @@
IMultiMediaStream* parent;
MSPID purpose_id;
STREAM_TYPE stream_type;
+ IDirectDraw7 *ddraw;
} DirectDrawMediaStreamImpl;
static inline DirectDrawMediaStreamImpl
*impl_from_DirectDrawMediaStream_IAMMediaStream(IAMMediaStream *iface)
@@ -82,7 +87,11 @@
TRACE("(%p/%p)->(): new ref = %u\n", iface, This, ref);
if (!ref)
+ {
+ if (This->ddraw)
+ IDirectDraw7_Release(This->ddraw);
HeapFree(GetProcessHeap(), 0, This);
+ }
return ref;
}
@@ -230,48 +239,22 @@
REFIID riid, void **ret_iface)
{
DirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface);
-
TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid),
ret_iface);
-
- if (IsEqualGUID(riid, &IID_IUnknown) ||
- IsEqualGUID(riid, &IID_IMediaStream) ||
- IsEqualGUID(riid, &IID_IDirectDrawMediaStream))
- {
- IDirectDrawMediaStream_AddRef(iface);
- *ret_iface = iface;
- return S_OK;
- }
- else if (IsEqualGUID(riid, &IID_IAMMediaStream))
- {
- IDirectDrawMediaStream_AddRef(iface);
- *ret_iface = &This->IAMMediaStream_iface;
- return S_OK;
- }
-
- ERR("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ret_iface);
- return E_NOINTERFACE;
+ return IAMMediaStream_QueryInterface(&This->IAMMediaStream_iface, riid,
ret_iface);
}
static ULONG WINAPI
DirectDrawMediaStreamImpl_IDirectDrawMediaStream_AddRef(IDirectDrawMediaStream *iface)
{
DirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface);
-
TRACE("(%p/%p)\n", iface, This);
-
- return InterlockedIncrement(&This->ref);
+ return IAMMediaStream_AddRef(&This->IAMMediaStream_iface);
}
static ULONG WINAPI
DirectDrawMediaStreamImpl_IDirectDrawMediaStream_Release(IDirectDrawMediaStream *iface)
{
DirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface);
- ULONG ref = InterlockedDecrement(&This->ref);
-
TRACE("(%p/%p)\n", iface, This);
-
- if (!ref)
- HeapFree(GetProcessHeap(), 0, This);
-
- return ref;
+ return IAMMediaStream_Release(&This->IAMMediaStream_iface);
}
/*** IMediaStream methods ***/
@@ -361,11 +344,22 @@
}
static HRESULT WINAPI
DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetDirectDraw(IDirectDrawMediaStream
*iface,
- IDirectDraw **ppDirectDraw)
-{
- FIXME("(%p)->(%p) stub!\n", iface, ppDirectDraw);
-
- return E_NOTIMPL;
+ IDirectDraw **ddraw)
+{
+ DirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface);
+
+ TRACE("(%p)->(%p)\n", iface, ddraw);
+
+ *ddraw = NULL;
+ if (!This->ddraw)
+ {
+ HRESULT hr = DirectDrawCreateEx(NULL, (void**)&This->ddraw,
&IID_IDirectDraw7, NULL);
+ if (FAILED(hr))
+ return hr;
+ IDirectDraw7_SetCooperativeLevel(This->ddraw, NULL, DDSCL_NORMAL);
+ }
+
+ return IDirectDraw7_QueryInterface(This->ddraw, &IID_IDirectDraw,
(void**)ddraw);
}
static HRESULT WINAPI
DirectDrawMediaStreamImpl_IDirectDrawMediaStream_SetDirectDraw(IDirectDrawMediaStream
*iface,
@@ -377,12 +371,12 @@
}
static HRESULT WINAPI
DirectDrawMediaStreamImpl_IDirectDrawMediaStream_CreateSample(IDirectDrawMediaStream
*iface,
- IDirectDrawSurface *pSurface, const RECT *pRect, DWORD dwFlags,
+ IDirectDrawSurface *surface, const RECT *rect, DWORD dwFlags,
IDirectDrawStreamSample **ppSample)
{
- TRACE("(%p)->(%p,%p,%x,%p)\n", iface, pSurface, pRect, dwFlags,
ppSample);
-
- return ddrawstreamsample_create(iface, ppSample);
+ TRACE("(%p)->(%p,%s,%x,%p)\n", iface, surface, wine_dbgstr_rect(rect),
dwFlags, ppSample);
+
+ return ddrawstreamsample_create(iface, surface, rect, ppSample);
}
static HRESULT WINAPI
DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetTimePerFrame(IDirectDrawMediaStream
*iface,
@@ -416,7 +410,7 @@
};
HRESULT ddrawmediastream_create(IMultiMediaStream *parent, const MSPID *purpose_id,
- STREAM_TYPE stream_type, IMediaStream **media_stream)
+ STREAM_TYPE stream_type, IAMMediaStream **media_stream)
{
DirectDrawMediaStreamImpl *object;
@@ -434,7 +428,7 @@
object->purpose_id = *purpose_id;
object->stream_type = stream_type;
- *media_stream = (IMediaStream*)&object->IAMMediaStream_iface;
+ *media_stream = &object->IAMMediaStream_iface;
return S_OK;
}
@@ -646,52 +640,22 @@
REFIID riid, void **ret_iface)
{
AudioMediaStreamImpl *This = impl_from_IAudioMediaStream(iface);
-
TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid),
ret_iface);
-
- if (IsEqualGUID(riid, &IID_IUnknown) ||
- IsEqualGUID(riid, &IID_IMediaStream) ||
- IsEqualGUID(riid, &IID_IAudioMediaStream))
- {
- IAudioMediaStream_AddRef(iface);
- *ret_iface = iface;
- return S_OK;
- }
- else if (IsEqualGUID(riid, &IID_IAMMediaStream))
- {
- IAudioMediaStream_AddRef(iface);
- *ret_iface = &This->IAMMediaStream_iface;
- return S_OK;
- }
-
-
- *ret_iface = NULL;
-
- ERR("(%p/%p)->(%s,%p),not found\n", iface, This, debugstr_guid(riid),
ret_iface);
- return E_NOINTERFACE;
+ return IAMMediaStream_QueryInterface(&This->IAMMediaStream_iface, riid,
ret_iface);
}
static ULONG WINAPI AudioMediaStreamImpl_IAudioMediaStream_AddRef(IAudioMediaStream
*iface)
{
AudioMediaStreamImpl *This = impl_from_IAudioMediaStream(iface);
- ULONG ref = InterlockedIncrement(&This->ref);
-
- TRACE("(%p/%p): new ref = %u\n", iface, This, ref);
-
- return ref;
+ TRACE("(%p/%p)\n", iface, This);
+ return IAMMediaStream_AddRef(&This->IAMMediaStream_iface);
}
static ULONG WINAPI AudioMediaStreamImpl_IAudioMediaStream_Release(IAudioMediaStream
*iface)
{
AudioMediaStreamImpl *This = impl_from_IAudioMediaStream(iface);
- ULONG ref = InterlockedDecrement(&This->ref);
-
- TRACE("(%p/%p): new ref = %u\n", iface, This, ref);
-
- if (!ref)
- HeapFree(GetProcessHeap(), 0, This);
-
- return ref;
+ TRACE("(%p/%p)\n", iface, This);
+ return IAMMediaStream_Release(&This->IAMMediaStream_iface);
}
/*** IMediaStream methods ***/
@@ -816,7 +780,7 @@
};
HRESULT audiomediastream_create(IMultiMediaStream *parent, const MSPID *purpose_id,
- STREAM_TYPE stream_type, IMediaStream **media_stream)
+ STREAM_TYPE stream_type, IAMMediaStream **media_stream)
{
AudioMediaStreamImpl *object;
@@ -834,7 +798,7 @@
object->purpose_id = *purpose_id;
object->stream_type = stream_type;
- *media_stream = (IMediaStream*)&object->IAMMediaStream_iface;
+ *media_stream = &object->IAMMediaStream_iface;
return S_OK;
}
@@ -843,6 +807,8 @@
IDirectDrawStreamSample IDirectDrawStreamSample_iface;
LONG ref;
IMediaStream *parent;
+ IDirectDrawSurface *surface;
+ RECT rect;
} IDirectDrawStreamSampleImpl;
static inline IDirectDrawStreamSampleImpl
*impl_from_IDirectDrawStreamSample(IDirectDrawStreamSample *iface)
@@ -889,7 +855,12 @@
TRACE("(%p)->(): new ref = %u\n", iface, ref);
if (!ref)
+ {
+ if (This->surface)
+ IDirectDrawSurface_Release(This->surface);
+ IMediaStream_Release(This->parent);
HeapFree(GetProcessHeap(), 0, This);
+ }
return ref;
}
@@ -937,9 +908,21 @@
static HRESULT WINAPI IDirectDrawStreamSampleImpl_GetSurface(IDirectDrawStreamSample
*iface, IDirectDrawSurface **ddraw_surface,
RECT *rect)
{
- FIXME("(%p)->(%p,%p): stub\n", iface, ddraw_surface, rect);
-
- return E_NOTIMPL;
+ IDirectDrawStreamSampleImpl *This = impl_from_IDirectDrawStreamSample(iface);
+
+ TRACE("(%p)->(%p,%p)\n", iface, ddraw_surface, rect);
+
+ if (ddraw_surface)
+ {
+ *ddraw_surface = This->surface;
+ if (*ddraw_surface)
+ IDirectDrawSurface_AddRef(*ddraw_surface);
+ }
+
+ if (rect)
+ *rect = This->rect;
+
+ return S_OK;
}
static HRESULT WINAPI IDirectDrawStreamSampleImpl_SetRect(IDirectDrawStreamSample *iface,
const RECT *rect)
@@ -966,21 +949,78 @@
IDirectDrawStreamSampleImpl_SetRect
};
-static HRESULT ddrawstreamsample_create(IDirectDrawMediaStream *parent,
IDirectDrawStreamSample **ddraw_stream_sample)
+static HRESULT ddrawstreamsample_create(IDirectDrawMediaStream *parent,
IDirectDrawSurface *surface,
+ const RECT *rect, IDirectDrawStreamSample **ddraw_stream_sample)
{
IDirectDrawStreamSampleImpl *object;
+ HRESULT hr;
TRACE("(%p)\n", ddraw_stream_sample);
- object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(IDirectDrawStreamSampleImpl));
+ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
if (!object)
return E_OUTOFMEMORY;
object->IDirectDrawStreamSample_iface.lpVtbl = &DirectDrawStreamSample_Vtbl;
object->ref = 1;
object->parent = (IMediaStream*)parent;
-
- *ddraw_stream_sample =
(IDirectDrawStreamSample*)&object->IDirectDrawStreamSample_iface;
+ IMediaStream_AddRef(object->parent);
+
+ if (surface)
+ {
+ object->surface = surface;
+ IDirectDrawSurface_AddRef(surface);
+ }
+ else
+ {
+ DDSURFACEDESC desc;
+ IDirectDraw *ddraw;
+
+ hr = IDirectDrawMediaStream_GetDirectDraw(parent, &ddraw);
+ if (FAILED(hr))
+ {
+
IDirectDrawStreamSample_Release(&object->IDirectDrawStreamSample_iface);
+ return hr;
+ }
+
+ desc.dwSize = sizeof(desc);
+ desc.dwFlags = DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT;
+ desc.dwHeight = 100;
+ desc.dwWidth = 100;
+ desc.ddpfPixelFormat.dwSize = sizeof(desc.ddpfPixelFormat);
+ desc.ddpfPixelFormat.dwFlags = DDPF_RGB;
+ desc.ddpfPixelFormat.dwRGBBitCount = 32;
+ desc.ddpfPixelFormat.dwRBitMask = 0xff0000;
+ desc.ddpfPixelFormat.dwGBitMask = 0x00ff00;
+ desc.ddpfPixelFormat.dwBBitMask = 0x0000ff;
+ desc.ddpfPixelFormat.dwRGBAlphaBitMask = 0;
+ desc.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN;
+
+ hr = IDirectDraw_CreateSurface(ddraw, &desc, &object->surface, NULL);
+ IDirectDraw_Release(ddraw);
+ if (FAILED(hr))
+ {
+ ERR("failed to create surface, 0x%08x\n", hr);
+
IDirectDrawStreamSample_Release(&object->IDirectDrawStreamSample_iface);
+ return hr;
+ }
+ }
+
+ if (rect)
+ object->rect = *rect;
+ else if (object->surface)
+ {
+ DDSURFACEDESC desc = { sizeof(desc) };
+ hr = IDirectDrawSurface_GetSurfaceDesc(object->surface, &desc);
+ if (hr == S_OK)
+ {
+ object->rect.left = object->rect.top = 0;
+ object->rect.right = desc.dwWidth;
+ object->rect.bottom = desc.dwHeight;
+ }
+ }
+
+ *ddraw_stream_sample = &object->IDirectDrawStreamSample_iface;
return S_OK;
}
Modified: trunk/reactos/dll/directx/wine/amstream/mediastreamfilter.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/amstream/…
==============================================================================
--- trunk/reactos/dll/directx/wine/amstream/mediastreamfilter.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/amstream/mediastreamfilter.c [iso-8859-1] Tue Jul 21
23:17:39 2015
@@ -237,6 +237,8 @@
IMediaStream_Release(This->streams[i]);
IPin_Release(This->pins[i]);
}
+ CoTaskMemFree(This->streams);
+ CoTaskMemFree(This->pins);
BaseFilter_Destroy(&This->filter);
HeapFree(GetProcessHeap(), 0, This);
}
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Jul 21 23:17:39 2015
@@ -21,7 +21,7 @@
The following libraries are shared with Wine.
-reactos/dll/directx/wine/amstream # Synced to WineStaging-1.7.37
+reactos/dll/directx/wine/amstream # Synced to WineStaging-1.7.47
reactos/dll/directx/wine/d3d8 # Synced to WineStaging-1.7.37
reactos/dll/directx/wine/d3d9 # Synced to WineStaging-1.7.37
reactos/dll/directx/wine/d3dcompiler_43 # Synced to WineStaging-1.7.37