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]

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 const unsigned int kHeaderSize = 4
 
static const unsigned char kPayloadOnlyHeader [4]
 

Private Attributes

unsigned char _tsdata [4]
 

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

Member Typedef Documentation

◆ Clock

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

Definition at line 27 of file tspacket.h.

◆ TimePoint

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

Definition at line 28 of file tspacket.h.

Constructor & Destructor Documentation

◆ TSHeader() [1/2]

TSHeader::TSHeader ( void  )
inline

Definition at line 30 of file tspacket.h.

◆ TSHeader() [2/2]

TSHeader::TSHeader ( int  cc)
inlineexplicit

Definition at line 38 of file tspacket.h.

Member Function Documentation

◆ InitHeader()

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

Definition at line 47 of file tspacket.h.

Referenced by TSPacket::CreatePayloadOnlyPacket().

◆ HasSync()

bool TSHeader::HasSync ( void  ) const
inline

Definition at line 61 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 69 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 75 of file tspacket.h.

Referenced by TSPacket::toString().

◆ AdaptationFieldControl()

unsigned int TSHeader::AdaptationFieldControl ( void  ) const
inline

Definition at line 81 of file tspacket.h.

Referenced by TSPacket::toString().

◆ ContinuityCounter()

unsigned int TSHeader::ContinuityCounter ( void  ) const
inline

◆ Scrambled()

bool TSHeader::Scrambled ( void  ) const
inline

◆ HasAdaptationField()

bool TSHeader::HasAdaptationField ( void  ) const
inline

Definition at line 91 of file tspacket.h.

Referenced by TSPacket::AFCOffset(), and FirewireRecorder::ProcessTSPacket().

◆ AdaptationFieldSize()

size_t TSHeader::AdaptationFieldSize ( void  ) const
inline

Definition at line 92 of file tspacket.h.

◆ HasPayload()

bool TSHeader::HasPayload ( void  ) const
inline

◆ GetDiscontinuityIndicator()

bool TSHeader::GetDiscontinuityIndicator ( void  ) const
inline

Definition at line 96 of file tspacket.h.

◆ HasPCR()

bool TSHeader::HasPCR ( void  ) const
inline

Definition at line 99 of file tspacket.h.

Referenced by MPEGStreamData::ProcessTSPacket().

◆ GetPCRbase()

int64_t TSHeader::GetPCRbase ( void  ) const
inline

Definition at line 109 of file tspacket.h.

◆ GetPCRext()

int32_t TSHeader::GetPCRext ( void  ) const
inline

Definition at line 117 of file tspacket.h.

◆ GetPCRraw()

int64_t TSHeader::GetPCRraw ( void  ) const
inline

Definition at line 122 of file tspacket.h.

◆ GetPCR()

TimePoint TSHeader::GetPCR ( void  ) const
inline

Definition at line 126 of file tspacket.h.

Referenced by MPEGStreamData::ProcessTSPacket().

◆ SetTransportError()

void TSHeader::SetTransportError ( bool  err)
inline

Definition at line 129 of file tspacket.h.

◆ SetPayloadStart()

void TSHeader::SetPayloadStart ( bool  start)
inline

Definition at line 132 of file tspacket.h.

◆ SetPriority()

void TSHeader::SetPriority ( bool  priority)
inline

Definition at line 135 of file tspacket.h.

◆ SetPID()

void TSHeader::SetPID ( unsigned int  pid)
inline

Definition at line 138 of file tspacket.h.

Referenced by PESPacket::GetAsTSPackets().

◆ SetScrambled()

void TSHeader::SetScrambled ( unsigned int  scr)
inline

Definition at line 142 of file tspacket.h.

◆ SetAdaptationFieldControl()

void TSHeader::SetAdaptationFieldControl ( unsigned int  afc)
inline

Definition at line 145 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 153 of file tspacket.h.

Member Data Documentation

◆ kHeaderSize

const unsigned int TSHeader::kHeaderSize = 4
static

Definition at line 155 of file tspacket.h.

Referenced by PESPacket::AddTSPacket().

◆ kPayloadOnlyHeader

const unsigned char TSHeader::kPayloadOnlyHeader
static
Initial value:
=
{
0x40,
0x0,
0x10,
}

Definition at line 156 of file tspacket.h.

◆ _tsdata

unsigned char TSHeader::_tsdata[4]
private

Definition at line 158 of file tspacket.h.


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