mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 17:10:22 +00:00
[QUARTZ] Sync with Wine Staging 1.7.37. CORE-9246
svn path=/trunk/; revision=66534
This commit is contained in:
parent
338231b612
commit
440b3fe282
11 changed files with 90 additions and 90 deletions
|
@ -39,11 +39,6 @@ static inline ACMWrapperImpl *impl_from_TransformFilter( TransformFilter *iface
|
|||
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);
|
||||
|
|
|
@ -32,11 +32,6 @@ typedef struct AVIDecImpl
|
|||
|
||||
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);
|
||||
|
|
|
@ -243,8 +243,7 @@ static HRESULT AVISplitter_next_request(AVISplitterImpl *This, DWORD streamnumbe
|
|||
|
||||
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 @@ static HRESULT AVISplitter_Receive(AVISplitterImpl *This, IMediaSample *sample,
|
|||
}
|
||||
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 @@ static HRESULT AVISplitter_InputPin_PreConnect(IPin * iface, IPin * pConnectPin,
|
|||
indexes = 0;
|
||||
}
|
||||
}
|
||||
else if (!indexes && pAviSplit->oldindex)
|
||||
else if (pAviSplit->oldindex)
|
||||
indexes = pAviSplit->Parser.cStreams;
|
||||
|
||||
if (!indexes && pAviSplit->AviHeader.dwFlags & AVIF_MUSTUSEINDEX)
|
||||
|
|
|
@ -28,7 +28,6 @@ static const REFERENCE_TIME DSoundRenderer_Max_Fill = 150 * 10000;
|
|||
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 LONG cookie_counter = 1;
|
|||
|
||||
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);
|
||||
|
|
|
@ -180,7 +180,6 @@ typedef struct _IFilterGraphImpl {
|
|||
GUID timeformatseek;
|
||||
REFERENCE_TIME start_time;
|
||||
REFERENCE_TIME pause_time;
|
||||
LONGLONG stop_position;
|
||||
LONG recursioncount;
|
||||
IUnknown *pSite;
|
||||
LONG version;
|
||||
|
@ -1716,8 +1715,27 @@ static HRESULT WINAPI FilterGraph2_AddSourceFilterForMoniker(IFilterGraph2 *ifac
|
|||
IMoniker *pMoniker, IBindCtx *pCtx, LPCWSTR lpcwstrFilterName, IBaseFilter **ppFilter)
|
||||
{
|
||||
IFilterGraphImpl *This = impl_from_IFilterGraph2(iface);
|
||||
HRESULT hr;
|
||||
IBaseFilter* pfilter;
|
||||
|
||||
TRACE("(%p/%p)->(%p %p %s %p): stub !!!\n", This, iface, pMoniker, pCtx, debugstr_w(lpcwstrFilterName), ppFilter);
|
||||
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 @@ static HRESULT WINAPI MediaSeeking_GetDuration(IMediaSeeking *iface, LONGLONG *p
|
|||
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)
|
||||
{
|
||||
|
@ -2496,11 +2468,6 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG *
|
|||
(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);
|
||||
args.current = pCurrent;
|
||||
|
@ -2518,16 +2485,68 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG *
|
|||
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 @@ HRESULT FilterGraph_create(IUnknown *pUnkOuter, LPVOID *ppObj)
|
|||
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;
|
||||
|
|
|
@ -268,11 +268,10 @@ HRESULT __RPC_STUB ICaptureGraphBuilder2_FindInterface_Stub( ICaptureGraphBuilde
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,6 @@ static int MPEGSplitter_head_check(const BYTE *header)
|
|||
}
|
||||
|
||||
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 @@ static HRESULT MPEGSplitter_first_request(LPVOID iface)
|
|||
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);
|
||||
|
|
|
@ -66,7 +66,6 @@ static HRESULT SendFurther( IPin *from, SendPinFunc fnMiddle, LPVOID arg, SendPi
|
|||
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 @@ HRESULT WINAPI PullPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const
|
|||
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? */
|
||||
|
||||
|
|
|
@ -457,14 +457,12 @@ static HRESULT WINAPI VMR9_ShouldDrawSampleNow(BaseRenderer *This, IMediaSample
|
|||
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;
|
||||
|
|
|
@ -101,7 +101,7 @@ static HRESULT WAVEParser_Sample(LPVOID iface, IMediaSample * pSample, DWORD_PTR
|
|||
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 @@ static HRESULT WAVEParser_InputPin_PreConnect(IPin * iface, IPin * pConnectPin,
|
|||
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 @@ static HRESULT WAVEParser_first_request(LPVOID iface)
|
|||
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;
|
||||
|
|
|
@ -46,7 +46,7 @@ reactos/dll/directx/wine/dxdiagn # Synced to Wine-1.7.27
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue