fgi_showavi() (Fastgraph/Image)

Win32 DirectX Fastgraph/Light


int fgi_showavi (char *filename, int count, int flags, int handle);

Function fgi_showavi (ByVal filename As String, ByVal count As Long, ByVal flags As Long, handle As Long) As Long

function fgi_showavi (filename : string; count, flags, handle : integer) : integer;


The fgi_showavi() function plays an AVI file stored in an FGI library. Each frame in the AVI file is played in the active virtual buffer and then scaled to fit the client area.


filename is the name of the AVI file. It may only include a file name and extension (such as CLOCK.AVI) and must be terminated by a null character (that is, 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:




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


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.


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

handle is the file handle for the FGI library containing filename.

Return value

0 = Success

-1 = Error reading the FGI library

-2 = The requested file is not in the FGI library

-3 = The requested file is not an AVI file

-4 = Error initializing the AVI video stream

-5 = Error allocating memory

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

-7 = Error creating or writing to a temporary file


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

See also

fgi_avihead(), fgi_avipal(), fg_aviplay(), fg_avisize(), fgi_display(), fg_realize()



Fastgraph Home Page


copyright 2001 Ted Gruber Software, Inc.