diff --git a/Makefile.in b/Makefile.in index 989ec85994d..2ea45622449 100644 --- a/Makefile.in +++ b/Makefile.in @@ -29,6 +29,7 @@ LIBSUBDIRS = \ controls \ console \ dlls/advapi32 \ + dlls/avifil32 \ dlls/comctl32 \ dlls/commdlg \ dlls/imagehlp \ @@ -101,6 +102,7 @@ LIBOBJS = \ controls/controls.o \ console/console.o \ dlls/advapi32/advapi32.o \ + dlls/avifil32/avifil32.o \ dlls/comctl32/comctl32.o \ dlls/commdlg/commdlg.o \ dlls/imagehlp/imagehlp.o \ diff --git a/configure b/configure index 799cea68977..d21293d8c47 100755 --- a/configure +++ b/configure @@ -4597,6 +4597,7 @@ controls/Makefile debugger/Makefile dlls/Makefile dlls/advapi32/Makefile +dlls/avifil32/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/imagehlp/Makefile @@ -4758,6 +4759,7 @@ controls/Makefile debugger/Makefile dlls/Makefile dlls/advapi32/Makefile +dlls/avifil32/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/imagehlp/Makefile diff --git a/configure.in b/configure.in index e4150590e93..242d48335ef 100644 --- a/configure.in +++ b/configure.in @@ -622,6 +622,7 @@ controls/Makefile debugger/Makefile dlls/Makefile dlls/advapi32/Makefile +dlls/avifil32/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/imagehlp/Makefile diff --git a/dlls/Makefile.in b/dlls/Makefile.in index 66d67ce864a..dff63430d85 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -1,5 +1,6 @@ SUBDIRS = \ advapi32 \ + avifil32 \ comctl32 \ commdlg \ imagehlp \ diff --git a/dlls/avifil32/.cvsignore b/dlls/avifil32/.cvsignore new file mode 100644 index 00000000000..f3c7a7c5da6 --- /dev/null +++ b/dlls/avifil32/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/dlls/avifil32/Makefile.in b/dlls/avifil32/Makefile.in new file mode 100644 index 00000000000..77a6e3c8372 --- /dev/null +++ b/dlls/avifil32/Makefile.in @@ -0,0 +1,16 @@ +DEFS = @DLLFLAGS@ -D__WINE__ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = avifil32 + +C_SRCS = \ + avifile.c + +all: $(MODULE).o + +@MAKE_RULES@ + +### Dependencies: + diff --git a/dlls/avifil32/avifile.c b/dlls/avifil32/avifile.c new file mode 100644 index 00000000000..7b2e9cce332 --- /dev/null +++ b/dlls/avifil32/avifile.c @@ -0,0 +1,505 @@ +/* + * Copyright 1999 Marcus Meissner + */ +#include +#include +#include + +#include "vfw.h" +#include "winbase.h" +#include "wine/winestring.h" +#include "driver.h" +#include "mmsystem.h" +#include "winerror.h" +#include "debugstr.h" +#include "debug.h" + +typedef struct IAVIStreamImpl { + /* IUnknown stuff */ + ICOM_VTABLE(IAVIStream)* lpvtbl; + DWORD ref; + /* IAVIStream stuff */ + LPVOID lpInputFormat; + DWORD inputformatsize; + BOOL iscompressing; + DWORD curframe; + + /* Compressor stuff */ + HIC hic; + LPVOID lpCompressFormat; + ICINFO icinfo; + DWORD compbufsize; + LPVOID compbuffer; + + DWORD decompbufsize; + LPVOID decompbuffer; + LPVOID decompformat; + AVICOMPRESSOPTIONS aco; + + LPVOID lpPrev; /* pointer to decompressed frame later */ + LPVOID lpPrevFormat; /* pointer to decompressed info later */ +} IAVIStreamImpl; + +void WINAPI +AVIFileInit(void) { + FIXME(avifile,"(),stub!\n"); +} + +typedef struct IAVIFileImpl { + /* IUnknown stuff */ + ICOM_VTABLE(IAVIFile)* lpvtbl; + DWORD ref; + /* IAVIFile stuff... */ +} IAVIFileImpl; + +struct ICOM_VTABLE(IAVIStream) iavist; + +static HRESULT WINAPI IAVIFile_fnQueryInterface(IAVIFile* iface,REFIID refiid,LPVOID *obj) { + ICOM_THIS(IAVIFileImpl,iface); + char xrefiid[50]; + + WINE_StringFromCLSID((LPCLSID)refiid,xrefiid); + TRACE(relay,"(%p)->QueryInterface(%s,%p)\n",This,xrefiid,obj); + if ( !memcmp(&IID_IUnknown,refiid,sizeof(IID_IUnknown)) || + !memcmp(&IID_IAVIFile,refiid,sizeof(IID_IAVIFile)) + ) { + *obj = iface; + return S_OK; + } + return OLE_E_ENUM_NOMORE; +} + +static ULONG WINAPI IAVIFile_fnAddRef(IAVIFile* iface) { + ICOM_THIS(IAVIFileImpl,iface); + + FIXME(relay,"(%p)->AddRef()\n",iface); + return ++(This->ref); +} + +static ULONG WINAPI IAVIFile_fnRelease(IAVIFile* iface) { + ICOM_THIS(IAVIFileImpl,iface); + + FIXME(relay,"(%p)->Release()\n",iface); + if (!--(This->ref)) { + HeapFree(GetProcessHeap(),0,iface); + return 0; + } + return This->ref; +} + +static HRESULT WINAPI IAVIFile_fnInfo(IAVIFile*iface,AVIFILEINFOW*afi,LONG size) { + FIXME(avifile,"(%p)->Info(%p,%ld)\n",iface,afi,size); + + /* FIXME: fill out struct? */ + return E_FAIL; +} + +static HRESULT WINAPI IAVIFile_fnGetStream(IAVIFile*iface,PAVISTREAM*avis,DWORD fccType,LONG lParam) { + FIXME(avifile,"(%p)->GetStream(%p,0x%08lx,%ld)\n",iface,avis,fccType,lParam); + /* FIXME: create interface etc. */ + return E_FAIL; +} + +static HRESULT WINAPI IAVIFile_fnCreateStream(IAVIFile*iface,PAVISTREAM*avis,AVISTREAMINFOW*asi) { + ICOM_THIS(IAVIStreamImpl,iface); + char fcc[5]; + IAVIStreamImpl *istream; + + FIXME(avifile,"(%p,%p,%p)\n",This,avis,asi); + istream = (IAVIStreamImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IAVIStreamImpl)); + istream->ref = 1; + istream->lpvtbl = &iavist; + fcc[4]='\0'; + memcpy(fcc,(char*)&(asi->fccType),4); + FIXME(avifile,"\tfccType '%s'\n",fcc); + memcpy(fcc,(char*)&(asi->fccHandler),4); + FIXME(avifile,"\tfccHandler '%s'\n",fcc); + FIXME(avifile,"\tdwFlags 0x%08lx\n",asi->dwFlags); + FIXME(avifile,"\tdwCaps 0x%08lx\n",asi->dwCaps); + FIXME(avifile,"\tname '%s'\n",debugstr_w(asi->szName)); + + istream->curframe = 0; + *avis = (PAVISTREAM)istream; + return S_OK; +} + +static HRESULT WINAPI IAVIFile_fnWriteData(IAVIFile*iface,DWORD ckid,LPVOID lpData,LONG size) { + FIXME(avifile,"(%p)->WriteData(0x%08lx,%p,%ld)\n",iface,ckid,lpData,size); + /* FIXME: write data to file */ + return E_FAIL; +} + +static HRESULT WINAPI IAVIFile_fnReadData(IAVIFile*iface,DWORD ckid,LPVOID lpData,LONG *size) { + FIXME(avifile,"(%p)->ReadData(0x%08lx,%p,%p)\n",iface,ckid,lpData,size); + /* FIXME: read at most size bytes from file */ + return E_FAIL; +} + +static HRESULT WINAPI IAVIFile_fnEndRecord(IAVIFile*iface) { + FIXME(avifile,"(%p)->EndRecord()\n",iface); + /* FIXME: end record? */ + return E_FAIL; +} + +static HRESULT WINAPI IAVIFile_fnDeleteStream(IAVIFile*iface,DWORD fccType,LONG lParam) { + FIXME(avifile,"(%p)->DeleteStream(0x%08lx,%ld)\n",iface,fccType,lParam); + /* FIXME: delete stream? */ + return E_FAIL; +} + +struct ICOM_VTABLE(IAVIFile) iavift = { + IAVIFile_fnQueryInterface, + IAVIFile_fnAddRef, + IAVIFile_fnRelease, + IAVIFile_fnInfo, + IAVIFile_fnGetStream, + IAVIFile_fnCreateStream, + IAVIFile_fnWriteData, + IAVIFile_fnReadData, + IAVIFile_fnEndRecord, + IAVIFile_fnDeleteStream +}; + +HRESULT WINAPI AVIFileOpenA( + PAVIFILE * ppfile,LPCSTR szFile,UINT uMode,LPCLSID lpHandler +) { + char buf[80]; + IAVIFileImpl *iavi; + + + if (HIWORD(lpHandler)) + WINE_StringFromCLSID(lpHandler,buf); + else + sprintf(buf,"",(DWORD)lpHandler); + + FIXME(avifile,"(%p,%s,0x%08lx,%s),stub!\n",ppfile,szFile,(DWORD)uMode,buf); + iavi = (IAVIFileImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IAVIFileImpl)); + iavi->ref = 1; + iavi->lpvtbl = &iavift; + *ppfile = (LPVOID)iavi; + return S_OK; +} + +static HRESULT WINAPI IAVIStream_fnQueryInterface(IAVIStream*iface,REFIID refiid,LPVOID *obj) { + ICOM_THIS(IAVIStreamImpl,iface); + char xrefiid[50]; + + WINE_StringFromCLSID((LPCLSID)refiid,xrefiid); + TRACE(relay,"(%p)->QueryInterface(%s,%p)\n",This,xrefiid,obj); + if ( !memcmp(&IID_IUnknown,refiid,sizeof(IID_IUnknown)) || + !memcmp(&IID_IAVIStream,refiid,sizeof(IID_IAVIStream)) + ) { + *obj = This; + return S_OK; + } + /* can return IGetFrame interface too */ + return OLE_E_ENUM_NOMORE; +} + +static ULONG WINAPI IAVIStream_fnAddRef(IAVIStream*iface) { + ICOM_THIS(IAVIStreamImpl,iface); + + FIXME(relay,"(%p)->AddRef()\n",iface); + return ++(This->ref); +} + +static ULONG WINAPI IAVIStream_fnRelease(IAVIStream* iface) { + ICOM_THIS(IAVIStreamImpl,iface); + + FIXME(relay,"(%p)->Release()\n",iface); + if (!--(This->ref)) { + HeapFree(GetProcessHeap(),0,This); + return 0; + } + return This->ref; +} + +HRESULT WINAPI IAVIStream_fnCreate(IAVIStream*iface,LPARAM lParam1,LPARAM lParam2) { + FIXME(avifile,"(%p)->Create(0x%08lx,0x%08lx)\n",iface,lParam1,lParam2); + return E_FAIL; +} + +HRESULT WINAPI IAVIStream_fnInfo(IAVIStream*iface,AVISTREAMINFOW *psi,LONG size) { + FIXME(avifile,"(%p)->Info(%p,%ld)\n",iface,psi,size); + return E_FAIL; +} + +LONG WINAPI IAVIStream_fnFindSample(IAVIStream*iface,LONG pos,LONG flags) { + FIXME(avifile,"(%p)->FindSample(%ld,0x%08lx)\n",iface,pos,flags); + return E_FAIL; +} + +HRESULT WINAPI IAVIStream_fnReadFormat(IAVIStream*iface,LONG pos,LPVOID format,LONG *formatsize) { + FIXME(avifile,"(%p)->ReadFormat(%ld,%p,%p)\n",iface,pos,format,formatsize); + return E_FAIL; +} + +/***************************************************************************** + * [IAVIStream::SetFormat] + */ +HRESULT WINAPI IAVIStream_fnSetFormat(IAVIStream*iface,LONG pos,LPVOID format,LONG formatsize) { + IAVIStreamImpl *as = (IAVIStreamImpl*)iface; + + FIXME(avifile,"(%p)->SetFormat(%ld,%p,%ld)\n",iface,pos,format,formatsize); + if (as->lpInputFormat) HeapFree(GetProcessHeap(),0,as->lpInputFormat); + as->inputformatsize = formatsize; + as->lpInputFormat = HeapAlloc(GetProcessHeap(),0,formatsize); + memcpy(as->lpInputFormat,format,formatsize); + if (as->iscompressing) { + int xsize; + /* Set up the Compressor part */ + xsize = ICCompressGetFormatSize(as->hic,as->lpInputFormat); + as->lpCompressFormat = HeapAlloc(GetProcessHeap(),0,xsize); + ICCompressGetFormat(as->hic,as->lpInputFormat,as->lpCompressFormat); + ICCompressBegin(as->hic,as->lpInputFormat,as->lpCompressFormat); + as->compbufsize = ICCompressGetSize(as->hic,as->lpInputFormat,as->lpCompressFormat); + as->compbuffer = HeapAlloc(GetProcessHeap(),0,as->compbufsize); + + /* Set up the Decompressor part (for prev frames?) */ + xsize=ICDecompressGetFormatSize(as->hic,as->lpCompressFormat); + as->decompformat = HeapAlloc(GetProcessHeap(),0,xsize); + ICDecompressGetFormat(as->hic,as->lpCompressFormat,as->decompformat); + as->decompbufsize=((LPBITMAPINFOHEADER)as->decompbuffer)->biSizeImage; + as->decompbuffer = HeapReAlloc(GetProcessHeap(),0,as->decompbuffer,as->decompbufsize); + memset(as->decompbuffer,0xff,as->decompbufsize); + assert(HeapValidate(GetProcessHeap(),0,NULL)); + + ICDecompressGetFormat(as->hic,as->lpCompressFormat,as->decompformat); + ICDecompressBegin(as->hic,as->lpCompressFormat,as->decompformat); + as->lpPrev = as->lpPrevFormat = NULL; + } + return S_OK; +} + +HRESULT WINAPI IAVIStream_fnRead(IAVIStream*iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,LONG *bytesread,LONG *samplesread) { + FIXME(avifile,"(%p)->Read(%ld,%ld,%p,%ld,%p,%p)\n",iface,start,samples,buffer,buffersize,bytesread,samplesread); + return E_FAIL; +} + +HRESULT WINAPI IAVIStream_fnWrite(IAVIStream*iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,DWORD flags,LONG *sampwritten,LONG *byteswritten) { + IAVIStreamImpl *as = (IAVIStreamImpl*)iface; + DWORD ckid,xflags; + + FIXME(avifile,"(%p)->Write(%ld,%ld,%p,%ld,0x%08lx,%p,%p)\n",iface,start,samples,buffer,buffersize,flags,sampwritten,byteswritten); + + ICCompress( + as->hic,flags, + as->lpCompressFormat, + as->compbuffer, + as->lpInputFormat,buffer, + &ckid,&xflags, + as->curframe,0xffffff/*framesize*/,as->aco.dwQuality, + as->lpPrevFormat,as->lpPrev + ); + ICDecompress( + as->hic, + flags, /* FIXME: check */ + as->lpCompressFormat, + as->compbuffer, + as->decompformat, + as->decompbuffer + ); + /* We now have a prev format for the next compress ... */ + as->lpPrevFormat = as->decompformat; + as->lpPrev = as->decompbuffer; + return S_OK; +} + +HRESULT WINAPI IAVIStream_fnDelete(IAVIStream*iface,LONG start,LONG samples) { + FIXME(avifile,"(%p)->Delete(%ld,%ld)\n",iface,start,samples); + return E_FAIL; +} + +HRESULT WINAPI IAVIStream_fnReadData(IAVIStream*iface,DWORD fcc,LPVOID lp,LONG *lpread) { + FIXME(avifile,"(%p)->ReadData(0x%08lx,%p,%p)\n",iface,fcc,lp,lpread); + return E_FAIL; +} + +HRESULT WINAPI IAVIStream_fnWriteData(IAVIStream*iface,DWORD fcc,LPVOID lp,LONG size) { + FIXME(avifile,"(%p)->WriteData(0x%08lx,%p,%ld)\n",iface,fcc,lp,size); + return E_FAIL; +} + +HRESULT WINAPI IAVIStream_fnSetInfo(IAVIStream*iface,AVISTREAMINFOW*info,LONG infolen) { + FIXME(avifile,"(%p)->SetInfo(%p,%ld)\n",iface,info,infolen); + return E_FAIL; +} + +struct ICOM_VTABLE(IAVIStream) iavist = { + IAVIStream_fnQueryInterface, + IAVIStream_fnAddRef, + IAVIStream_fnRelease, + IAVIStream_fnCreate, + IAVIStream_fnInfo, + IAVIStream_fnFindSample, + IAVIStream_fnReadFormat, + IAVIStream_fnSetFormat, + IAVIStream_fnRead, + IAVIStream_fnWrite, + IAVIStream_fnDelete, + IAVIStream_fnReadData, + IAVIStream_fnWriteData, + IAVIStream_fnSetInfo +}; + +HRESULT WINAPI AVIFileCreateStreamA(PAVIFILE iface,PAVISTREAM *ppavi,AVISTREAMINFOA * psi) { + AVISTREAMINFOW psiw; + + /* Only the szName at the end is different */ + memcpy(&psiw,psi,sizeof(*psi)-sizeof(psi->szName)); + lstrcpynAtoW(psiw.szName,psi->szName,sizeof(psi->szName)); + return iface->lpvtbl->fnCreateStream(iface,ppavi,&psiw); +} + +HRESULT WINAPI AVIFileCreateStreamW(IAVIFile*iface,PAVISTREAM*avis,AVISTREAMINFOW*asi) { + return iface->lpvtbl->fnCreateStream(iface,avis,asi); +} + + +HRESULT WINAPI AVIFileGetStream(IAVIFile*iface,PAVISTREAM*avis,DWORD fccType,LONG lParam) { + return iface->lpvtbl->fnGetStream(iface,avis,fccType,lParam); +} + +HRESULT WINAPI AVIFileInfoA(PAVIFILE iface,LPAVIFILEINFOA afi,LONG size) { + AVIFILEINFOW afiw; + HRESULT hres; + + if (size < sizeof(AVIFILEINFOA)) + return AVIERR_BADSIZE; + hres = iface->lpvtbl->fnInfo(iface,&afiw,sizeof(afiw)); + memcpy(afi,&afiw,sizeof(*afi)-sizeof(afi->szFileType)); + lstrcpynWtoA(afi->szFileType,afiw.szFileType,sizeof(afi->szFileType)); + return hres; +} + +HRESULT WINAPI AVIStreamInfoW(PAVISTREAM iface,AVISTREAMINFOW *asi,LONG + size) { + return iface->lpvtbl->fnInfo(iface,asi,size); +} + +HRESULT WINAPI AVIStreamInfoA(PAVISTREAM iface,AVISTREAMINFOA *asi,LONG + size) { + AVISTREAMINFOW asiw; + HRESULT hres; + + if (sizelpvtbl->fnInfo(iface,&asiw,sizeof(asiw)); + memcpy(asi,&asiw,sizeof(asiw)-sizeof(asiw.szName)); + lstrcpynWtoA(asi->szName,asiw.szName,sizeof(asi->szName)); + return hres; +} + +HRESULT WINAPI AVIFileInfoW(PAVIFILE iface,LPAVIFILEINFOW afi,LONG size) { + return iface->lpvtbl->fnInfo(iface,afi,size); +} + +HRESULT WINAPI AVIMakeCompressedStream(PAVISTREAM *ppsCompressed,PAVISTREAM ppsSource,AVICOMPRESSOPTIONS *aco,CLSID *pclsidHandler) { + char fcc[5]; + IAVIStreamImpl *as; + FIXME(avifile,"(%p,%p,%p,%p)\n",ppsCompressed,ppsSource,aco,pclsidHandler); + fcc[4]='\0'; + memcpy(fcc,&(aco->fccType),4); + FIXME(avifile,"\tfccType: '%s'\n",fcc); + memcpy(fcc,&(aco->fccHandler),4); + FIXME(avifile,"\tfccHandler: '%s'\n",fcc); + FIXME(avifile,"\tdwFlags: 0x%08lx\n",aco->dwFlags); + + /* we just create a duplicate for now */ + ((IUnknown*)ppsSource)->lpvtbl->fnAddRef((IUnknown*)ppsSource); + *ppsCompressed = ppsSource; + as = (IAVIStreamImpl*)ppsSource; + + /* this is where the fun begins. Open a compressor and prepare it. */ + as->hic = ICOpen(aco->fccType,aco->fccHandler,ICMODE_COMPRESS); + + /* May happen. for instance if the codec is not able to compress */ + if (!as->hic) + return AVIERR_UNSUPPORTED; + + ICGetInfo(as->hic,&(as->icinfo),sizeof(ICINFO)); + FIXME(avifile,"Opened compressor: '%s' '%s'\n",debugstr_w(as->icinfo.szName),debugstr_w(as->icinfo.szDescription)); + as->iscompressing = TRUE; + memcpy(&(as->aco),aco,sizeof(*aco)); + if (as->icinfo.dwFlags & VIDCF_COMPRESSFRAMES) { + ICCOMPRESSFRAMES icf; + + /* now what to fill in there ... Hmm */ + memset(&icf,0,sizeof(icf)); + icf.lDataRate = aco->dwBytesPerSecond; + icf.lQuality = aco->dwQuality; + icf.lKeyRate = aco->dwKeyFrameEvery; + + icf.GetData = (void*)0xdead4242; + icf.PutData = (void*)0xdead4243; + ICSendMessage(as->hic,ICM_COMPRESS_FRAMES_INFO,(LPARAM)&icf,sizeof(icf)); + } + return S_OK; +} + +HRESULT WINAPI AVIStreamSetFormat(PAVISTREAM iface,LONG pos,LPVOID format,LONG formatsize) { + return iface->lpvtbl->fnSetFormat(iface,pos,format,formatsize); +} + +HRESULT WINAPI AVIStreamReadFormat(PAVISTREAM iface,LONG pos,LPVOID format,LONG *formatsize) { + return iface->lpvtbl->fnReadFormat(iface,pos,format,formatsize); +} + +HRESULT WINAPI AVIStreamWrite(PAVISTREAM iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,DWORD flags,LONG *sampwritten,LONG *byteswritten) { + return iface->lpvtbl->fnWrite(iface,start,samples,buffer,buffersize,flags,sampwritten,byteswritten); +} + +HRESULT WINAPI AVIStreamRead(PAVISTREAM iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,LONG *bytesread,LONG *samplesread) { + return iface->lpvtbl->fnRead(iface,start,samples,buffer,buffersize,bytesread,samplesread); +} + +HRESULT WINAPI AVIStreamWriteData(PAVISTREAM iface,DWORD fcc,LPVOID lp,LONG size) { + return iface->lpvtbl->fnWriteData(iface,fcc,lp,size); +} + +HRESULT WINAPI AVIStreamReadData(PAVISTREAM iface,DWORD fcc,LPVOID lp,LONG *lpread) { + return iface->lpvtbl->fnReadData(iface,fcc,lp,lpread); +} + +LONG WINAPI AVIStreamStart(PAVISTREAM iface) { + AVISTREAMINFOW si; + + iface->lpvtbl->fnInfo(iface,&si,sizeof(si)); + return si.dwStart; +} + +LONG WINAPI AVIStreamLength(PAVISTREAM iface) { + AVISTREAMINFOW si; + HRESULT ret; + + ret = iface->lpvtbl->fnInfo(iface,&si,sizeof(si)); + if (ret) /* error */ + return 1; + return si.dwLength; +} + +ULONG WINAPI AVIStreamRelease(PAVISTREAM iface) { + return ((LPUNKNOWN)iface)->lpvtbl->fnRelease((LPUNKNOWN)iface); +} + +PGETFRAME WINAPI AVIStreamGetFrameOpen(PAVISTREAM iface,LPBITMAPINFOHEADER bmi) { + FIXME(msvideo,"(%p)->(%p),stub!\n",iface,bmi); + return NULL; +} + +LPVOID WINAPI AVIStreamGetFrame(PGETFRAME pg,LONG pos) { + return pg->lpvtbl->fnGetFrame(pg,pos); +} + +HRESULT WINAPI AVIStreamGetFrameClose(PGETFRAME pg) { + if (pg) ((LPUNKNOWN)pg)->lpvtbl->fnRelease((LPUNKNOWN)pg); + return 0; +} + +ULONG WINAPI AVIFileRelease(PAVIFILE iface) { + return ((LPUNKNOWN)iface)->lpvtbl->fnRelease((LPUNKNOWN)iface); +} + +void WINAPI AVIFileExit(void) { + FIXME(avifile,"(), stub.\n"); +} diff --git a/include/debug.h b/include/debug.h index e60a252709f..f129e3e5dbd 100644 --- a/include/debug.h +++ b/include/debug.h @@ -10,153 +10,154 @@ #define dbch_animate 2 #define dbch_aspi 3 #define dbch_atom 4 -#define dbch_bitblt 5 -#define dbch_bitmap 6 -#define dbch_caret 7 -#define dbch_cdaudio 8 -#define dbch_class 9 -#define dbch_clipboard 10 -#define dbch_clipping 11 -#define dbch_combo 12 -#define dbch_comboex 13 -#define dbch_comm 14 -#define dbch_commctrl 15 -#define dbch_commdlg 16 -#define dbch_console 17 -#define dbch_crtdll 18 -#define dbch_cursor 19 -#define dbch_datetime 20 -#define dbch_dc 21 -#define dbch_dde 22 -#define dbch_ddeml 23 -#define dbch_ddraw 24 -#define dbch_debug 25 -#define dbch_dialog 26 -#define dbch_dinput 27 -#define dbch_dll 28 -#define dbch_dosfs 29 -#define dbch_dosmem 30 -#define dbch_dplay 31 -#define dbch_driver 32 -#define dbch_dsound 33 -#define dbch_edit 34 -#define dbch_event 35 -#define dbch_exec 36 -#define dbch_file 37 -#define dbch_fixup 38 -#define dbch_font 39 -#define dbch_gdi 40 -#define dbch_global 41 -#define dbch_graphics 42 -#define dbch_header 43 -#define dbch_heap 44 -#define dbch_hook 45 -#define dbch_hotkey 46 -#define dbch_icon 47 -#define dbch_imagehlp 48 -#define dbch_imagelist 49 -#define dbch_imm 50 -#define dbch_int 51 -#define dbch_int10 52 -#define dbch_int16 53 -#define dbch_int17 54 -#define dbch_int19 55 -#define dbch_int21 56 -#define dbch_int31 57 -#define dbch_io 58 -#define dbch_ipaddress 59 -#define dbch_key 60 -#define dbch_keyboard 61 -#define dbch_ldt 62 -#define dbch_listbox 63 -#define dbch_listview 64 -#define dbch_local 65 -#define dbch_mci 66 -#define dbch_mcianim 67 -#define dbch_mciavi 68 -#define dbch_mcimidi 69 -#define dbch_mciwave 70 -#define dbch_mdi 71 -#define dbch_menu 72 -#define dbch_message 73 -#define dbch_metafile 74 -#define dbch_midi 75 -#define dbch_mmaux 76 -#define dbch_mmio 77 -#define dbch_mmsys 78 -#define dbch_mmtime 79 -#define dbch_module 80 -#define dbch_monthcal 81 -#define dbch_mpr 82 -#define dbch_msacm 83 -#define dbch_msg 84 -#define dbch_msvideo 85 -#define dbch_nativefont 86 -#define dbch_nonclient 87 -#define dbch_ntdll 88 -#define dbch_ole 89 -#define dbch_pager 90 -#define dbch_palette 91 -#define dbch_pidl 92 -#define dbch_print 93 -#define dbch_process 94 -#define dbch_profile 95 -#define dbch_progress 96 -#define dbch_prop 97 -#define dbch_propsheet 98 -#define dbch_psapi 99 -#define dbch_psdrv 100 -#define dbch_ras 101 -#define dbch_rebar 102 -#define dbch_reg 103 -#define dbch_region 104 -#define dbch_relay 105 -#define dbch_resource 106 -#define dbch_scroll 107 -#define dbch_security 108 -#define dbch_segment 109 -#define dbch_selector 110 -#define dbch_sem 111 -#define dbch_sendmsg 112 -#define dbch_server 113 -#define dbch_shell 114 -#define dbch_shm 115 -#define dbch_snoop 116 -#define dbch_sound 117 -#define dbch_static 118 -#define dbch_statusbar 119 -#define dbch_stress 120 -#define dbch_string 121 -#define dbch_syscolor 122 -#define dbch_system 123 -#define dbch_tab 124 -#define dbch_task 125 -#define dbch_text 126 -#define dbch_thread 127 -#define dbch_thunk 128 -#define dbch_timer 129 -#define dbch_toolbar 130 -#define dbch_toolhelp 131 -#define dbch_tooltips 132 -#define dbch_trackbar 133 -#define dbch_treeview 134 -#define dbch_ttydrv 135 -#define dbch_tweak 136 -#define dbch_uitools 137 -#define dbch_unknown 138 -#define dbch_updown 139 -#define dbch_ver 140 -#define dbch_virtual 141 -#define dbch_vxd 142 -#define dbch_wave 143 -#define dbch_win 144 -#define dbch_win16drv 145 -#define dbch_win32 146 -#define dbch_wing 147 -#define dbch_winsock 148 -#define dbch_wnet 149 -#define dbch_x11 150 -#define dbch_x11drv 151 +#define dbch_avifile 5 +#define dbch_bitblt 6 +#define dbch_bitmap 7 +#define dbch_caret 8 +#define dbch_cdaudio 9 +#define dbch_class 10 +#define dbch_clipboard 11 +#define dbch_clipping 12 +#define dbch_combo 13 +#define dbch_comboex 14 +#define dbch_comm 15 +#define dbch_commctrl 16 +#define dbch_commdlg 17 +#define dbch_console 18 +#define dbch_crtdll 19 +#define dbch_cursor 20 +#define dbch_datetime 21 +#define dbch_dc 22 +#define dbch_dde 23 +#define dbch_ddeml 24 +#define dbch_ddraw 25 +#define dbch_debug 26 +#define dbch_dialog 27 +#define dbch_dinput 28 +#define dbch_dll 29 +#define dbch_dosfs 30 +#define dbch_dosmem 31 +#define dbch_dplay 32 +#define dbch_driver 33 +#define dbch_dsound 34 +#define dbch_edit 35 +#define dbch_event 36 +#define dbch_exec 37 +#define dbch_file 38 +#define dbch_fixup 39 +#define dbch_font 40 +#define dbch_gdi 41 +#define dbch_global 42 +#define dbch_graphics 43 +#define dbch_header 44 +#define dbch_heap 45 +#define dbch_hook 46 +#define dbch_hotkey 47 +#define dbch_icon 48 +#define dbch_imagehlp 49 +#define dbch_imagelist 50 +#define dbch_imm 51 +#define dbch_int 52 +#define dbch_int10 53 +#define dbch_int16 54 +#define dbch_int17 55 +#define dbch_int19 56 +#define dbch_int21 57 +#define dbch_int31 58 +#define dbch_io 59 +#define dbch_ipaddress 60 +#define dbch_key 61 +#define dbch_keyboard 62 +#define dbch_ldt 63 +#define dbch_listbox 64 +#define dbch_listview 65 +#define dbch_local 66 +#define dbch_mci 67 +#define dbch_mcianim 68 +#define dbch_mciavi 69 +#define dbch_mcimidi 70 +#define dbch_mciwave 71 +#define dbch_mdi 72 +#define dbch_menu 73 +#define dbch_message 74 +#define dbch_metafile 75 +#define dbch_midi 76 +#define dbch_mmaux 77 +#define dbch_mmio 78 +#define dbch_mmsys 79 +#define dbch_mmtime 80 +#define dbch_module 81 +#define dbch_monthcal 82 +#define dbch_mpr 83 +#define dbch_msacm 84 +#define dbch_msg 85 +#define dbch_msvideo 86 +#define dbch_nativefont 87 +#define dbch_nonclient 88 +#define dbch_ntdll 89 +#define dbch_ole 90 +#define dbch_pager 91 +#define dbch_palette 92 +#define dbch_pidl 93 +#define dbch_print 94 +#define dbch_process 95 +#define dbch_profile 96 +#define dbch_progress 97 +#define dbch_prop 98 +#define dbch_propsheet 99 +#define dbch_psapi 100 +#define dbch_psdrv 101 +#define dbch_ras 102 +#define dbch_rebar 103 +#define dbch_reg 104 +#define dbch_region 105 +#define dbch_relay 106 +#define dbch_resource 107 +#define dbch_scroll 108 +#define dbch_security 109 +#define dbch_segment 110 +#define dbch_selector 111 +#define dbch_sem 112 +#define dbch_sendmsg 113 +#define dbch_server 114 +#define dbch_shell 115 +#define dbch_shm 116 +#define dbch_snoop 117 +#define dbch_sound 118 +#define dbch_static 119 +#define dbch_statusbar 120 +#define dbch_stress 121 +#define dbch_string 122 +#define dbch_syscolor 123 +#define dbch_system 124 +#define dbch_tab 125 +#define dbch_task 126 +#define dbch_text 127 +#define dbch_thread 128 +#define dbch_thunk 129 +#define dbch_timer 130 +#define dbch_toolbar 131 +#define dbch_toolhelp 132 +#define dbch_tooltips 133 +#define dbch_trackbar 134 +#define dbch_treeview 135 +#define dbch_ttydrv 136 +#define dbch_tweak 137 +#define dbch_uitools 138 +#define dbch_unknown 139 +#define dbch_updown 140 +#define dbch_ver 141 +#define dbch_virtual 142 +#define dbch_vxd 143 +#define dbch_wave 144 +#define dbch_win 145 +#define dbch_win16drv 146 +#define dbch_win32 147 +#define dbch_wing 148 +#define dbch_winsock 149 +#define dbch_wnet 150 +#define dbch_x11 151 +#define dbch_x11drv 152 /* Definitions for classes identifiers */ #define dbcl_fixme 0 #define dbcl_err 1 diff --git a/include/debugdefs.h b/include/debugdefs.h index 062fe3d9b1e..9f9ad398e26 100644 --- a/include/debugdefs.h +++ b/include/debugdefs.h @@ -4,7 +4,7 @@ #include "debugtools.h" #endif -#define DEBUG_CHANNEL_COUNT 152 +#define DEBUG_CHANNEL_COUNT 153 #ifdef DEBUG_RUNTIME short debug_msg_enabled[][DEBUG_CLASS_COUNT] = { {1, 1, 0, 0}, @@ -159,6 +159,7 @@ short debug_msg_enabled[][DEBUG_CLASS_COUNT] = { {1, 1, 0, 0}, {1, 1, 0, 0}, {1, 1, 0, 0}, +{1, 1, 0, 0}, }; const char* debug_ch_name[] = { "accel", @@ -166,6 +167,7 @@ const char* debug_ch_name[] = { "animate", "aspi", "atom", +"avifile", "bitblt", "bitmap", "caret", diff --git a/relay32/avifil32.spec b/relay32/avifil32.spec index f770f17fdd5..2d3ee207da8 100644 --- a/relay32/avifil32.spec +++ b/relay32/avifil32.spec @@ -7,23 +7,23 @@ type win32 3 stub AVIClearClipboard 4 stub AVIFileAddRef 5 stub AVIFileCreateStream - 6 stub AVIFileCreateStreamA + 6 stdcall AVIFileCreateStreamA(ptr ptr ptr) AVIFileCreateStreamA 7 stub AVIFileCreateStreamW 8 stub AVIFileEndRecord - 9 stub AVIFileExit + 9 stdcall AVIFileExit() AVIFileExit 10 stub AVIFileGetStream - 11 stub AVIFileInfo - 12 stub AVIFileInfoA - 13 stub AVIFileInfoW - 14 stub AVIFileInit + 11 stdcall AVIFileInfo (ptr ptr long) AVIFileInfoA # A in both Win95 and NT + 12 stdcall AVIFileInfoA(ptr ptr long) AVIFileInfoA + 13 stdcall AVIFileInfoW(ptr ptr long) AVIFileInfoW + 14 stdcall AVIFileInit() AVIFileInit 15 stub AVIFileOpen - 16 stub AVIFileOpenA + 16 stdcall AVIFileOpenA(ptr str long ptr) AVIFileOpenA 17 stub AVIFileOpenW 18 stub AVIFileReadData - 19 stub AVIFileRelease + 19 stdcall AVIFileRelease(ptr) AVIFileRelease 20 stub AVIFileWriteData 21 stub AVIGetFromClipboard - 22 stub AVIMakeCompressedStream + 22 stdcall AVIMakeCompressedStream(ptr ptr ptr ptr) AVIMakeCompressedStream 23 stub AVIMakeFileFromStreams 24 stub AVIMakeStreamFromClipboard 25 stub AVIPutFileOnClipboard @@ -40,26 +40,26 @@ type win32 36 stub AVIStreamCreate 37 stub AVIStreamEndStreaming 38 stub AVIStreamFindSample - 39 stub AVIStreamGetFrame - 40 stub AVIStreamGetFrameClose - 41 stub AVIStreamGetFrameOpen - 42 stub AVIStreamInfo - 43 stub AVIStreamInfoA - 44 stub AVIStreamInfoW - 45 stub AVIStreamLength + 39 stdcall AVIStreamGetFrame(ptr long) AVIStreamGetFrame + 40 stdcall AVIStreamGetFrameClose(ptr) AVIStreamGetFrameClose + 41 stdcall AVIStreamGetFrameOpen(ptr ptr) AVIStreamGetFrameOpen + 42 stdcall AVIStreamInfo (ptr ptr long) AVIStreamInfoA + 43 stdcall AVIStreamInfoA(ptr ptr long) AVIStreamInfoA + 44 stdcall AVIStreamInfoW(ptr ptr long) AVIStreamInfoW + 45 stdcall AVIStreamLength(ptr) AVIStreamLength 46 stub AVIStreamOpenFromFile 47 stub AVIStreamOpenFromFileA 48 stub AVIStreamOpenFromFileW - 49 stub AVIStreamRead - 50 stub AVIStreamReadData - 51 stub AVIStreamReadFormat - 52 stub AVIStreamRelease + 49 stdcall AVIStreamRead(ptr long long ptr long ptr ptr) AVIStreamRead + 50 stdcall AVIStreamReadData(ptr long ptr ptr) AVIStreamReadData + 51 stdcall AVIStreamReadFormat(ptr long ptr long) AVIStreamReadFormat + 52 stdcall AVIStreamRelease(ptr) AVIStreamRelease 53 stub AVIStreamSampleToTime - 54 stub AVIStreamSetFormat - 55 stub AVIStreamStart + 54 stdcall AVIStreamSetFormat(ptr long ptr long) AVIStreamSetFormat + 55 stdcall AVIStreamStart(ptr) AVIStreamStart 56 stub AVIStreamTimeToSample - 57 stub AVIStreamWrite - 58 stub AVIStreamWriteData + 57 stdcall AVIStreamWrite(ptr long long ptr long long ptr ptr) AVIStreamWrite + 58 stdcall AVIStreamWriteData(ptr long ptr long) AVIStreamWriteData 59 stub CLSID_AVISimpleUnMarshal 60 stub CreateEditableStream 61 stub DllCanUnloadNow