fg_showavi()

Win32 DirectX Fastgraph/Light

Prototype

int fg_showavi (char *filename, int count, int flags);

Function fg_showavi (ByVal filename As String, ByVal count As Long, ByVal flags As Long) As Long

function fg_showavi (filename : string; count, flags : integer) : integer;

Description

The fg_showavi() function plays an animation sequence from an AVI file. Each frame in the AVI file is played in the active virtual buffer and then scaled to fit the client area.

Parameters

filename is the name of the AVI file. A device and path name may be included as part of the file name. The file name must be terminated by a zero byte.

count is the number of times to play the AVI image. If count is zero, the AVI plays continuously. You can stop the AVI play at any time by pressing the Escape key.

flags is a series of flags that controls how the AVI is played:

Flag

Meaning

FG_AT_XY

If specified, play the AVI file relative to the current graphics position. If not, play it relative to (0,0).

FG_IGNOREAVIPALETTE

If specified, play the AVI file using the current palette. If not, use the palette values stored in the AVI file. Not meaningful for high color or true color AVI files.

FG_NODELAY

If specified, play the AVI file with no delay between frames. If not, delay between frames as specified in the AVI header.

Return value

0 = AVI file opened successfully

-1 = The specified file does not exist

-2 = The specified file is not an AVI file

-3 = Error initializing the AVI video stream

-4 = Error allocating memory

-5 = The codec needed for the specified AVI file is not available

Restrictions

When using DirectX, the active virtual buffer must not be locked.

See also

fg_avihead(), fg_aviplay(), fg_avisize(), fg_realize()

Examples

Image

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.