Michael Stefaniuc : avifil32: Reorder some code to avoid forward declarations for the IGetFrameVtbl methods .

Alexandre Julliard julliard at winehq.org
Tue Dec 28 10:48:19 CST 2010


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

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Mon Dec 27 23:26:23 2010 +0100

avifil32: Reorder some code to avoid forward declarations for the IGetFrameVtbl methods.

---

 dlls/avifil32/getframe.c |   73 +++++++++++++++++++---------------------------
 1 files changed, 30 insertions(+), 43 deletions(-)

diff --git a/dlls/avifil32/getframe.c b/dlls/avifil32/getframe.c
index 6f3e6ba..c24009c 100644
--- a/dlls/avifil32/getframe.c
+++ b/dlls/avifil32/getframe.c
@@ -37,29 +37,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(avifile);
 
 /***********************************************************************/
 
-static HRESULT WINAPI IGetFrame_fnQueryInterface(IGetFrame *iface,
-						 REFIID refiid, LPVOID *obj);
-static ULONG   WINAPI IGetFrame_fnAddRef(IGetFrame *iface);
-static ULONG   WINAPI IGetFrame_fnRelease(IGetFrame *iface);
-static LPVOID  WINAPI IGetFrame_fnGetFrame(IGetFrame *iface, LONG lPos);
-static HRESULT WINAPI IGetFrame_fnBegin(IGetFrame *iface, LONG lStart,
-					LONG lEnd, LONG lRate);
-static HRESULT WINAPI IGetFrame_fnEnd(IGetFrame *iface);
-static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface,
-					    LPBITMAPINFOHEADER lpbi,
-					    LPVOID lpBits, INT x, INT y,
-					    INT dx, INT dy);
-
-static const struct IGetFrameVtbl igetframeVtbl = {
-  IGetFrame_fnQueryInterface,
-  IGetFrame_fnAddRef,
-  IGetFrame_fnRelease,
-  IGetFrame_fnGetFrame,
-  IGetFrame_fnBegin,
-  IGetFrame_fnEnd,
-  IGetFrame_fnSetFormat
-};
-
 typedef struct _IGetFrameImpl {
   /* IUnknown stuff */
   IGetFrame          IGetFrame_iface;
@@ -115,26 +92,6 @@ static void AVIFILE_CloseCompressor(IGetFrameImpl *This)
   }
 }
 
-PGETFRAME AVIFILE_CreateGetFrame(PAVISTREAM pStream)
-{
-  IGetFrameImpl *pg;
-
-  /* check parameter */
-  if (pStream == NULL)
-    return NULL;
-
-  pg = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IGetFrameImpl));
-  if (pg != NULL) {
-    pg->IGetFrame_iface.lpVtbl = &igetframeVtbl;
-    pg->ref           = 1;
-    pg->lCurrentFrame = -1;
-    pg->pStream       = pStream;
-    IAVIStream_AddRef(pStream);
-  }
-
-  return (PGETFRAME)pg;
-}
-
 static HRESULT WINAPI IGetFrame_fnQueryInterface(IGetFrame *iface,
 						 REFIID refiid, LPVOID *obj)
 {
@@ -521,4 +478,34 @@ static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface,
   }
 }
 
+static const struct IGetFrameVtbl igetframeVtbl = {
+  IGetFrame_fnQueryInterface,
+  IGetFrame_fnAddRef,
+  IGetFrame_fnRelease,
+  IGetFrame_fnGetFrame,
+  IGetFrame_fnBegin,
+  IGetFrame_fnEnd,
+  IGetFrame_fnSetFormat
+};
+
+PGETFRAME AVIFILE_CreateGetFrame(PAVISTREAM pStream)
+{
+  IGetFrameImpl *pg;
+
+  /* check parameter */
+  if (pStream == NULL)
+    return NULL;
+
+  pg = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IGetFrameImpl));
+  if (pg != NULL) {
+    pg->IGetFrame_iface.lpVtbl = &igetframeVtbl;
+    pg->ref           = 1;
+    pg->lCurrentFrame = -1;
+    pg->pStream       = pStream;
+    IAVIStream_AddRef(pStream);
+  }
+
+  return (PGETFRAME)pg;
+}
+
 /***********************************************************************/




More information about the wine-cvs mailing list