Поделиться через


Using the MPEG-2 Splitter

 
Microsoft DirectShow 9.0

Using the MPEG-2 Splitter

  • Note   Starting in Microsoft® Windows® XP, the MPEG-2 Splitter filter is deprecated. Use the MPEG-2 Demultiplexer instead.

The MPEG-2 Splitter filter supports pull-mode playback of MPEG-2 program streams that contain at least one of the following stream types.

  • MPEG-2 video
  • MPEG-2 audio
  • Dolby AC-3 audio encoded as defined for DVD-Video
  • LPCM (Linear Pulse Code Modulated) audio encoded as defined for DVD-Video

For a list of media types that the MPEG-2 Splitter supports, see MPEG-2 Splitter Media Types.

The MPEG-2 Splitter does not parse transport streams. Use the MPEG-2 Demultiplexer filter for transport streams (push mode only).

Time Stamps

When playing back MPEG-2 program streams, the MPEG-2 Splitter filter treats the first system clock reference it encounters as the time origin of any stream. This differs from the MPEG-1 Stream Splitter, which uses presentation time stamps. The IAMParse::GetParseTime method returns the (possibly estimated) stream system clock time for the data it has processed.

If the MPEG-2 splitter filter encounters an input sample with the discontinuity property set (the discontinuity property can be set by using IMediaSample::SetDiscontinuity or IMediaSample2::SetProperties), it skips data until it finds the first pack in the data and adjusts its time stamps so that the system clock reference (SCR) for that pack is considered identical to the SCR time before the discontinuity. If the SCR clock appears either to jump backward or to jump forward by more than a second, then (in line with the MPEG-2 program stream specification), this is also treated as a clock discontinuity and the apparent clock discrepancy is subtracted from the time stamps passed to downstream filters.

Stream Selection

When playing back the MPEG-2 program stream, the first video stream and first audio stream found traversing the program stream are chosen. Up to one audio and one video output pin are supported. Through the IAMStreamSelect interface, different streams of the same type can be selected up to the number specified by the audio limit in the system header. For MPEG-2 audio, it is currently assumed the streams form a contiguous range starting at stream 0xC0.

Supported Interfaces

The MPEG-2 splitter filter supports the following interfaces.

See Also