MythTV  master
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 Member Functions

 TSHeader ()
 
 TSHeader (int cc)
 
void InitHeader (const unsigned char *header)
 
bool HasSync () const
 
bool TransportError () const
 
bool PayloadStart () const
 
bool Priority () const
 
unsigned int PID () const
 
unsigned int ScramblingControl () const
 
unsigned int AdaptationFieldControl () const
 
unsigned int ContinuityCounter () const
 
bool Scrambled () const
 
bool HasAdaptationField () const
 
bool HasPayload () 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 () const
 
unsigned char * data ()
 

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

Constructor & Destructor Documentation

◆ TSHeader() [1/2]

TSHeader::TSHeader ( )
inline

Definition at line 26 of file tspacket.h.

◆ TSHeader() [2/2]

TSHeader::TSHeader ( int  cc)
inlineexplicit

Definition at line 34 of file tspacket.h.

Member Function Documentation

◆ InitHeader()

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

Definition at line 43 of file tspacket.h.

Referenced by TSPacket::CreatePayloadOnlyPacket().

◆ HasSync()

bool TSHeader::HasSync ( ) const
inline

Definition at line 57 of file tspacket.h.

Referenced by TSPacket::toString().

◆ TransportError()

bool TSHeader::TransportError ( ) const
inline

◆ PayloadStart()

bool TSHeader::PayloadStart ( ) const
inline

◆ Priority()

bool TSHeader::Priority ( void  ) const
inline

Definition at line 65 of file tspacket.h.

Referenced by TSPacket::toString().

◆ PID()

unsigned int TSHeader::PID ( void  ) const
inline

◆ ScramblingControl()

unsigned int TSHeader::ScramblingControl ( ) const
inline

Definition at line 71 of file tspacket.h.

Referenced by TSPacket::toString().

◆ AdaptationFieldControl()

unsigned int TSHeader::AdaptationFieldControl ( ) const
inline

Definition at line 77 of file tspacket.h.

Referenced by TSPacket::toString().

◆ ContinuityCounter()

unsigned int TSHeader::ContinuityCounter ( ) const
inline

◆ Scrambled()

bool TSHeader::Scrambled ( ) const
inline

◆ HasAdaptationField()

bool TSHeader::HasAdaptationField ( ) const
inline

Definition at line 87 of file tspacket.h.

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

◆ HasPayload()

bool TSHeader::HasPayload ( ) const
inline

◆ SetTransportError()

void TSHeader::SetTransportError ( bool  err)
inline

Definition at line 90 of file tspacket.h.

◆ SetPayloadStart()

void TSHeader::SetPayloadStart ( bool  start)
inline

Definition at line 93 of file tspacket.h.

◆ SetPriority()

void TSHeader::SetPriority ( bool  priority)
inline

Definition at line 96 of file tspacket.h.

◆ SetPID()

void TSHeader::SetPID ( unsigned int  pid)
inline

Definition at line 99 of file tspacket.h.

Referenced by PESPacket::GetAsTSPackets().

◆ SetScrambled()

void TSHeader::SetScrambled ( unsigned int  scr)
inline

Definition at line 103 of file tspacket.h.

◆ SetAdaptationFieldControl()

void TSHeader::SetAdaptationFieldControl ( unsigned int  afc)
inline

Definition at line 106 of file tspacket.h.

◆ SetContinuityCounter()

void TSHeader::SetContinuityCounter ( unsigned int  cc)
inline

◆ data() [1/2]

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

◆ data() [2/2]

unsigned char* TSHeader::data ( )
inline

Definition at line 114 of file tspacket.h.

Member Data Documentation

◆ kHeaderSize

const unsigned int TSHeader::kHeaderSize = 4
static

Definition at line 116 of file tspacket.h.

Referenced by PESPacket::AddTSPacket().

◆ kPayloadOnlyHeader

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

Definition at line 117 of file tspacket.h.

◆ _tsdata

unsigned char TSHeader::_tsdata[4]
private

Definition at line 119 of file tspacket.h.


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