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


Public Member Functions | |
| TSClock (DuckContext &duck, int severity=Severity::Verbose) | |
| Time | clock () const |
| Time | clockUTC () const |
| cn::milliseconds | durationMS () const |
| PCR | durationPCR () const |
| void | feedPacket (const TSPacket &pkt, const TSPacketMetadata &mdata) |
| Time | initialClock () const |
| Time | initialClockUTC () const |
| bool | isValid () const |
| void | reset (const TSClockArgs &args) |
Compute a clock, based real time, TS time, PCR or input timestamps. Depending on parameters, the clock can be:
| ts::TSClock::TSClock | ( | DuckContext & | duck, |
| int | severity = Severity::Verbose ) |
Constructor.
| [in,out] | duck | TSDuck execution context. A reference is kept inside this object. |
| [in] | severity | Severity of the messages when switching sources. |
| void ts::TSClock::reset | ( | const TSClockArgs & | args | ) |
Reset all collected information.
| [in] | args | Clock parameters. |
| void ts::TSClock::feedPacket | ( | const TSPacket & | pkt, |
| const TSPacketMetadata & | mdata ) |
The following method feeds the analyzer with a TS packet.
| [in] | pkt | A new transport stream packet. |
| [in] | mdata | Associated metadata, including the input timestamp. |
|
inline |
|
inline |
Get the clock in UTC time of the first packet.
| Time ts::TSClock::initialClock | ( | ) | const |
Get the clock of the first packet, in UTC or local time, depending on TSClockArgs.
| Time ts::TSClock::clockUTC | ( | ) | const |
Get the current clock in UTC time.
| Time ts::TSClock::clock | ( | ) | const |
Get the current clock, in UTC or local time, depending on TSClockArgs.
| cn::milliseconds ts::TSClock::durationMS | ( | ) | const |
Get the estimated playout duration since first packets in milliseconds. The returned duration depends on the TSClockArgs. If real time is used, this is the number of actual milliseconds since the first packet. Otherwise, this is the same as durationPCR(), converted in milliseconds.
|
inline |