![]() |
TSDuck v3.46-4965
MPEG Transport Stream Toolkit
|
#include <tstr101290Analyzer.h>


Public Member Functions | |
| Analyzer (DuckContext &duck, ErrorHandlerInterface *handler=nullptr) | |
| void | feedPacket (const PCR ×tamp, const TSPacket &pkt) |
| void | getCounters (Counters &counters) |
| void | getCounters (Counters &global, CountersByPID &by_pid) |
| void | getCountersRestart (Counters &counters) |
| void | getCountersRestart (Counters &global, CountersByPID &by_pid) |
| void | reset () |
| void | setCollectByPID (bool on) |
| void | setErrorHandler (ErrorHandlerInterface *handler) |
| template<class Rep, class Period> | |
| void | setMaxPIDInterval (cn::duration< Rep, Period > interval) |
| void | setTSSyncLostCount (size_t count) |
A class which analyzes a transport stream according to ETSI TR 101 290.
Although this is not clearly explained that way, ETSI TR 101 290 defines two distinct classes of measurements: physical transport errors and transport stream logical errors. As a software tool, TSDuck can only detect transport stream logical errors. As an example, section 4 of ETSI TR 101 290 says: "Most of the parameters can be measured with standard equipment such as spectrum analysers or constellation analysers. Other parameters are defined in a new way as a request to test and measurement equipment manufacturers to integrate this functionality in their products." It is obvious that TSDuck cannot detect physical transport errors that require "spectrum analysers or constellation analysers". Therefore, this class implements only a subset of ETSI TR 101 290.
The "TS_sync_loss" and "Sync_byte_error" indicators are inaccessible in most cases. It depends on the input plugin. Many plugins, such as "dvb" or all IP-based plugins ("ip", "srt", "rist", etc.) use the 0x47 sync byte to resynchronize in the data stream or to locate TS packets in datagrams. Therefore, with these input plugins, corrupted sync bytes are filtered upstream and never reach the analyzer classes.
|
explicit |
Constructor.
| [in,out] | duck | TSDuck execution context. The reference is kept inside this instance. |
| [in] | handler | Optional error handler. |
| void ts::tr101290::Analyzer::reset | ( | ) |
Reset the analyzer.
|
inline |
Set a new error handler.
| [in] | handler | New error handler. Can be null (no handler). |
|
inline |
Enable or disable the detailed collection of error counters by PID. By default, error counters are collected at global TS level. Enabling the detailed collection of error counters by PID uses more resources. Use only when necessary.
| [in] | on | If true, detailed counters are collected by PID. If false, only collect the global counters. |
The following method feeds the analyzer with a TS packet.
| void ts::tr101290::Analyzer::getCounters | ( | Counters & | counters | ) |
Get the global error counters since start or the last getCountersRestart(). This is just a snapshot. Counters will continue to increment.
| [out] | counters | Returned error counters. |
| void ts::tr101290::Analyzer::getCounters | ( | Counters & | global, |
| CountersByPID & | by_pid ) |
Get the global and detailed error counters since start or the last getCountersRestart(). This is just a snapshot. Counters will continue to increment.
| [out] | global | Returned global error counters, at TS level. |
| [out] | by_pid | Returned error counters. If setCollectByPID() was not called, the error counters are empty. |
| void ts::tr101290::Analyzer::getCountersRestart | ( | Counters & | counters | ) |
Get and restart the global error counters since start or the last getCountersRestart(). Error counters are reset and a new measurement period starts.
| [out] | counters | Returned error counters. |
| void ts::tr101290::Analyzer::getCountersRestart | ( | Counters & | global, |
| CountersByPID & | by_pid ) |
Get and restart the global and detailed error counters since start or the last getCountersRestart(). Error counters are reset and a new measurement period starts.
| [out] | global | Returned global error counters, at TS level. |
| [out] | by_pid | Returned error counters. If setCollectByPID() was not called, the error counters are empty. |
|
inline |
Set the maximum packet interval in "user PID's" before declaring PID_error. This value currently applies to video and audio PID's only.
| [in] | interval | The maximum interval as a duration value. |
|
inline |
Set the number of consecutive invalid TS sync bytes before declaring TS sync loss.
| [in] | count | When that number of consecutive TS packets have a corrupted sync byte (the initial 0x47 value), we declare a TS synchronization loss. |