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

This commit is contained in:
Michael Stefaniuc 2010-12-27 23:26:23 +01:00 committed by Alexandre Julliard
parent 157480df1a
commit 6994317b05
1 changed files with 30 additions and 43 deletions

View File

@ -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;
}
/***********************************************************************/