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
[legend]
Collaboration diagram for TSPacket:
Collaboration graph
[legend]

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 TSHeaderArray kPayloadOnlyHeader
 

Private Attributes

std::array< uint8_t, 184 > m_tsPayload {}
 

Friends

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 169 of file tspacket.h.

Constructor & Destructor Documentation

◆ TSPacket()

TSPacket::TSPacket ( void  )
default

Member Function Documentation

◆ CreatePayloadOnlyPacket()

static TSPacket* TSPacket::CreatePayloadOnlyPacket ( void  )
inlinestatic

◆ CreateClone()

TSPacket* TSPacket::CreateClone ( void  ) const
inline

Definition at line 186 of file tspacket.h.

Referenced by MpegRecorder::ProcessTSPacket().

◆ InitPayload() [1/2]

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

Definition at line 192 of file tspacket.h.

◆ InitPayload() [2/2]

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

Definition at line 198 of file tspacket.h.

◆ AFCOffset()

unsigned int TSPacket::AFCOffset ( void  ) const
inline

◆ StartOfFieldPointer()

unsigned int TSPacket::StartOfFieldPointer ( void  ) const
inline

Definition at line 216 of file tspacket.h.

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

◆ SetStartOfFieldPointer()

void TSPacket::SetStartOfFieldPointer ( uint  sof)
inline

Definition at line 218 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
friend

Definition at line 171 of file tspacket.h.

Member Data Documentation

◆ kSize

constexpr unsigned int TSPacket::kSize {188}
staticconstexpr

◆ kPayloadSize

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

◆ kDVBEmissionSize

constexpr unsigned int TSPacket::kDVBEmissionSize {204}
staticconstexpr

Definition at line 225 of file tspacket.h.

Referenced by ASIStreamHandler::Open().

◆ kISDBEmissionSize

constexpr unsigned int TSPacket::kISDBEmissionSize {204}
staticconstexpr

Definition at line 226 of file tspacket.h.

◆ k8VSBEmissionSize

constexpr unsigned int TSPacket::k8VSBEmissionSize {208}
staticconstexpr

Definition at line 227 of file tspacket.h.

◆ kNullPacket

const TSPacket * TSPacket::kNullPacket
static
Initial value:
=
reinterpret_cast<const TSPacket*>(NULL_PACKET_BYTES.data())

Definition at line 228 of file tspacket.h.

◆ m_tsPayload

std::array<uint8_t,184> TSPacket::m_tsPayload {}
private

Definition at line 230 of file tspacket.h.


The documentation for this class was generated from the following files:
TSPacket
Used to access the data of a Transport Stream packet.
Definition: tspacket.h:170
NULL_PACKET_BYTES
const std::array< unsigned char, 188 > NULL_PACKET_BYTES
Definition: tspacket.cpp:15