PESPacket Class Reference

#include <pespacket.h>

Inheritance diagram for PESPacket:

PSIPTable ConditionalAccessTable DirectedChannelChangeSelectionCodeTable DirectedChannelChangeTable DiscontinuityInformationTable DVBEventInformationTable EventInformationTable ExtendedTextTable MasterGuideTable NetworkInformationTable PremiereContentInformationTable PremiereContentPresentationTable ProgramAssociationTable ProgramMapTable RatingRegionTable SelectionInformationTable ServiceDescriptionTable SystemTimeTable TimeDateTable VirtualChannelTable

List of all members.


Detailed Description

Allows us to transform TS packets to PES packets, which are used to hold PSIP tables as well as multimedia streams.

See also:
PSIPTable, TSPacket

Definition at line 21 of file pespacket.h.


Public Member Functions

 PESPacket (const PESPacket &pkt)
 PESPacket (const TSPacket &tspacket)
 PESPacket (const TSPacket &tspacket, const unsigned char *pesdata, uint pes_size)
virtual ~PESPacket ()
bool IsClone () const
bool AddTSPacket (const TSPacket *tspacket, bool &broken)
bool IsGood () const
const TSHeadertsheader () const
TSHeadertsheader ()
uint WriteAsTSPackets (unsigned char *buf, uint &cc) const
 Writes payload only PESPacket as series of TSPacket data.
uint StreamID () const
uint Length () const
uint ScramblingControl () const
bool HighPriority () const
 1 bit Indicates if this is a high priority packet
bool DataAligned () const
 1 bit Data alignment indicator (must be 0 for video)
bool CopyRight () const
 1 bit If true packet may contain copy righted material and is known to have once contained materiale with copy rights.
bool OriginalRecording () const
 1 bit Original Recording
bool HasPTS () const
 1 bit Presentation Time Stamp field is present
bool HasDTS () const
 1 bit Decoding Time Stamp field is present
bool HasESCR () const
 1 bit Elementary Stream Clock Reference field is present
bool HasESR () const
 1 bit Elementary Stream Rate field is present
bool HasDSM () const
 1 bit DSM field present (should always be false for broadcasts)
bool HasACI () const
 1 bit Additional Copy Info field is present
virtual bool HasCRC () const
 1 bit Cyclic Redundancy Check present
bool HasExtensionFlags () const
 1 bit Extension flags are present
uint TSSizeInBuffer () const
uint PSIOffset () const
const unsigned char * pesdata () const
unsigned char * pesdata ()
const unsigned char * data () const
unsigned char * data ()
void SetStreamID (uint id)
void SetLength (uint len)
void SetTotalLength (uint len)
void SetPSIOffset (uint offset)
uint CRC (void) const
void SetCRC (uint crc)
uint CalcCRC (void) const
bool VerifyCRC (void) const

Static Public Member Functions

static const PESPacket View (const TSPacket &tspacket)
static PESPacket View (TSPacket &tspacket)
static const PESPacket ViewData (const unsigned char *pesdata)

Protected Member Functions

 PESPacket (const TSPacket *tspacket, bool)
 PESPacket (const unsigned char *pesdata, bool)
void Finalize ()

Protected Attributes

unsigned char * _pesdata
 Pointer to PES data in full buffer.
unsigned char * _fullbuffer
 Pointer to allocated data.
uint _psiOffset
 AFCOffset + StartOfFieldPointer.
uint _ccLast
 Continuity counter of last inserted TS Packet.
uint _pesdataSize
 Number of data bytes (TS header + PES data).
uint _allocSize
 Total number of bytes we allocated.
bool _badPacket
 true if a CRC is not good yet

Private Member Functions

void InitPESPacket (TSPacket &tspacket)
 Only handles single TS packet PES packets, for PMT/PAT tables basically.
PESPacketoperator= (const PESPacket &pkt)

Constructor & Destructor Documentation

PESPacket::PESPacket ( const TSPacket tspacket,
bool   
) [inline, protected]

Definition at line 47 of file pespacket.h.

Referenced by View(), and ViewData().

PESPacket::PESPacket ( const unsigned char *  pesdata,
bool   
) [inline, protected]

Definition at line 55 of file pespacket.h.

PESPacket::PESPacket ( const PESPacket pkt  )  [inline]

Definition at line 70 of file pespacket.h.

PESPacket::PESPacket ( const TSPacket tspacket  )  [inline]

Definition at line 87 of file pespacket.h.

PESPacket::PESPacket ( const TSPacket tspacket,
const unsigned char *  pesdata,
uint  pes_size 
) [inline]

Definition at line 106 of file pespacket.h.

virtual PESPacket::~PESPacket (  )  [inline, virtual]

Definition at line 120 of file pespacket.h.


Member Function Documentation

void PESPacket::InitPESPacket ( TSPacket tspacket  )  [inline, private]

Only handles single TS packet PES packets, for PMT/PAT tables basically.

Definition at line 24 of file pespacket.h.

Referenced by PESPacket().

PESPacket& PESPacket::operator= ( const PESPacket pkt  )  [private]

static const PESPacket PESPacket::View ( const TSPacket tspacket  )  [inline, static]

Reimplemented in PSIPTable.

Definition at line 129 of file pespacket.h.

Referenced by FirewireDevice::ProcessPATPacket(), and PSIPTable::View().

static PESPacket PESPacket::View ( TSPacket tspacket  )  [inline, static]

Reimplemented in PSIPTable.

Definition at line 132 of file pespacket.h.

static const PESPacket PESPacket::ViewData ( const unsigned char *  pesdata  )  [inline, static]

bool PESPacket::IsClone (  )  const [inline]

Definition at line 138 of file pespacket.h.

Referenced by AddTSPacket(), and ~PESPacket().

bool PESPacket::AddTSPacket ( const TSPacket tspacket,
bool broken 
)

Definition at line 21 of file pespacket.cpp.

Referenced by MPEGStreamData::AssemblePSIP().

bool PESPacket::IsGood (  )  const [inline]

Definition at line 143 of file pespacket.h.

Referenced by MPEGStreamData::AssemblePSIP(), and MPEGStreamData::HandleTSTables().

const TSHeader* PESPacket::tsheader (  )  const [inline]

TSHeader* PESPacket::tsheader (  )  [inline]

Definition at line 147 of file pespacket.h.

uint PESPacket::WriteAsTSPackets ( unsigned char *  buf,
uint cc 
) const

Writes payload only PESPacket as series of TSPacket data.

Definition at line 103 of file pespacket.cpp.

Referenced by HDHRRecorder::HandleSingleProgramPMT(), and DVBRecorder::HandleSingleProgramPMT().

uint PESPacket::StreamID (  )  const [inline]

uint PESPacket::Length ( void   )  const [inline]

uint PESPacket::ScramblingControl (  )  const [inline]

Definition at line 158 of file pespacket.h.

bool PESPacket::HighPriority (  )  const [inline]

1 bit Indicates if this is a high priority packet

Definition at line 161 of file pespacket.h.

bool PESPacket::DataAligned (  )  const [inline]

1 bit Data alignment indicator (must be 0 for video)

Definition at line 163 of file pespacket.h.

bool PESPacket::CopyRight (  )  const [inline]

1 bit If true packet may contain copy righted material and is known to have once contained materiale with copy rights.

If false packet may contain copy righted material but is not known to have ever contained materiale with copy rights.

Definition at line 168 of file pespacket.h.

bool PESPacket::OriginalRecording (  )  const [inline]

1 bit Original Recording

Definition at line 170 of file pespacket.h.

bool PESPacket::HasPTS (  )  const [inline]

1 bit Presentation Time Stamp field is present

Definition at line 173 of file pespacket.h.

bool PESPacket::HasDTS (  )  const [inline]

1 bit Decoding Time Stamp field is present

Definition at line 175 of file pespacket.h.

bool PESPacket::HasESCR (  )  const [inline]

1 bit Elementary Stream Clock Reference field is present

Definition at line 177 of file pespacket.h.

bool PESPacket::HasESR (  )  const [inline]

1 bit Elementary Stream Rate field is present

