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

Public Member Functions | |
| virtual std::ostream & | display (std::ostream &strm) const |
| const DuckContext & | duck () const |
| virtual bool | getNextPacket (TSPacket &packet)=0 |
| PID | getPID () const |
| uint8_t | nextContinuityCounter () const |
| PacketCounter | packetCount () const |
| Report & | report () const |
| virtual void | reset () |
| void | setNextContinuityCounter (uint8_t cc) |
| void | setPID (PID pid) |
Protected Member Functions | |
| AbstractPacketizer (const DuckContext &duck, PID pid=PID_NULL) | |
| virtual | ~AbstractPacketizer () |
| void | configurePacket (TSPacket &pkt, bool nullify) |
Abstract superclass for packetizer classes (sections or PES packets).
|
protected |
Constructor.
| [in] | duck | TSDuck execution context. The reference is kept inside the packetizer. |
| [in] | pid | PID for generated TS packets. |
|
protectedvirtual |
Destructor
|
inline |
|
inline |
|
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.
| [in] | cc | Next continuity counter. |
|
inline |
Get the continuity counter value for next MPEG 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.
| [out] | packet | The next TS packet. |
Implemented in ts::Packetizer, and ts::PESPacketizer.
|
inline |
Get the number of generated TS packets so far.
|
virtual |
Reset the packetizer. All unfinished items (sections or PES packets) are dropped.
Reimplemented in ts::CyclingPacketizer, ts::Packetizer, ts::PESPacketizer, and ts::PESStreamPacketizer.
|
inline |
Get a reference to the debugging report.
|
inline |
Get a reference to the TSDuck execution context.
|
virtual |
Display the internal state of the packetizer, mainly for debug.
| [in,out] | strm | Output text stream. |
Reimplemented in ts::CyclingPacketizer, ts::Packetizer, ts::PESPacketizer, and ts::PESStreamPacketizer.
|
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.
| [in,out] | pkt | TS packet to configure |
| [in] | nullify | Return a null packet instead (no data to return for now). |