Return to previous page Return to menu Go to next page

3.4 Branch execution (branch stream switching processing)

(1) Branch execution

When branching is executed in the branch destination determination state (turning on the branch execution switch of the branch playback server), the following branch stream switching processing is performed.
 (a) The current stream A is closed.
(The reading of A is stopped and data is deleted even if data remains in the CD buffer.)
(b) The branch destination stream B becomes a new current stream.
(c) The branch destination stream is undetermined. 

Table 3.2 Branch stream switching by branch execution
 Branch stream 
 Before branch 
 After branch ( After switching process) 
 Current stream 
(obtained with BPL_GetCurStm function)
 A 
 B 
(A is closed)
 Branch stream 
(obtained with BPL_GetNextStm function)
 B 
 Undecided until the next branch destination is selected 
(Selected / decided by BPL_SelectBranch function)

[Branch destination selection always precedes branch execution (switching), but selection and switching operations are basically asynchronous.

(2) Open and close stream

Streams opened by the branch playback library are the current stream and branch candidate streams. The open / close procedure is shown below.
 (a) The playback start stream specified by the BPL_SetStart function is the current stream.
Opened first.
(b) When reading of the current stream starts, a branch candidate stream is opened.
(c) When a branch destination is selected, other branch candidates are closed and only the branch destination is prefetched.
(d) Executing a branch closes the current stream.
The branch destination stream switches to the current stream and repeats (b) to (d).
(e) When the branch reproduction ends, the stream group is closed. 

(3) Branch stream switching timing

Branch stream switching timing is classified as shown in Table 3.3.

Table 3.3 Branch stream switching timing
 Timing 
 Description 
 Natural switching 
 After decoding of stream A, switch to stream B as the branch destination. 
 Forced switching 
 Forcibly switch to stream B, which is the branch destination, even while stream A is being decoded. 

Even if the branch destination is decided, the branch must not be executed until the decoder finishes processing the current stream. (To prevent the stream data being decoded from being interrupted).
In both natural and forced switching, the switching process for the decoder is executed first, and after that is completed, the branch execution switch is turned ON.


Return to previous page Return to menu Go to next page