MythTV  master
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
TSHeader Class Reference

Used to access header of a TSPacket. More...

#include <tspacket.h>

Inheritance diagram for TSHeader:
Inheritance graph
[legend]
Collaboration diagram for TSHeader:
Collaboration graph
[legend]

Public Types

using Clock = std::chrono::steady_clock
 
using TimePoint = std::chrono::time_point< Clock, std::chrono::microseconds >
 

Public Member Functions

 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 Attributes

static constexpr unsigned int kHeaderSize {4}
 
static const TSHeaderArray kPayloadOnlyHeader
 

Private Attributes

TSHeaderArray m_tsData {}
 

Detailed Description

Used to access header of a TSPacket.

This class is also used to determine which PID a PESPacket arrived on.

See also
TSPacket, PESPacket, HDTVRecorder

Definition at line 27 of file tspacket.h.

Member Typedef Documentation

◆ Clock

using TSHeader::Clock = std::chrono::steady_clock

Definition at line 30 of file tspacket.h.

◆ TimePoint

using TSHeader::TimePoint = std::chrono::time_point<Clock, std::chrono::microseconds>

Definition at line 31 of file tspacket.h.

Constructor & Destructor Documentation

◆ TSHeader() [1/2]

TSHeader::TSHeader ( void  )
inline

Definition at line 33 of file tspacket.h.

◆ TSHeader() [2/2]

TSHeader::TSHeader ( int  cc)
inlineexplicit

Definition at line 41 of file tspacket.h.

Member Function Documentation

◆ InitHeader()

void TSHeader::InitHeader ( const unsigned char *  header)
inline

Definition at line 50 of file tspacket.h.

◆ HasSync()

bool TSHeader::HasSync ( void  ) const
inline

Definition at line 64 of file tspacket.h.

Referenced by TSPacket::toString().

◆ TransportError()

bool TSHeader::TransportError ( void  ) const
inline

◆ PayloadStart()

bool TSHeader::PayloadStart ( void  ) const
inline

◆ Priority()

bool TSHeader::Priority ( void  ) const
inline

Definition at line 72 of file tspacket.h.

Referenced by TSPacket::toString().

◆ PID()

unsigned int TSHeader::PID ( void  ) const
inline

◆ ScramblingControl()

unsigned int TSHeader::ScramblingControl ( void  ) const
inline

Definition at line 78 of file tspacket.h.

Referenced by TSPacket::toString().

◆ AdaptationFieldControl()

unsigned int TSHeader::AdaptationFieldControl ( void  ) const
inline

Definition at line 84 of file tspacket.h.

Referenced by PESPacket::AddTSPacket(), and TSPacket::toString().

◆ ContinuityCounter()

unsigned int TSHeader::ContinuityCounter ( void  ) const
inline

◆ Scrambled()

bool TSHeader::Scrambled ( void  ) const
inline

◆ HasAdaptationField()

bool TSHeader::HasAdaptationField ( void  ) const
inline

◆ AdaptationFieldSize()

size_t TSHeader::AdaptationFieldSize ( void  ) const
inline

Definition at line 95 of file tspacket.h.

Referenced by PESPacket::AddTSPacket().

◆ HasPayload()

bool TSHeader::HasPayload ( void  ) const
inline

◆ GetDiscontinuityIndicator()

bool TSHeader::GetDiscontinuityIndicator ( void  ) const
inline

Definition at line 99 of file tspacket.h.

◆ HasPCR()

bool TSHeader::HasPCR ( void  ) const
inline

Definition at line 102 of file tspacket.h.

Referenced by MPEGStreamData::ProcessTSPacket().

◆ GetPCRbase()

int64_t TSHeader::GetPCRbase ( void  ) const
inline

Definition at line 112 of file tspacket.h.

◆ GetPCRext()

int32_t TSHeader::GetPCRext ( void  ) const
inline

Definition at line 120 of file tspacket.h.

◆ GetPCRraw()

int64_t TSHeader::GetPCRraw ( void  ) const
inline

Definition at line 125 of file tspacket.h.

◆ GetPCR()

TimePoint TSHeader::GetPCR ( void  ) const
inline

Definition at line 129 of file tspacket.h.

Referenced by MPEGStreamData::ProcessTSPacket().

◆ SetTransportError()

void TSHeader::SetTransportError ( bool  err)
inline

Definition at line 132 of file tspacket.h.

◆ SetPayloadStart()

void TSHeader::SetPayloadStart ( bool  start)
inline

Definition at line 135 of file tspacket.h.

◆ SetPriority()

void TSHeader::SetPriority ( bool  priority)
inline

Definition at line 138 of file tspacket.h.

◆ SetPID()

void TSHeader::SetPID ( unsigned int  pid)
inline

Definition at line 141 of file tspacket.h.

Referenced by ProgramMapTable::Create(), and PESPacket::GetAsTSPackets().

◆ SetScrambled()

void TSHeader::SetScrambled ( unsigned int  scr)
inline

Definition at line 145 of file tspacket.h.

◆ SetAdaptationFieldControl()

void TSHeader::SetAdaptationFieldControl ( unsigned int  afc)
inline

Definition at line 148 of file tspacket.h.

◆ SetContinuityCounter()

void TSHeader::SetContinuityCounter ( unsigned int  cc)
inline

◆ data() [1/2]

const unsigned char* TSHeader::data ( void  ) const
inline

◆ data() [2/2]

unsigned char* TSHeader::data ( void  )
inline

Definition at line 156 of file tspacket.h.

Member Data Documentation

◆ kHeaderSize

constexpr unsigned int TSHeader::kHeaderSize {4}
staticconstexpr

Definition at line 158 of file tspacket.h.

Referenced by PESPacket::AddTSPacket().

◆ kPayloadOnlyHeader

const TSHeaderArray TSHeader::kPayloadOnlyHeader
static
Initial value:
{
0x40,
0x0,
0x10,
}

Definition at line 159 of file tspacket.h.

◆ m_tsData

TSHeaderArray TSHeader::m_tsData {}
private

Definition at line 161 of file tspacket.h.


The documentation for this class was generated from the following files:
SYNC_BYTE
#define SYNC_BYTE
Definition: tspacket.h:16