PROGRAMMER'S GUIDEMPEG library
BackForward
MPEG library

7. Branch playback


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

7.1 Clear buffer

The decode buffer must be cleared in a timely manner for smooth branch playback. The video has a VBV buffer in front of the decoder and a framer behind it.
Audio has a buffer for one sector in front of the decoder. Therefore, there are two buffers to be cleared, VBV buffer or VBV + frame buffer for video, and only the sector buffer for audio.

(1) For video

  1. Target to clear

    Figure 7.1 MPEG video buffer configuration

  2. Clear timing
    • Clear immediately.
    • Wait for the start of decoding the I or P picture to clear it.

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

(2) For audio
  1. Target to clear

    Figure 7.2 MPEG audio buffer configuration

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


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