src/libtsduck/dtv/tsSignalizationDemux.cpp
void ts::SignalizationDemux::addServiceId(uint16_t sid)
{
    // Do something only when the service is not yet monitored.
    if (!hasServiceId(sid)) {

        // Remember the service id to monitor.
        _service_ids.insert(sid);

        // We need the PAT to get PMT PID's.
        _demux.addPID(PID_PAT);

        // If a PAT is known and references the service, add its PMT PID.
        if (_last_pat.isValid()) {
            const auto it(_last_pat.pmts.find(sid));
            if (it != _last_pat.pmts.end()) {
                _demux.addPID(it->second);
            }
        }
    }
}
//----------------------------------------------------------------------------
// Add a service id to filter its PMT.
//----------------------------------------------------------------------------
Add a service id to filter its PMT.
Add a service id to filter its PMT .
void ts::SignalizationDemux::addServiceId(uint16_t sid)
{
    if (!hasServiceId(sid)) {
        _service_ids.insert(sid);
        _demux.addPID(PID_PAT);
        if (_last_pat.isValid()) {
            const auto it(_last_pat.pmts.find(sid));
            if (it != _last_pat.pmts.end()) {
                _demux.addPID(it->second);
            }
        }
    }
}
void ts :: SignalizationDemux :: addServiceId ( uint16_t sid ) { if ( ! hasServiceId ( sid ) ) { _service_ids . insert ( sid ) ; _demux . addPID ( PID_PAT ) ; if ( _last_pat . isValid ( ) ) { const auto it ( _last_pat . pmts . find ( sid ) ) ; if ( it != _last_pat . pmts . end ( ) ) { _demux . addPID ( it -> second ) ; } } } }
Add a service id to filter its PMT.
Add a service id to filter its PMT .
// Do something only when the service is not yet monitored. // Remember the service id to monitor. // We need the PAT to get PMT PID's. // If a PAT is known and references the service, add its PMT PID.