Jo Engine 2026.11.1
Jo Sega Saturn Engine
Loading...
Searching...
No Matches
video.h File Reference

Jo Engine Video Player (Sega FILM/CPK File Format). More...

Go to the source code of this file.

Typedefs

typedef void(*) jo_video_onstop_callback(void)
 Function prototype for jo_video_play().

Functions

bool jo_video_open_file (const char *const filename)
 Open a Sega FILM / Cinepak.
bool jo_video_play (const jo_video_onstop_callback onstop)
 Play the movie previously loaded.
bool jo_video_pause (void)
 Pause the movie (must be called after jo_video_play()).
void jo_video_stop (void)
 Stop the movie (must be called after jo_video_play()).
static __jo_force_inline int jo_get_video_sprite (void)
 Get video sprite Id.

Variables

int __jo_video_sprite_id
 Error handling (Internal usage).

Detailed Description

Jo Engine Video Player (Sega FILM/CPK File Format).

Author
Johannes Fetz
Todo

handle all kind of movie (bpp, audio channel, etc)

Custom implementation

Reduce memory consumption

Bug
No known bugs.

Typedef Documentation

◆ jo_video_onstop_callback

typedef void(*) jo_video_onstop_callback(void)

Function prototype for jo_video_play().

Function Documentation

◆ jo_get_video_sprite()

__jo_force_inline int jo_get_video_sprite ( void )
static

Get video sprite Id.

Returns
sprite Id
Remarks
The movie uses 2 sprites (double buffering), so call it every frame: the sprite Id changes when a new frame is ready

◆ jo_video_open_file()

bool jo_video_open_file ( const char *const filename)

Open a Sega FILM / Cinepak.

Parameters
filenameFilename (upper case and shorter as possible like "A.CPK")
Returns
true if succeeded

◆ jo_video_pause()

bool jo_video_pause ( void )

Pause the movie (must be called after jo_video_play()).

Warning
To play the movie again, you must reopen the movie (jo_video_open_file())
Returns
true if succeeded

◆ jo_video_play()

bool jo_video_play ( const jo_video_onstop_callback onstop)

Play the movie previously loaded.

Returns
true if succeeded

◆ jo_video_stop()

void jo_video_stop ( void )

Stop the movie (must be called after jo_video_play()).

Warning
To play the movie again, you must reopen the movie (jo_video_open_file())

Variable Documentation

◆ __jo_video_sprite_id

int __jo_video_sprite_id
extern

Error handling (Internal usage).

Warning
MC Hammer: don't touch this