Nikolay Sivov : quartz: Use proper method macros.

Alexandre Julliard julliard at winehq.org
Wed Aug 15 14:08:32 CDT 2012


Module: wine
Branch: master
Commit: 17450f0be05fc331ed026d61f7ea9678a1e356c3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=17450f0be05fc331ed026d61f7ea9678a1e356c3

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Wed Aug 15 08:24:18 2012 +0400

quartz: Use proper method macros.

---

 dlls/quartz/dsoundrender.c |    2 +-
 dlls/quartz/filesource.c   |    2 +-
 dlls/quartz/filtergraph.c  |   14 +++++++-------
 dlls/quartz/vmr9.c         |   30 +++++++++++++++---------------
 4 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c
index 0b5463e..0a498b0 100644
--- a/dlls/quartz/dsoundrender.c
+++ b/dlls/quartz/dsoundrender.c
@@ -656,7 +656,7 @@ HRESULT DSoundRender_create(IUnknown * pUnkOuter, LPVOID * ppv)
             hr = IDirectSound_CreateSoundBuffer(pDSoundRender->dsound, &buf_desc, &buf, NULL);
             if (SUCCEEDED(hr)) {
                 IDirectSoundBuffer_Play(buf, 0, 0, DSBPLAY_LOOPING);
-                IUnknown_Release(buf);
+                IDirectSoundBuffer_Release(buf);
             }
             hr = S_OK;
         }
diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c
index 375ce04..e5a5d3c 100644
--- a/dlls/quartz/filesource.c
+++ b/dlls/quartz/filesource.c
@@ -517,7 +517,7 @@ static HRESULT WINAPI AsyncReader_FindPin(IBaseFilter * iface, LPCWSTR Id, IPin
     }
 
     *ppPin = This->pOutputPin;
-    IUnknown_AddRef(*ppPin);
+    IPin_AddRef(*ppPin);
     return S_OK;
 }
 
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index 6b0085d..1cc1df9 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -772,13 +772,13 @@ static HRESULT WINAPI FilterGraph2_SetDefaultSyncSource(IFilterGraph2 *iface)
     {
         DWORD miscflags;
         IAMFilterMiscFlags *flags = NULL;
-        IUnknown_QueryInterface(This->ppFiltersInGraph[i], &IID_IAMFilterMiscFlags, (void**)&flags);
+        IBaseFilter_QueryInterface(This->ppFiltersInGraph[i], &IID_IAMFilterMiscFlags, (void**)&flags);
         if (!flags)
             continue;
         miscflags = IAMFilterMiscFlags_GetMiscFlags(flags);
-        IUnknown_Release(flags);
+        IAMFilterMiscFlags_Release(flags);
         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)
             break;
     }
@@ -1039,7 +1039,7 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut,
                 if (FAILED(rc))
                 {
                     TRACE("Filter rejected by IAMGraphBuilderCallback_SelectedFilter\n");
-                    IUnknown_Release(callback);
+                    IAMGraphBuilderCallback_Release(callback);
                     goto error;
                 }
             }
