TSDuck v3.46-4930
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::PMT::Stream Class Reference

#include <tsPMT.h>

Inheritance diagram for ts::PMT::Stream:
Collaboration diagram for ts::PMT::Stream:

Public Member Functions

 Stream (const AbstractTable *table, uint8_t type=0)
PIDClass getClass (const DuckContext &duck) const
CodecType getCodec (const DuckContext &duck) const
bool getComponentTag (uint8_t &tag) const
bool isAudio (const DuckContext &duck) const
bool isSubtitles (const DuckContext &duck) const
bool isVideo (const DuckContext &duck) const
UString language (DuckContext &duck) const
bool matchLanguage (DuckContext &duck, const UString &language) const

Public Attributes

DescriptorList descs
size_t order_hint
uint8_t stream_type = 0
 Stream type, one of ST_* (eg ts::ST_MPEG2_VIDEO).

Detailed Description

Description of an elementary stream.

Note: by inheriting from EntryWithDescriptors, there is a public field "DescriptorList descs".

Constructor & Destructor Documentation

◆ Stream()

ts::PMT::Stream::Stream ( const AbstractTable * table,
uint8_t type = 0 )
explicit

Constructor.

Parameters
[in]tableParent PMT.
[in]typeStream type.

Member Function Documentation

◆ isAudio()

bool ts::PMT::Stream::isAudio ( const DuckContext & duck) const

Check if the elementary stream carries audio. Does not just look at the stream type. Also analyzes the descriptor list for additional information.

Parameters
[in]duckTSDuck execution context.
Returns
True if the elementary stream carries audio.

◆ isVideo()

bool ts::PMT::Stream::isVideo ( const DuckContext & duck) const

Check if the elementary stream carries video. Does not just look at the stream type. Also analyzes the descriptor list for additional information.

Parameters
[in]duckTSDuck execution context.
Returns
True if the elementary stream carries video.

◆ isSubtitles()

bool ts::PMT::Stream::isSubtitles ( const DuckContext & duck) const

Check if the elementary stream carries subtitles. Does not just look at the stream type. Also analyzes the descriptor list for additional information.

Parameters
[in]duckTSDuck execution context.
Returns
True if the elementary stream carries subtitles.

◆ language()

UString ts::PMT::Stream::language ( DuckContext & duck) const

Get the first language code in the elementary stream.

Parameters
[in,out]duckTSDuck execution context.
Returns
The language code from the first language descriptor or an empty string if none is found.

◆ matchLanguage()

bool ts::PMT::Stream::matchLanguage ( DuckContext & duck,
const UString & language ) const
inline

Check if the elementary stream matches a specified language code.

Parameters
[in,out]duckTSDuck execution context.
[in]languageLanguage code to search (case insensitive, spaces are ignored).
Returns
True if the elementary stream contains a language descriptor with the specified language code.

◆ getClass()

PIDClass ts::PMT::Stream::getClass ( const DuckContext & duck) const

Get the PID class of the elementary stream. Look at the stream type and the descriptor list.

Parameters
[in]duckTSDuck execution context.
Returns
The PID class (PIDClass::DATA if unknown component type).

◆ getCodec()

CodecType ts::PMT::Stream::getCodec ( const DuckContext & duck) const

Try to determine the codec which is used in the elementary stream. Look at the stream type and the descriptor list.

Parameters
[in]duckTSDuck execution context.
Returns
The codec type (CodecType::UNDEFINED if unknown).

◆ getComponentTag()

bool ts::PMT::Stream::getComponentTag ( uint8_t & tag) const

Look for a component tag in a stream_identifier_descriptor.

Parameters
[out]tagFirst component tag found, unmodified if none found.
Returns
True if a component tag was found.

Member Data Documentation

◆ descs

DescriptorList ts::AbstractTable::EntryWithDescriptors::descs
inherited

List of descriptors for this entry, publicly accessible.

◆ order_hint

size_t ts::AbstractTable::AttachedEntry::order_hint
inherited

Preferred insertion index when serializing the table or NPOS if unspecified. This is an informational hint which can be used or ignored.


The documentation for this class was generated from the following file: