This module contains elements for handling ISO/IEC 13818-1 Program Streams and ISO/IEC 11172-1 System Streams.
Module Name | Streamer Program Stream Elements |
---|---|
File Name | libtselements.so |
Class Count | 7 |
PS System Clock Reference Element, SS System Clock Reference Element, PS PES Filter Element, PS Stream Info Decoder Element, PS Demuxer Element, PS Audio Selector Element, PS Video Selector Element.
Typical Program Stream pipeline.
The audio elementary stream must be aligned to segment boundaries as described in the Framing Element section.
The PS System Clock Reference element.
Name | PS System Clock Reference Descriptor |
---|---|
Version | 1 |
Interface Name | IElementDescriptor |
Binding | C++ |
Name | PS System Clock Reference |
---|---|
Type | Intermediate |
Priority | 500 |
Input Formats | MPEG-2/Program Stream |
Output Formats | MPEG-2/Program Stream |
Trait | ClockReference |
The element immediately recommits all metadata to its output pad.
The element looks for ISO/IEC 13818-1 pack_header structures in the stream. It expects pack headers to be aligned to segment boundaries, i.e. pack headers must, if present, be located first in a segment. For every header it finds, it extracts the system_clock_reference field and reports that clock reference to the Streamer using the IStreamClock interface.
The SS System Clock Reference element.
Name | SS System Clock Reference Descriptor |
---|---|
Version | 1 |
Interface Name | IElementDescriptor |
Binding | C++ |
Name | SS System Clock Reference |
---|---|
Type | Intermediate |
Priority | 500 |
Input Formats | MPEG-1/System Stream |
Output Formats | MPEG-1/System Stream |
Trait | ClockReference |
The element immediately recommits all metadata to its output pad.
The element looks for ISO/IEC 11172-1 Pack headers in the stream. It expects Pack headers to be aligned to segment boundaries, i.e. Pack headers must, if present, be located first in a segment. For every header it finds, it extracts the system_clock_reference field and reports that clock reference to the Streamer using the IStreamClock interface.
The PS PES Filter element.
Name | PS PES Filter Descriptor |
---|---|
Version | 1 |
Interface Name | IElementDescriptor |
Binding | C++ |
Name | PS PES Filter |
---|---|
Type | Intermediate |
Priority | 500 |
Input Formats | MPEG-[2/Program|1/System] Stream |
Output Formats | MPEG-[2/Program|1/System] Stream/PES |
Key | Input | Output |
---|---|---|
PES_START | Produced | Committed |
The element splits each segment so that there is one segment for each PES packet. It also inserts a PES_START metadata (with empty value) before each segment. The syntactic elements MPEG_program_end_code (0x000001b9), pack_header (0x000001ba), system_header (0x000001bb), program_stream_map (0x000001bc) and padding_stream (0x000001be) are released from the stream. Special measures are taken to handle both system streams and program streams in the same way.
The PS Stream Info Decoder element.
Name | PS Stream Info Decoder Descriptor |
---|---|
Version | 1 |
Interface Name | IElementDescriptor |
Binding | C++ |
Name | PS Stream Info Decoder |
---|---|
Type | Intermediate |
Priority | 500 |
Input Formats | MPEG-[2/Program|1/System] Stream/PES |
Output Formats | Output same as input |
Key | Input | Output |
---|---|---|
_VideoStreamList | Produced | Committed |
_AudioStreamList | Produced | Committed |
_VideoStreamInfo | Produced | Committed |
_AudioStreamInfo | Produced | Committed |
The element examines the stream_id field of each PES packet and keeps record on which video and audio tracks are embedded in the stream. Both ISO/IEC 11172-1 and ISO/IEC 13818-1 mandates that PES packets with stream ids in the range 0xc0–0xdf inclusive must carry audio and PES packets with stream ids in the range 0xe0–0xef inclusive must carry video. In addition to the regular stream ids for audio and video, the element examines PES packets carrying private data to see if they contain DVD audio.
For each new video PES stream it finds, the element commits both _VideoStreamList and _VideoStreamInfo<stream_id> metadata with values updated to reflect the current situation. For each new audio PES stream it finds, the element commits updated versions of the _AudioStreamList metadata in the same way, but writes the _AudioStreamInfo<stream_id> parameter directly on the blackboard.
The _VideoStreamList, _AudioStreamList, _VideoStreamInfo.* and _AudioStreamInfo.* parameters are described in greater detail in the Complex Metadata section.
The PS Demuxer element.
Name | PS Demuxer Descriptor |
---|---|
Version | 1 |
Interface Name | IElementDescriptor |
Binding | C++ |
Name | PS Demuxer |
---|---|
Type | Intermediate |
Priority | 500 |
Input Formats | MPEG-[2/Program|1/System] Stream/PES |
Output Formats | MPEG-[2/Program|1/System] Stream/[Multi Video|Multi Audio] |
The element immediately recommits all metadata to each output pad.
The element opens two output pads, one for video and one for audio. It then sends all PES packets with stream_id in the range 0xc0–0xdf inclusive to the audio output pad and PES packets in the range 0xe0–0xef inclusive to the video output pad. Some PES packets with stream_id equal to 0xbd are also sent to the audio output pad as they are assumed to carry DVD audio.
The PS Audio Selector element.
Name | PS Audio Selector Descriptor |
---|---|
Version | 1 |
Interface Name | IElementDescriptor |
Binding | C++ |
Name | PS Audio Selector |
---|---|
Type | Intermediate |
Priority | 500 |
Input Formats | MPEG-[2/Program|1/System] Stream/Multi Audio |
Output Formats | MPEG-[2/Program|1/System] Stream/Single Audio |
Key | Input | Output |
---|---|---|
_AudioStreamList | Required | Committed |
_ActiveAudioStream | Produced | Committed |
The element filters the stream based on the value of the _RequestAudioStream blackboard parameter, which holds the pid of the audio stream selected by the user. If this parameter does not exist, the element chooses the first pid in the _AudioStreamList as default. The _AudioStreamList parameter is described in greater detail in the Complex Metadata section.
The PS Video Selector element.
Name | PS Video Selector Descriptor |
---|---|
Version | 1 |
Interface Name | IElementDescriptor |
Binding | C++ |
Name | PS Video Selector |
---|---|
Type | Intermediate |
Priority | 500 |
Input Formats | MPEG-[2/Program|1/System] Stream/Multi Video |
Output Formats | MPEG-[2/Program|1/System] Stream/Single Video |
Key | Input | Output |
---|---|---|
_VideoStreamList | Required | Committed |
_ActiveVideoStream | Produced | Committed |
The element filters the stream based on the value of the _RequestVideoStream blackboard parameter, which holds the pid of the video stream selected by the user. If this parameter does not exist, the element chooses the first pid in the _VideoStreamList as default. The _VideoStreamList parameter is described in greater detail in the Complex Metadata section.