Japanese
PROGRAMMER'S GUIDEMPEG library
BackForward
MPEG library

7. Branch playback


Branch playback means switching the currently playing stream to another stream. By registering the MPEG handle when the next stream to be played is determined, playback will switch to the next stream at the end of the current stream or by a forced switching function.
The timing of switching may be as follows.

7.1 Clearing the buffer

In order to perform branch playback smoothly, the decode buffer must be cleared in a timely manner. The video has a VBV buffer in front of the decoder and a frame buffer in the back.
Audio has a 1 sector buffer before the decoder. Therefore, there are two buffers that can be cleared for video: the VBV buffer or VBV + frame buffer, and for audio, it is only the sector buffer.

(1) For video

  1. Clear target

    Figure 7.1 MPEG video buffer structure

  2. clear timing
    • Clear immediately.
    • Clear after waiting for I or P picture decoding to start.

    Due to the nature of MPEG video streams, clearing the VBV buffer after waiting for I or P picture decoding to start will result in a very clean connection. At other timings, the response is slightly better, but the same frame may be output or frames may be skipped.

(2) For audio
  1. Clear target

    Figure 7.2 MPEG audio buffer structure

  2. clear timing
    • Clear immediately.
    • Clear in sync with video clear.


BackForward
PROGRAMMER'S GUIDEMPEG library
Copyright SEGA ENTERPRISES, LTD., 1997