Regulate execution speed based on a bitrate.
More...
#include <tsBitRateRegulator.h>
Regulate execution speed based on a bitrate.
- See also
- PCRRegulator
◆ BitRateRegulator()
Constructor.
- Parameters
-
[in,out] | report | Where to report errors. |
[in] | log_level | Severity level for information messages. |
◆ setReport()
Set a new report.
- Parameters
-
[in,out] | report | Where to report errors. |
[in] | log_level | Severity level for information messages. |
◆ setBurstPacketCount()
void ts::BitRateRegulator::setBurstPacketCount |
( |
PacketCounter |
count | ) |
|
|
inline |
Set the number of packets to burst at a time.
- Parameters
-
[in] | count | Number of packets to burst at a time. |
◆ setFixedBitRate()
void ts::BitRateRegulator::setFixedBitRate |
( |
const BitRate & |
bitrate | ) |
|
|
inline |
Set a fixed bitrate for regulation, ignore current bitrate.
- Parameters
-
[in] | bitrate | Fixed bitrate to use. When zero, use current bitrate. |
◆ regulate() [1/2]
void ts::BitRateRegulator::regulate |
( |
const BitRate & |
current_bitrate, |
|
|
bool & |
flush, |
|
|
bool & |
bitrate_changed |
|
) |
| |
Regulate the flow, to be called at each packet.
Suspend the process when necessary.
- Parameters
-
[in] | current_bitrate | Current bitrate. Ignored if a fixed bitrate was set. |
[out] | flush | Set to true if all previously processed and buffered packets should be flushed. |
[out] | bitrate_changed | Set to true if the bitrate has changed. |
◆ regulate() [2/2]
void ts::BitRateRegulator::regulate |
( |
| ) |
|
Regulate the flow, to be called at each packet.
Suspend the process when necessary. This version is suitable for fixed bitrate.
The documentation for this class was generated from the following file: