TSDuck v3.40-3963
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::ChannelFile::TransportStream Class Reference

Description of one transport stream. More...

#include <tsChannelFile.h>

Collaboration diagram for ts::ChannelFile::TransportStream:

Public Member Functions

 TransportStream (uint16_t ts=0, uint16_t on=0)
 Default constructor.
 
bool addService (const ServicePtr &srv, ShareMode copy=ShareMode::SHARE, bool replace=true)
 Add a service in the transport stream.
 
void addServices (const ServiceList &list)
 Add a list of services in the transport stream.
 
void clear ()
 Clear all services.
 
ServicePtr serviceById (uint16_t id) const
 Get a service by id in the transport stream.
 
ServicePtr serviceByIndex (size_t index) const
 Get a service by index in the transport stream.
 
ServicePtr serviceByName (const UString &name, bool strict=true) const
 Get a service by name in the transport stream.
 
size_t serviceCount () const
 Get the number of services in the transport stream.
 
ServicePtr serviceGetOrCreate (uint16_t id)
 Get or create a service by id in the transport stream.
 

Public Attributes

uint16_t id = 0
 Transport Stream Id.
 
uint16_t onid = 0
 Original Network Id.
 
ModulationArgs tune {}
 Tuner parameters for the transport stream.
 

Detailed Description

Description of one transport stream.

Constructor & Destructor Documentation

◆ TransportStream()

ts::ChannelFile::TransportStream::TransportStream ( uint16_t  ts = 0,
uint16_t  on = 0 
)
inline

Default constructor.

Parameters
[in]tsTransport Stream Id.
[in]onOriginal Network Id.

Member Function Documentation

◆ serviceCount()

size_t ts::ChannelFile::TransportStream::serviceCount ( ) const
inline

Get the number of services in the transport stream.

Returns
The number of services in the transport stream.

◆ serviceByIndex()

ServicePtr ts::ChannelFile::TransportStream::serviceByIndex ( size_t  index) const

Get a service by index in the transport stream.

Parameters
[in]indexService index, from 0 to serviceCount()-1.
Returns
A safe pointer to the service description or a null pointer if the specified service does not exist.

◆ serviceById()

ServicePtr ts::ChannelFile::TransportStream::serviceById ( uint16_t  id) const

Get a service by id in the transport stream.

Parameters
[in]idService identifier.
Returns
A safe pointer to the service description or a null pointer if the specified service does not exist.

◆ serviceByName()

ServicePtr ts::ChannelFile::TransportStream::serviceByName ( const UString name,
bool  strict = true 
) const

Get a service by name in the transport stream.

Parameters
[in]nameService name.
[in]strictIf true, search exactly name. If false, the comparison is case-insensitive and spaces are ignored. If false, name can also be "major.minor" for ATSC services.
Returns
A safe pointer to the service description or a null pointer if the specified service does not exist.

◆ serviceGetOrCreate()

ServicePtr ts::ChannelFile::TransportStream::serviceGetOrCreate ( uint16_t  id)

Get or create a service by id in the transport stream.

Parameters
[in]idService identifier.
Returns
A safe pointer to the service, never a null pointer.

◆ addService()

bool ts::ChannelFile::TransportStream::addService ( const ServicePtr srv,
ShareMode  copy = ShareMode::SHARE,
bool  replace = true 
)

Add a service in the transport stream.

Parameters
[in]srvSafe pointer to the new service.
[in]copyWhen COPY, duplicate the service object. When SHARE, simply copy the pointer to the same object.
[in]replaceIf true, replace a service with same id if it already exists.
Returns
True if the service has been added. False if replace is false and a service with same id already exists.

◆ addServices()

void ts::ChannelFile::TransportStream::addServices ( const ServiceList list)

Add a list of services in the transport stream.

Existing services are updated with new info.

Parameters
[in]listList of services.

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