2 * Copyright 1999 Marcus Meissner
13 #include "debugtools.h"
15 DEFAULT_DEBUG_CHANNEL(avifile
);
17 static HRESULT WINAPI
IAVIFile_fnQueryInterface(IAVIFile
* iface
,REFIID refiid
,LPVOID
*obj
);
18 static ULONG WINAPI
IAVIFile_fnAddRef(IAVIFile
* iface
);
19 static ULONG WINAPI
IAVIFile_fnRelease(IAVIFile
* iface
);
20 static HRESULT WINAPI
IAVIFile_fnInfo(IAVIFile
*iface
,AVIFILEINFOW
*afi
,LONG size
);
21 static HRESULT WINAPI
IAVIFile_fnGetStream(IAVIFile
*iface
,PAVISTREAM
*avis
,DWORD fccType
,LONG lParam
);
22 static HRESULT WINAPI
IAVIFile_fnCreateStream(IAVIFile
*iface
,PAVISTREAM
*avis
,AVISTREAMINFOW
*asi
);
23 static HRESULT WINAPI
IAVIFile_fnWriteData(IAVIFile
*iface
,DWORD ckid
,LPVOID lpData
,LONG size
);
24 static HRESULT WINAPI
IAVIFile_fnReadData(IAVIFile
*iface
,DWORD ckid
,LPVOID lpData
,LONG
*size
);
25 static HRESULT WINAPI
IAVIFile_fnEndRecord(IAVIFile
*iface
);
26 static HRESULT WINAPI
IAVIFile_fnDeleteStream(IAVIFile
*iface
,DWORD fccType
,LONG lParam
);
28 struct ICOM_VTABLE(IAVIFile
) iavift
= {
29 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
30 IAVIFile_fnQueryInterface
,
35 IAVIFile_fnCreateStream
,
39 IAVIFile_fnDeleteStream
42 static HRESULT WINAPI
IAVIStream_fnQueryInterface(IAVIStream
*iface
,REFIID refiid
,LPVOID
*obj
);
43 static ULONG WINAPI
IAVIStream_fnAddRef(IAVIStream
*iface
);
44 static ULONG WINAPI
IAVIStream_fnRelease(IAVIStream
* iface
);
45 static HRESULT WINAPI
IAVIStream_fnCreate(IAVIStream
*iface
,LPARAM lParam1
,LPARAM lParam2
);
46 static HRESULT WINAPI
IAVIStream_fnInfo(IAVIStream
*iface
,AVISTREAMINFOW
*psi
,LONG size
);
47 static LONG WINAPI
IAVIStream_fnFindSample(IAVIStream
*iface
,LONG pos
,LONG flags
);
48 static HRESULT WINAPI
IAVIStream_fnReadFormat(IAVIStream
*iface
,LONG pos
,LPVOID format
,LONG
*formatsize
);
49 static HRESULT WINAPI
IAVIStream_fnSetFormat(IAVIStream
*iface
,LONG pos
,LPVOID format
,LONG formatsize
);
50 static HRESULT WINAPI
IAVIStream_fnRead(IAVIStream
*iface
,LONG start
,LONG samples
,LPVOID buffer
,LONG buffersize
,LONG
*bytesread
,LONG
*samplesread
);
51 static HRESULT WINAPI
IAVIStream_fnWrite(IAVIStream
*iface
,LONG start
,LONG samples
,LPVOID buffer
,LONG buffersize
,DWORD flags
,LONG
*sampwritten
,LONG
*byteswritten
);
52 static HRESULT WINAPI
IAVIStream_fnDelete(IAVIStream
*iface
,LONG start
,LONG samples
);
53 static HRESULT WINAPI
IAVIStream_fnReadData(IAVIStream
*iface
,DWORD fcc
,LPVOID lp
,LONG
*lpread
);
54 static HRESULT WINAPI
IAVIStream_fnWriteData(IAVIStream
*iface
,DWORD fcc
,LPVOID lp
,LONG size
);
55 static HRESULT WINAPI
IAVIStream_fnSetInfo(IAVIStream
*iface
,AVISTREAMINFOW
*info
,LONG infolen
);
57 struct ICOM_VTABLE(IAVIStream
) iavist
= {
58 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
59 IAVIStream_fnQueryInterface
,
64 IAVIStream_fnFindSample
,
65 IAVIStream_fnReadFormat
,
66 IAVIStream_fnSetFormat
,
70 IAVIStream_fnReadData
,
71 IAVIStream_fnWriteData
,
75 typedef struct IAVIStreamImpl
{
77 ICOM_VFIELD(IAVIStream
);
79 /* IAVIStream stuff */
81 DWORD inputformatsize
;
85 /* Compressor stuff */
87 LPVOID lpCompressFormat
;
95 AVICOMPRESSOPTIONS aco
;
97 LPVOID lpPrev
; /* pointer to decompressed frame later */
98 LPVOID lpPrevFormat
; /* pointer to decompressed info later */
101 /***********************************************************************
102 * AVIFileInit (AVIFIL32.@)
103 * AVIFileInit (AVIFILE.100)
110 typedef struct IAVIFileImpl
{
112 ICOM_VFIELD(IAVIFile
);
114 /* IAVIFile stuff... */
117 static HRESULT WINAPI
IAVIFile_fnQueryInterface(IAVIFile
* iface
,REFIID refiid
,LPVOID
*obj
) {
118 ICOM_THIS(IAVIFileImpl
,iface
);
120 TRACE("(%p)->QueryInterface(%s,%p)\n",This
,debugstr_guid(refiid
),obj
);
121 if ( !memcmp(&IID_IUnknown
,refiid
,sizeof(IID_IUnknown
)) ||
122 !memcmp(&IID_IAVIFile
,refiid
,sizeof(IID_IAVIFile
))
127 return OLE_E_ENUM_NOMORE
;
130 static ULONG WINAPI
IAVIFile_fnAddRef(IAVIFile
* iface
) {
131 ICOM_THIS(IAVIFileImpl
,iface
);
133 FIXME("(%p)->AddRef()\n",iface
);
134 return ++(This
->ref
);
137 static ULONG WINAPI
IAVIFile_fnRelease(IAVIFile
* iface
) {
138 ICOM_THIS(IAVIFileImpl
,iface
);
140 FIXME("(%p)->Release()\n",iface
);
141 if (!--(This
->ref
)) {
142 HeapFree(GetProcessHeap(),0,iface
);
148 static HRESULT WINAPI
IAVIFile_fnInfo(IAVIFile
*iface
,AVIFILEINFOW
*afi
,LONG size
) {
149 FIXME("(%p)->Info(%p,%ld)\n",iface
,afi
,size
);
151 /* FIXME: fill out struct? */
155 static HRESULT WINAPI
IAVIFile_fnGetStream(IAVIFile
*iface
,PAVISTREAM
*avis
,DWORD fccType
,LONG lParam
) {
156 FIXME("(%p)->GetStream(%p,0x%08lx,%ld)\n",iface
,avis
,fccType
,lParam
);
157 /* FIXME: create interface etc. */
161 static HRESULT WINAPI
IAVIFile_fnCreateStream(IAVIFile
*iface
,PAVISTREAM
*avis
,AVISTREAMINFOW
*asi
) {
162 ICOM_THIS(IAVIStreamImpl
,iface
);
164 IAVIStreamImpl
*istream
;
166 FIXME("(%p,%p,%p)\n",This
,avis
,asi
);
167 istream
= (IAVIStreamImpl
*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY
,sizeof(IAVIStreamImpl
));
169 ICOM_VTBL(istream
) = &iavist
;
171 memcpy(fcc
,(char*)&(asi
->fccType
),4);
172 FIXME("\tfccType '%s'\n",fcc
);
173 memcpy(fcc
,(char*)&(asi
->fccHandler
),4);
174 FIXME("\tfccHandler '%s'\n",fcc
);
175 FIXME("\tdwFlags 0x%08lx\n",asi
->dwFlags
);
176 FIXME("\tdwCaps 0x%08lx\n",asi
->dwCaps
);
177 FIXME("\tname '%s'\n",debugstr_w(asi
->szName
));
179 istream
->curframe
= 0;
180 *avis
= (PAVISTREAM
)istream
;
184 static HRESULT WINAPI
IAVIFile_fnWriteData(IAVIFile
*iface
,DWORD ckid
,LPVOID lpData
,LONG size
) {
185 FIXME("(%p)->WriteData(0x%08lx,%p,%ld)\n",iface
,ckid
,lpData
,size
);
186 /* FIXME: write data to file */
190 static HRESULT WINAPI
IAVIFile_fnReadData(IAVIFile
*iface
,DWORD ckid
,LPVOID lpData
,LONG
*size
) {
191 FIXME("(%p)->ReadData(0x%08lx,%p,%p)\n",iface
,ckid
,lpData
,size
);
192 /* FIXME: read at most size bytes from file */
196 static HRESULT WINAPI
IAVIFile_fnEndRecord(IAVIFile
*iface
) {
197 FIXME("(%p)->EndRecord()\n",iface
);
198 /* FIXME: end record? */
202 static HRESULT WINAPI
IAVIFile_fnDeleteStream(IAVIFile
*iface
,DWORD fccType
,LONG lParam
) {
203 FIXME("(%p)->DeleteStream(0x%08lx,%ld)\n",iface
,fccType
,lParam
);
204 /* FIXME: delete stream? */
208 /***********************************************************************
209 * AVIFileOpenA (AVIFIL32.@)
210 * AVIFileOpenA (AVIFILE.102)
212 HRESULT WINAPI
AVIFileOpenA(
213 PAVIFILE
* ppfile
,LPCSTR szFile
,UINT uMode
,LPCLSID lpHandler
217 FIXME("(%p,%s,0x%08lx,%s),stub!\n",ppfile
,szFile
,(DWORD
)uMode
,debugstr_guid(lpHandler
));
218 iavi
= (IAVIFileImpl
*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY
,sizeof(IAVIFileImpl
));
220 ICOM_VTBL(iavi
) = &iavift
;
221 *ppfile
= (LPVOID
)iavi
;
225 static HRESULT WINAPI
IAVIStream_fnQueryInterface(IAVIStream
*iface
,REFIID refiid
,LPVOID
*obj
) {
226 ICOM_THIS(IAVIStreamImpl
,iface
);
228 TRACE("(%p)->QueryInterface(%s,%p)\n",This
,debugstr_guid(refiid
),obj
);
229 if ( !memcmp(&IID_IUnknown
,refiid
,sizeof(IID_IUnknown
)) ||
230 !memcmp(&IID_IAVIStream
,refiid
,sizeof(IID_IAVIStream
))
235 /* can return IGetFrame interface too */
236 return OLE_E_ENUM_NOMORE
;
239 static ULONG WINAPI
IAVIStream_fnAddRef(IAVIStream
*iface
) {
240 ICOM_THIS(IAVIStreamImpl
,iface
);
242 FIXME("(%p)->AddRef()\n",iface
);
243 return ++(This
->ref
);
246 static ULONG WINAPI
IAVIStream_fnRelease(IAVIStream
* iface
) {
247 ICOM_THIS(IAVIStreamImpl
,iface
);
249 FIXME("(%p)->Release()\n",iface
);
250 if (!--(This
->ref
)) {
251 HeapFree(GetProcessHeap(),0,This
);
257 static HRESULT WINAPI
IAVIStream_fnCreate(IAVIStream
*iface
,LPARAM lParam1
,LPARAM lParam2
) {
258 FIXME("(%p)->Create(0x%08lx,0x%08lx)\n",iface
,lParam1
,lParam2
);
262 static HRESULT WINAPI
IAVIStream_fnInfo(IAVIStream
*iface
,AVISTREAMINFOW
*psi
,LONG size
) {
263 FIXME("(%p)->Info(%p,%ld)\n",iface
,psi
,size
);
267 static LONG WINAPI
IAVIStream_fnFindSample(IAVIStream
*iface
,LONG pos
,LONG flags
) {
268 FIXME("(%p)->FindSample(%ld,0x%08lx)\n",iface
,pos
,flags
);
272 static HRESULT WINAPI
IAVIStream_fnReadFormat(IAVIStream
*iface
,LONG pos
,LPVOID format
,LONG
*formatsize
) {
273 FIXME("(%p)->ReadFormat(%ld,%p,%p)\n",iface
,pos
,format
,formatsize
);
277 /***********************************************************************
278 * IAVIStream::SetFormat
280 static HRESULT WINAPI
IAVIStream_fnSetFormat(IAVIStream
*iface
,LONG pos
,LPVOID format
,LONG formatsize
) {
281 IAVIStreamImpl
*as
= (IAVIStreamImpl
*)iface
;
283 FIXME("(%p)->SetFormat(%ld,%p,%ld)\n",iface
,pos
,format
,formatsize
);
284 if (as
->lpInputFormat
) HeapFree(GetProcessHeap(),0,as
->lpInputFormat
);
285 as
->inputformatsize
= formatsize
;
286 as
->lpInputFormat
= HeapAlloc(GetProcessHeap(),0,formatsize
);
287 memcpy(as
->lpInputFormat
,format
,formatsize
);
288 if (as
->iscompressing
) {
290 /* Set up the Compressor part */
291 xsize
= ICCompressGetFormatSize(as
->hic
,as
->lpInputFormat
);
292 as
->lpCompressFormat
= HeapAlloc(GetProcessHeap(),0,xsize
);
293 ICCompressGetFormat(as
->hic
,as
->lpInputFormat
,as
->lpCompressFormat
);
294 ICCompressBegin(as
->hic
,as
->lpInputFormat
,as
->lpCompressFormat
);
295 as
->compbufsize
= ICCompressGetSize(as
->hic
,as
->lpInputFormat
,as
->lpCompressFormat
);
296 as
->compbuffer
= HeapAlloc(GetProcessHeap(),0,as
->compbufsize
);
298 /* Set up the Decompressor part (for prev frames?) */
299 xsize
=ICDecompressGetFormatSize(as
->hic
,as
->lpCompressFormat
);
300 as
->decompformat
= HeapAlloc(GetProcessHeap(),0,xsize
);
301 ICDecompressGetFormat(as
->hic
,as
->lpCompressFormat
,as
->decompformat
);
302 as
->decompbufsize
=((LPBITMAPINFOHEADER
)as
->decompbuffer
)->biSizeImage
;
303 as
->decompbuffer
= HeapReAlloc(GetProcessHeap(),0,as
->decompbuffer
,as
->decompbufsize
);
304 memset(as
->decompbuffer
,0xff,as
->decompbufsize
);
305 assert(HeapValidate(GetProcessHeap(),0,NULL
));
307 ICDecompressGetFormat(as
->hic
,as
->lpCompressFormat
,as
->decompformat
);
308 ICDecompressBegin(as
->hic
,as
->lpCompressFormat
,as
->decompformat
);
309 as
->lpPrev
= as
->lpPrevFormat
= NULL
;
314 static HRESULT WINAPI
IAVIStream_fnRead(IAVIStream
*iface
,LONG start
,LONG samples
,LPVOID buffer
,LONG buffersize
,LONG
*bytesread
,LONG
*samplesread
) {
315 FIXME("(%p)->Read(%ld,%ld,%p,%ld,%p,%p)\n",iface
,start
,samples
,buffer
,buffersize
,bytesread
,samplesread
);
319 static HRESULT WINAPI
IAVIStream_fnWrite(IAVIStream
*iface
,LONG start
,LONG samples
,LPVOID buffer
,LONG buffersize
,DWORD flags
,LONG
*sampwritten
,LONG
*byteswritten
) {
320 IAVIStreamImpl
*as
= (IAVIStreamImpl
*)iface
;
323 FIXME("(%p)->Write(%ld,%ld,%p,%ld,0x%08lx,%p,%p)\n",iface
,start
,samples
,buffer
,buffersize
,flags
,sampwritten
,byteswritten
);
327 as
->lpCompressFormat
,
329 as
->lpInputFormat
,buffer
,
331 as
->curframe
,0xffffff/*framesize*/,as
->aco
.dwQuality
,
332 as
->lpPrevFormat
,as
->lpPrev
336 flags
, /* FIXME: check */
337 as
->lpCompressFormat
,
342 /* We now have a prev format for the next compress ... */
343 as
->lpPrevFormat
= as
->decompformat
;
344 as
->lpPrev
= as
->decompbuffer
;
348 static HRESULT WINAPI
IAVIStream_fnDelete(IAVIStream
*iface
,LONG start
,LONG samples
) {
349 FIXME("(%p)->Delete(%ld,%ld)\n",iface
,start
,samples
);
352 static HRESULT WINAPI
IAVIStream_fnReadData(IAVIStream
*iface
,DWORD fcc
,LPVOID lp
,LONG
*lpread
) {
353 FIXME("(%p)->ReadData(0x%08lx,%p,%p)\n",iface
,fcc
,lp
,lpread
);
357 static HRESULT WINAPI
IAVIStream_fnWriteData(IAVIStream
*iface
,DWORD fcc
,LPVOID lp
,LONG size
) {
358 FIXME("(%p)->WriteData(0x%08lx,%p,%ld)\n",iface
,fcc
,lp
,size
);
362 static HRESULT WINAPI
IAVIStream_fnSetInfo(IAVIStream
*iface
,AVISTREAMINFOW
*info
,LONG infolen
) {
363 FIXME("(%p)->SetInfo(%p,%ld)\n",iface
,info
,infolen
);
367 /***********************************************************************
368 * AVIFileCreateStreamA (AVIFIL32.@)
370 HRESULT WINAPI
AVIFileCreateStreamA(PAVIFILE iface
,PAVISTREAM
*ppavi
,AVISTREAMINFOA
* psi
) {
373 /* Only the szName at the end is different */
374 memcpy(&psiw
,psi
,sizeof(*psi
)-sizeof(psi
->szName
));
375 MultiByteToWideChar( CP_ACP
, 0, psi
->szName
, -1,
376 psiw
.szName
, sizeof(psiw
.szName
) / sizeof(WCHAR
) );
377 return IAVIFile_CreateStream(iface
,ppavi
,&psiw
);
380 /***********************************************************************
381 * AVIFileCreateStreamW (AVIFIL32.@)
383 HRESULT WINAPI
AVIFileCreateStreamW(IAVIFile
*iface
,PAVISTREAM
*avis
,AVISTREAMINFOW
*asi
) {
384 return IAVIFile_CreateStream(iface
,avis
,asi
);
388 /***********************************************************************
389 * AVIFileGetStream (AVIFIL32.@)
390 * AVIFileGetStream (AVIFILE.143)
392 HRESULT WINAPI
AVIFileGetStream(IAVIFile
*iface
,PAVISTREAM
*avis
,DWORD fccType
,LONG lParam
) {
393 return IAVIFile_GetStream(iface
,avis
,fccType
,lParam
);
396 /***********************************************************************
397 * AVIFileInfoA (AVIFIL32.@)
399 HRESULT WINAPI
AVIFileInfoA(PAVIFILE iface
,LPAVIFILEINFOA afi
,LONG size
) {
403 if (size
< sizeof(AVIFILEINFOA
))
404 return AVIERR_BADSIZE
;
405 hres
= IAVIFile_Info(iface
,&afiw
,sizeof(afiw
));
406 memcpy(afi
,&afiw
,sizeof(*afi
)-sizeof(afi
->szFileType
));
407 WideCharToMultiByte( CP_ACP
, 0, afiw
.szFileType
, -1,
408 afi
->szFileType
, sizeof(afi
->szFileType
), NULL
, NULL
);
409 afi
->szFileType
[sizeof(afi
->szFileType
)-1] = 0;
413 /***********************************************************************
414 * AVIStreamInfoW (AVIFIL32.@)
416 HRESULT WINAPI
AVIStreamInfoW(PAVISTREAM iface
,AVISTREAMINFOW
*asi
,LONG
418 return IAVIFile_Info(iface
,asi
,size
);
421 /***********************************************************************
422 * AVIStreamInfoA (AVIFIL32.@)
424 HRESULT WINAPI
AVIStreamInfoA(PAVISTREAM iface
,AVISTREAMINFOA
*asi
,LONG
429 if (size
<sizeof(AVISTREAMINFOA
))
430 return AVIERR_BADSIZE
;
431 hres
= IAVIFile_Info(iface
,&asiw
,sizeof(asiw
));
432 memcpy(asi
,&asiw
,sizeof(asiw
)-sizeof(asiw
.szName
));
433 WideCharToMultiByte( CP_ACP
, 0, asiw
.szName
, -1,
434 asi
->szName
, sizeof(asi
->szName
), NULL
, NULL
);
435 asi
->szName
[sizeof(asi
->szName
)-1] = 0;
439 /***********************************************************************
440 * AVIFileInfoW (AVIFIL32.@)
442 HRESULT WINAPI
AVIFileInfoW(PAVIFILE iface
,LPAVIFILEINFOW afi
,LONG size
) {
443 return IAVIFile_Info(iface
,afi
,size
);
446 /***********************************************************************
447 * AVIMakeCompressedStream (AVIFIL32.@)
449 HRESULT WINAPI
AVIMakeCompressedStream(PAVISTREAM
*ppsCompressed
,PAVISTREAM ppsSource
,AVICOMPRESSOPTIONS
*aco
,CLSID
*pclsidHandler
) {
452 FIXME("(%p,%p,%p,%p)\n",ppsCompressed
,ppsSource
,aco
,pclsidHandler
);
454 memcpy(fcc
,&(aco
->fccType
),4);
455 FIXME("\tfccType: '%s'\n",fcc
);
456 memcpy(fcc
,&(aco
->fccHandler
),4);
457 FIXME("\tfccHandler: '%s'\n",fcc
);
458 FIXME("\tdwFlags: 0x%08lx\n",aco
->dwFlags
);
460 /* we just create a duplicate for now */
461 IAVIStream_AddRef(ppsSource
);
462 *ppsCompressed
= ppsSource
;
463 as
= (IAVIStreamImpl
*)ppsSource
;
465 /* this is where the fun begins. Open a compressor and prepare it. */
466 as
->hic
= ICOpen(aco
->fccType
,aco
->fccHandler
,ICMODE_COMPRESS
);
468 /* May happen. for instance if the codec is not able to compress */
470 return AVIERR_UNSUPPORTED
;
472 ICGetInfo(as
->hic
,&(as
->icinfo
),sizeof(ICINFO
));
473 FIXME("Opened compressor: '%s' '%s'\n",debugstr_w(as
->icinfo
.szName
),debugstr_w(as
->icinfo
.szDescription
));
474 as
->iscompressing
= TRUE
;
475 memcpy(&(as
->aco
),aco
,sizeof(*aco
));
476 if (as
->icinfo
.dwFlags
& VIDCF_COMPRESSFRAMES
) {
477 ICCOMPRESSFRAMES icf
;
479 /* now what to fill in there ... Hmm */
480 memset(&icf
,0,sizeof(icf
));
481 icf
.lDataRate
= aco
->dwBytesPerSecond
;
482 icf
.lQuality
= aco
->dwQuality
;
483 icf
.lKeyRate
= aco
->dwKeyFrameEvery
;
485 icf
.GetData
= (void *)0xdead4242;
486 icf
.PutData
= (void *)0xdead4243;
487 ICSendMessage(as
->hic
,ICM_COMPRESS_FRAMES_INFO
,(LPARAM
)&icf
,sizeof(icf
));
492 /***********************************************************************
493 * AVIStreamSetFormat (AVIFIL32.@)
495 HRESULT WINAPI
AVIStreamSetFormat(PAVISTREAM iface
,LONG pos
,LPVOID format
,LONG formatsize
) {
496 return IAVIStream_SetFormat(iface
,pos
,format
,formatsize
);
499 /***********************************************************************
500 * AVIStreamReadFormat (AVIFIL32.@)
502 HRESULT WINAPI
AVIStreamReadFormat(PAVISTREAM iface
,LONG pos
,LPVOID format
,LONG
*formatsize
) {
503 return IAVIStream_ReadFormat(iface
,pos
,format
,formatsize
);
506 /***********************************************************************
507 * AVIStreamWrite (AVIFIL32.@)
509 HRESULT WINAPI
AVIStreamWrite(PAVISTREAM iface
,LONG start
,LONG samples
,LPVOID buffer
,LONG buffersize
,DWORD flags
,LONG
*sampwritten
,LONG
*byteswritten
) {
510 return IAVIStream_Write(iface
,start
,samples
,buffer
,buffersize
,flags
,sampwritten
,byteswritten
);
513 /***********************************************************************
514 * AVIStreamRead (AVIFIL32.@)
516 HRESULT WINAPI
AVIStreamRead(PAVISTREAM iface
,LONG start
,LONG samples
,LPVOID buffer
,LONG buffersize
,LONG
*bytesread
,LONG
*samplesread
) {
517 return IAVIStream_Read(iface
,start
,samples
,buffer
,buffersize
,bytesread
,samplesread
);
520 /***********************************************************************
521 * AVIStreamWriteData (AVIFIL32.@)
523 HRESULT WINAPI
AVIStreamWriteData(PAVISTREAM iface
,DWORD fcc
,LPVOID lp
,LONG size
) {
524 return IAVIStream_WriteData(iface
,fcc
,lp
,size
);
527 /***********************************************************************
528 * AVIStreamReadData (AVIFIL32.@)
530 HRESULT WINAPI
AVIStreamReadData(PAVISTREAM iface
,DWORD fcc
,LPVOID lp
,LONG
*lpread
) {
531 return IAVIStream_ReadData(iface
,fcc
,lp
,lpread
);
534 /***********************************************************************
535 * AVIStreamStart (AVIFIL32.@)
537 LONG WINAPI
AVIStreamStart(PAVISTREAM iface
) {
540 IAVIStream_Info(iface
,&si
,sizeof(si
));
544 /***********************************************************************
545 * AVIStreamLength (AVIFIL32.@)
547 LONG WINAPI
AVIStreamLength(PAVISTREAM iface
) {
551 ret
= IAVIStream_Info(iface
,&si
,sizeof(si
));
557 /***********************************************************************
558 * AVIStreamRelease (AVIFIL32.@)
560 ULONG WINAPI
AVIStreamRelease(PAVISTREAM iface
) {
561 return IAVIStream_Release(iface
);
564 /***********************************************************************
565 * AVIStreamGetFrameOpen (AVIFIL32.@)
567 PGETFRAME WINAPI
AVIStreamGetFrameOpen(PAVISTREAM iface
,LPBITMAPINFOHEADER bmi
) {
568 FIXME("(%p)->(%p),stub!\n",iface
,bmi
);
572 /***********************************************************************
573 * AVIStreamGetFrame (AVIFIL32.@)
575 LPVOID WINAPI
AVIStreamGetFrame(PGETFRAME pg
,LONG pos
) {
576 return IGetFrame_GetFrame(pg
,pos
);
579 /***********************************************************************
580 * AVIStreamGetFrameClose (AVIFIL32.@)
582 HRESULT WINAPI
AVIStreamGetFrameClose(PGETFRAME pg
) {
583 if (pg
) IGetFrame_Release(pg
);
587 /***********************************************************************
588 * AVIFileRelease (AVIFIL32.@)
589 * AVIFileRelease (AVIFILE.141)
591 ULONG WINAPI
AVIFileRelease(PAVIFILE iface
) {
592 return IAVIFile_Release(iface
);
595 /***********************************************************************
596 * AVIFileExit (AVIFIL32.@)
597 * AVIFileExit (AVIFILE.101)
599 void WINAPI
AVIFileExit(void) {
600 FIXME("(), stub.\n");