VX_UnpackFrameImage


C Specification

#include <nitro/vx.h>

u32     VX_UnpackFrameImage         ( VXHandle handle );

Description

Unpacks the image of a frame and puts it in the internal image frame FIFO.

libVX stores unpacked image frames in an internal FIFO.
The size of this FIFO is determined at the opening of the movie with the functions VX_OpenMovieFromMemory or 
VX_OpenMovieFromFile and is equal to the value of the parameter 'nbBufferedFrameMax' passed to either one of these two 
functions.

Each time VX_UnpackFrameImage is called, the new unpacked image is added to the FIFO.

Each time VX_BlitFrameImage or VX_SkipFrameImage functions are called, the oldest unpacked image is removed from the 
FIFO (after being blitted or skipped).

You can call VX_UnpackFrameImage 'nbBufferedFrameMax' times without the need to call VX_BlitFrameImage or VX_SkipFrameImage.

This is a useful feature which allows to do frame buffering:
At some point in the movie playback, calling VX_UnpackFrameImage can be a time consuming operation which can cause sound buffer 
underflow. 
Prebuffering image frames allows to smooth occasional CPU peaks, thus preventing sound buffer underflow.

Arguments

handle Valid handle movie.

Return Values

1 if no error, 0 if error (no free internal buffer available) or if the handle is VX_INVALID_HANDLE.

See Also

VX_ReadFrame
VX_BlitFrameImage
VX_SkipFrameImage

Revision History

10/26/2005 Initial Version