Commit 17450f0b authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

quartz: Use proper method macros.

parent a488e574
...@@ -656,7 +656,7 @@ HRESULT DSoundRender_create(IUnknown * pUnkOuter, LPVOID * ppv) ...@@ -656,7 +656,7 @@ HRESULT DSoundRender_create(IUnknown * pUnkOuter, LPVOID * ppv)
hr = IDirectSound_CreateSoundBuffer(pDSoundRender->dsound, &buf_desc, &buf, NULL); hr = IDirectSound_CreateSoundBuffer(pDSoundRender->dsound, &buf_desc, &buf, NULL);
if (SUCCEEDED(hr)) { if (SUCCEEDED(hr)) {
IDirectSoundBuffer_Play(buf, 0, 0, DSBPLAY_LOOPING); IDirectSoundBuffer_Play(buf, 0, 0, DSBPLAY_LOOPING);
IUnknown_Release(buf); IDirectSoundBuffer_Release(buf);
} }
hr = S_OK; hr = S_OK;
} }
......
...@@ -517,7 +517,7 @@ static HRESULT WINAPI AsyncReader_FindPin(IBaseFilter * iface, LPCWSTR Id, IPin ...@@ -517,7 +517,7 @@ static HRESULT WINAPI AsyncReader_FindPin(IBaseFilter * iface, LPCWSTR Id, IPin
} }
*ppPin = This->pOutputPin; *ppPin = This->pOutputPin;
IUnknown_AddRef(*ppPin); IPin_AddRef(*ppPin);
return S_OK; return S_OK;
} }
......
...@@ -772,13 +772,13 @@ static HRESULT WINAPI FilterGraph2_SetDefaultSyncSource(IFilterGraph2 *iface) ...@@ -772,13 +772,13 @@ static HRESULT WINAPI FilterGraph2_SetDefaultSyncSource(IFilterGraph2 *iface)
{ {
DWORD miscflags; DWORD miscflags;
IAMFilterMiscFlags *flags = NULL; IAMFilterMiscFlags *flags = NULL;
IUnknown_QueryInterface(This->ppFiltersInGraph[i], &IID_IAMFilterMiscFlags, (void**)&flags); IBaseFilter_QueryInterface(This->ppFiltersInGraph[i], &IID_IAMFilterMiscFlags, (void**)&flags);
if (!flags) if (!flags)
continue; continue;
miscflags = IAMFilterMiscFlags_GetMiscFlags(flags); miscflags = IAMFilterMiscFlags_GetMiscFlags(flags);
IUnknown_Release(flags); IAMFilterMiscFlags_Release(flags);
if (miscflags == AM_FILTER_MISC_FLAGS_IS_RENDERER) if (miscflags == AM_FILTER_MISC_FLAGS_IS_RENDERER)
IUnknown_QueryInterface(This->ppFiltersInGraph[i], &IID_IReferenceClock, (void**)&pClock); IBaseFilter_QueryInterface(This->ppFiltersInGraph[i], &IID_IReferenceClock, (void**)&pClock);
if (pClock) if (pClock)
break; break;
} }
...@@ -1039,7 +1039,7 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut, ...@@ -1039,7 +1039,7 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut,
if (FAILED(rc)) if (FAILED(rc))
{ {
TRACE("Filter rejected by IAMGraphBuilderCallback_SelectedFilter\n"); TRACE("Filter rejected by IAMGraphBuilderCallback_SelectedFilter\n");
IUnknown_Release(callback); IAMGraphBuilderCallback_Release(callback);
goto error; goto error;
} }
} }
...@@ -1055,7 +1055,7 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut, ...@@ -1055,7 +1055,7 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut,
{ {
HRESULT rc; HRESULT rc;
rc = IAMGraphBuilderCallback_CreatedFilter(callback, pfilter); rc = IAMGraphBuilderCallback_CreatedFilter(callback, pfilter);
IUnknown_Release(callback); IAMGraphBuilderCallback_Release(callback);
if (FAILED(rc)) if (FAILED(rc))
{ {
IBaseFilter_Release(pfilter); IBaseFilter_Release(pfilter);
...@@ -2200,11 +2200,11 @@ static HRESULT all_renderers_seek(IFilterGraphImpl *This, fnFoundSeek FoundSeek, ...@@ -2200,11 +2200,11 @@ static HRESULT all_renderers_seek(IFilterGraphImpl *This, fnFoundSeek FoundSeek,
IBaseFilter* pfilter = This->ppFiltersInGraph[i]; IBaseFilter* pfilter = This->ppFiltersInGraph[i];
IAMFilterMiscFlags *flags = NULL; IAMFilterMiscFlags *flags = NULL;
ULONG filterflags; ULONG filterflags;
IUnknown_QueryInterface(pfilter, &IID_IAMFilterMiscFlags, (void**)&flags); IBaseFilter_QueryInterface(pfilter, &IID_IAMFilterMiscFlags, (void**)&flags);
if (!flags) if (!flags)
continue; continue;
filterflags = IAMFilterMiscFlags_GetMiscFlags(flags); filterflags = IAMFilterMiscFlags_GetMiscFlags(flags);
IUnknown_Release(flags); IAMFilterMiscFlags_Release(flags);
if (filterflags != AM_FILTER_MISC_FLAGS_IS_RENDERER) if (filterflags != AM_FILTER_MISC_FLAGS_IS_RENDERER)
continue; continue;
......
...@@ -293,7 +293,7 @@ static HRESULT WINAPI VMR9_DoRenderSample(BaseRenderer *iface, IMediaSample * pS ...@@ -293,7 +293,7 @@ static HRESULT WINAPI VMR9_DoRenderSample(BaseRenderer *iface, IMediaSample * pS
info.szAspectRatio.cx = This->bmiheader.biWidth; info.szAspectRatio.cx = This->bmiheader.biWidth;
info.szAspectRatio.cy = This->bmiheader.biHeight; info.szAspectRatio.cy = This->bmiheader.biHeight;
hr = IVMRSurfaceAllocator9_GetSurface(This->allocator, This->cookie, (++This->cur_surface)%This->num_surfaces, 0, &info.lpSurf); hr = IVMRSurfaceAllocatorEx9_GetSurface(This->allocator, This->cookie, (++This->cur_surface)%This->num_surfaces, 0, &info.lpSurf);
if (FAILED(hr)) if (FAILED(hr))
return hr; return hr;
...@@ -794,14 +794,14 @@ static ULONG WINAPI VMR9Inner_Release(IUnknown * iface) ...@@ -794,14 +794,14 @@ static ULONG WINAPI VMR9Inner_Release(IUnknown * iface)
CloseHandle(This->hD3d9); CloseHandle(This->hD3d9);
if (This->allocator) if (This->allocator)
IVMRSurfaceAllocator9_Release(This->allocator); IVMRSurfaceAllocatorEx9_Release(This->allocator);
if (This->presenter) if (This->presenter)
IVMRImagePresenter9_Release(This->presenter); IVMRImagePresenter9_Release(This->presenter);
This->num_surfaces = 0; This->num_surfaces = 0;
if (This->allocator_d3d9_dev) if (This->allocator_d3d9_dev)
{ {
IUnknown_Release(This->allocator_d3d9_dev); IDirect3DDevice9_Release(This->allocator_d3d9_dev);
This->allocator_d3d9_dev = NULL; This->allocator_d3d9_dev = NULL;
} }
...@@ -1146,7 +1146,7 @@ static HRESULT WINAPI VMR9FilterConfig_SetRenderingMode(IVMRFilterConfig9 *iface ...@@ -1146,7 +1146,7 @@ static HRESULT WINAPI VMR9FilterConfig_SetRenderingMode(IVMRFilterConfig9 *iface
} }
if (This->allocator) if (This->allocator)
IVMRSurfaceAllocator9_Release(This->allocator); IVMRSurfaceAllocatorEx9_Release(This->allocator);
if (This->presenter) if (This->presenter)
IVMRImagePresenter9_Release(This->presenter); IVMRImagePresenter9_Release(This->presenter);
...@@ -1166,12 +1166,12 @@ static HRESULT WINAPI VMR9FilterConfig_SetRenderingMode(IVMRFilterConfig9 *iface ...@@ -1166,12 +1166,12 @@ static HRESULT WINAPI VMR9FilterConfig_SetRenderingMode(IVMRFilterConfig9 *iface
if (FAILED(hr)) if (FAILED(hr))
{ {
ERR("Unable to find Presenter interface\n"); ERR("Unable to find Presenter interface\n");
IVMRSurfaceAllocatorEx9_Release(This->presenter); IVMRImagePresenter9_Release(This->presenter);
This->allocator = NULL; This->allocator = NULL;
This->presenter = NULL; This->presenter = NULL;
} }
else else
hr = IVMRSurfaceAllocator9_AdviseNotify(This->allocator, &This->IVMRSurfaceAllocatorNotify9_iface); hr = IVMRSurfaceAllocatorEx9_AdviseNotify(This->allocator, &This->IVMRSurfaceAllocatorNotify9_iface);
break; break;
case VMR9Mode_Renderless: case VMR9Mode_Renderless:
break; break;
...@@ -1449,15 +1449,15 @@ static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AdviseSurfaceAllocator(IVMRSurf ...@@ -1449,15 +1449,15 @@ static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AdviseSurfaceAllocator(IVMRSurf
if (This->presenter) if (This->presenter)
return VFW_E_WRONG_STATE; return VFW_E_WRONG_STATE;
if (FAILED(IUnknown_QueryInterface(alloc, &IID_IVMRImagePresenter9, (void **)&This->presenter))) if (FAILED(IVMRSurfaceAllocator9_QueryInterface(alloc, &IID_IVMRImagePresenter9, (void **)&This->presenter)))
return E_NOINTERFACE; return E_NOINTERFACE;
if (SUCCEEDED(IUnknown_QueryInterface(alloc, &IID_IVMRSurfaceAllocatorEx9, (void **)&This->allocator))) if (SUCCEEDED(IVMRSurfaceAllocator9_QueryInterface(alloc, &IID_IVMRSurfaceAllocatorEx9, (void **)&This->allocator)))
This->allocator_is_ex = 1; This->allocator_is_ex = 1;
else else
{ {
This->allocator = (IVMRSurfaceAllocatorEx9 *)alloc; This->allocator = (IVMRSurfaceAllocatorEx9 *)alloc;
IUnknown_AddRef(alloc); IVMRSurfaceAllocator9_AddRef(alloc);
This->allocator_is_ex = 0; This->allocator_is_ex = 0;
} }
...@@ -1694,7 +1694,7 @@ static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface) ...@@ -1694,7 +1694,7 @@ static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface)
int i; int i;
TRACE("Destroying\n"); TRACE("Destroying\n");
CloseHandle(This->ack); CloseHandle(This->ack);
IUnknown_Release(This->d3d9_ptr); IDirect3D9_Release(This->d3d9_ptr);
TRACE("Number of surfaces: %u\n", This->num_surfaces); TRACE("Number of surfaces: %u\n", This->num_surfaces);
for (i = 0; i < This->num_surfaces; ++i) for (i = 0; i < This->num_surfaces; ++i)
...@@ -1702,7 +1702,7 @@ static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface) ...@@ -1702,7 +1702,7 @@ static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface)
IDirect3DSurface9 *surface = This->d3d9_surfaces[i]; IDirect3DSurface9 *surface = This->d3d9_surfaces[i];
TRACE("Releasing surface %p\n", surface); TRACE("Releasing surface %p\n", surface);
if (surface) if (surface)
IUnknown_Release(surface); IDirect3DSurface9_Release(surface);
} }
CoTaskMemFree(This->d3d9_surfaces); CoTaskMemFree(This->d3d9_surfaces);
...@@ -1710,7 +1710,7 @@ static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface) ...@@ -1710,7 +1710,7 @@ static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface)
This->num_surfaces = 0; This->num_surfaces = 0;
if (This->d3d9_vertex) if (This->d3d9_vertex)
{ {
IUnknown_Release(This->d3d9_vertex); IDirect3DVertexBuffer9_Release(This->d3d9_vertex);
This->d3d9_vertex = NULL; This->d3d9_vertex = NULL;
} }
CoTaskMemFree(This); CoTaskMemFree(This);
...@@ -2118,7 +2118,7 @@ static HRESULT VMR9_SurfaceAllocator_UpdateDeviceReset(VMR9DefaultAllocatorPrese ...@@ -2118,7 +2118,7 @@ static HRESULT VMR9_SurfaceAllocator_UpdateDeviceReset(VMR9DefaultAllocatorPrese
IDirect3DSurface9 *surface = This->d3d9_surfaces[i]; IDirect3DSurface9 *surface = This->d3d9_surfaces[i];
TRACE("Releasing surface %p\n", surface); TRACE("Releasing surface %p\n", surface);
if (surface) if (surface)
IUnknown_Release(surface); IDirect3DSurface9_Release(surface);
} }
ZeroMemory(This->d3d9_surfaces, sizeof(IDirect3DSurface9 *) * This->num_surfaces); ZeroMemory(This->d3d9_surfaces, sizeof(IDirect3DSurface9 *) * This->num_surfaces);
...@@ -2215,7 +2215,7 @@ static HRESULT WINAPI VMR9_SurfaceAllocator_GetSurface(IVMRSurfaceAllocatorEx9 * ...@@ -2215,7 +2215,7 @@ static HRESULT WINAPI VMR9_SurfaceAllocator_GetSurface(IVMRSurfaceAllocatorEx9 *
return E_FAIL; return E_FAIL;
} }
*surface = This->d3d9_surfaces[surfaceindex]; *surface = This->d3d9_surfaces[surfaceindex];
IUnknown_AddRef(*surface); IDirect3DSurface9_AddRef(*surface);
return S_OK; return S_OK;
} }
...@@ -2283,7 +2283,7 @@ static HRESULT VMR9DefaultAllocatorPresenterImpl_create(VMR9Impl *parent, LPVOID ...@@ -2283,7 +2283,7 @@ static HRESULT VMR9DefaultAllocatorPresenterImpl_create(VMR9Impl *parent, LPVOID
if (hr == D3DERR_NOTAVAILABLE) if (hr == D3DERR_NOTAVAILABLE)
{ {
ERR("Format not supported\n"); ERR("Format not supported\n");
IUnknown_Release(This->d3d9_ptr); IDirect3D9_Release(This->d3d9_ptr);
CoTaskMemFree(This); CoTaskMemFree(This);
return VFW_E_DDRAW_CAPS_NOT_SUITABLE; return VFW_E_DDRAW_CAPS_NOT_SUITABLE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment