In usr_mech9 we explained the resources necessary for movie playback.
On this page we will explain the timing of actual resource allocation and release.
The moment it is in playback prep status (CRIMANAPLAYER_STATUS_PREP).
Strictly speaking, when the criMana_ExecuteMain/criManaPlayer_ExecuteMain function is called for the player in CRIMANAPLAYER_STATUS_WAIT_PREP.
Resources are not used when the header is just analyzed.
When the player handle is recycled and preparation to play the next movie starts.
The decoding buffer is held in the decoder. It is designed so that access to the decoding buffer (final frame) is allowed even after playback is finished, and therefore the decoder is not destroyed when playback finishes.
Timing of Decoder Resource Allocation and Release
The lifetime of the CriFsLoader resource and the ::CriManaPlayer is the same.
The CriFsLoader creates one resource internally when one ::CriManaPlayer is generated.
File Opening and Closing Timing
When playing a movie, a file descriptor is used while the movie is being streamed.
The file closes once playback finishes.