Share via


AVIStreamSetFormat

The AVIStreamSetFormat function sets the format of a stream at the specified position.

STDAPI AVIStreamSetFormat(
  PAVISTREAM pavi,  
  LONG lPos,        
  LPVOID lpFormat,  
  LONG cbFormat     
);

Parameters

pavi

Handle to an open stream.

lPos

Position in the stream to receive the format.

lpFormat

Pointer to a structure containing the new format.

cbFormat

Size, in bytes, of the block of memory referenced by lpFormat.

Return Values

Returns zero if successful or an error otherwise.

Remarks

The handler for writing AVI files does not accept format changes. Besides setting the initial format for a stream, only changes in the palette of a video stream are allowed in an AVI file. The palette change must occur after any frames already written to the AVI file. Other handlers might impose different restrictions.

The argument pavi is a pointer to an IAVIStream interface.

Requirements

**  Windows NT/2000/XP:** Included in Windows NT 3.1 and later.
**  Windows 95/98/Me:** Included in Windows 95 and later.
**  Header:** Declared in Vfw.h.
**  Library:** Use Vfw32.lib.

See Also

AVIFile Functions and Macros, AVIFile Functions