Main Page   Modules   Data Structures   Data Fields   Related Pages  

MJpgAlleg

The soul of MJpgAlleg is here. More...

Data Structures

struct  MJPGA_MOVIE
 The main struct of MJpgAlleg, it contain all information to play the movie. More...


Defines

#define MJPGAT_DAT   AL_ID('D', 'A', 'T', ' ')
 Type datafile.

#define MJPGAT_AVI   AL_ID('A', 'V', 'I', ' ')
 Type avi file.

#define MJPGAST_JPG   AL_ID('J', 'P', 'G', ' ')
 Subtype jpg (only to datafiles).

#define MJPGAST_M4V   AL_ID('M', '4', 'V', ' ')
 Subtype m4v (only to datafiles).

#define MJPGAST_XVID   AL_ID('X', 'V', 'I', 'D')
 Subtype XviD (only to avi files).

#define MJPGAST_DIVX   AL_ID('D', 'I', 'V', 'X')
 Subtype DivX (only to avi files).

#define MJPGAM_NORMAL   0
 Display mode normal.

#define MJPGAM_FULL   1
 Display mode full screen.

#define MJPGAM_CENTER   2
 Display mode center.

#define MJPGAM_HALF   3
 Display mode half size.

#define MJPGAM_DOUBLE   4
 Display mode double size.

#define MJPGAM_TOTAL_MODES   (MJPGAM_DOUBLE + 1)
 Numer of display modes.


Typedefs

typedef MJPGA_MOVIE MJPGA_MOVIE
 The main struct of MJpgAlleg, it contain all information to play the movie.


Functions

void init_movie (void)
 Alloc the memory for the movie.

int play_movie (const char *file, BITMAP *bmp, int(*callback)())
 Play the movie, like play_fli().

int open_movie (const char *file)
 Open a movie and prepare to play.

void close_movie (void)
 Close the movie.

int update_movie_frame (void)
 Jump to current frame.

void set_mode_movie (unsigned char mode)
 Set movie mode.

unsigned char get_mode_movie (void)
 Get movie mode.


Variables

MJPGA_MOVIEthe_movie
 Current movie playing.

volatile int timer_movie
 When timer_movie > 0, is necessary to update the frame.


Detailed Description

The soul of MJpgAlleg is here.

This files is the core of the library.

Author:
Eduardo "Dudaskank"
Date:

Function Documentation

void close_movie void   
 

Close the movie.

This function call the appropriate close_movie_xxx() for each type of movie, and free the memory.

Returns:
Nothing
See also:
close_movie_dat(), close_movie_avi()
Author:
Eduardo "Dudaskank"
Date:
  • Created : ??/05/2002
  • Updated : 30/9/2002

unsigned char get_mode_movie void   
 

Get movie mode.

Return the display mode (0 is normal, non zero is fullscreen).

Returns:
Current display mode
See also:
set_mode_movie()
Author:
Eduardo "Dudaskank"
Date:
  • Created : 30/9/2002
  • Updated : -

void init_movie void   
 

Alloc the memory for the movie.

Alloc and start the global var the_movie and lock the timer and timer function in the first call.

Returns:
Nothing
Author:
Eduardo "Dudaskank"
Date:
  • Created : ??/05/2002
  • Updated : 09/10/2002

int open_movie const char *    file
 

Open a movie and prepare to play.

It will open file with the appropriate function, based on the extension of file.

Returns:
1 on error, 0 ok
See also:
open_movie_dat(), open_movie_avi()
Author:
Eduardo "Dudaskank"
Date:
  • Created : ??/05/2002
  • Updated : 30/09/2002

int play_movie const char *    file,
BITMAP *    bmp,
int(*    callback)()
 

Play the movie, like play_fli().

This function is like play_fli(). It will open the file calling open_movie(), and if it's ok, call the appropriate play_movie_xxx() based on the type of the movie.

The bmp is the destination bitmap, and callback, if not NULL, will be called every time during the execution of the movie.

If callback returns non zero, the movie stops.

Returns:
1 on error, 0 ok
See also:
play_movie_dat(), play_movie_avi()
Author:
Eduardo "Dudaskank"
Date:
  • Created : ??/05/2002
  • Updated : 30/9/2002

void set_mode_movie unsigned char    mode
 

Set movie mode.

Set the display mode (0 is normal, non zero is fullscreen).

Maybe I can add more modes in the near future (50%, 200%, ...).

Returns:
Nothing
See also:
get_mode_movie()
Author:
Eduardo "Dudaskank"
Date:
  • Created : 30/9/2002
  • Updated : -

int update_movie_frame void   
 

Jump to current frame.

Call this for change to actual movie frame.

Returns:
0 if ok, non zero if end of movie
See also:
update_movie_frame_dat(), update_movie_frame_avi()
Author:
Eduardo "Dudaskank"
Date:
  • Created : 30/9/2002
  • Updated : -


Generated on Mon Apr 7 00:19:25 2003 for MJpgAlleg by doxygen1.2.18