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)
 
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 const unsigned int kSize = 188
 
static const unsigned int kPayloadSize = 188-4
 
static const unsigned int kDVBEmissionSize = 204
 
static const unsigned int kISDBEmissionSize = 204
 
static const unsigned int k8VSBEmissionSize = 208
 
static const TSPacketkNullPacket
 
- Static Public Attributes inherited from TSHeader
static const unsigned int kHeaderSize = 4
 
static const unsigned char kPayloadOnlyHeader [4]
 

Private Attributes

unsigned char _tspayload [184]
 

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

Constructor & Destructor Documentation

◆ TSPacket()

TSPacket::TSPacket ( void  )
inline

Definition at line 172 of file tspacket.h.

Member Function Documentation

◆ CreatePayloadOnlyPacket()

static TSPacket* TSPacket::CreatePayloadOnlyPacket ( void  )
inlinestatic

◆ CreateClone()

TSPacket* TSPacket::CreateClone ( void  ) const
inline

Definition at line 183 of file tspacket.h.

Referenced by MpegRecorder::ProcessTSPacket().

◆ InitPayload() [1/2]

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

Definition at line 189 of file tspacket.h.

◆ InitPayload() [2/2]

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

Definition at line 195 of file tspacket.h.

◆ AFCOffset()

unsigned int TSPacket::AFCOffset ( void  ) const
inline

◆ StartOfFieldPointer()

unsigned int TSPacket::StartOfFieldPointer ( void  ) const
inline

Definition at line 213 of file tspacket.h.

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

◆ SetStartOfFieldPointer()

void TSPacket::SetStartOfFieldPointer ( uint  sof)
inline

Definition at line 215 of file tspacket.h.

Referenced by CreatePayloadOnlyPacket().

◆ toString()

QString TSPacket::toString ( void  ) const

Definition at line 37 of file tspacket.cpp.

Friends And Related Function Documentation

◆ PESPacket

friend class PESPacket
friend

Definition at line 168 of file tspacket.h.

Member Data Documentation

◆ kSize

const unsigned int TSPacket::kSize = 188
static

◆ kPayloadSize

const unsigned int TSPacket::kPayloadSize = 188-4
static

◆ kDVBEmissionSize

const unsigned int TSPacket::kDVBEmissionSize = 204
static

Definition at line 222 of file tspacket.h.

Referenced by ASIStreamHandler::Open().

◆ kISDBEmissionSize

const unsigned int TSPacket::kISDBEmissionSize = 204
static

Definition at line 223 of file tspacket.h.

◆ k8VSBEmissionSize

const unsigned int TSPacket::k8VSBEmissionSize = 208
static

Definition at line 224 of file tspacket.h.

◆ kNullPacket

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

Definition at line 225 of file tspacket.h.

◆ _tspayload

unsigned char TSPacket::_tspayload[184]
private

Definition at line 227 of file tspacket.h.

Referenced by CreatePayloadOnlyPacket().


The documentation for this class was generated from the following files: