[QUARTZ] Sync with Wine Staging 1.9.11. CORE-11368

svn path=/trunk/; revision=71764
This commit is contained in:
Amine Khaldi 2016-07-02 15:56:39 +00:00
parent f88ab4534f
commit b9d9c7829d
9 changed files with 37 additions and 59 deletions

View file

@ -36,7 +36,7 @@ static const IBaseFilterVtbl ACMWrapper_Vtbl;
static inline ACMWrapperImpl *impl_from_TransformFilter( TransformFilter *iface )
{
return CONTAINING_RECORD(iface, ACMWrapperImpl, tf.filter);
return CONTAINING_RECORD(iface, ACMWrapperImpl, tf);
}
static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSample)

View file

@ -34,7 +34,7 @@ static const IBaseFilterVtbl AVIDec_Vtbl;
static inline AVIDecImpl *impl_from_TransformFilter( TransformFilter *iface )
{
return CONTAINING_RECORD(iface, AVIDecImpl, tf.filter);
return CONTAINING_RECORD(iface, AVIDecImpl, tf);
}
static HRESULT WINAPI AVIDec_StartStreaming(TransformFilter* pTransformFilter)

View file

@ -387,7 +387,7 @@ static HRESULT WINAPI DSoundRender_DoRenderSample(BaseRenderer *iface, IMediaSam
else if (jitter < 0)
jitter = 0;
q.Type = (jitter > 0 ? Famine : Flood);
q.Proportion = 1.;
q.Proportion = 1000;
q.Late = jitter;
q.TimeStamp = tStart;
IQualityControl_Notify((IQualityControl *)This->renderer.qcimpl, (IBaseFilter*)This, q);

View file

@ -598,6 +598,9 @@ static HRESULT WINAPI FileSource_Load(IFileSourceFilter * iface, LPCOLESTR pszFi
TRACE("(%s, %p)\n", debugstr_w(pszFileName), pmt);
if (!pszFileName)
return E_POINTER;
/* open file */
/* FIXME: check the sharing values that native uses */
hFile = CreateFileW(pszFileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
@ -637,8 +640,8 @@ static HRESULT WINAPI FileSource_Load(IFileSourceFilter * iface, LPCOLESTR pszFi
hr = GetClassMediaFile(pReader, pszFileName, &This->pmt->majortype, &This->pmt->subtype, NULL);
if (FAILED(hr))
{
memcpy(&This->pmt->majortype, &MEDIATYPE_Stream, sizeof(GUID));
memcpy(&This->pmt->subtype, &MEDIASUBTYPE_NULL, sizeof(GUID));
This->pmt->majortype = MEDIATYPE_Stream;
This->pmt->subtype = MEDIASUBTYPE_NULL;
hr = S_OK;
}
}
@ -751,7 +754,7 @@ static inline FileAsyncReader *impl_from_BaseOutputPin(BaseOutputPin *iface)
return CONTAINING_RECORD(iface, FileAsyncReader, pin);
}
static inline BaseOutputPin *impl_BaseOututPin_from_BasePin(BasePin *iface)
static inline BaseOutputPin *impl_BaseOutputPin_from_BasePin(BasePin *iface)
{
return CONTAINING_RECORD(iface, BaseOutputPin, pin);
}
@ -867,7 +870,7 @@ static const IPinVtbl FileAsyncReaderPin_Vtbl =
* doesn't need the IMemInputPin interface on the receiving pin */
static HRESULT WINAPI FileAsyncReaderPin_AttemptConnection(BasePin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt)
{
BaseOutputPin *This = impl_BaseOututPin_from_BasePin(iface);
BaseOutputPin *This = impl_BaseOutputPin_from_BasePin(iface);
HRESULT hr;
TRACE("(%p, %p)\n", pReceivePin, pmt);

View file

@ -1141,7 +1141,8 @@ static HRESULT WINAPI FilterMapper_EnumMatchingFilters(
HRESULT hr;
TRACE("(%p/%p)->(%p, %x, %s, %s, %s, %s, %s, %s, %s) stub!\n",
iface,This,
This,
iface,
ppEnum,
dwMerit,
bInputNeeded ? "true" : "false",

View file

@ -20,8 +20,6 @@
#include "quartz_private.h"
static const IPinVtbl PullPin_Vtbl;
#define ALIGNDOWN(value,boundary) ((value)/(boundary)*(boundary))
#define ALIGNUP(value,boundary) (ALIGNDOWN((value)+(boundary)-1, (boundary)))

View file

@ -164,7 +164,7 @@ static void VideoRenderer_AutoShowWindow(VideoRendererImpl *This)
AdjustWindowRectEx(&This->WindowPos, style, FALSE, style_ex);
TRACE("WindowPos: %d %d %d %d\n", This->WindowPos.left, This->WindowPos.top, This->WindowPos.right, This->WindowPos.bottom);
TRACE("WindowPos: %s\n", wine_dbgstr_rect(&This->WindowPos));
SetWindowPos(This->baseControlWindow.baseWindow.hWnd, NULL,
This->WindowPos.left,
This->WindowPos.top,
@ -222,8 +222,8 @@ static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data,
return E_FAIL;
}
TRACE("Src Rect: %d %d %d %d\n", This->SourceRect.left, This->SourceRect.top, This->SourceRect.right, This->SourceRect.bottom);
TRACE("Dst Rect: %d %d %d %d\n", This->DestRect.left, This->DestRect.top, This->DestRect.right, This->DestRect.bottom);
TRACE("Src Rect: %s\n", wine_dbgstr_rect(&This->SourceRect));
TRACE("Dst Rect: %s\n", wine_dbgstr_rect(&This->DestRect));
StretchDIBits(This->baseControlWindow.baseWindow.hDC, This->DestRect.left, This->DestRect.top, This->DestRect.right -This->DestRect.left,
This->DestRect.bottom - This->DestRect.top, This->SourceRect.left, This->SourceRect.top,
@ -410,9 +410,7 @@ static RECT WINAPI VideoRenderer_GetDefaultRect(BaseWindow *iface)
VideoRendererImpl *This = impl_from_BaseWindow(iface);
static RECT defRect;
defRect.left = defRect.top = 0;
defRect.right = This->VideoWidth;
defRect.bottom = This->VideoHeight;
SetRect(&defRect, 0, 0, This->VideoWidth, This->VideoHeight);
return defRect;
}
@ -576,10 +574,7 @@ static HRESULT WINAPI VideoRenderer_SetDefaultSourceRect(BaseControlVideo* iface
{
VideoRendererImpl *This = impl_from_BaseControlVideo(iface);
This->SourceRect.left = 0;
This->SourceRect.top = 0;
This->SourceRect.right = This->VideoWidth;
This->SourceRect.bottom = This->VideoHeight;
SetRect(&This->SourceRect, 0, 0, This->VideoWidth, This->VideoHeight);
return S_OK;
}
@ -592,10 +587,7 @@ static HRESULT WINAPI VideoRenderer_SetDefaultTargetRect(BaseControlVideo* iface
if (!GetClientRect(This->baseControlWindow.baseWindow.hWnd, &rect))
return E_FAIL;
This->DestRect.left = 0;
This->DestRect.top = 0;
This->DestRect.right = rect.right;
This->DestRect.bottom = rect.bottom;
SetRect(&This->DestRect, 0, 0, rect.right, rect.bottom);
return S_OK;
}

View file

@ -227,8 +227,8 @@ static DWORD VMR9_SendSampleData(struct quartz_vmr *This, VMR9PresentationInfo *
width = bmiHeader->biWidth;
height = bmiHeader->biHeight;
TRACE("Src Rect: %d %d %d %d\n", This->source_rect.left, This->source_rect.top, This->source_rect.right, This->source_rect.bottom);
TRACE("Dst Rect: %d %d %d %d\n", This->target_rect.left, This->target_rect.top, This->target_rect.right, This->target_rect.bottom);
TRACE("Src Rect: %s\n", wine_dbgstr_rect(&This->source_rect));
TRACE("Dst Rect: %s\n", wine_dbgstr_rect(&This->target_rect));
hr = IDirect3DSurface9_LockRect(info->lpSurf, &lock, NULL, D3DLOCK_DISCARD);
if (FAILED(hr))
@ -335,9 +335,9 @@ static HRESULT WINAPI VMR9_CheckMediaType(BaseRenderer *iface, const AM_MEDIA_TY
This->bmiheader = format->bmiHeader;
TRACE("Resolution: %dx%d\n", format->bmiHeader.biWidth, format->bmiHeader.biHeight);
This->source_rect.right = This->VideoWidth = format->bmiHeader.biWidth;
This->source_rect.bottom = This->VideoHeight = format->bmiHeader.biHeight;
This->source_rect.top = This->source_rect.left = 0;
This->VideoWidth = format->bmiHeader.biWidth;
This->VideoHeight = format->bmiHeader.biHeight;
SetRect(&This->source_rect, 0, 0, This->VideoWidth, This->VideoHeight);
}
else if (IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo2))
{
@ -346,9 +346,9 @@ static HRESULT WINAPI VMR9_CheckMediaType(BaseRenderer *iface, const AM_MEDIA_TY
This->bmiheader = format->bmiHeader;
TRACE("Resolution: %dx%d\n", format->bmiHeader.biWidth, format->bmiHeader.biHeight);
This->source_rect.right = This->VideoWidth = format->bmiHeader.biWidth;
This->source_rect.bottom = This->VideoHeight = format->bmiHeader.biHeight;
This->source_rect.top = This->source_rect.left = 0;
This->VideoWidth = format->bmiHeader.biWidth;
This->VideoHeight = format->bmiHeader.biHeight;
SetRect(&This->source_rect, 0, 0, This->VideoWidth, This->VideoHeight);
}
else
{
@ -408,9 +408,7 @@ static HRESULT VMR9_maybe_init(struct quartz_vmr *This, BOOL force)
hr = IVMRSurfaceAllocatorEx9_InitializeDevice(This->allocator, This->cookie, &info, &buffers);
if (SUCCEEDED(hr))
{
This->source_rect.left = This->source_rect.top = 0;
This->source_rect.right = This->bmiheader.biWidth;
This->source_rect.bottom = This->bmiheader.biHeight;
SetRect(&This->source_rect, 0, 0, This->bmiheader.biWidth, This->bmiheader.biHeight);
This->num_surfaces = buffers;
}
@ -526,9 +524,7 @@ static RECT WINAPI VMR9_GetDefaultRect(BaseWindow *This)
struct quartz_vmr* pVMR9 = impl_from_BaseWindow(This);
static RECT defRect;
defRect.left = defRect.top = 0;
defRect.right = pVMR9->VideoWidth;
defRect.bottom = pVMR9->VideoHeight;
SetRect(&defRect, 0, 0, pVMR9->VideoWidth, pVMR9->VideoHeight);
return defRect;
}
@ -670,10 +666,7 @@ static HRESULT WINAPI VMR9_SetDefaultSourceRect(BaseControlVideo* This)
{
struct quartz_vmr* pVMR9 = impl_from_BaseControlVideo(This);
pVMR9->source_rect.left = 0;
pVMR9->source_rect.top = 0;
pVMR9->source_rect.right = pVMR9->VideoWidth;
pVMR9->source_rect.bottom = pVMR9->VideoHeight;
SetRect(&pVMR9->source_rect, 0, 0, pVMR9->VideoWidth, pVMR9->VideoHeight);
return S_OK;
}
@ -686,10 +679,7 @@ static HRESULT WINAPI VMR9_SetDefaultTargetRect(BaseControlVideo* This)
if (!GetClientRect(pVMR9->baseControlWindow.baseWindow.hWnd, &rect))
return E_FAIL;
pVMR9->target_rect.left = 0;
pVMR9->target_rect.top = 0;
pVMR9->target_rect.right = rect.right;
pVMR9->target_rect.bottom = rect.bottom;
SetRect(&pVMR9->target_rect, 0, 0, rect.right, rect.bottom);
return S_OK;
}
@ -1761,8 +1751,7 @@ static HRESULT WINAPI VMR7WindowlessControl_SetVideoPosition(IVMRWindowlessContr
This->target_rect = *dest;
if (This->baseControlWindow.baseWindow.hWnd)
{
FIXME("Output rectangle: starting at %dx%d, up to point %dx%d\n",
dest->left, dest->top, dest->right, dest->bottom);
FIXME("Output rectangle: %s\n", wine_dbgstr_rect(dest));
SetWindowPos(This->baseControlWindow.baseWindow.hWnd, NULL,
dest->left, dest->top, dest->right - dest->left, dest->bottom-dest->top,
SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOOWNERZORDER|SWP_NOREDRAW);
@ -1966,7 +1955,7 @@ static HRESULT WINAPI VMR9WindowlessControl_SetVideoPosition(IVMRWindowlessContr
This->target_rect = *dest;
if (This->baseControlWindow.baseWindow.hWnd)
{
FIXME("Output rectangle: starting at %dx%d, up to point %dx%d\n", dest->left, dest->top, dest->right, dest->bottom);
FIXME("Output rectangle: %s\n", wine_dbgstr_rect(dest));
SetWindowPos(This->baseControlWindow.baseWindow.hWnd, NULL, dest->left, dest->top, dest->right - dest->left,
dest->bottom-dest->top, SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOOWNERZORDER|SWP_NOREDRAW);
}
@ -2584,14 +2573,9 @@ static HRESULT VMR9_ImagePresenter_PresentOffscreenSurface(VMR9DefaultAllocatorP
return hr;
}
target_rect = This->pVMR9->target_rect;
target_rect.right -= target_rect.left;
target_rect.bottom -= target_rect.top;
target_rect.left = target_rect.top = 0;
/* Flip */
target_rect.top = target_rect.bottom;
target_rect.bottom = 0;
/* Move rect to origin and flip it */
SetRect(&target_rect, 0, This->pVMR9->target_rect.bottom - This->pVMR9->target_rect.top,
This->pVMR9->target_rect.right - This->pVMR9->target_rect.left, 0);
hr = IDirect3DDevice9_StretchRect(This->d3d9_dev, surface, &This->pVMR9->source_rect, target, &target_rect, D3DTEXF_LINEAR);
if (FAILED(hr))
@ -2610,7 +2594,7 @@ static HRESULT WINAPI VMR9_ImagePresenter_PresentImage(IVMRImagePresenter9 *ifac
TRACE("(%p/%p/%p)->(...) stub\n", iface, This, This->pVMR9);
GetWindowRect(This->pVMR9->baseControlWindow.baseWindow.hWnd, &output);
TRACE("Output rectangle: starting at %dx%d, up to point %dx%d\n", output.left, output.top, output.right, output.bottom);
TRACE("Output rectangle: %s\n", wine_dbgstr_rect(&output));
/* This might happen if we don't have active focus (eg on a different virtual desktop) */
if (!This->d3d9_dev)

View file

@ -39,7 +39,7 @@ reactos/dll/directx/wine/dsound # Synced to Wine-1.3.29
reactos/dll/directx/wine/dxdiagn # Synced to WineStaging-1.9.4
reactos/dll/directx/wine/msdmo # Synced to WineStaging-1.9.4
reactos/dll/directx/wine/qedit # Synced to WineStaging-1.9.11
reactos/dll/directx/wine/quartz # Synced to WineStaging-1.9.4
reactos/dll/directx/wine/quartz # Synced to WineStaging-1.9.11
reactos/dll/directx/wine/wined3d # Synced to WineStaging-1.9.4
reactos/dll/win32/activeds # Synced to WineStaging-1.9.4