MythTV  master
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Friends | List of all members
ProgramAssociationTable Class Reference

The Program Association Table lists all the programs in a stream, and is always found on PID 0. More...

#include <mpegtables.h>

Inheritance diagram for ProgramAssociationTable:
Inheritance graph
Collaboration diagram for ProgramAssociationTable:
Collaboration graph

Public Member Functions

 ProgramAssociationTable (const ProgramAssociationTable &table)
 ProgramAssociationTable (const PSIPTable &table)
uint TransportStreamID (void) const
uint ProgramCount (void) const
uint ProgramNumber (uint i) const
uint ProgramPID (uint i) const
void SetTranportStreamID (uint gtsid)
uint FindPID (uint progNum) const
uint FindAnyPID (void) const
uint FindProgram (uint pid) const
QString toString (void) const override
QString toStringXML (uint indent_level) const override
- Public Member Functions inherited from PSIPTable
 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
- 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 > &pkts, 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 ProgramAssociationTableCreate (uint tsid, uint version, const vector< uint > &pnum, const vector< uint > &pid)
- Static Public Member Functions inherited from PSIPTable
static const PSIPTable View (const TSPacket &tspacket)
static PSIPTable View (TSPacket &tspacket)
static const PSIPTable ViewData (const unsigned char *pesdata)

Static Private Member Functions

static ProgramAssociationTableCreateBlank (bool smallPacket=true)


class TestMPEGTables

Additional Inherited Members

- Static Public Attributes inherited from PSIPTable
static const uint PSIP_OFFSET = 8
- Protected Member Functions inherited from PSIPTable
 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 ()
- 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

The Program Association Table lists all the programs in a stream, and is always found on PID 0.

Based on info in this table and the ProgramMapTable for the program we are interested in we should be able determine which PID to write to the ringbuffer when given the program stream to record.

NOTE: Broadcasters are encouraged to keep the subprogram:PID mapping constant. If we store this data in the channel database, we can branch-predict which PIDs we are looking for, and can thus "tune" the subprogram more quickly.

See also

Definition at line 579 of file mpegtables.h.

Constructor & Destructor Documentation

◆ ProgramAssociationTable() [1/2]

ProgramAssociationTable::ProgramAssociationTable ( const ProgramAssociationTable table)

Definition at line 582 of file mpegtables.h.

Referenced by CreateBlank().

◆ ProgramAssociationTable() [2/2]

ProgramAssociationTable::ProgramAssociationTable ( const PSIPTable table)

Definition at line 588 of file mpegtables.h.

Member Function Documentation

◆ Create()

ProgramAssociationTable * ProgramAssociationTable::Create ( uint  tsid,
uint  version,
const vector< uint > &  pnum,
const vector< uint > &  pid 

◆ TransportStreamID()

uint ProgramAssociationTable::TransportStreamID ( void  ) const

◆ ProgramCount()

uint ProgramAssociationTable::ProgramCount ( void  ) const

◆ ProgramNumber()

uint ProgramAssociationTable::ProgramNumber ( uint  i) const

◆ ProgramPID()

uint ProgramAssociationTable::ProgramPID ( uint  i) const

◆ SetTranportStreamID()

void ProgramAssociationTable::SetTranportStreamID ( uint  gtsid)

Definition at line 616 of file mpegtables.h.

◆ FindPID()

uint ProgramAssociationTable::FindPID ( uint  progNum) const

◆ FindAnyPID()

uint ProgramAssociationTable::FindAnyPID ( void  ) const

◆ FindProgram()

uint ProgramAssociationTable::FindProgram ( uint  pid) const

Definition at line 633 of file mpegtables.h.

Referenced by DTVSignalMonitor::HandlePAT().

◆ toString()

QString ProgramAssociationTable::toString ( void  ) const

◆ toStringXML()

QString ProgramAssociationTable::toStringXML ( uint  indent_level) const

Reimplemented from PSIPTable.

Definition at line 843 of file mpegtables.cpp.

◆ CreateBlank()

ProgramAssociationTable * ProgramAssociationTable::CreateBlank ( bool  smallPacket = true)

Definition at line 330 of file mpegtables.cpp.

Referenced by Create().

Friends And Related Function Documentation

◆ TestMPEGTables

friend class TestMPEGTables

Definition at line 648 of file mpegtables.h.

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