[PATCH 4/4] avifil32: Reorder some code to avoid forward declarations
Michael Stefaniuc
mstefani at redhat.de
Mon Dec 27 16:26:23 CST 2010
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;
+}
+
/***********************************************************************/
--
1.7.3.4
More information about the wine-patches
mailing list