Microsoft DirectX 8.1 (C++) |
The tree diagram shown in the previous section does not indicate how the overlapping tracks and compositions are rendered. For this purpose, it is helpful to consider the timeline as a time sequence, rather than as a node structure. The following illustration shows a simple project with two video tracks and two audio tracks. The arrow at the top represents the direction of the timeline, starting from time 0.
First, consider the video group. Track 1 has a higher priority than Track 0. Wherever Track 1 contains a video source, that source obscures anything in Track 0. Where Track 1 is empty, Track 0 "shows through." When the video is rendered, it begins with Source A. Then, it cuts to Source C, obscuring the last part of Source A and the beginning of Source B. Finally, when Source C ends, it cuts to Source B (already in progress).
The audio group behaves differently: All tracks are simply mixed together. The audio begins with Source D, switches to a mix of Source D and Source E, and finishes with Source D by itself again.