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

This protected inner class contains the analysis context for one PID. More...

#include <tsTSAnalyzer.h>

Collaboration diagram for ts::TSAnalyzer::PIDContext:

Public Member Functions

 PIDContext (PID pid, const UString &description=UNREFERENCED)
 Default constructor.
 
void addAttribute (const UString &desc)
 Add an attribute string for the PID.
 
void addDescriptionOrAttribute (const UString &desc)
 Set the description or add an attribute string for the PID.
 
void addService (uint16_t service_id)
 Register a service id for the PID.
 
UString fullDescription (bool include_attributes) const
 Return a full description, with comment and optionally attributes.
 

Public Attributes

UStringVector attributes {}
 Audio or video attributes (several lines if attributes changed).
 
MPEG2AudioAttributes audio2 {}
 Last MPEG-2 audio attributes.
 
BitRate bitrate = 0
 Average PID bitrate in b/s.
 
uint64_t br_last_pcr = INVALID_PCR
 Last PCR value in the PID, for bitrate computation.
 
uint64_t br_last_pcr_pkt = 0
 Index of packet with last PCR.
 
bool carry_audio = false
 This PID carries audio data.
 
bool carry_ecm = false
 This PID carries ECM's.
 
bool carry_emm = false
 This PID carries EMM's.
 
bool carry_iip = false
 Carry ISDB-T Information Packets.
 
bool carry_pes = false
 This PID carries PES packets.
 
bool carry_section = false
 This PID carries sections.
 
bool carry_t2mi = false
 Carry T2-MI encasulated data.
 
bool carry_video = false
 This PID carries video data.
 
uint16_t cas_id = 0
 For EMM and ECM streams.
 
std::set< uint32_t > cas_operators {}
 Operators for EMM and ECM streams, when applicable.
 
UString comment {}
 Additional description (ie "MPE", "HbbTV").
 
uint64_t crypto_period = 0
 Average number of TS packets per crypto-period.
 
uint64_t cryptop_cnt = 0
 Number of crypto-periods.
 
uint64_t cryptop_ts_cnt = 0
 Number of TS packets in all crypto-periods.
 
uint8_t cur_continuity = 0
 Current continuity count.
 
uint8_t cur_ts_sc = 0
 Current scrambling control in TS header.
 
uint64_t cur_ts_sc_pkt = 0
 First packet index of current crypto-period.
 
UString description {}
 Readable description string (ie "MPEG-2 Audio").
 
uint64_t dts_cnt = 0
 Number of DTS's.
 
uint64_t dts_leap_cnt = 0
 Number of leaps in DTS's (potential time discontinuities).
 
uint64_t duplicated = 0
 Number of duplicated packets.
 
uint64_t exp_discont = 0
 Number of expected discontinuities.
 
uint64_t first_dts = INVALID_DTS
 First DTS value in the PID, if any.
 
uint64_t first_pcr = INVALID_PCR
 First PCR value in the PID, if any.
 
uint64_t first_pts = INVALID_PTS
 First PTS value in the PID, if any.
 
uint64_t inv_pes = 0
 Number of invalid PES packets.
 
uint64_t inv_pes_start = 0
 Number of invalid PES start code.
 
uint64_t inv_sections = 0
 Number of invalid sections.
 
uint64_t inv_ts_sc_cnt = 0
 Number of invalid scrambling control in TS headers.
 
bool is_pcr_pid = false
 Is the PCR PID for this service.
 
bool is_pmt_pid = false
 Is the PMT PID for this service.
 
ISDBTLayerCounter isdb_layers {}
 For ISDB-T streams with 204-byte packets, map key = layer indicator (0-1) to value = number of TS packets.
 
UStringVector languages {}
 For audio or subtitles (3 chars per language).
 
uint64_t last_dts = INVALID_DTS
 Last DTS value in the PID, if any.
 
uint64_t last_pcr = INVALID_PCR
 Last PCR value in the PID, if any.
 
uint64_t last_pts = INVALID_PTS
 Last PTS value in the PID, if any.
 
bool optional = false
 Optional PID, don't display report if no packet.
 
uint64_t pcr_cnt = 0
 Number of PCR's.
 
uint64_t pcr_leap_cnt = 0
 Number of leaps in PCR's (potential time discontinuities).
 
uint8_t pes_stream_id = 0
 Stream_id in PES packets on this PID.
 
const PID pid
 PID value.
 
uint64_t pl_start_cnt = 0
 Number of unit_start & has_payload in packets.
 
uint64_t pmt_cnt = 0
 Number of PMT (for PMT PID's).
 
uint64_t pts_cnt = 0
 Number of PTS's.
 
uint64_t pts_leap_cnt = 0
 Number of leaps in PTS's (potential time discontinuities).
 
bool referenced = false
 Is referenced (by service or global).
 
bool same_stream_id = false
 All PES packets have same stream_id.
 
bool scrambled = false
 Contains some scrambled packets.
 
ETIDContextMap sections {}
 List of sections in this PID.
 
ServiceIdSet services {}
 List of service ids the PID belongs to.
 
std::set< uint32_t > ssu_oui {}
 Set of applicable OUI's for SSU.
 
uint8_t stream_type = 0
 Stream type in PMT.
 
uint64_t t2mi_cnt = 0
 Number of T2-MI packets.
 
IntegerMap< uint8_t, uint64_t > t2mi_plp_ts {}
 For T2-MI streams, map key = PLP (Physical Layer Pipe) to value = number of embedded TS packets.
 
uint64_t ts_af_cnt = 0
 Number of TS packets with adaptation field.
 
uint64_t ts_bitrate_cnt = 0
 Number of computed TS bitrates.
 
BitRate ts_bitrate_sum = 0
 Sum of all computed TS bitrates.
 
BitRate ts_pcr_bitrate = 0
 Average TS bitrate in b/s (eval from PCR).
 
uint64_t ts_pkt_cnt = 0
 Number of TS packets.
 
uint64_t ts_sc_cnt = 0
 Number of scrambled packets.
 
uint64_t unexp_discont = 0
 Number of unexpected discontinuities.
 
uint64_t unit_start_cnt = 0
 Number of unit_start in packets.
 

Detailed Description

This protected inner class contains the analysis context for one PID.

Constructor & Destructor Documentation

◆ PIDContext()

ts::TSAnalyzer::PIDContext::PIDContext ( PID  pid,
const UString description = UNREFERENCED 
)

Default constructor.

Parameters
[in]pidPID value.
[in]descriptionPID description.

Member Function Documentation

◆ addService()

void ts::TSAnalyzer::PIDContext::addService ( uint16_t  service_id)

Register a service id for the PID.

Parameters
[in]service_idA service id which references the PID.

◆ addAttribute()

void ts::TSAnalyzer::PIDContext::addAttribute ( const UString desc)

Add an attribute string for the PID.

Parameters
[in]descAttribute string.

◆ addDescriptionOrAttribute()

void ts::TSAnalyzer::PIDContext::addDescriptionOrAttribute ( const UString desc)

Set the description or add an attribute string for the PID.

If there is no description yet, use it as description. Otherwise, add as an attribute.

Parameters
[in]descAttribute string.

◆ fullDescription()

UString ts::TSAnalyzer::PIDContext::fullDescription ( bool  include_attributes) const

Return a full description, with comment and optionally attributes.

Parameters
[in]include_attributesInclude the PID attributes in the description.
Returns
The PID description.

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