MythTV  master
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | List of all members
PSIPTable Class Reference

A PSIP table is a variant of a PES packet containing an MPEG, ATSC or DVB table. More...

#include <mpegtables.h>

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

Public Member Functions

 PSIPTable (const TSPacket &tspacket, const unsigned char *pesdata, uint pes_size)
 
 PSIPTable (const unsigned char *pesdata)
 Constructor for viewing a section, does not create it's own data. More...
 
 PSIPTable (const PSIPTable &table)
 
 PSIPTable (const PESPacket &table)
 
 PSIPTable (const TSPacket &table)
 
uint TableID (void) const
 
bool SectionSyntaxIndicator (void) const
 
bool PrivateIndicator (void) const
 
uint SectionLength (void) const
 
uint TableIDExtension (void) const
 
uint Version (void) const
 
bool IsCurrent (void) const
 
uint Section (void) const
 
uint LastSection (void) const
 
uint ATSCProtocolVersion (void) const
 
const unsigned char * psipdata (void) const
 
unsigned char * psipdata (void)
 
void SetTableID (uint id)
 
void SetSectionLength (uint length)
 
void SetTableIDExtension (uint len)
 
void SetVersionNumber (uint ver)
 
void SetCurrent (bool cur)
 
void SetSection (uint num)
 
void SetLastSection (uint num)
 
void SetATSCProtocolVersion (int ver)
 
bool HasCRC (void) const override
 1 bit Cyclic Redundancy Check present More...
 
bool HasSectionNumber (void) const
 
bool VerifyPSIP (bool verify_crc) const
 
virtual QString toString (void) const
 
virtual QString toStringXML (uint indent_level) const
 
- Public Member Functions inherited from PESPacket
 PESPacket (const unsigned char *pesdata)
 
 PESPacket (const PESPacket &pkt)
 
virtual ~PESPacket ()
 
bool IsClone () const
 
bool AddTSPacket (const TSPacket *tspacket, bool &broken)
 
bool IsGood () const
 
const TSHeadertsheader () const
 
TSHeadertsheader ()
 
void GetAsTSPackets (vector< TSPacket > &output, uint cc) const
 Returns payload only PESPacket as series of TSPackets. More...
 
uint StreamID () const
 
uint Length () const
 
uint ScramblingControl () const
 
bool HighPriority () const
 1 bit Indicates if this is a high priority packet More...
 
bool DataAligned () const
 1 bit Data alignment indicator (must be 0 for video) More...
 
bool CopyRight () const
 1 bit If true packet may contain copy righted material and is known to have once contained materiale with copy rights. More...
 
bool OriginalRecording () const
 1 bit Original Recording More...
 
bool HasPTS () const
 1 bit Presentation Time Stamp field is present More...
 
bool HasDTS () const
 1 bit Decoding Time Stamp field is present More...
 
bool HasESCR () const
 1 bit Elementary Stream Clock Reference field is present More...
 
bool HasESR () const
 1 bit Elementary Stream Rate field is present More...
 
bool HasDSM () const
 1 bit DSM field present (should always be false for broadcasts) More...
 
bool HasACI () const
 1 bit Additional Copy Info field is present More...
 
bool HasExtensionFlags () const
 1 bit Extension flags are present More...
 
uint64_t PTS (void) const
 Presentation Time Stamp, present if HasPTS() is true. More...
 
uint64_t DTS (void) const
 Decode Time Stamp, present if HasDTS() is true. More...
 
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 PSIPTable View (const TSPacket &tspacket)
 
static PSIPTable View (TSPacket &tspacket)
 
static const PSIPTable ViewData (const unsigned char *pesdata)
 

Static Public Attributes

static const uint PSIP_OFFSET = 8
 

Protected Member Functions

 PSIPTable (const TSPacket &tspacket, bool)
 
QString XMLValues (uint indent_level) const
 
- Protected Member Functions inherited from PESPacket
 PESPacket ()
 noop constructor, only for use by derived classes More...
 
void Finalize ()
 

Private Member Functions

void InitPESPacket (TSPacket &tspacket)
 Only handles single TS packet PES packets, for PMT/PAT tables basically. More...
 

Additional Inherited Members

- Protected Attributes inherited from PESPacket
unsigned char * _pesdata
 Pointer to PES data in full buffer. More...
 
unsigned char * _fullbuffer
 Pointer to allocated data. More...
 
