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


Public Member Functions | |
| PESStreamPacketizer (const DuckContext &duck, PID pid=PID_NULL) | |
| virtual | ~PESStreamPacketizer () override |
| bool | addPES (const PESPacket &pes, ShareMode mode) |
| bool | addPES (const PESPacketPtr &pes) |
| bool | atPESBoundary () const |
| virtual std::ostream & | display (std::ostream &strm) const override |
| const DuckContext & | duck () const |
| bool | empty () const |
| virtual bool | getNextPacket (TSPacket &packet) override |
| PID | getPID () const |
| uint8_t | nextContinuityCounter () const |
| PacketCounter | packetCount () const |
| PacketCounter | pesCount () const |
| PESProviderInterface * | pesProvider () const |
| Report & | report () const |
| virtual void | reset () override |
| void | setMaxQueuedPackets (size_t count) |
| void | setNextContinuityCounter (uint8_t cc) |
| void | setPID (PID pid) |
Protected Member Functions | |
| void | configurePacket (TSPacket &pkt, bool nullify) |
Packetization of PES data into Transport Stream packets in "push" mode.
This class works in "push" mode; the application pushes new PES packets in the packetizer, asynchronously from the generation of the TS packets. If you need a PES packetizer working in "pull" mode, check class PESPacketizer.
| ts::PESStreamPacketizer::PESStreamPacketizer | ( | const DuckContext & | duck, |
| PID | pid = PID_NULL ) |
Constructor.
| [in] | duck | TSDuck execution context. The reference is kept inside the packetizer. |
| [in] | pid | PID for generated TS packets. |
|
overridevirtual |
Destructor
|
inline |
Set a limit to the number of internally queued PES packets. This is a way to limit the internal memory which is used by this instance.
| [in] | count | Maximum number of internally queued PES packets. If the number of already queued packets is already higher, none is dropped. If count is zero, there is no limit (this is the initial default). |
| bool ts::PESStreamPacketizer::addPES | ( | const PESPacketPtr & | pes | ) |
Add a PES packet to packetize.
| [in] | pes | A safe pointer to the PES packet. |
Add a PES packet to packetize.
| [in] | pes | The PES packet. |
| [in] | mode | The enqueue PES packet's data are either shared (ShareMode::SHARE) between the provided pes or duplicated (ShareMode::COPY). |
|
inline |
Check if the packetizer is empty (no more TS packet to produce).
|
overridevirtual |
Reset the packetizer. All unfinished items (sections or PES packets) are dropped.
Reimplemented from ts::PESPacketizer.
|
overridevirtual |
Display the internal state of the packetizer, mainly for debug.
| [in,out] | strm | Output text stream. |
Reimplemented from ts::PESPacketizer.
|
inlineinherited |
Get the object which provides PES packets when the packetizer needs more data.
|
inlineinherited |
Check if the TS packet stream is exactly at a PES packet boundary.
|
inlineinherited |
Get the number of completely packetized PES packets so far.
|
overridevirtualinherited |
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. |
Implements ts::AbstractPacketizer.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
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. |
|
inlineinherited |
Get the continuity counter value for next MPEG packet.
|
inlineinherited |
Get the number of generated TS packets so far.
|
inlineinherited |
Get a reference to the debugging report.
|
inlineinherited |
Get a reference to the TSDuck execution context.
|
protectedinherited |
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). |