Author: akhaldi
Date: Sun Mar 1 22:48:56 2015
New Revision: 66534
URL:
http://svn.reactos.org/svn/reactos?rev=66534&view=rev
Log:
[QUARTZ] Sync with Wine Staging 1.7.37. CORE-9246
Modified:
trunk/reactos/dll/directx/wine/quartz/acmwrapper.c
trunk/reactos/dll/directx/wine/quartz/avidec.c
trunk/reactos/dll/directx/wine/quartz/avisplit.c
trunk/reactos/dll/directx/wine/quartz/dsoundrender.c
trunk/reactos/dll/directx/wine/quartz/filtergraph.c
trunk/reactos/dll/directx/wine/quartz/main.c
trunk/reactos/dll/directx/wine/quartz/mpegsplit.c
trunk/reactos/dll/directx/wine/quartz/pin.c
trunk/reactos/dll/directx/wine/quartz/vmr9.c
trunk/reactos/dll/directx/wine/quartz/waveparser.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/directx/wine/quartz/acmwrapper.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/ac…
==============================================================================
--- trunk/reactos/dll/directx/wine/quartz/acmwrapper.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/quartz/acmwrapper.c [iso-8859-1] Sun Mar 1 22:48:56
2015
@@ -39,11 +39,6 @@
return CONTAINING_RECORD(iface, ACMWrapperImpl, tf.filter);
}
-static inline ACMWrapperImpl *impl_from_IBaseFilter( IBaseFilter *iface )
-{
- return CONTAINING_RECORD(iface, ACMWrapperImpl, tf.filter.IBaseFilter_iface);
-}
-
static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSample)
{
ACMWrapperImpl* This = impl_from_TransformFilter(tf);
Modified: trunk/reactos/dll/directx/wine/quartz/avidec.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/av…
==============================================================================
--- trunk/reactos/dll/directx/wine/quartz/avidec.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/quartz/avidec.c [iso-8859-1] Sun Mar 1 22:48:56 2015
@@ -32,11 +32,6 @@
static const IBaseFilterVtbl AVIDec_Vtbl;
-static inline AVIDecImpl *impl_from_IBaseFilter( IBaseFilter *iface )
-{
- return CONTAINING_RECORD(iface, AVIDecImpl, tf.filter.IBaseFilter_iface);
-}
-
static inline AVIDecImpl *impl_from_TransformFilter( TransformFilter *iface )
{
return CONTAINING_RECORD(iface, AVIDecImpl, tf.filter);
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] Sun Mar 1 22:48:56
2015
@@ -243,8 +243,7 @@
if (rtSampleStart != rtSampleStop)
{
- hr = IMediaSample_SetTime(sample, &rtSampleStart, &rtSampleStop);
-
+ IMediaSample_SetTime(sample, &rtSampleStart, &rtSampleStop);
hr = IAsyncReader_Request(pin->pReader, sample, streamnumber);
if (FAILED(hr))
@@ -321,7 +320,7 @@
}
rtstart = (double)(start - pin->pin.pin.tStart) / pin->pin.pin.dRate;
rtstop = (double)(stop - pin->pin.pin.tStart) / pin->pin.pin.dRate;
- hr = IMediaSample_SetMediaTime(sample, &start, &stop);
+ IMediaSample_SetMediaTime(sample, &start, &stop);
IMediaSample_SetTime(sample, &rtstart, &rtstop);
IMediaSample_SetMediaTime(sample, &start, &stop);
@@ -1182,7 +1181,7 @@
indexes = 0;
}
}
- else if (!indexes && pAviSplit->oldindex)
+ else if (pAviSplit->oldindex)
indexes = pAviSplit->Parser.cStreams;
if (!indexes && pAviSplit->AviHeader.dwFlags & AVIF_MUSTUSEINDEX)
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] Sun Mar 1 22:48:56
2015
@@ -28,7 +28,6 @@
static const IBaseFilterVtbl DSoundRender_Vtbl;
static const IBasicAudioVtbl IBasicAudio_Vtbl;
static const IReferenceClockVtbl IReferenceClock_Vtbl;
-static const IMediaSeekingVtbl IMediaSeeking_Vtbl;
static const IAMDirectSoundVtbl IAMDirectSound_Vtbl;
static const IAMFilterMiscFlagsVtbl IAMFilterMiscFlags_Vtbl;
@@ -899,7 +898,7 @@
static DWORD WINAPI DSoundAdviseThread(LPVOID lpParam) {
DSoundRenderImpl *This = lpParam;
- struct dsoundrender_timer head = {0};
+ struct dsoundrender_timer head = {NULL};
MSG msg;
TRACE("(%p): Main Loop\n", This);
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] Sun Mar 1 22:48:56
2015
@@ -180,7 +180,6 @@
GUID timeformatseek;
REFERENCE_TIME start_time;
REFERENCE_TIME pause_time;
- LONGLONG stop_position;
LONG recursioncount;
IUnknown *pSite;
LONG version;
@@ -1716,8 +1715,27 @@
IMoniker *pMoniker, IBindCtx *pCtx, LPCWSTR lpcwstrFilterName, IBaseFilter
**ppFilter)
{
IFilterGraphImpl *This = impl_from_IFilterGraph2(iface);
-
- TRACE("(%p/%p)->(%p %p %s %p): stub !!!\n", This, iface, pMoniker, pCtx,
debugstr_w(lpcwstrFilterName), ppFilter);
+ HRESULT hr;
+ IBaseFilter* pfilter;
+
+ TRACE("(%p/%p)->(%p %p %s %p)\n", This, iface, pMoniker, pCtx,
debugstr_w(lpcwstrFilterName), ppFilter);
+
+ hr = IMoniker_BindToObject(pMoniker, pCtx, NULL, &IID_IBaseFilter,
(void**)&pfilter);
+ if(FAILED(hr)) {
+ WARN("Unable to bind moniker to filter object (%x)\n", hr);
+ return hr;
+ }
+
+ hr = IFilterGraph2_AddFilter(iface, pfilter, lpcwstrFilterName);
+ if (FAILED(hr)) {
+ WARN("Unable to add filter (%x)\n", hr);
+ IBaseFilter_Release(pfilter);
+ return hr;
+ }
+
+ if(ppFilter)
+ *ppFilter = pfilter;
+ else IBaseFilter_Release(pfilter);
return S_OK;
}
@@ -2409,52 +2427,6 @@
return hr;
}
-static HRESULT WINAPI MediaSeeking_GetStopPosition(IMediaSeeking *iface, LONGLONG
*pStop)
-{
- IFilterGraphImpl *This = impl_from_IMediaSeeking(iface);
- HRESULT hr = S_OK;
-
- TRACE("(%p/%p)->(%p)\n", This, iface, pStop);
-
- if (!pStop)
- return E_POINTER;
-
- EnterCriticalSection(&This->cs);
- if (This->stop_position < 0)
- /* Stop position not set, use duration instead */
- hr = IMediaSeeking_GetDuration(iface, pStop);
- else
- *pStop = This->stop_position;
- LeaveCriticalSection(&This->cs);
-
- return hr;
-}
-
-static HRESULT WINAPI MediaSeeking_GetCurrentPosition(IMediaSeeking *iface, LONGLONG
*pCurrent)
-{
- IFilterGraphImpl *This = impl_from_IMediaSeeking(iface);
- LONGLONG time = 0;
-
- if (!pCurrent)
- return E_POINTER;
-
- EnterCriticalSection(&This->cs);
- if (This->state == State_Running && This->refClock &&
This->start_time >= 0)
- {
- IReferenceClock_GetTime(This->refClock, &time);
- if (time)
- time -= This->start_time;
- }
- if (This->pause_time > 0)
- time += This->pause_time;
- *pCurrent = time;
- LeaveCriticalSection(&This->cs);
-
- TRACE("Time: %u.%03u\n", (DWORD)(*pCurrent / 10000000), (DWORD)((*pCurrent
/ 10000)%1000));
-
- return S_OK;
-}
-
static HRESULT WINAPI MediaSeeking_ConvertTimeFormat(IMediaSeeking *iface, LONGLONG
*pTarget,
const GUID *pTargetFormat, LONGLONG Source, const GUID *pSourceFormat)
{
@@ -2495,11 +2467,6 @@
if ((dwCurrentFlags & 0x7) != AM_SEEKING_AbsolutePositioning &&
(dwCurrentFlags & 0x7) != AM_SEEKING_NoPositioning)
FIXME("Adjust method %x not handled yet!\n", dwCurrentFlags &
0x7);
-
- if ((dwStopFlags & 0x7) == AM_SEEKING_AbsolutePositioning)
- This->stop_position = *pStop;
- else if ((dwStopFlags & 0x7) != AM_SEEKING_NoPositioning)
- FIXME("Stop position not handled yet!\n");
if (state == State_Running && !(dwCurrentFlags & AM_SEEKING_NoFlush))
IMediaControl_Pause(&This->IMediaControl_iface);
@@ -2518,16 +2485,68 @@
return hr;
}
+static HRESULT WINAPI found_getposition(IFilterGraphImpl *This, IMediaSeeking *seek,
DWORD_PTR pargs)
+{
+ struct pos_args *args = (void*)pargs;
+
+ return IMediaSeeking_GetPositions(seek, args->current, args->stop);
+}
+
static HRESULT WINAPI MediaSeeking_GetPositions(IMediaSeeking *iface, LONGLONG
*pCurrent,
LONGLONG *pStop)
{
IFilterGraphImpl *This = impl_from_IMediaSeeking(iface);
+ struct pos_args args;
+ LONGLONG time = 0;
HRESULT hr;
TRACE("(%p/%p)->(%p, %p)\n", This, iface, pCurrent, pStop);
- hr = IMediaSeeking_GetCurrentPosition(iface, pCurrent);
- if (SUCCEEDED(hr))
- hr = IMediaSeeking_GetStopPosition(iface, pStop);
+
+ args.current = pCurrent;
+ args.stop = pStop;
+ EnterCriticalSection(&This->cs);
+ hr = all_renderers_seek(This, found_getposition, (DWORD_PTR)&args);
+ if (This->state == State_Running && This->refClock &&
This->start_time >= 0)
+ {
+ IReferenceClock_GetTime(This->refClock, &time);
+ if (time)
+ time -= This->start_time;
+ }
+ if (This->pause_time > 0)
+ time += This->pause_time;
+ *pCurrent += time;
+ LeaveCriticalSection(&This->cs);
+
+ return hr;
+}
+
+static HRESULT WINAPI MediaSeeking_GetCurrentPosition(IMediaSeeking *iface, LONGLONG
*pCurrent)
+{
+ LONGLONG time;
+ HRESULT hr;
+
+ if (!pCurrent)
+ return E_POINTER;
+
+ hr = MediaSeeking_GetPositions(iface, pCurrent, &time);
+
+ TRACE("Time: %u.%03u\n", (DWORD)(*pCurrent / 10000000), (DWORD)((*pCurrent
/ 10000)%1000));
+
+ return hr;
+}
+
+static HRESULT WINAPI MediaSeeking_GetStopPosition(IMediaSeeking *iface, LONGLONG
*pStop)
+{
+ IFilterGraphImpl *This = impl_from_IMediaSeeking(iface);
+ LONGLONG time;
+ HRESULT hr;
+
+ TRACE("(%p/%p)->(%p)\n", This, iface, pStop);
+
+ if (!pStop)
+ return E_POINTER;
+
+ hr = MediaSeeking_GetPositions(iface, &time, pStop);
return hr;
}
@@ -5641,7 +5660,6 @@
fimpl->nItfCacheEntries = 0;
memcpy(&fimpl->timeformatseek, &TIME_FORMAT_MEDIA_TIME, sizeof(GUID));
fimpl->start_time = fimpl->pause_time = 0;
- fimpl->stop_position = -1;
fimpl->punkFilterMapper2 = NULL;
fimpl->recursioncount = 0;
fimpl->version = 0;
Modified: trunk/reactos/dll/directx/wine/quartz/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/ma…
==============================================================================
--- trunk/reactos/dll/directx/wine/quartz/main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/quartz/main.c [iso-8859-1] Sun Mar 1 22:48:56 2015
@@ -268,11 +268,10 @@
const char * qzdebugstr_guid( const GUID * id )
{
int i;
- char * name = NULL;
-
- for (i=0;InterfaceDesc[i].name && !name;i++) {
+
+ for (i=0; InterfaceDesc[i].name; i++)
if (IsEqualGUID(&InterfaceDesc[i].riid, id)) return InterfaceDesc[i].name;
- }
+
return debugstr_guid(id);
}
Modified: trunk/reactos/dll/directx/wine/quartz/mpegsplit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/mp…
==============================================================================
--- trunk/reactos/dll/directx/wine/quartz/mpegsplit.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/quartz/mpegsplit.c [iso-8859-1] Sun Mar 1 22:48:56
2015
@@ -79,7 +79,6 @@
}
static const WCHAR wszAudioStream[] =
{'A','u','d','i','o',0};
-static const WCHAR wszVideoStream[] =
{'V','i','d','e','o',0};
static const DWORD freqs[10] = { 44100, 48000, 32000, 22050, 24000, 16000, 11025, 12000,
8000, 0 };
@@ -692,8 +691,7 @@
if (rtSampleStop > pin->rtStop)
rtSampleStop =
MEDIATIME_FROM_BYTES(ALIGNUP(BYTES_FROM_MEDIATIME(pin->rtStop), pin->cbAlign));
- hr = IMediaSample_SetTime(sample, &rtSampleStart, &rtSampleStop);
-
+ IMediaSample_SetTime(sample, &rtSampleStart, &rtSampleStop);
IMediaSample_SetPreroll(sample, FALSE);
IMediaSample_SetDiscontinuity(sample, TRUE);
IMediaSample_SetSyncPoint(sample, 1);
Modified: trunk/reactos/dll/directx/wine/quartz/pin.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/pi…
==============================================================================
--- trunk/reactos/dll/directx/wine/quartz/pin.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/quartz/pin.c [iso-8859-1] Sun Mar 1 22:48:56 2015
@@ -66,7 +66,6 @@
hr = IPin_QueryInternalConnections( from, NULL, &amount );
if (hr != E_NOTIMPL && amount)
FIXME("Use QueryInternalConnections!\n");
- hr = S_OK;
pin_info.pFilter = NULL;
hr = IPin_QueryPinInfo( from, &pin_info );
@@ -260,7 +259,7 @@
props.cbAlign = 1;
props.cbPrefix = 0;
- if (SUCCEEDED(hr) && (This->fnQueryAccept(This->pUserData, pmt) !=
S_OK))
+ if (This->fnQueryAccept(This->pUserData, pmt) != S_OK)
hr = VFW_E_TYPE_NOT_ACCEPTED; /* FIXME: shouldn't we just map common
errors onto
* VFW_E_TYPE_NOT_ACCEPTED and pass the value
on otherwise? */
Modified: trunk/reactos/dll/directx/wine/quartz/vmr9.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/vm…
==============================================================================
--- trunk/reactos/dll/directx/wine/quartz/vmr9.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/quartz/vmr9.c [iso-8859-1] Sun Mar 1 22:48:56 2015
@@ -457,14 +457,12 @@
static HRESULT WINAPI VMR9_CompleteConnect(BaseRenderer *This, IPin *pReceivePin)
{
struct quartz_vmr *pVMR9 = (struct quartz_vmr*)This;
- HRESULT hr = S_OK;
+ HRESULT hr;
TRACE("(%p)\n", This);
- if (!pVMR9->mode && SUCCEEDED(hr))
- hr = IVMRFilterConfig9_SetRenderingMode(&pVMR9->IVMRFilterConfig9_iface,
VMR9Mode_Windowed);
-
- if (SUCCEEDED(hr))
+ if (pVMR9->mode ||
+ SUCCEEDED(hr =
IVMRFilterConfig9_SetRenderingMode(&pVMR9->IVMRFilterConfig9_iface,
VMR9Mode_Windowed)))
hr = VMR9_maybe_init(pVMR9, FALSE);
return hr;
Modified: trunk/reactos/dll/directx/wine/quartz/waveparser.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/wa…
==============================================================================
--- trunk/reactos/dll/directx/wine/quartz/waveparser.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/quartz/waveparser.c [iso-8859-1] Sun Mar 1 22:48:56
2015
@@ -101,7 +101,7 @@
if (rtSampleStop > pin->rtStop)
rtSampleStop =
MEDIATIME_FROM_BYTES(ALIGNUP(BYTES_FROM_MEDIATIME(pin->rtStop), pin->cbAlign));
- hr = IMediaSample_SetTime(newsample, &rtSampleStart, &rtSampleStop);
+ IMediaSample_SetTime(newsample, &rtSampleStart, &rtSampleStop);
pin->rtCurrent = pin->rtNext;
pin->rtNext = rtSampleStop;
@@ -274,7 +274,7 @@
amt.cbFormat = chunk.cb;
amt.pbFormat = CoTaskMemAlloc(amt.cbFormat);
amt.pUnk = NULL;
- hr = IAsyncReader_SyncRead(This->pReader, pos, amt.cbFormat, amt.pbFormat);
+ IAsyncReader_SyncRead(This->pReader, pos, amt.cbFormat, amt.pbFormat);
amt.subtype = MEDIATYPE_Audio;
amt.subtype.Data1 = ((WAVEFORMATEX*)amt.pbFormat)->wFormatTag;
@@ -360,7 +360,7 @@
if (rtSampleStop > pin->rtStop)
rtSampleStop =
MEDIATIME_FROM_BYTES(ALIGNUP(BYTES_FROM_MEDIATIME(pin->rtStop), pin->cbAlign));
- hr = IMediaSample_SetTime(sample, &rtSampleStart, &rtSampleStop);
+ IMediaSample_SetTime(sample, &rtSampleStart, &rtSampleStop);
pin->rtCurrent = pin->rtNext;
pin->rtNext = rtSampleStop;
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] Sun Mar 1 22:48:56 2015
@@ -46,7 +46,7 @@
reactos/dll/directx/wine/dxgi # Synced to WineStaging-1.7.37
reactos/dll/directx/wine/msdmo # Synced to WineStaging-1.7.37
reactos/dll/directx/wine/qedit # Synced to WineStaging-1.7.37
-reactos/dll/directx/wine/quartz # Synced to Wine-1.7.27
+reactos/dll/directx/wine/quartz # Synced to WineStaging-1.7.37
reactos/dll/directx/wine/wined3d # Synced to WineStaging-1.7.37
reactos/dll/win32/activeds # Synced to Wine-1.7.27