MythTV  master
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | Friends | List of all members
TSPacket Class Reference

Used to access the data of a Transport Stream packet. More...

#include <tspacket.h>

Inheritance diagram for TSPacket:
Inheritance graph
Collaboration diagram for TSPacket:
Collaboration graph

Public Member Functions

 TSPacket (void)=default
TSPacketCreateClone (void) const
void InitPayload (const unsigned char *payload)
void InitPayload (const unsigned char *payload, uint size)
unsigned int AFCOffset (void) const
unsigned int StartOfFieldPointer (void) const
void SetStartOfFieldPointer (uint sof)
QString toString (void) const
- Public Member Functions inherited from TSHeader
 TSHeader (void)
 TSHeader (int cc)
void InitHeader (const unsigned char *header)
bool HasSync (void) const
bool TransportError (void) const
bool PayloadStart (void) const
bool Priority (void) const
unsigned int PID (void) const
unsigned int ScramblingControl (void) const
unsigned int AdaptationFieldControl (void) const
unsigned int ContinuityCounter (void) const
bool Scrambled (void) const
bool HasAdaptationField (void) const
size_t AdaptationFieldSize (void) const
bool HasPayload (void) const
bool GetDiscontinuityIndicator (void) const
bool HasPCR (void) const
int64_t GetPCRbase (void) const
int32_t GetPCRext (void) const
int64_t GetPCRraw (void) const
TimePoint GetPCR (void) const
void SetTransportError (bool err)
void SetPayloadStart (bool start)
void SetPriority (bool priority)
void SetPID (unsigned int pid)
void SetScrambled (unsigned int scr)
void SetAdaptationFieldControl (unsigned int afc)
void SetContinuityCounter (unsigned int cc)
const unsigned char * data (void) const
unsigned char * data (void)

Static Public Member Functions

static TSPacketCreatePayloadOnlyPacket (void)

Static Public Attributes

static constexpr unsigned int kSize {188}
static constexpr unsigned int kPayloadSize {188-4}
static constexpr unsigned int kDVBEmissionSize {204}
static constexpr unsigned int kISDBEmissionSize {204}
static constexpr unsigned int k8VSBEmissionSize {208}
static const TSPacketkNullPacket
- Static Public Attributes inherited from TSHeader
static constexpr unsigned int kHeaderSize {4}
static const unsigned char kPayloadOnlyHeader [4]

Private Attributes

unsigned char m_tsPayload [184] {}


class PESPacket

Additional Inherited Members

- Public Types inherited from TSHeader
using Clock = std::chrono::steady_clock
using TimePoint = std::chrono::time_point< Clock, std::chrono::microseconds >

Detailed Description

Used to access the data of a Transport Stream packet.

See also
TSHeader, PESPacket, HDTVRecorder

Definition at line 166 of file tspacket.h.

Constructor & Destructor Documentation

◆ TSPacket()

TSPacket::TSPacket ( void  )

Member Function Documentation

◆ CreatePayloadOnlyPacket()

static TSPacket* TSPacket::CreatePayloadOnlyPacket ( void  )

◆ CreateClone()

TSPacket* TSPacket::CreateClone ( void  ) const

Definition at line 183 of file tspacket.h.

Referenced by MpegRecorder::ProcessTSPacket().

◆ InitPayload() [1/2]

void TSPacket::InitPayload ( const unsigned char *  payload)

Definition at line 189 of file tspacket.h.

◆ InitPayload() [2/2]

void TSPacket::InitPayload ( const unsigned char *  payload,
uint  size 

Definition at line 195 of file tspacket.h.

◆ AFCOffset()

unsigned int TSPacket::AFCOffset ( void  ) const

◆ StartOfFieldPointer()

unsigned int TSPacket::StartOfFieldPointer ( void  ) const

Definition at line 213 of file tspacket.h.

Referenced by MPEGStreamData::AssemblePSIP(), and PSIPTable::InitPESPacket().

◆ SetStartOfFieldPointer()

void TSPacket::SetStartOfFieldPointer ( uint  sof)

Definition at line 215 of file tspacket.h.

◆ toString()

QString TSPacket::toString ( void  ) const

Definition at line 28 of file tspacket.cpp.

Friends And Related Function Documentation

◆ PESPacket

friend class PESPacket

Definition at line 168 of file tspacket.h.

Member Data Documentation

◆ kSize

constexpr unsigned int TSPacket::kSize {188}

◆ kPayloadSize

constexpr unsigned int TSPacket::kPayloadSize {188-4}

◆ kDVBEmissionSize

constexpr unsigned int TSPacket::kDVBEmissionSize {204}

Definition at line 222 of file tspacket.h.

Referenced by ASIStreamHandler::Open().

◆ kISDBEmissionSize

constexpr unsigned int TSPacket::kISDBEmissionSize {204}

Definition at line 223 of file tspacket.h.

◆ k8VSBEmissionSize

constexpr unsigned int TSPacket::k8VSBEmissionSize {208}

Definition at line 224 of file tspacket.h.

◆ kNullPacket

const TSPacket * TSPacket::kNullPacket
Initial value:
reinterpret_cast<const TSPacket*>(NULL_PACKET_BYTES)

Definition at line 225 of file tspacket.h.

◆ m_tsPayload

unsigned char TSPacket::m_tsPayload[184] {}

Definition at line 227 of file tspacket.h.

The documentation for this class was generated from the following files:
Used to access the data of a Transport Stream packet.
Definition: tspacket.h:166
const unsigned char NULL_PACKET_BYTES[188]
Definition: tspacket.cpp:14