|
MistServer
2.5.3-Pro-19-gf5e75b1 ( Generic_64)
|
#include <ts_packet.h>
Public Member Functions | |
| void | addStuffing () |
| Adds stuffing to the Packet depending on how much content you want to send. More... | |
| void | addStuffing () |
| const char * | checkAndGetBuffer () const |
| Checks the size of the internal packet buffer (prints error if size !=188), then returns a pointer to the data. More... | |
| const char * | checkAndGetBuffer () const |
| void | clear () |
| Sets the packet pos to 4, and resets the first 4 fields to defaults (including sync byte on pos 0) More... | |
| void | clear () |
| int | fillFree (const char *PackageData, int maxLen) |
| Fills the free bytes of the Packet. More... | |
| int | fillFree (const char *PackageData, int maxLen) |
| bool | FromFile (FILE *data) |
| bool | FromFile (FILE *data) |
| This function fills a Packet from a file. More... | |
| bool | FromPointer (const char *data) |
| This funtion fills a Packet from a char array. More... | |
| bool | FromPointer (const char *data) |
| int | getAdaptationField () const |
| Gets whether a Packet contains an adaptationfield. More... | |
| int | getAdaptationField () const |
| int | getAdaptationFieldLen () const |
| Gets the current length of the adaptationfield. More... | |
| int | getAdaptationFieldLen () const |
| unsigned int | getBytesFree () const |
| Gets the amount of bytes that are not written yet in a Packet. More... | |
| unsigned int | getBytesFree () const |
| int | getContinuityCounter () const |
| Gets the Continuity Counter of a single Packet. More... | |
| int | getContinuityCounter () const |
| int | getCRC () const |
| int | getCRC () const |
| bool | getCurrentNextIndicator () const |
| bool | getCurrentNextIndicator () const |
| Retrieves the "current/next" indicator. More... | |
| unsigned int | getDataSize () const |
| unsigned int | getDataSize () const |
| char | getLastSectionNumber () const |
| Retrieves the last section number. More... | |
| char | getLastSectionNumber () const |
| char | getOffset () const |
| char | getOffset () const |
| Retrieves the current addStuffingoffset value for a PAT. More... | |
| int64_t | getOPCR () const |
| Gets the OPCR (Original Program Clock Reference) of a Packet. More... | |
| int64_t | getOPCR () const |
| const char * | getPayload () const |
| returns the character buffer with a std::string wrapper More... | |
| const char * | getPayload () const |
| int | getPayloadLength () const |
| Gets the length of the payload for this apcket. More... | |
| int | getPayloadLength () const |
| int64_t | getPCR () const |
| Gets the PCR (Program Clock Reference) of a Packet. More... | |
| int64_t | getPCR () const |
| unsigned int | getPID () const |
| Gets the PID of a single Packet. More... | |
| unsigned int | getPID () const |
| short | getProgramCount () const |
| Returns the amount of programs in this table. More... | |
| short | getProgramCount () const |
| short | getProgramNumber (short index) const |
| short | getProgramNumber (short index) const |
| short | getProgramPID (short index) const |
| short | getProgramPID (short index) const |
| bool | getRandomAccess () const |
| Gets whether this Packet can be accessed at random (indicates keyframe). More... | |
| bool | getRandomAccess () const |
| short | getSectionLength () const |
| Retrieves the current section length. More... | |
| short | getSectionLength () const |
| char | getSectionNumber () const |
| Retrieves the section number. More... | |
| char | getSectionNumber () const |
| char | getTableId () const |
| char | getTableId () const |
| Retrieves the ID of this table. More... | |
| unsigned int | getTransportScramblingControl () const |
| Gets the transport scrambling control of a Packet. More... | |
| unsigned int | getTransportScramblingControl () const |
| short | getTransportStreamId () const |
| short | getTransportStreamId () const |
| Retrieves the Transport Stream ID. More... | |
| bool | getUnitStart () const |
| Gets the payload unit start inficator of a Packet. More... | |
| bool | getUnitStart () const |
| char | getVersionNumber () const |
| Retrieves the version number. More... | |
| char | getVersionNumber () const |
| bool | hasDiscontinuity () const |
| bool | hasDiscontinuity () const |
| bool | hasESpriority () const |
| Gets the elementary stream priority indicator of a Packet. More... | |
| bool | hasESpriority () const |
| bool | hasOPCR () const |
| Gets the value of the OPCR flag. More... | |
| bool | hasOPCR () const |
| bool | hasPCR () const |
| Gets the value of the PCR flag. More... | |
| bool | hasPCR () const |
| bool | hasPriority () const |
| bool | hasPriority () const |
| Gets the transport priority of a Packet. More... | |
| bool | hasSplicingPoint () const |
| Gets the value of the splicing point flag. More... | |
| bool | hasSplicingPoint () const |
| bool | hasTransportError () const |
| Gets the transport error inficator of a Packet. More... | |
| bool | hasTransportError () const |
| bool | isPMT () const |
| bool | isPMT () const |
| Returns true if this PID contains a PMT. More... | |
| operator bool () const | |
| operator bool () const | |
| ProgramAssociationTable & | operator= (const Packet &rhs) |
| ProgramAssociationTable & | operator= (const Packet &rhs) |
| void | setAdaptationField (int NewVal) |
| void | setAdaptationField (int NewVal) |
| Sets the selection value for an adaptationfield of a Packet. More... | |
| void | setContinuityCounter (int NewContinuity) |
| Sets the Continuity Counter of a single Packet. More... | |
| void | setContinuityCounter (int NewContinuity) |
| void | setDefaultPAT () |
| void | setDefaultPAT () |
| Transforms the Packet into a standard Program Association Table. More... | |
| void | setDiscontinuity (bool newVal) |
| void | setDiscontinuity (bool newVal) |
| void | setPCR (int64_t NewVal) |
| void | setPCR (int64_t NewVal) |
| Sets the PCR (Program Clock Reference) of a Packet. More... | |
| void | setPID (int NewPID) |
| Sets the PID of a single Packet. More... | |
| void | setPID (int NewPID) |
| void | setRandomAccess (bool newVal) |
| Gets the value of the transport private data point flag. More... | |
| void | setRandomAccess (bool newVal) |
| void | setUnitStart (bool newVal) |
| Sets the start of a new unit in this Packet. More... | |
| void | setUnitStart (bool newVal) |
| std::string | toPrettyString (size_t indent=0, int detailLevel=3) const |
| Prints a packet to stdout, for analyser purposes. More... | |
| std::string | toPrettyString (size_t indent) const |
| std::string | toPrettyString (size_t indent) const |
| This function prints a program association table, prints all values in a human readable format. More... | |
| void | updPos (unsigned int newPos) |
| update position in character array (pos), More... | |
| void | updPos (unsigned int newPos) |
Static Public Member Functions | |
| static std::string & | getPESAudioLeadIn (unsigned int len, unsigned long long PTS) |
| Generates a PES Lead-in for an audio frame. More... | |
| static std::string & | getPESAudioLeadIn (unsigned int len, unsigned long long PTS) |
| static std::string & | getPESVideoLeadIn (unsigned int len, unsigned long long PTS, unsigned long long offset, bool isAligned) |
| Generates a PES Lead-in for a video frame. More... | |
| static std::string & | getPESVideoLeadIn (unsigned int len, unsigned long long PTS, unsigned long long offset, bool isAligned) |
Protected Attributes | |
| unsigned int | pos |
| char | strBuf [189] |
|
inherited |
|
inherited |
|
inherited |
Checks the size of the internal packet buffer (prints error if size !=188), then returns a pointer to the data.
|
inherited |
|
inherited |
Sets the packet pos to 4, and resets the first 4 fields to defaults (including sync byte on pos 0)
|
inherited |
|
inherited |
Fills the free bytes of the Packet.
Stores as many bytes from NewVal as possible in the packet. The minimum of Packet::BytesFree and maxLen is used.
| NewVal | The data to store in the packet. |
| maxLen | The maximum amount of bytes to store. |
|
inherited |
|
inherited |
|
inherited |
This function fills a Packet from a file.
It fills the content with the next 188 bytes int he file.
| Data | The data to be read into the packet. |
|
inherited |
This funtion fills a Packet from a char array.
It fills the content with the first 188 characters of a char array
| Data | The char array that contains the data to be read into the packet |
|
inherited |
|
inherited |
|
inherited |
Gets whether a Packet contains an adaptationfield.
|
inherited |
Gets the current length of the adaptationfield.
|
inherited |
|
inherited |
Gets the amount of bytes that are not written yet in a Packet.
|
inherited |
|
inherited |
Gets the Continuity Counter of a single Packet.
|
inherited |
| int TS::ProgramAssociationTable::getCRC | ( | ) | const |
| int TS::ProgramAssociationTable::getCRC | ( | ) | const |
| bool TS::ProgramAssociationTable::getCurrentNextIndicator | ( | ) | const |
| bool TS::ProgramAssociationTable::getCurrentNextIndicator | ( | ) | const |
Retrieves the "current/next" indicator.
|
inherited |
|
inherited |
| char TS::ProgramAssociationTable::getLastSectionNumber | ( | ) | const |
Retrieves the last section number.
| char TS::ProgramAssociationTable::getLastSectionNumber | ( | ) | const |
| char TS::ProgramAssociationTable::getOffset | ( | ) | const |
| char TS::ProgramAssociationTable::getOffset | ( | ) | const |
Retrieves the current addStuffingoffset value for a PAT.
|
inherited |
Gets the OPCR (Original Program Clock Reference) of a Packet.
|
inherited |
|
inherited |
|
inherited |
returns the character buffer with a std::string wrapper
|
inherited |
|
inherited |
Gets the length of the payload for this apcket.
|
inherited |
Gets the PCR (Program Clock Reference) of a Packet.
|
inherited |
|
staticinherited |
Generates a PES Lead-in for an audio frame.
Prepends the lead-in to variable toSend, assumes toSend's length is all other data.
| len | The length of this frame. |
| PTS | The timestamp of the frame. |
|
staticinherited |
|
staticinherited |
|
staticinherited |
Generates a PES Lead-in for a video frame.
Prepends the lead-in to variable toSend, assumes toSend's length is all other data.
| len | The length of this frame. |
| PTS | The timestamp of the frame. |
|
inherited |
Gets the PID of a single Packet.
|
inherited |
| short TS::ProgramAssociationTable::getProgramCount | ( | ) | const |
Returns the amount of programs in this table.
| short TS::ProgramAssociationTable::getProgramCount | ( | ) | const |
| short TS::ProgramAssociationTable::getProgramNumber | ( | short | index | ) | const |
| short TS::ProgramAssociationTable::getProgramNumber | ( | short | index | ) | const |
| short TS::ProgramAssociationTable::getProgramPID | ( | short | index | ) | const |
| short TS::ProgramAssociationTable::getProgramPID | ( | short | index | ) | const |
|
inherited |
|
inherited |
| short TS::ProgramAssociationTable::getSectionLength | ( | ) | const |
Retrieves the current section length.
| short TS::ProgramAssociationTable::getSectionLength | ( | ) | const |
| char TS::ProgramAssociationTable::getSectionNumber | ( | ) | const |
Retrieves the section number.
| char TS::ProgramAssociationTable::getSectionNumber | ( | ) | const |
| char TS::ProgramAssociationTable::getTableId | ( | ) | const |
| char TS::ProgramAssociationTable::getTableId | ( | ) | const |
Retrieves the ID of this table.
|
inherited |
|
inherited |
| short TS::ProgramAssociationTable::getTransportStreamId | ( | ) | const |
| short TS::ProgramAssociationTable::getTransportStreamId | ( | ) | const |
Retrieves the Transport Stream ID.
|
inherited |
|
inherited |
| char TS::ProgramAssociationTable::getVersionNumber | ( | ) | const |
Retrieves the version number.
| char TS::ProgramAssociationTable::getVersionNumber | ( | ) | const |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Gets the value of the OPCR flag.
|
inherited |
|
inherited |
|
inherited |
Gets the value of the PCR flag.
|
inherited |
|
inherited |
|
inherited |
Gets the value of the splicing point flag.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Returns true if this PID contains a PMT.
Important caveat: only works if the corresponding PAT has been pretty-printed earlier!
|
inherited |
|
inherited |
| ProgramAssociationTable& TS::ProgramAssociationTable::operator= | ( | const Packet & | rhs | ) |
| ProgramAssociationTable & TS::ProgramAssociationTable::operator= | ( | const Packet & | rhs | ) |
|
inherited |
|
inherited |
Sets the selection value for an adaptationfield of a Packet.
| NewSelector | The new value of the selection bits.
|
|
inherited |
|
inherited |
Sets the Continuity Counter of a single Packet.
| NewContinuity | The new Continuity Counter of the packet. |
|
inherited |
|
inherited |
Transforms the Packet into a standard Program Association Table.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Sets the PCR (Program Clock Reference) of a Packet.
| NewVal | The new PCR Value. |
|
inherited |
|
inherited |
Sets the PID of a single Packet.
| NewPID | The new PID of the packet. |
|
inherited |
|
inherited |
Gets the value of the transport private data point flag.
|
inherited |
|
inherited |
Sets the start of a new unit in this Packet.
| NewVal | The new value for the start of a unit. |
|
inherited |
Prints a packet to stdout, for analyser purposes.
| std::string TS::ProgramAssociationTable::toPrettyString | ( | size_t | indent | ) | const |
| std::string TS::ProgramAssociationTable::toPrettyString | ( | size_t | indent | ) | const |
This function prints a program association table, prints all values in a human readable format.
| indent | The indentation of the string printed as wanted by the user |
|
inherited |
update position in character array (pos),
|
inherited |
|
protectedinherited |
|
protectedinherited |
1.8.11