Definition at line 179 of file pespacket.h.

bool PESPacket::HasDSM (  )  const [inline]

1 bit DSM field present (should always be false for broadcasts)

Definition at line 181 of file pespacket.h.

bool PESPacket::HasACI (  )  const [inline]

1 bit Additional Copy Info field is present

Definition at line 183 of file pespacket.h.

virtual bool PESPacket::HasCRC ( void   )  const [inline, virtual]

1 bit Cyclic Redundancy Check present

Reimplemented in PSIPTable.

Definition at line 185 of file pespacket.h.

Referenced by CRC(), PESPacket(), and VerifyCRC().

bool PESPacket::HasExtensionFlags (  )  const [inline]

1 bit Extension flags are present

Definition at line 187 of file pespacket.h.

uint PESPacket::TSSizeInBuffer (  )  const [inline]

Definition at line 193 of file pespacket.h.

Referenced by MPEGStreamData::AssemblePSIP().

uint PESPacket::PSIOffset (  )  const [inline]

Definition at line 194 of file pespacket.h.

Referenced by MPEGStreamData::AssemblePSIP().

const unsigned char* PESPacket::pesdata (  )  const [inline]

unsigned char* PESPacket::pesdata (  )  [inline]

Definition at line 197 of file pespacket.h.

const unsigned char* PESPacket::data (  )  const [inline]

Definition at line 199 of file pespacket.h.

Referenced by WriteAsTSPackets().

unsigned char* PESPacket::data (  )  [inline]

Definition at line 200 of file pespacket.h.

void PESPacket::SetStreamID ( uint  id  )  [inline]

Definition at line 202 of file pespacket.h.

Referenced by PSIPTable::SetTableID().

void PESPacket::SetLength ( uint  len  )  [inline]

void PESPacket::SetTotalLength ( uint  len  )  [inline]

void PESPacket::SetPSIOffset ( uint  offset  )  [inline]

Definition at line 215 of file pespacket.h.

Referenced by MPEGStreamData::AssemblePSIP().

uint PESPacket::CRC ( void   )  const [inline]

Definition at line 221 of file pespacket.h.

Referenced by DTVSignalMonitor::HandlePAT(), VerifyCRC(), and PSIPTable::VerifyPSIP().

void PESPacket::SetCRC ( uint  crc  )  [inline]

Definition at line 232 of file pespacket.h.

Referenced by Finalize(), and ServiceDescriptionTable::Mutate().

uint PESPacket::CalcCRC ( void   )  const

bool PESPacket::VerifyCRC ( void   )  const

void PESPacket::Finalize (  )  [inline, protected]

Definition at line 248 of file pespacket.h.


Member Data Documentation

unsigned char* PESPacket::_pesdata [protected]

unsigned char* PESPacket::_fullbuffer [protected]

Pointer to allocated data.

Definition at line 251 of file pespacket.h.

Referenced by AddTSPacket(), data(), PESPacket(), SetPSIOffset(), tsheader(), PSIPTable::VerifyPSIP(), WriteAsTSPackets(), and ~PESPacket().

AFCOffset + StartOfFieldPointer.

Definition at line 253 of file pespacket.h.

Referenced by AddTSPacket(), InitPESPacket(), PESPacket(), PSIOffset(), and SetPSIOffset().

uint PESPacket::_ccLast [protected]

Continuity counter of last inserted TS Packet.

Definition at line 254 of file pespacket.h.

Referenced by AddTSPacket().

Number of data bytes (TS header + PES data).

Definition at line 255 of file pespacket.h.

Referenced by AddTSPacket(), PESPacket(), and TSSizeInBuffer().

Total number of bytes we allocated.

Definition at line 256 of file pespacket.h.

Referenced by AddTSPacket(), IsClone(), PESPacket(), and PSIPTable::VerifyPSIP().

true if a CRC is not good yet

Definition at line 257 of file pespacket.h.

Referenced by AddTSPacket(), InitPESPacket(), IsGood(), and PESPacket().


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

Generated on Sat Dec 18 05:16:09 2010 for MythTV by  doxygen 1.5.5