@@ -1055,7 +1055,7 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut,
         {
             HRESULT rc;
             rc = IAMGraphBuilderCallback_CreatedFilter(callback, pfilter);
-            IUnknown_Release(callback);
+            IAMGraphBuilderCallback_Release(callback);
             if (FAILED(rc))
             {
                 IBaseFilter_Release(pfilter);
@@ -2200,11 +2200,11 @@ static HRESULT all_renderers_seek(IFilterGraphImpl *This, fnFoundSeek FoundSeek,
         IBaseFilter* pfilter = This->ppFiltersInGraph[i];
         IAMFilterMiscFlags *flags = NULL;
         ULONG filterflags;
-        IUnknown_QueryInterface(pfilter, &IID_IAMFilterMiscFlags, (void**)&flags);
+        IBaseFilter_QueryInterface(pfilter, &IID_IAMFilterMiscFlags, (void**)&flags);
         if (!flags)
             continue;
         filterflags = IAMFilterMiscFlags_GetMiscFlags(flags);
-        IUnknown_Release(flags);
+        IAMFilterMiscFlags_Release(flags);
         if (filterflags != AM_FILTER_MISC_FLAGS_IS_RENDERER)
             continue;
 
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c
index f197878..847b460 100644
--- a/dlls/quartz/vmr9.c
+++ b/dlls/quartz/vmr9.c
@@ -293,7 +293,7 @@ static HRESULT WINAPI VMR9_DoRenderSample(BaseRenderer *iface, IMediaSample * pS
     info.szAspectRatio.cx = This->bmiheader.biWidth;
     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))
         return hr;
@@ -794,14 +794,14 @@ static ULONG WINAPI VMR9Inner_Release(IUnknown * iface)
         CloseHandle(This->hD3d9);
 
         if (This->allocator)
-            IVMRSurfaceAllocator9_Release(This->allocator);
+            IVMRSurfaceAllocatorEx9_Release(This->allocator);
         if (This->presenter)
             IVMRImagePresenter9_Release(This->presenter);
 
         This->num_surfaces = 0;
         if (This->allocator_d3d9_dev)
         {
-            IUnknown_Release(This->allocator_d3d9_dev);
+            IDirect3DDevice9_Release(This->allocator_d3d9_dev);
             This->allocator_d3d9_dev = NULL;
         }
 
@@ -1146,7 +1146,7 @@ static HRESULT WINAPI VMR9FilterConfig_SetRenderingMode(IVMRFilterConfig9 *iface
     }
 
     if (This->allocator)
-        IVMRSurfaceAllocator9_Release(This->allocator);
+        IVMRSurfaceAllocatorEx9_Release(This->allocator);
     if (This->presenter)
         IVMRImagePresenter9_Release(This->presenter);
 
@@ -1166,12 +1166,12 @@ static HRESULT WINAPI VMR9FilterConfig_SetRenderingMode(IVMRFilterConfig9 *iface
         if (FAILED(hr))
         {
             ERR("Unable to find Presenter interface\n");
-            IVMRSurfaceAllocatorEx9_Release(This->presenter);
+            IVMRImagePresenter9_Release(This->presenter);
             This->allocator = NULL;
             This->presenter = NULL;
         }
         else
-            hr = IVMRSurfaceAllocator9_AdviseNotify(This->allocator, &This->IVMRSurfaceAllocatorNotify9_iface);
+            hr = IVMRSurfaceAllocatorEx9_AdviseNotify(This->allocator, &This->IVMRSurfaceAllocatorNotify9_iface);
         break;
     case VMR9Mode_Renderless:
         break;
@@ -1449,15 +1449,15 @@ static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AdviseSurfaceAllocator(IVMRSurf
     if (This->presenter)
         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;
 
-    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;
     else
     {
         This->allocator = (IVMRSurfaceAllocatorEx9 *)alloc;
-        IUnknown_AddRef(alloc);
+        IVMRSurfaceAllocator9_AddRef(alloc);
         This->allocator_is_ex = 0;
     }
 
@@ -1694,7 +1694,7 @@ static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface)
         int i;
         TRACE("Destroying\n");
         CloseHandle(This->ack);
-        IUnknown_Release(This->d3d9_ptr);
+        IDirect3D9_Release(This->d3d9_ptr);
 
         TRACE("Number of surfaces: %u\n", This->num_surfaces);
         for (i = 0; i < This->num_surfaces; ++i)
@@ -1702,7 +1702,7 @@ static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface)
             IDirect3DSurface9 *surface = This->d3d9_surfaces[i];
             TRACE("Releasing surface %p\n", surface);
             if (surface)
-                IUnknown_Release(surface);
+                IDirect3DSurface9_Release(surface);
         }
 
         CoTaskMemFree(This->d3d9_surfaces);
@@ -1710,7 +1710,7 @@ static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface)
         This->num_surfaces = 0;
         if (This->d3d9_vertex)
         {
-            IUnknown_Release(This->d3d9_vertex);
+            IDirect3DVertexBuffer9_Release(This->d3d9_vertex);
             This->d3d9_vertex = NULL;
         }
         CoTaskMemFree(This);
@@ -2118,7 +2118,7 @@ static HRESULT VMR9_SurfaceAllocator_UpdateDeviceReset(VMR9DefaultAllocatorPrese
         IDirect3DSurface9 *surface = This->d3d9_surfaces[i];
         TRACE("Releasing surface %p\n", surface);
         if (surface)
-            IUnknown_Release(surface);
+            IDirect3DSurface9_Release(surface);
     }
     ZeroMemory(This->d3d9_surfaces, sizeof(IDirect3DSurface9 *) * This->num_surfaces);
 
@@ -2215,7 +2215,7 @@ static HRESULT WINAPI VMR9_SurfaceAllocator_GetSurface(IVMRSurfaceAllocatorEx9 *
         return E_FAIL;
     }
     *surface = This->d3d9_surfaces[surfaceindex];
-    IUnknown_AddRef(*surface);
+    IDirect3DSurface9_AddRef(*surface);
 
     return S_OK;
 }
@@ -2283,7 +2283,7 @@ static HRESULT VMR9DefaultAllocatorPresenterImpl_create(VMR9Impl *parent, LPVOID
     if (hr == D3DERR_NOTAVAILABLE)
     {
         ERR("Format not supported\n");
-        IUnknown_Release(This->d3d9_ptr);
+        IDirect3D9_Release(This->d3d9_ptr);
         CoTaskMemFree(This);
         return VFW_E_DDRAW_CAPS_NOT_SUITABLE;
     }




More information about the wine-cvs mailing list