|
resonance 1.0.1
|
#include <ezmpeg.h>#include <libgraph.h>
Go to the source code of this file.
Functions | |
| void | play_cutscene (const char *name, int with_audio) |
| Play a PSS movie to the end, or until the player skips it. | |
Variables | |
| VoBuf | voBuf |
| The decoded frame queue. | |
| sceGsDBuff | db |
| The display double buffer. | |
| VideoDec | videoDec |
| The video decoder instance. | |
| AudioDec | audioDec |
| The audio decoder instance. | |
| void play_cutscene | ( | const char * | name, |
| int | with_audio ) |
Play a PSS movie to the end, or until the player skips it.
The unit is Sony's ezmpeg sample driver adapted by the game. It is a C file, as its __FILE__ literal "cutscene.c" records. A name with a device prefix is first opened as a host file after the colon, and the routine returns at once when that fails. Otherwise it allocates one 0x57bc00 byte block for every decoder buffer, resets the GS, plays the stream, and frees the block.
Pressing and releasing Cross or Start after the eleventh decoded frame aborts the playback.
The name is inferred. The front end's Sony screen and one other caller both pass a with-audio flag of 1.
| name | The stream to play, with its device prefix. |
| with_audio | Non-zero to decode and play the PCM stream alongside the video. |
|
extern |
The decoded frame queue.
The decoder stages pictures into it, and the display handlers take entries from it and release them through it.
The queue starts a cache line of its own. Its cached updates then never share a line with the display buffer placed before it.
|
extern |
The display double buffer.
The end-of-image handler swaps its halves as fields are shown.
The vertical blank handler writes the draw environments through the uncached segment while the GIF channel reads the buffer. The buffer therefore starts on a cache line.
|
extern |
The video decoder instance.
The decoder and stream callbacks address it directly, because the sample registers them with a null context.
|
extern |
The audio decoder instance.
The audio callback addresses it directly.