CRI Sofdec2  Last Updated: 2022-11-21 16:25 p
Eliminating Playback Latency

Sofdec2 has a latency (movie data read and decode latency) between the start of movie playback and
when the first frame can be retrieved.
Consider the following measures to eliminate this
playback latency.

(1) criManaPlayer_Prepare

Using criManaPlayer_Prepare and leaving the Mana player status in CRIMANAPLAYER_STATUS_READY
playback standby (be sure to finish reading and writing
beforehand) will let you immediately retrieve a frame.

For example, when you're rendering to switch to movie B while playing movie A, and you want
to immediately retrieve a frame from movie B, then put movie B in playback standby.

(2) Fixed Read Buffer Format

You can reduce latency during playback by specifying and allocating the size of the input buffer you are using with the Mana player,
instead of allocating it dynamically.

You will need to use the following API that uses a configuration structure for Mana player creation
to use this function. (Refer to the individual function reference for more information.)

Specify the input buffer size as a value based on the the maximum bit rate
of the movie that you will play back with the Mana player.

(3) Memory Playback

By loading the movie data in memory beforehand, specifying the
address and size using criManaPlayer_SetData, and using memory playback,
you will eliminate the movie data read time.

Consider this if you have ample memory and can operate with
small movie data sizes.