Abstract superclass for packetizer classes (sections or PES packets).
More...
#include <tsAbstractPacketizer.h>
|
| virtual std::ostream & | display (std::ostream &strm) const |
| | Display the internal state of the packetizer, mainly for debug.
|
| |
| const DuckContext & | duck () const |
| | Get a reference to the TSDuck execution context.
|
| |
| virtual bool | getNextPacket (TSPacket &packet)=0 |
| | Build the next MPEG packet for the list of items (sections or PES) to pacjetize.
|
| |
| PID | getPID () const |
| | Get the default PID for subsequent MPEG packets.
|
| |
| uint8_t | nextContinuityCounter () const |
| | Get the continuity counter value for next MPEG packet.
|
| |
| PacketCounter | packetCount () const |
| | Get the number of generated TS packets so far.
|
| |
| Report & | report () const |
| | Get a reference to the debugging report.
|
| |
| virtual void | reset () |
| | Reset the packetizer.
|
| |
| void | setNextContinuityCounter (uint8_t cc) |
| | Set the continuity counter value for next MPEG packet.
|
| |
| void | setPID (PID pid) |
| | Set the default PID for subsequent MPEG packets.
|
| |
Abstract superclass for packetizer classes (sections or PES packets).
◆ AbstractPacketizer()
Constructor.
- Parameters
-
| [in] | duck | TSDuck execution context. The reference is kept inside the packetizer. |
| [in] | pid | PID for generated TS packets. |
◆ setPID()
| void ts::AbstractPacketizer::setPID |
( |
PID |
pid | ) |
|
|
inline |
Set the default PID for subsequent MPEG packets.
- Parameters
-
| [in] | pid | PID for generated TS packets. |
◆ getPID()
| PID ts::AbstractPacketizer::getPID |
( |
| ) |
const |
|
inline |
Get the default PID for subsequent MPEG packets.
- Returns
- PID for generated TS packets.
◆ setNextContinuityCounter()
| void ts::AbstractPacketizer::setNextContinuityCounter |
( |
uint8_t |
cc | ) |
|
|
inline |
Set the continuity counter value for next MPEG packet.
This counter is automatically incremented at each packet. It is usually never a good idea to change this, except maybe before generating the first packet if the continuity must be preserved with the previous content of the PID.
- Parameters
-
| [in] | cc | Next continuity counter. |
◆ nextContinuityCounter()
| uint8_t ts::AbstractPacketizer::nextContinuityCounter |
( |
| ) |
const |
|
inline |
Get the continuity counter value for next MPEG packet.
- Returns
- Next continuity counter.
◆ getNextPacket()
| virtual bool ts::AbstractPacketizer::getNextPacket |
( |
TSPacket & |
packet | ) |
|
|
pure virtual |
Build the next MPEG packet for the list of items (sections or PES) to pacjetize.
If there is nothing to packetize, generate a null packet on PID_NULL.
- Parameters
-
| [out] | packet | The next TS packet. |
- Returns
- True if a real packet is returned, false if a null packet was returned.
Implemented in ts::Packetizer, and ts::PESPacketizer.
◆ packetCount()
Get the number of generated TS packets so far.
- Returns
- The number of generated TS packets so far.
◆ reset()
| virtual void ts::AbstractPacketizer::reset |
( |
| ) |
|
|
virtual |
◆ report()
| Report & ts::AbstractPacketizer::report |
( |
| ) |
const |
|
inline |
Get a reference to the debugging report.
- Returns
- A reference to the debugging report.
◆ duck()
| const DuckContext & ts::AbstractPacketizer::duck |
( |
| ) |
const |
|
inline |
Get a reference to the TSDuck execution context.
- Returns
- A reference to the TSDuck execution context.
◆ display()
| virtual std::ostream & ts::AbstractPacketizer::display |
( |
std::ostream & |
strm | ) |
const |
|
virtual |
◆ configurePacket()
| void ts::AbstractPacketizer::configurePacket |
( |
TSPacket & |
pkt, |
|
|
bool |
nullify |
|
) |
| |
|
protected |
Configure a TS packet with continuity and PID.
Also increment the number of generated packet. So this method must be called exactly once per packet.
- Parameters
-
| [in,out] | pkt | TS packet to configure |
| [in] | nullify | Return a null packet instead (no data to return for now). |
The documentation for this class was generated from the following file: