2 * Copyright 1999 Marcus Meissner
10 #include "wine/winestring.h"
15 #include "debugtools.h"
17 DECLARE_DEBUG_CHANNEL(avifile
)
18 DECLARE_DEBUG_CHANNEL(msvideo
)
19 DECLARE_DEBUG_CHANNEL(relay
)
21 static HRESULT WINAPI
IAVIFile_fnQueryInterface(IAVIFile
* iface
,REFIID refiid
,LPVOID
*obj
);
22 static ULONG WINAPI
IAVIFile_fnAddRef(IAVIFile
* iface
);
23 static ULONG WINAPI
IAVIFile_fnRelease(IAVIFile
* iface
);
24 static HRESULT WINAPI
IAVIFile_fnInfo(IAVIFile
*iface
,AVIFILEINFOW
*afi
,LONG size
);
25 static HRESULT WINAPI
IAVIFile_fnGetStream(IAVIFile
*iface
,PAVISTREAM
*avis
,DWORD fccType
,LONG lParam
);
26 static HRESULT WINAPI
IAVIFile_fnCreateStream(IAVIFile
*iface
,PAVISTREAM
*avis
,AVISTREAMINFOW
*asi
);
27 static HRESULT WINAPI
IAVIFile_fnWriteData(IAVIFile
*iface
,DWORD ckid
,LPVOID lpData
,LONG size
);
28 static HRESULT WINAPI
IAVIFile_fnReadData(IAVIFile
*iface
,DWORD ckid
,LPVOID lpData
,LONG
*size
);
29 static HRESULT WINAPI
IAVIFile_fnEndRecord(IAVIFile
*iface
);
30 static HRESULT WINAPI
IAVIFile_fnDeleteStream(IAVIFile
*iface
,DWORD fccType
,LONG lParam
);
32 struct ICOM_VTABLE(IAVIFile
) iavift
= {
33 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
34 IAVIFile_fnQueryInterface
,
39 IAVIFile_fnCreateStream
,
43 IAVIFile_fnDeleteStream
46 static HRESULT WINAPI
IAVIStream_fnQueryInterface(IAVIStream
*iface
,REFIID refiid
,LPVOID
*obj
);
47 static ULONG WINAPI
IAVIStream_fnAddRef(IAVIStream
*iface
);
48 static ULONG WINAPI
IAVIStream_fnRelease(IAVIStream
* iface
);
49 static HRESULT WINAPI
IAVIStream_fnCreate(IAVIStream
*iface
,LPARAM lParam1
,LPARAM lParam2
);
50 static HRESULT WINAPI
IAVIStream_fnInfo(IAVIStream
*iface
,AVISTREAMINFOW
*psi
,LONG size
);
51 static LONG WINAPI
IAVIStream_fnFindSample(IAVIStream
*iface
,LONG pos
,LONG flags
);
52 static HRESULT WINAPI
IAVIStream_fnReadFormat(IAVIStream
*iface
,LONG pos
,LPVOID format
,LONG
*formatsize
);
53 static HRESULT WINAPI
IAVIStream_fnSetFormat(IAVIStream
*iface
,LONG pos
,LPVOID format
,LONG formatsize
);
54 static HRESULT WINAPI
IAVIStream_fnRead(IAVIStream
*iface
,LONG start
,LONG samples
,LPVOID buffer
,LONG buffersize
,LONG
*bytesread
,LONG
*samplesread
);
55 static HRESULT WINAPI
IAVIStream_fnWrite(IAVIStream
*iface
,LONG start
,LONG samples
,LPVOID buffer
,LONG buffersize
,DWORD flags
,LONG
*sampwritten
,LONG
*byteswritten
);
56 static HRESULT WINAPI
IAVIStream_fnDelete(IAVIStream
*iface
,LONG start
,LONG samples
);
57 static HRESULT WINAPI
IAVIStream_fnReadData(IAVIStream
*iface
,DWORD fcc
,LPVOID lp
,LONG
*lpread
);
58 static HRESULT WINAPI
IAVIStream_fnWriteData(IAVIStream
*iface
,DWORD fcc
,LPVOID lp
,LONG size
);
59 static HRESULT WINAPI
IAVIStream_fnSetInfo(IAVIStream
*iface
,AVISTREAMINFOW
*info
,LONG infolen
);
61 struct ICOM_VTABLE(IAVIStream
) iavist
= {
62 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
63 IAVIStream_fnQueryInterface
,
68 IAVIStream_fnFindSample
,
69 IAVIStream_fnReadFormat
,
70 IAVIStream_fnSetFormat
,
74 IAVIStream_fnReadData
,
75 IAVIStream_fnWriteData
,
79 typedef struct IAVIStreamImpl
{
81 ICOM_VTABLE(IAVIStream
)* lpvtbl
;
83 /* IAVIStream stuff */
85 DWORD inputformatsize
;
89 /* Compressor stuff */
91 LPVOID lpCompressFormat
;
99 AVICOMPRESSOPTIONS aco
;
101 LPVOID lpPrev
; /* pointer to decompressed frame later */
102 LPVOID lpPrevFormat
; /* pointer to decompressed info later */
107 FIXME_(avifile
)("(),stub!\n");
110 typedef struct IAVIFileImpl
{
112 ICOM_VTABLE(IAVIFile
)* lpvtbl
;
114 /* IAVIFile stuff... */
117 static HRESULT WINAPI
IAVIFile_fnQueryInterface(IAVIFile
* iface
,REFIID refiid
,LPVOID
*obj
) {
118 ICOM_THIS(IAVIFileImpl
,iface
);
121 WINE_StringFromCLSID((LPCLSID
)refiid
,xrefiid
);
122 TRACE_(relay
)("(%p)->QueryInterface(%s,%p)\n",This
,xrefiid
,obj
);
123 if ( !memcmp(&IID_IUnknown
,refiid
,sizeof(IID_IUnknown
)) ||
124 !memcmp(&IID_IAVIFile
,refiid
,sizeof(IID_IAVIFile
))
129 return OLE_E_ENUM_NOMORE
;
132 static ULONG WINAPI
IAVIFile_fnAddRef(IAVIFile
* iface
) {
133 ICOM_THIS(IAVIFileImpl
,iface
);
135 FIXME_(relay
)("(%p)->AddRef()\n",iface
);
136 return ++(This
->ref
);
139 static ULONG WINAPI
IAVIFile_fnRelease(IAVIFile
* iface
) {
140 ICOM_THIS(IAVIFileImpl
,iface
);
142 FIXME_(relay
)("(%p)->Release()\n",iface
);
143 if (!--(This
->ref
)) {
144 HeapFree(GetProcessHeap(),0,iface
);
150 static HRESULT WINAPI
IAVIFile_fnInfo(IAVIFile
*iface
,AVIFILEINFOW
*afi
,LONG size
) {
151 FIXME_(avifile
)("(%p)->Info(%p,%ld)\n",iface
,afi
,size
);
153 /* FIXME: fill out struct? */
157 static HRESULT WINAPI
IAVIFile_fnGetStream(IAVIFile
*iface
,PAVISTREAM
*avis
,DWORD fccType
,LONG lParam
) {
158 FIXME_(avifile
)("(%p)->GetStream(%p,0x%08lx,%ld)\n",iface
,avis
,fccType
,lParam
);
159 /* FIXME: create interface etc. */
163 static HRESULT WINAPI
IAVIFile_fnCreateStream(IAVIFile
*iface
,PAVISTREAM
*avis
,AVISTREAMINFOW
*asi
) {
164 ICOM_THIS(IAVIStreamImpl
,iface
);
166 IAVIStreamImpl
*istream
;
168 FIXME_(avifile
)("(%p,%p,%p)\n",This
,avis
,asi
);
169 istream
= (IAVIStreamImpl
*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY
,sizeof(IAVIStreamImpl
));
171 istream
->lpvtbl
= &iavist
;
173 memcpy(fcc
,(char*)&(asi
->fccType
),4);
174 FIXME_(avifile
)("\tfccType '%s'\n",fcc
);
175 memcpy(fcc
,(char*)&(asi
->fccHandler
),4);
176 FIXME_(avifile
)("\tfccHandler '%s'\n",fcc
);
177 FIXME_(avifile
)("\tdwFlags 0x%08lx\n",asi
->dwFlags
);
178 FIXME_(avifile
)("\tdwCaps 0x%08lx\n",asi
->dwCaps
);
179 FIXME_(avifile
)("\tname '%s'\n",debugstr_w(asi
->szName
));
181 istream
->curframe
= 0;
182 *avis
= (PAVISTREAM
)istream
;
186 static HRESULT WINAPI
IAVIFile_fnWriteData(IAVIFile
*iface
,DWORD ckid
,LPVOID lpData
,LONG size
) {
187 FIXME_(avifile
)("(%p)->WriteData(0x%08lx,%p,%ld)\n",iface
,ckid
,lpData
,size
);
188 /* FIXME: write data to file */
192 static HRESULT WINAPI
IAVIFile_fnReadData(IAVIFile
*iface
,DWORD ckid
,LPVOID lpData
,LONG
*size
) {
193 FIXME_(avifile
)("(%p)->ReadData(0x%08lx,%p,%p)\n",iface
,ckid
,lpData
,size
);
194 /* FIXME: read at most size bytes from file */
198 static HRESULT WINAPI
IAVIFile_fnEndRecord(IAVIFile
*iface
) {
199 FIXME_(avifile
)("(%p)->EndRecord()\n",iface
);
200 /* FIXME: end record? */
204 static HRESULT WINAPI
IAVIFile_fnDeleteStream(IAVIFile
*iface
,DWORD fccType
,LONG lParam
) {
205 FIXME_(avifile
)("(%p)->DeleteStream(0x%08lx,%ld)\n",iface
,fccType
,lParam
);
206 /* FIXME: delete stream? */
210 HRESULT WINAPI
AVIFileOpenA(
211 PAVIFILE
* ppfile
,LPCSTR szFile
,UINT uMode
,LPCLSID lpHandler
217 if (HIWORD(lpHandler
))
218 WINE_StringFromCLSID(lpHandler
,buf
);
220 sprintf(buf
,"<clsid-0x%04lx>",(DWORD
)lpHandler
);
222 FIXME_(avifile
)("(%p,%s,0x%08lx,%s),stub!\n",ppfile
,szFile
,(DWORD
)uMode
,buf
);
223 iavi
= (IAVIFileImpl
*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY
,sizeof(IAVIFileImpl
));
225 iavi
->lpvtbl
= &iavift
;
226 *ppfile
= (LPVOID
)iavi
;
230 static HRESULT WINAPI
IAVIStream_fnQueryInterface(IAVIStream
*iface
,REFIID refiid
,LPVOID
*obj
) {
231 ICOM_THIS(IAVIStreamImpl
,iface
);
234 WINE_StringFromCLSID((LPCLSID
)refiid
,xrefiid
);
235 TRACE_(relay
)("(%p)->QueryInterface(%s,%p)\n",This
,xrefiid
,obj
);
236 if ( !memcmp(&IID_IUnknown
,refiid
,sizeof(IID_IUnknown
)) ||
237 !memcmp(&IID_IAVIStream
,refiid
,sizeof(IID_IAVIStream
))
242 /* can return IGetFrame interface too */
243 return OLE_E_ENUM_NOMORE
;
246 static ULONG WINAPI
IAVIStream_fnAddRef(IAVIStream
*iface
) {
247 ICOM_THIS(IAVIStreamImpl
,iface
);
249 FIXME_(relay
)("(%p)->AddRef()\n",iface
);
250 return ++(This
->ref
);
253 static ULONG WINAPI
IAVIStream_fnRelease(IAVIStream
* iface
) {
254 ICOM_THIS(IAVIStreamImpl
,iface
);
256 FIXME_(relay
)("(%p)->Release()\n",iface
);
257 if (!--(This
->ref
)) {
258 HeapFree(GetProcessHeap(),0,This
);
264 static HRESULT WINAPI
IAVIStream_fnCreate(IAVIStream
*iface
,LPARAM lParam1
,LPARAM lParam2
) {
265 FIXME_(avifile
)("(%p)->Create(0x%08lx,0x%08lx)\n",iface
,lParam1
,lParam2
);
269 static HRESULT WINAPI
IAVIStream_fnInfo(IAVIStream
*iface
,AVISTREAMINFOW
*psi
,LONG size
) {
270 FIXME_(avifile
)("(%p)->Info(%p,%ld)\n",iface
,psi
,size
);
274 static LONG WINAPI
IAVIStream_fnFindSample(IAVIStream
*iface
,LONG pos
,LONG flags
) {
275 FIXME_(avifile
)("(%p)->FindSample(%ld,0x%08lx)\n",iface
,pos
,flags
);
279 static HRESULT WINAPI
IAVIStream_fnReadFormat(IAVIStream
*iface
,LONG pos
,LPVOID format
,LONG
*formatsize
) {
280 FIXME_(avifile
)("(%p)->ReadFormat(%ld,%p,%p)\n",iface
,pos
,format
,formatsize
);
284 /*****************************************************************************
285 * [IAVIStream::SetFormat]
287 static HRESULT WINAPI
IAVIStream_fnSetFormat(IAVIStream
*iface
,LONG pos
,LPVOID format
,LONG formatsize
) {
288 IAVIStreamImpl
*as
= (IAVIStreamImpl
*)iface
;
290 FIXME_(avifile
)("(%p)->SetFormat(%ld,%p,%ld)\n",iface
,pos
,format
,formatsize
);
291 if (as
->lpInputFormat
) HeapFree(GetProcessHeap(),0,as
->lpInputFormat
);
292 as
->inputformatsize
= formatsize
;
293 as
->lpInputFormat
= HeapAlloc(GetProcessHeap(),0,formatsize
);
294 memcpy(as
->lpInputFormat
,format
,formatsize
);
295 if (as
->iscompressing
) {
297 /* Set up the Compressor part */
298 xsize
= ICCompressGetFormatSize(as
->hic
,as
->lpInputFormat
);
299 as
->lpCompressFormat
= HeapAlloc(GetProcessHeap(),0,xsize
);
300 ICCompressGetFormat(as
->hic
,as
->lpInputFormat
,as
->lpCompressFormat
);
301 ICCompressBegin(as
->hic
,as
->lpInputFormat
,as
->lpCompressFormat
);
302 as
->compbufsize
= ICCompressGetSize(as
->hic
,as
->lpInputFormat
,as
->lpCompressFormat
);
303 as
->compbuffer
= HeapAlloc(GetProcessHeap(),0,as
->compbufsize
);
305 /* Set up the Decompressor part (for prev frames?) */
306 xsize
=ICDecompressGetFormatSize(as
->hic
,as
->lpCompressFormat
);
307 as
->decompformat
= HeapAlloc(GetProcessHeap(),0,xsize
);
308 ICDecompressGetFormat(as
->hic
,as
->lpCompressFormat
,as
->decompformat
);
309 as
->decompbufsize
=((LPBITMAPINFOHEADER
)as
->decompbuffer
)->biSizeImage
;
310 as
->decompbuffer
= HeapReAlloc(GetProcessHeap(),0,as
->decompbuffer
,as
->decompbufsize
);
311 memset(as
->decompbuffer
,0xff,as
->decompbufsize
);
312 assert(HeapValidate(GetProcessHeap(),0,NULL
));
314 ICDecompressGetFormat(as
->hic
,as
->lpCompressFormat
,as
->decompformat
);
315 ICDecompressBegin(as
->hic
,as
->lpCompressFormat
,as
->decompformat
);
316 as
->lpPrev
= as
->lpPrevFormat
= NULL
;
321 static HRESULT WINAPI
IAVIStream_fnRead(IAVIStream
*iface
,LONG start
,LONG samples
,LPVOID buffer
,LONG buffersize
,LONG
*bytesread
,LONG
*samplesread
) {
322 FIXME_(avifile
)("(%p)->Read(%ld,%ld,%p,%ld,%p,%p)\n",iface
,start
,samples
,buffer
,buffersize
,bytesread
,samplesread
);
326 static HRESULT WINAPI
IAVIStream_fnWrite(IAVIStream
*iface
,LONG start
,LONG samples
,LPVOID buffer
,LONG buffersize
,DWORD flags
,LONG
*sampwritten
,LONG
*byteswritten
) {
327 IAVIStreamImpl
*as
= (IAVIStreamImpl
*)iface
;
330 FIXME_(avifile
)("(%p)->Write(%ld,%ld,%p,%ld,0x%08lx,%p,%p)\n",iface
,start
,samples
,buffer
,buffersize
,flags
,sampwritten
,byteswritten
);
334 as
->lpCompressFormat
,
336 as
->lpInputFormat
,buffer
,
338 as
->curframe
,0xffffff/*framesize*/,as
->aco
.dwQuality
,
339 as
->lpPrevFormat
,as
->lpPrev
343 flags
, /* FIXME: check */
344 as
->lpCompressFormat
,
349 /* We now have a prev format for the next compress ... */
350 as
->lpPrevFormat
= as
->decompformat
;
351 as
->lpPrev
= as
->decompbuffer
;
355 static HRESULT WINAPI
IAVIStream_fnDelete(IAVIStream
*iface
,LONG start
,LONG samples
) {
356 FIXME_(avifile
)("(%p)->Delete(%ld,%ld)\n",iface
,start
,samples
);
359 static HRESULT WINAPI
IAVIStream_fnReadData(IAVIStream
*iface
,DWORD fcc
,LPVOID lp
,LONG
*lpread
) {
360 FIXME_(avifile
)("(%p)->ReadData(0x%08lx,%p,%p)\n",iface
,fcc
,lp
,lpread
);
364 static HRESULT WINAPI
IAVIStream_fnWriteData(IAVIStream
*iface
,DWORD fcc
,LPVOID lp
,LONG size
) {
365 FIXME_(avifile
)("(%p)->WriteData(0x%08lx,%p,%ld)\n",iface
,fcc
,lp
,size
);
369 static HRESULT WINAPI
IAVIStream_fnSetInfo(IAVIStream
*iface
,AVISTREAMINFOW
*info
,LONG infolen
) {
370 FIXME_(avifile
)("(%p)->SetInfo(%p,%ld)\n",iface
,info
,infolen
);
374 HRESULT WINAPI
AVIFileCreateStreamA(PAVIFILE iface
,PAVISTREAM
*ppavi
,AVISTREAMINFOA
* psi
) {
377 /* Only the szName at the end is different */
378 memcpy(&psiw
,psi
,sizeof(*psi
)-sizeof(psi
->szName
));
379 lstrcpynAtoW(psiw
.szName
,psi
->szName
,sizeof(psi
->szName
));
380 return iface
->lpvtbl
->fnCreateStream(iface
,ppavi
,&psiw
);
383 HRESULT WINAPI
AVIFileCreateStreamW(IAVIFile
*iface
,PAVISTREAM
*avis
,AVISTREAMINFOW
*asi
) {
384 return iface
->lpvtbl
->fnCreateStream(iface
,avis
,asi
);
388 HRESULT WINAPI
AVIFileGetStream(IAVIFile
*iface
,PAVISTREAM
*avis
,DWORD fccType
,LONG lParam
) {
389 return iface
->lpvtbl
->fnGetStream(iface
,avis
,fccType
,lParam
);
392 HRESULT WINAPI
AVIFileInfoA(PAVIFILE iface
,LPAVIFILEINFOA afi
,LONG size
) {
396 if (size
< sizeof(AVIFILEINFOA
))
397 return AVIERR_BADSIZE
;
398 hres
= iface
->lpvtbl
->fnInfo(iface
,&afiw
,sizeof(afiw
));
399 memcpy(afi
,&afiw
,sizeof(*afi
)-sizeof(afi
->szFileType
));
400 lstrcpynWtoA(afi
->szFileType
,afiw
.szFileType
,sizeof(afi
->szFileType
));
404 HRESULT WINAPI
AVIStreamInfoW(PAVISTREAM iface
,AVISTREAMINFOW
*asi
,LONG
406 return iface
->lpvtbl
->fnInfo(iface
,asi
,size
);
409 HRESULT WINAPI
AVIStreamInfoA(PAVISTREAM iface
,AVISTREAMINFOA
*asi
,LONG
414 if (size
<sizeof(AVISTREAMINFOA
))
415 return AVIERR_BADSIZE
;
416 hres
= iface
->lpvtbl
->fnInfo(iface
,&asiw
,sizeof(asiw
));
417 memcpy(asi
,&asiw
,sizeof(asiw
)-sizeof(asiw
.szName
));
418 lstrcpynWtoA(asi
->szName
,asiw
.szName
,sizeof(asi
->szName
));
422 HRESULT WINAPI
AVIFileInfoW(PAVIFILE iface
,LPAVIFILEINFOW afi
,LONG size
) {
423 return iface
->lpvtbl
->fnInfo(iface
,afi
,size
);
426 HRESULT WINAPI
AVIMakeCompressedStream(PAVISTREAM
*ppsCompressed
,PAVISTREAM ppsSource
,AVICOMPRESSOPTIONS
*aco
,CLSID
*pclsidHandler
) {
429 FIXME_(avifile
)("(%p,%p,%p,%p)\n",ppsCompressed
,ppsSource
,aco
,pclsidHandler
);
431 memcpy(fcc
,&(aco
->fccType
),4);
432 FIXME_(avifile
)("\tfccType: '%s'\n",fcc
);
433 memcpy(fcc
,&(aco
->fccHandler
),4);
434 FIXME_(avifile
)("\tfccHandler: '%s'\n",fcc
);
435 FIXME_(avifile
)("\tdwFlags: 0x%08lx\n",aco
->dwFlags
);
437 /* we just create a duplicate for now */
438 ((IUnknown
*)ppsSource
)->lpvtbl
->fnAddRef((IUnknown
*)ppsSource
);
439 *ppsCompressed
= ppsSource
;
440 as
= (IAVIStreamImpl
*)ppsSource
;
442 /* this is where the fun begins. Open a compressor and prepare it. */
443 as
->hic
= ICOpen(aco
->fccType
,aco
->fccHandler
,ICMODE_COMPRESS
);
445 /* May happen. for instance if the codec is not able to compress */
447 return AVIERR_UNSUPPORTED
;
449 ICGetInfo(as
->hic
,&(as
->icinfo
),sizeof(ICINFO
));
450 FIXME_(avifile
)("Opened compressor: '%s' '%s'\n",debugstr_w(as
->icinfo
.szName
),debugstr_w(as
->icinfo
.szDescription
));
451 as
->iscompressing
= TRUE
;
452 memcpy(&(as
->aco
),aco
,sizeof(*aco
));
453 if (as
->icinfo
.dwFlags
& VIDCF_COMPRESSFRAMES
) {
454 ICCOMPRESSFRAMES icf
;
456 /* now what to fill in there ... Hmm */
457 memset(&icf
,0,sizeof(icf
));
458 icf
.lDataRate
= aco
->dwBytesPerSecond
;
459 icf
.lQuality
= aco
->dwQuality
;
460 icf
.lKeyRate
= aco
->dwKeyFrameEvery
;
462 icf
.GetData
= (LONG (*)(LPARAM
,LONG
,LPVOID
,LONG
)) 0xdead4242;
463 icf
.PutData
= (LONG (*)(LPARAM
,LONG
,LPVOID
,LONG
)) 0xdead4243;
464 ICSendMessage(as
->hic
,ICM_COMPRESS_FRAMES_INFO
,(LPARAM
)&icf
,sizeof(icf
));
469 HRESULT WINAPI
AVIStreamSetFormat(PAVISTREAM iface
,LONG pos
,LPVOID format
,LONG formatsize
) {
470 return iface
->lpvtbl
->fnSetFormat(iface
,pos
,format
,formatsize
);
473 HRESULT WINAPI
AVIStreamReadFormat(PAVISTREAM iface
,LONG pos
,LPVOID format
,LONG
*formatsize
) {
474 return iface
->lpvtbl
->fnReadFormat(iface
,pos
,format
,formatsize
);
477 HRESULT WINAPI
AVIStreamWrite(PAVISTREAM iface
,LONG start
,LONG samples
,LPVOID buffer
,LONG buffersize
,DWORD flags
,LONG
*sampwritten
,LONG
*byteswritten
) {
478 return iface
->lpvtbl
->fnWrite(iface
,start
,samples
,buffer
,buffersize
,flags
,sampwritten
,byteswritten
);
481 HRESULT WINAPI
AVIStreamRead(PAVISTREAM iface
,LONG start
,LONG samples
,LPVOID buffer
,LONG buffersize
,LONG
*bytesread
,LONG
*samplesread
) {
482 return iface
->lpvtbl
->fnRead(iface
,start
,samples
,buffer
,buffersize
,bytesread
,samplesread
);
485 HRESULT WINAPI
AVIStreamWriteData(PAVISTREAM iface
,DWORD fcc
,LPVOID lp
,LONG size
) {
486 return iface
->lpvtbl
->fnWriteData(iface
,fcc
,lp
,size
);
489 HRESULT WINAPI
AVIStreamReadData(PAVISTREAM iface
,DWORD fcc
,LPVOID lp
,LONG
*lpread
) {
490 return iface
->lpvtbl
->fnReadData(iface
,fcc
,lp
,lpread
);
493 LONG WINAPI
AVIStreamStart(PAVISTREAM iface
) {
496 iface
->lpvtbl
->fnInfo(iface
,&si
,sizeof(si
));
500 LONG WINAPI
AVIStreamLength(PAVISTREAM iface
) {
504 ret
= iface
->lpvtbl
->fnInfo(iface
,&si
,sizeof(si
));
510 ULONG WINAPI
AVIStreamRelease(PAVISTREAM iface
) {
511 return ((LPUNKNOWN
)iface
)->lpvtbl
->fnRelease((LPUNKNOWN
)iface
);
514 PGETFRAME WINAPI
AVIStreamGetFrameOpen(PAVISTREAM iface
,LPBITMAPINFOHEADER bmi
) {
515 FIXME_(msvideo
)("(%p)->(%p),stub!\n",iface
,bmi
);
519 LPVOID WINAPI
AVIStreamGetFrame(PGETFRAME pg
,LONG pos
) {
520 return pg
->lpvtbl
->fnGetFrame(pg
,pos
);
523 HRESULT WINAPI
AVIStreamGetFrameClose(PGETFRAME pg
) {
524 if (pg
) ((LPUNKNOWN
)pg
)->lpvtbl
->fnRelease((LPUNKNOWN
)pg
);
528 ULONG WINAPI
AVIFileRelease(PAVIFILE iface
) {
529 return ((LPUNKNOWN
)iface
)->lpvtbl
->fnRelease((LPUNKNOWN
)iface
);
532 void WINAPI
AVIFileExit(void) {
533 FIXME_(avifile
)("(), stub.\n");