uint _psiOffset
 AFCOffset + StartOfFieldPointer. More...
 
uint _ccLast
 Continuity counter of last inserted TS Packet. More...
 
uint _pesdataSize
 Number of data bytes (TS header + PES data) More...
 
uint _allocSize
 Total number of bytes we allocated. More...
 
bool _badPacket
 true if a CRC is not good yet More...
 
- Static Protected Attributes inherited from PESPacket
static const uint kTheMagicNoCRCCRC = 0xFFFFFFFF
 

Detailed Description

A PSIP table is a variant of a PES packet containing an MPEG, ATSC or DVB table.

Definition at line 371 of file mpegtables.h.

Constructor & Destructor Documentation

◆ PSIPTable() [1/6]

PSIPTable::PSIPTable ( const TSPacket tspacket,
bool   
)
inlineprotected

Definition at line 397 of file mpegtables.h.

◆ PSIPTable() [2/6]

PSIPTable::PSIPTable ( const TSPacket tspacket,
const unsigned char *  pesdata,
uint  pes_size 
)
inline

Definition at line 411 of file mpegtables.h.

◆ PSIPTable() [3/6]

PSIPTable::PSIPTable ( const unsigned char *  pesdata)
inlineexplicit

Constructor for viewing a section, does not create it's own data.

Definition at line 429 of file mpegtables.h.

◆ PSIPTable() [4/6]

PSIPTable::PSIPTable ( const PSIPTable table)
inline

Definition at line 436 of file mpegtables.h.

◆ PSIPTable() [5/6]

PSIPTable::PSIPTable ( const PESPacket table)
inlineexplicit

Definition at line 441 of file mpegtables.h.

◆ PSIPTable() [6/6]

PSIPTable::PSIPTable ( const TSPacket table)
inlineexplicit

Definition at line 447 of file mpegtables.h.

Member Function Documentation

◆ InitPESPacket()

void PSIPTable::InitPESPacket ( TSPacket tspacket)
inlineprivate

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

Definition at line 374 of file mpegtables.h.

◆ View() [1/2]

static const PSIPTable PSIPTable::View ( const TSPacket tspacket)
inlinestatic

◆ View() [2/2]

static PSIPTable PSIPTable::View ( TSPacket tspacket)
inlinestatic

Definition at line 470 of file mpegtables.h.

◆ ViewData()

static const PSIPTable PSIPTable::ViewData ( const unsigned char *  pesdata)
inlinestatic

Definition at line 473 of file mpegtables.h.

Referenced by ProgramMapTable::ViewData().

◆ TableID()

uint PSIPTable::TableID ( void  ) const
inline

Definition at line 479 of file mpegtables.h.

Referenced by EITHelper::AddEIT(), AggregateDataEventTable::AggregateDataEventTable(), AggregateEventInformationTable::AggregateEventInformationTable(), AggregateExtendedTextTable::AggregateExtendedTextTable(), BouquetAssociationTable::BouquetAssociationTable(), CableVirtualChannelTable::CableVirtualChannelTable(), ConditionalAccessTable::ConditionalAccessTable(), ATSCStreamData::DeleteCachedTable(), DVBStreamData::DeleteCachedTable(), MPEGStreamData::DeleteCachedTable(), DirectedChannelChangeSelectionCodeTable::DirectedChannelChangeSelectionCodeTable(), DirectedChannelChangeTable::DirectedChannelChangeTable(), DVBEventInformationTable::DVBEventInformationTable(), EventInformationTable::EventInformationTable(), ExtendedTextTable::ExtendedTextTable(), ATSCStreamData::HandleTables(), DVBStreamData::HandleTables(), MPEGStreamData::HandleTables(), MPEGStreamData::HandleTSTables(), HasCRC(), HasSectionNumber(), insert_crc(), ATSCStreamData::IsRedundant(), DVBStreamData::IsRedundant(), MPEGStreamData::IsRedundant(), MasterGuideTable::MasterGuideTable(), NetworkInformationTable::Mutate(), ServiceDescriptionTable::Mutate(), NetworkInformationTable::NetworkInformationTable(), NetworkTextTable::NetworkTextTable(), SpliceInformationTable::Parse(), PremiereContentInformationTable::PremiereContentInformationTable(), ProgramAssociationTable::ProgramAssociationTable(), ProgramInformationMessageTable::ProgramInformationMessageTable(), ProgramMapTable::ProgramMapTable(), ProgramNameMessageTable::ProgramNameMessageTable(), RatingRegionTable::RatingRegionTable(), return_4096_block(), SCTENetworkInformationTable::SCTENetworkInformationTable(), SCTESystemTimeTable::SCTESystemTimeTable(), ServiceDescriptionTable::ServiceDescriptionTable(), ShortVirtualChannelTable::ShortVirtualChannelTable(), SpliceInformationTable::SpliceInformationTable(), SystemTimeTable::SystemTimeTable(), TerrestrialVirtualChannelTable::TerrestrialVirtualChannelTable(), TimeDateTable::TimeDateTable(), VirtualChannelTable::toString(), toString(), VirtualChannelTable::toStringXML(), VerifyPSIP(), VirtualChannelTable::VirtualChannelTable(), and XMLValues().

