Author: akhaldi
Date: Fri Sep 26 09:51:00 2014
New Revision: 64305
URL:
http://svn.reactos.org/svn/reactos?rev=64305&view=rev
Log:
[QUARTZ]
* Sync with Wine 1.7.27.
CORE-8540
Modified:
trunk/reactos/dll/directx/wine/quartz/avisplit.c
trunk/reactos/dll/directx/wine/quartz/dsoundrender.c
trunk/reactos/dll/directx/wine/quartz/filesource.c
trunk/reactos/dll/directx/wine/quartz/filtergraph.c
trunk/reactos/dll/directx/wine/quartz/filtermapper.c
trunk/reactos/dll/directx/wine/quartz/parser.c
trunk/reactos/dll/directx/wine/quartz/regsvr.c
trunk/reactos/dll/directx/wine/quartz/videorenderer.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/directx/wine/quartz/avisplit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/av…
==============================================================================
--- trunk/reactos/dll/directx/wine/quartz/avisplit.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/quartz/avisplit.c [iso-8859-1] Fri Sep 26 09:51:00
2014
@@ -134,6 +134,7 @@
PullPin *pin = This->Parser.pInputPin;
IMediaSample *sample = NULL;
HRESULT hr;
+ ULONG ref;
TRACE("(%p, %u)->()\n", This, streamnumber);
@@ -247,7 +248,10 @@
hr = IAsyncReader_Request(pin->pReader, sample, streamnumber);
if (FAILED(hr))
- assert(IMediaSample_Release(sample) == 0);
+ {
+ ref = IMediaSample_Release(sample);
+ assert(ref == 0);
+ }
}
else
{
@@ -261,7 +265,8 @@
if (sample)
{
ERR("There should be no sample!\n");
- assert(IMediaSample_Release(sample) == 0);
+ ref = IMediaSample_Release(sample);
+ assert(ref == 0);
}
}
TRACE("--> %08x\n", hr);
@@ -493,8 +498,8 @@
static HRESULT AVISplitter_done_process(LPVOID iface)
{
AVISplitterImpl *This = iface;
-
DWORD x;
+ ULONG ref;
for (x = 0; x < This->Parser.cStreams; ++x)
{
@@ -508,7 +513,10 @@
stream->thread = NULL;
if (stream->sample)
- assert(IMediaSample_Release(stream->sample) == 0);
+ {
+ ref = IMediaSample_Release(stream->sample);
+ assert(ref == 0);
+ }
stream->sample = NULL;
ResetEvent(stream->packet_queued);
@@ -1202,6 +1210,7 @@
{
AVISplitterImpl *This = iface;
DWORD x;
+ ULONG ref;
TRACE("(%p)->()\n", This);
@@ -1210,7 +1219,10 @@
StreamData *stream = This->streams + x;
if (stream->sample)
- assert(IMediaSample_Release(stream->sample) == 0);
+ {
+ ref = IMediaSample_Release(stream->sample);
+ assert(ref == 0);
+ }
stream->sample = NULL;
ResetEvent(stream->packet_queued);
Modified: trunk/reactos/dll/directx/wine/quartz/dsoundrender.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/ds…
==============================================================================
--- trunk/reactos/dll/directx/wine/quartz/dsoundrender.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/quartz/dsoundrender.c [iso-8859-1] Fri Sep 26 09:51:00
2014
@@ -225,7 +225,7 @@
static HRESULT DSoundRender_HandleEndOfStream(DSoundRenderImpl *This)
{
- while (1)
+ while (This->renderer.filter.state == State_Running)
{
DWORD pos1, pos2;
DSoundRender_UpdatePositions(This, &pos1, &pos2);
@@ -236,8 +236,8 @@
LeaveCriticalSection(&This->renderer.filter.csFilter);
LeaveCriticalSection(&This->renderer.csRenderLock);
WaitForSingleObject(This->blocked, 10);
+ EnterCriticalSection(&This->renderer.csRenderLock);
EnterCriticalSection(&This->renderer.filter.csFilter);
- EnterCriticalSection(&This->renderer.csRenderLock);
This->in_loop = 0;
}
Modified: trunk/reactos/dll/directx/wine/quartz/filesource.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/fi…
==============================================================================
--- trunk/reactos/dll/directx/wine/quartz/filesource.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/quartz/filesource.c [iso-8859-1] Fri Sep 26 09:51:00
2014
@@ -834,7 +834,7 @@
CloseHandle(This->hFile);
This->csList.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csList);
- CoTaskMemFree(This);
+ BaseOutputPin_Destroy(&This->pin);
return 0;
}
return refCount;
Modified: trunk/reactos/dll/directx/wine/quartz/filtergraph.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/fi…
==============================================================================
--- trunk/reactos/dll/directx/wine/quartz/filtergraph.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/quartz/filtergraph.c [iso-8859-1] Fri Sep 26 09:51:00
2014
@@ -801,7 +801,7 @@
hr = IPropertyBag_Read(pPropBagCat, wszFriendlyName, pvar, NULL);
if (SUCCEEDED(hr))
- TRACE("Moniker = %s\n", debugstr_w(V_UNION(pvar, bstrVal)));
+ TRACE("Moniker = %s\n", debugstr_w(V_BSTR(pvar)));
if (pPropBagCat)
IPropertyBag_Release(pPropBagCat);
@@ -1050,7 +1050,7 @@
}
}
- hr = IFilterGraph2_AddFilter(iface, pfilter, V_UNION(&var, bstrVal));
+ hr = IFilterGraph2_AddFilter(iface, pfilter, V_BSTR(&var));
if (FAILED(hr)) {
WARN("Unable to add filter (%x)\n", hr);
IBaseFilter_Release(pfilter);
@@ -1384,7 +1384,7 @@
goto error;
}
- hr = IFilterGraph2_AddFilter(iface, pfilter, V_UNION(&var, bstrVal));
+ hr = IFilterGraph2_AddFilter(iface, pfilter, V_BSTR(&var));
if (FAILED(hr)) {
WARN("Unable to add filter (%x)\n", hr);
IBaseFilter_Release(pfilter);
@@ -1424,10 +1424,10 @@
IPin_Release(ppinfilter);
if (FAILED(hr)) {
- WARN("Unable to connect %s to renderer (%x)\n",
debugstr_w(V_UNION(&var, bstrVal)), hr);
+ WARN("Unable to connect %s to renderer (%x)\n",
debugstr_w(V_BSTR(&var)), hr);
goto error;
}
- TRACE("Connected, recursing %s\n",
debugstr_w(V_UNION(&var, bstrVal)));
+ TRACE("Connected, recursing %s\n",
debugstr_w(V_BSTR(&var)));
VariantClear(&var);
Modified: trunk/reactos/dll/directx/wine/quartz/filtermapper.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/fi…
==============================================================================
--- trunk/reactos/dll/directx/wine/quartz/filtermapper.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/quartz/filtermapper.c [iso-8859-1] Fri Sep 26 09:51:00
2014
@@ -348,7 +348,7 @@
BSTR value;
V_VT(&var) = VT_BSTR;
- V_UNION(&var, bstrVal) = value = SysAllocString(szName);
+ V_BSTR(&var) = value = SysAllocString(szName);
ret = IPropertyBag_Write(pPropBag, wszFriendlyName, &var);
SysFreeString(value);
@@ -367,7 +367,7 @@
if (SUCCEEDED(hr))
{
V_VT(&var) = VT_BSTR;
- V_UNION(&var, bstrVal) = wszClsid;
+ V_BSTR(&var) = wszClsid;
hr = IPropertyBag_Write(pPropBag, wszClsidName, &var);
}
CoTaskMemFree(wszClsid);
@@ -779,7 +779,7 @@
}
V_VT(&var) = VT_ARRAY | VT_UI1;
- V_UNION(&var, parray) = psa;
+ V_ARRAY(&var) = psa;
if (SUCCEEDED(hr))
hr = IPropertyBag_Write(pPropBag, wszFilterDataName, &var);
@@ -928,7 +928,7 @@
if (SUCCEEDED(hrSub))
hrSub = IPropertyBag_Read(pPropBagCat, wszMeritName, &var, NULL);
- if (SUCCEEDED(hrSub) && (V_UNION(&var, ulVal) >= dwMerit))
+ if (SUCCEEDED(hrSub) && (V_UI4(&var) >= dwMerit))
{
CLSID clsidCat;
IEnumMoniker * pEnum;
@@ -941,14 +941,14 @@
VARIANT temp;
V_VT(&temp) = VT_EMPTY;
IPropertyBag_Read(pPropBagCat, wszFriendlyName, &temp, NULL);
- TRACE("Considering category %s\n",
debugstr_w(V_UNION(&temp, bstrVal)));
+ TRACE("Considering category %s\n",
debugstr_w(V_BSTR(&temp)));
VariantClear(&temp);
}
hrSub = IPropertyBag_Read(pPropBagCat, wszClsidName, &var, NULL);
if (SUCCEEDED(hrSub))
- hrSub = CLSIDFromString(V_UNION(&var, bstrVal), &clsidCat);
+ hrSub = CLSIDFromString(V_BSTR(&var), &clsidCat);
if (SUCCEEDED(hrSub))
hrSub = ICreateDevEnum_CreateClassEnumerator(pCreateDevEnum,
&clsidCat, &pEnum, 0);
@@ -975,7 +975,7 @@
VARIANT temp;
V_VT(&temp) = VT_EMPTY;
IPropertyBag_Read(pPropBag, wszFriendlyName, &temp, NULL);
- TRACE("Considering filter %s\n",
debugstr_w(V_UNION(&temp, bstrVal)));
+ TRACE("Considering filter %s\n",
debugstr_w(V_BSTR(&temp)));
VariantClear(&temp);
}
@@ -985,13 +985,13 @@
}
if (SUCCEEDED(hrSub))
- hrSub = SafeArrayAccessData(V_UNION(&var, parray),
(LPVOID*)&pData);
+ hrSub = SafeArrayAccessData(V_ARRAY(&var),
(LPVOID*)&pData);
if (SUCCEEDED(hrSub))
hrSub = FM2_ReadFilterData(pData, &rf2);
if (pData)
- SafeArrayUnaccessData(V_UNION(&var, parray));
+ SafeArrayUnaccessData(V_ARRAY(&var));
VariantClear(&var);
@@ -1165,7 +1165,7 @@
if (FAILED(hr))
return hr;
-
+
while(IEnumMoniker_Next(ppEnumMoniker, 1, &IMon, &nb) == S_OK)
{
IMoniker_Release(IMon);
@@ -1185,7 +1185,7 @@
return E_OUTOFMEMORY;
}
ZeroMemory(regfilters, nb_mon * sizeof(REGFILTER)); /* will prevent bad free of Name
in case of error. */
-
+
IEnumMoniker_Reset(ppEnumMoniker);
while(IEnumMoniker_Next(ppEnumMoniker, 1, &IMon, &nb) == S_OK)
{
@@ -1203,7 +1203,7 @@
hrSub = IPropertyBag_Read(pPropBagCat, wszClsidName, &var, NULL);
if (SUCCEEDED(hrSub))
- hrSub = CLSIDFromString(V_UNION(&var, bstrVal), &clsid);
+ hrSub = CLSIDFromString(V_BSTR(&var), &clsid);
VariantClear(&var);
@@ -1212,14 +1212,14 @@
if (SUCCEEDED(hrSub))
{
- len = (strlenW(V_UNION(&var, bstrVal))+1) * sizeof(WCHAR);
+ len = (strlenW(V_BSTR(&var))+1) * sizeof(WCHAR);
if (!(regfilters[idx].Name = CoTaskMemAlloc(len*2)))
hr = E_OUTOFMEMORY;
}
if (SUCCEEDED(hrSub) && regfilters[idx].Name)
{
- memcpy(regfilters[idx].Name, V_UNION(&var, bstrVal), len);
+ memcpy(regfilters[idx].Name, V_BSTR(&var), len);
regfilters[idx].Clsid = clsid;
idx++;
}
@@ -1239,7 +1239,7 @@
CoTaskMemFree(regfilters[idx].Name);
CoTaskMemFree(regfilters);
IEnumMoniker_Release(ppEnumMoniker);
-
+
return hr;
}
@@ -1260,7 +1260,7 @@
{
strcpyW(wszKeyName, wszFilterSlash);
strcatW(wszKeyName, wszClsid);
-
+
lRet = RegCreateKeyExW(HKEY_CLASSES_ROOT, wszKeyName, 0, NULL,
REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL);
hr = HRESULT_FROM_WIN32(lRet);
}
@@ -1276,7 +1276,7 @@
{
strcpyW(wszKeyName, wszClsidSlash);
strcatW(wszKeyName, wszClsid);
-
+
lRet = RegCreateKeyExW(HKEY_CLASSES_ROOT, wszKeyName, 0, NULL,
REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL);
hr = HRESULT_FROM_WIN32(lRet);
}
@@ -1287,7 +1287,7 @@
hr = HRESULT_FROM_WIN32(lRet);
RegCloseKey(hKey);
}
-
+
CoTaskMemFree(wszClsid);
return hr;
@@ -1347,7 +1347,7 @@
strcpyW(wszPinsKeyName, wszPins);
strcatW(wszPinsKeyName, wszSlash);
strcatW(wszPinsKeyName, szName);
-
+
lRet = RegCreateKeyExW(hKey, wszPinsKeyName, 0, NULL, REG_OPTION_NON_VOLATILE,
KEY_WRITE, NULL, &hPinsKey, NULL);
hr = HRESULT_FROM_WIN32(lRet);
CoTaskMemFree(wszPinsKeyName);
Modified: trunk/reactos/dll/directx/wine/quartz/parser.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/pa…
==============================================================================
--- trunk/reactos/dll/directx/wine/quartz/parser.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/quartz/parser.c [iso-8859-1] Fri Sep 26 09:51:00 2014
@@ -156,6 +156,7 @@
{
IPin *connected = NULL;
ULONG pinref;
+ HRESULT hr;
assert(!This->filter.refCount);
PullPin_WaitForStateChange(This->pInputPin, INFINITE);
@@ -164,9 +165,11 @@
IPin_ConnectedTo(&This->pInputPin->pin.IPin_iface, &connected);
if (connected)
{
- assert(IPin_Disconnect(connected) == S_OK);
+ hr = IPin_Disconnect(connected);
+ assert(hr == S_OK);
IPin_Release(connected);
- assert(IPin_Disconnect(&This->pInputPin->pin.IPin_iface) == S_OK);
+ hr = IPin_Disconnect(&This->pInputPin->pin.IPin_iface);
+ assert(hr == S_OK);
}
pinref = IPin_Release(&This->pInputPin->pin.IPin_iface);
if (pinref)
Modified: trunk/reactos/dll/directx/wine/quartz/regsvr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/re…
==============================================================================
--- trunk/reactos/dll/directx/wine/quartz/regsvr.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/quartz/regsvr.c [iso-8859-1] Fri Sep 26 09:51:00 2014
@@ -592,7 +592,7 @@
if (list->pins[i].mediatypes[j].subtype)
memcpy(lpClsid + j*2 + 1, list->pins[i].mediatypes[j].subtype, sizeof(CLSID));
else {
- /* Subtype are often a combination of major type + fourcc/tag */
+ /* Subtypes are often a combination of major type + fourcc/tag
*/
memcpy(lpClsid + j*2 + 1, list->pins[i].mediatypes[j].majortype, sizeof(CLSID));
*(DWORD*)(lpClsid + j*2 + 1) = list->pins[i].mediatypes[j].fourcc;
}
Modified: trunk/reactos/dll/directx/wine/quartz/videorenderer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/vi…
==============================================================================
--- trunk/reactos/dll/directx/wine/quartz/videorenderer.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/quartz/videorenderer.c [iso-8859-1] Fri Sep 26 09:51:00
2014
@@ -352,11 +352,11 @@
if (This->renderer.pMediaSample) {
ResetEvent(This->hEvent);
LeaveCriticalSection(iface->pInputPin->pin.pCritSec);
+ LeaveCriticalSection(&iface->filter.csFilter);
LeaveCriticalSection(&iface->csRenderLock);
- LeaveCriticalSection(&iface->filter.csFilter);
WaitForSingleObject(This->hEvent, INFINITE);
+ EnterCriticalSection(&iface->csRenderLock);
EnterCriticalSection(&iface->filter.csFilter);
- EnterCriticalSection(&iface->csRenderLock);
EnterCriticalSection(iface->pInputPin->pin.pCritSec);
}
if (This->renderer.filter.state == State_Paused) {
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] Fri Sep 26 09:51:00 2014
@@ -45,7 +45,7 @@
reactos/dll/directx/wine/dxgi # Synced to Wine-1.7.27
reactos/dll/directx/wine/msdmo # Synced to Wine-1.7.17
reactos/dll/directx/wine/qedit # Synced to Wine-1.7.27
-reactos/dll/directx/wine/quartz # Synced to Wine-1.7.17
+reactos/dll/directx/wine/quartz # Synced to Wine-1.7.27
reactos/dll/directx/wine/wined3d # Synced to Wine-1.7.27
reactos/dll/win32/activeds # Synced to Wine-1.7.17