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


Public Member Functions | |
| TimeStampRegulator (Report *report, int log_level=Severity::Verbose) | |
| TimeStampRegulator (ReporterBase *delegate, int log_level=Severity::Verbose) | |
| virtual | ~TimeStampRegulator () override |
| bool | muteReport (bool mute) |
| virtual void | regulate (TSPacket &pkt, TSPacketMetadata &mdata, const BitRate ¤t_bitrate) override |
| virtual Report & | report () const override |
| virtual bool | reset () override |
| void | setBurstPacketCount (PacketCounter count) |
| void | setFixedBitRate (const BitRate &bitrate) |
| template<class Rep, class Period> | |
| void | setMinimimWait (const cn::duration< Rep, Period > &d) |
| Report * | setReport (Report *report) |
| ReporterBase * | setReport (ReporterBase *delegate) |
Static Public Member Functions | |
| static int | SilentLevel (bool silent, int default_severity=Severity::Error) |
Static Public Attributes | |
| static constexpr cn::milliseconds | DEFAULT_MIN_WAIT = cn::milliseconds(2) |
Protected Attributes | |
| BitRate | _fixed_bitrate = 0 |
| Declared fixed bitrate. Zero means use current_bitrate parameter. | |
| int | _log_level = Severity::Info |
| Severity level for information messages. | |
| cn::microseconds | _minimum_wait {} |
| Minimum delay between two waits. | |
| PacketCounter | _requested_burst = 0 |
| Requested number of packets to burst at a time. | |
Regulate execution speed based on packet input timestamps. This class is only useful when the input timestamps come from stored media, for instance a PCAP or M2TS file. If the timestamps come from a real-time source (e.g., IP, RTP, SRT), the stream is already regulated.
|
inlineexplicit |
Constructor.
| [in] | report | Where to report errors. The report object must remain valid as long as this object exists or setReport() is used with another Report object. If report is null, log messages are discarded. |
| [in] | log_level | Severity level for information messages. |
|
inlineexplicit |
Constructor.
| [in] | delegate | Use the report of another ReporterBase. If delegate is null, log messages are discarded. |
| [in] | log_level | Severity level for information messages. |
|
overridevirtual |
Destructor.
|
overridevirtual |
Reset and restart regulation.
Implements ts::AbstractRegulator.
|
overridevirtual |
Regulate the flow, to be called at each packet. Suspend the process when necessary.
| [in,out] | pkt | TS packet from the stream. Maybe modified if necessary by subclass. |
| [in,out] | mdata | TS packet metadata. Maybe modified if necessary by subclass. |
| [in] | current_bitrate | Current bitrate if available. Informational only, zero if unknown. Ignored if a fixed bitrate has been set by |
Implements ts::AbstractRegulator.
|
inlineinherited |
Set the number of packets to burst at a time. This is used as a hint for the concrete subclass. The actual burst can be higher if the system cannot wait for too small durations.
| [in] | count | Number of packets to burst at a time. |
|
inlineinherited |
Set a fixed bitrate, ignore current_bitrate parameter in regulate(). The specified bitrate may be ignored by the concrete subclass.
| [in] | bitrate | Fixed bitrate to use. When zero, use current bitrate. |
|
inherited |
Set the minimum wait interval. The specified interval may be ignored by the concrete subclass.
| [in] | d | Minimum duration interval. |
|
overridevirtualinherited |
Access the Report which is associated with this object. Can be called from another thread only if the Report object is thread-safe.
Implements ts::ReporterInterface.
Associate this object with another Report to log errors.
| [in] | report | Where to report errors. The report object must remain valid as long as this object exists or setReport() is used with another Report object. If report is null, log messages are discarded. |
|
inherited |
Associate this object with another ReporterBase to log errors.
| [in] | delegate | Use the report of another ReporterBase. If delegate is null, the previous explicit Report is used.. |
|
inherited |
Temporarily mute the associated report.
| [in] | mute | It true, report() will return a null report (log messages are discarded), until muteReport() is invoked again with mute set to false. |
|
inlinestaticinherited |
Compute a log severity level from a "silent" parameter. Some subclass methods have a "silent" parameter to avoid reporting errors which may be insignificant, typically when closing a device after an error, in which case the close operation may produce other errors if the previous error left the device in an inconsistent state. While those errors should not be displayed as errors, we still display them at debug level.
| [in] | silent | If true, do not report errors, report debug messages instead. |
| [in] | default_severity | Default severity, in non-silent mode (error by default). |
|
staticconstexprinherited |
Default minimum wait interval.