◆ SectionSyntaxIndicator()

bool PSIPTable::SectionSyntaxIndicator ( void  ) const
inline

Definition at line 482 of file mpegtables.h.

Referenced by DVBStreamHandler::RunSR().

◆ PrivateIndicator()

bool PSIPTable::PrivateIndicator ( void  ) const
inline

Definition at line 484 of file mpegtables.h.

◆ SectionLength()

uint PSIPTable::SectionLength ( void  ) const
inline

◆ TableIDExtension()

uint PSIPTable::TableIDExtension ( void  ) const
inline

◆ Version()

uint PSIPTable::Version ( void  ) const
inline

◆ IsCurrent()

bool PSIPTable::IsCurrent ( void  ) const
inline

◆ Section()

uint PSIPTable::Section ( void  ) const
inline

◆ LastSection()

uint PSIPTable::LastSection ( void  ) const
inline

◆ ATSCProtocolVersion()

uint PSIPTable::ATSCProtocolVersion ( void  ) const
inline

Definition at line 519 of file mpegtables.h.

Referenced by toString(), and XMLValues().

◆ psipdata() [1/2]

const unsigned char* PSIPTable::psipdata ( void  ) const
inline

◆ psipdata() [2/2]

unsigned char* PSIPTable::psipdata ( void  )
inline

Definition at line 524 of file mpegtables.h.

◆ SetTableID()

void PSIPTable::SetTableID ( uint  id)
inline

◆ SetSectionLength()

void PSIPTable::SetSectionLength ( uint  length)
inline

Definition at line 531 of file mpegtables.h.

◆ SetTableIDExtension()

void PSIPTable::SetTableIDExtension ( uint  len)
inline

◆ SetVersionNumber()

void PSIPTable::SetVersionNumber ( uint  ver)
inline

Definition at line 537 of file mpegtables.h.

◆ SetCurrent()

void PSIPTable::SetCurrent ( bool  cur)
inline

Definition at line 539 of file mpegtables.h.

◆ SetSection()

void PSIPTable::SetSection ( uint  num)
inline

Definition at line 541 of file mpegtables.h.

◆ SetLastSection()

void PSIPTable::SetLastSection ( uint  num)
inline

Definition at line 542 of file mpegtables.h.

◆ SetATSCProtocolVersion()

void PSIPTable::SetATSCProtocolVersion ( int  ver)
inline

Definition at line 545 of file mpegtables.h.

◆ HasCRC()

bool PSIPTable::HasCRC ( void  ) const
overridevirtual

1 bit Cyclic Redundancy Check present

Reimplemented from PESPacket.

Definition at line 94 of file mpegtables.cpp.

Referenced by MPEGStreamData::HandleTSTables().

◆ HasSectionNumber()

bool PSIPTable::HasSectionNumber ( void  ) const

Definition at line 210 of file mpegtables.cpp.

Referenced by XMLValues().

◆ VerifyPSIP()

bool PSIPTable::VerifyPSIP ( bool  verify_crc) const

Definition at line 236 of file mpegtables.cpp.

Referenced by MPEGStreamData::HandleTSTables().

◆ toString()

QString PSIPTable::toString ( void  ) const
virtual

◆ toStringXML()

QString PSIPTable::toStringXML ( uint  indent_level) const
virtual

◆ XMLValues()

QString PSIPTable::XMLValues ( uint  indent_level) const
protected

Member Data Documentation

◆ PSIP_OFFSET

const uint PSIPTable::PSIP_OFFSET = 8
static

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