Microsoft DirectX 9.0 |
In push mode, the MPEG-2 demux exposes the IReferenceClock interface. It acts as a live source, so it will be chosen as the graph reference clock by default; see Live Sources for more information.
With transport streams, the demux synchronizes its clock to the PCR stream that corresponds to the audio or video stream that was mapped last. With program streams, the demux synchronizes its clock to the SCR stream. Synchronizing the filter clock to the PCR or SCR stream prevents data overflow or underflow, which could result if the graph clock varied from the stream clock.
The demux also translates PES PTS values into DirectShow reference times, and uses these values to time stamp the media samples. The time stamps apply to the next frame boundary; there is no guarantee that the frame boundary will align with the start of the media sample.
The demux guarantees that the time stamps increase monotonically. This means, for example, that if a transport stream includes a segment such as a commercial that was created with a different clock than the main program, the demux will adjust the presentation time stamps to hide the time discontinuity from downstream filters.
See Also