ProgramMapTable Class Reference

#include <mpegtables.h>

Inheritance diagram for ProgramMapTable:

PSIPTable PESPacket

List of all members.


Detailed Description

A PMT table maps a program described in the ProgramAssociationTable to various PID's which describe the multimedia contents of the program.

Definition at line 520 of file mpegtables.h.


Public Member Functions

 ProgramMapTable (const ProgramMapTable &table)
 ProgramMapTable (const PSIPTable &table)
uint PCRPID (void) const
 stream that contrains program clock reference.
uint ProgramNumber (void) const
uint ProgramInfoLength (void) const
const unsigned char * ProgramInfo (void) const
uint StreamType (uint i) const
uint StreamPID (uint i) const
uint StreamInfoLength (uint i) const
const unsigned char * StreamInfo (uint i) const
uint StreamCount (void) const
void SetPCRPID (uint pid)
void SetProgramNumber (uint num)
void SetStreamPID (uint i, uint pid)
void SetStreamType (uint i, uint type)
bool IsVideo (uint i, QString sistandard) const
 Returns true iff the stream at index i is an audio stream.
bool IsAudio (uint i, QString sistandard) const
 Returns true iff the stream at index i is an audio stream.
bool IsEncrypted (void) const
 Returns true iff PMT contains CA descriptor.
bool IsProgramEncrypted (void) const
 Returns true iff PMT's ProgramInfo contains CA descriptor.
bool IsStreamEncrypted (uint pid) const
 Returns true iff PMT contains CA descriptor.
bool IsStillPicture (QString sistandard) const
 Returns true iff PMT contains a still-picture video stream.
QString StreamTypeString (uint i) const
 Returns a string representation of type at stream index i.
QString StreamDescription (uint i, QString sistandard) const
 Returns a better (and more expensive) string representation of type at stream index i than StreamTypeString(uint).
QString GetLanguage (uint i) const
 Returns the cannonical language if we find the iso639 descriptor.
uint FindPIDs (uint type, vector< uint > &pids, const QString &sistandard) const
 Finds all pids matching type.
uint FindPIDs (uint type, vector< uint > &pids, vector< uint > &types, const QString &sistandard, bool normalize) const
 Finds all pids w/types, matching type (useful for AnyVideo/AnyAudio).
int FindPID (uint pid) const
 Locates stream index of pid.
uint FindUnusedPID (uint desired_pid=0x20)
void RemoveAllStreams (void)
void AppendStream (uint pid, uint type, unsigned char *si=0, uint il=0)
void Parse (void) const
const QString toString (void) const

Static Public Member Functions

static ProgramMapTableCreate (uint programNumber, uint basepid, uint pcrpid, uint version, vector< uint > pids, vector< uint > types)
static ProgramMapTableCreate (uint programNumber, uint basepid, uint pcrpid, uint version, const desc_list_t &global_desc, const vector< uint > &pids, const vector< uint > &types, const vector< desc_list_t > &prog_desc)

Private Member Functions

void SetStreamInfoLength (uint i, uint length)
void SetStreamProgramInfo (uint i, unsigned char *streamInfo, uint infoLength)
void SetProgramInfoLength (uint length)
void SetProgramInfo (unsigned char *streamInfo, uint infoLength)

Static Private Member Functions

static ProgramMapTableCreateBlank (bool smallPacket=true)

Private Attributes

vector< unsigned char * > _ptrs

Static Private Attributes

static const uint pmt_header = 4

Constructor & Destructor Documentation

ProgramMapTable::ProgramMapTable ( const ProgramMapTable table  )  [inline]

Definition at line 524 of file mpegtables.h.

Referenced by CreateBlank().

ProgramMapTable::ProgramMapTable ( const PSIPTable table  )  [inline]

Definition at line 530 of file mpegtables.h.


Member Function Documentation

ProgramMapTable * ProgramMapTable::Create ( uint  programNumber,
uint  basepid,
uint  pcrpid,
uint  version,
vector< uint pids,
vector< uint types 
) [static]

Definition at line 334 of file mpegtables.cpp.

Referenced by MPEGStreamData::CreatePMTSingleProgram().

ProgramMapTable * ProgramMapTable::Create ( uint  programNumber,
uint  basepid,
uint  pcrpid,
uint  version,
const desc_list_t global_desc,
const vector< uint > &  pids,
const vector< uint > &  types,
const vector< desc_list_t > &  prog_desc 
) [static]

Definition at line 354 of file mpegtables.cpp.

uint ProgramMapTable::PCRPID ( void   )  const [inline]

stream that contrains program clock reference.

Definition at line 548 of file mpegtables.h.

Referenced by HDHRRecorder::AdjustFilters(), and MPEGStreamData::CreatePMTSingleProgram().

uint ProgramMapTable::ProgramNumber ( void   )  const [inline]

uint ProgramMapTable::ProgramInfoLength ( void   )  const [inline]

const unsigned char* ProgramMapTable::ProgramInfo ( void   )  const [inline]

uint ProgramMapTable::StreamType ( uint  i  )  const [inline]

uint ProgramMapTable::StreamPID ( uint  i  )  const [inline]

uint ProgramMapTable::StreamInfoLength ( uint  i  )  const [inline]

const unsigned char* ProgramMapTable::StreamInfo ( uint  i  )  const [inline]

uint ProgramMapTable::StreamCount ( void   )  const [inline]

void ProgramMapTable::SetPCRPID ( uint  pid  )  [inline]

Definition at line 576 of file mpegtables.h.

void ProgramMapTable::SetProgramNumber ( uint  num  )  [inline]

Definition at line 582 of file mpegtables.h.

void ProgramMapTable::SetStreamPID ( uint  i,
uint  pid 
) [inline]

Definition at line 584 of file mpegtables.h.

Referenced by AppendStream().

void ProgramMapTable::SetStreamType ( uint  i,
uint  type 
) [inline]

Definition at line 590 of file mpegtables.h.

Referenced by AppendStream().

bool ProgramMapTable::IsVideo ( uint  i,
QString  sistandard 
) const

Returns true iff the stream at index i is an audio stream.

This of course returns true if StreamID::IsVideo() is true. And, it also returns true if IsVideo returns true after StreamID::Normalize() is used on the stream type.

Parameters:
i index of stream

Definition at line 436 of file mpegtables.cpp.

Referenced by FindPIDs(), DVBRecorder::HandlePMT(), DTVSignalMonitor::HandlePMT(), AvFormatDecoder::HasVideo(), IsStillPicture(), AvFormatDecoder::ScanATSCCaptionStreams(), and MPEGStreamData::TestDecryption().

bool ProgramMapTable::IsAudio ( uint  i,
QString  sistandard 
) const

Returns true iff the stream at index i is an audio stream.

This of course returns true if StreamID::IsAudio() is true. And, it also returns true if IsAudio returns true after StreamID::Normalize() is used on the stream type.

Parameters:
i index of stream

Definition at line 457 of file mpegtables.cpp.

Referenced by FindPIDs(), DVBRecorder::HandlePMT(), DTVSignalMonitor::HandlePMT(), and MPEGStreamData::TestDecryption().

bool ProgramMapTable::IsEncrypted ( void   )  const

Returns true iff PMT contains CA descriptor.

Definition at line 472 of file mpegtables.cpp.

Referenced by DTVSignalMonitor::HandlePMT().

bool ProgramMapTable::IsProgramEncrypted ( void   )  const

Returns true iff PMT's ProgramInfo contains CA descriptor.

Definition at line 485 of file mpegtables.cpp.

Referenced by IsEncrypted(), and MPEGStreamData::TestDecryption().

bool ProgramMapTable::IsStreamEncrypted ( uint  i  )  const

Returns true iff PMT contains CA descriptor.

Parameters:
i index of stream

Definition at line 509 of file mpegtables.cpp.

Referenced by IsEncrypted(), and MPEGStreamData::TestDecryption().

bool ProgramMapTable::IsStillPicture ( QString  sistandard  )  const

Returns true iff PMT contains a still-picture video stream.

Definition at line 528 of file mpegtables.cpp.

QString ProgramMapTable::StreamTypeString ( uint  i  )  const [inline]

Returns a string representation of type at stream index i.

Definition at line 602 of file mpegtables.h.

Referenced by toString().

QString ProgramMapTable::StreamDescription ( uint  i,
QString  sistandard 
) const

Returns a better (and more expensive) string representation of type at stream index i than StreamTypeString(uint).

Definition at line 829 of file mpegtables.cpp.

Referenced by CreateCAPMT().

QString ProgramMapTable::GetLanguage ( uint  i  )  const

Returns the cannonical language if we find the iso639 descriptor.

Definition at line 815 of file mpegtables.cpp.

Referenced by StreamDescription().

uint ProgramMapTable::FindPIDs ( uint  type,
vector< uint > &  pids,
const QString &  sistandard 
) const

Finds all pids matching type.

Parameters:
type StreamType to match
pids vector pids will be added to
sistandard standard to use in determining if this is a A/V stream
Returns:
number of pids in list

Definition at line 552 of file mpegtables.cpp.

uint ProgramMapTable::FindPIDs ( uint  type,
vector< uint > &  pids,
vector< uint > &  types,
const QString &  sistandard,
bool  normalize 
) const

Finds all pids w/types, matching type (useful for AnyVideo/AnyAudio).

Parameters:
type StreamType to match
pids vector pids will be added to
types vector types will be added to
sistandard standard to use in determining if this is a A/V stream
normalize if set types will be normalized
Returns:
number of items in pids and types lists.

Definition at line 588 of file mpegtables.cpp.

int ProgramMapTable::FindPID ( uint  pid  )  const [inline]

Locates stream index of pid.

Returns:
stream index if successful, -1 otherwise

Definition at line 617 of file mpegtables.h.

Referenced by MPEGStreamData::CreatePMTSingleProgram(), FindPIDs(), FindUnusedPID(), IPTVRecorder::ProcessTSPacket(), and HDHRRecorder::ProcessTSPacket().

uint ProgramMapTable::FindUnusedPID ( uint  desired_pid = 0x20  ) 

Definition at line 641 of file mpegtables.cpp.

void ProgramMapTable::RemoveAllStreams ( void   )  [inline]

Definition at line 626 of file mpegtables.h.

void ProgramMapTable::AppendStream ( uint  pid,
uint  type,
unsigned char *  si = 0,
uint  il = 0 
)

Definition at line 413 of file mpegtables.cpp.

void ProgramMapTable::Parse ( void   )  const

Definition at line 397 of file mpegtables.cpp.

Referenced by MPEGStreamData::CreatePMTSingleProgram(), and ProgramMapTable().

const QString ProgramMapTable::toString ( void   )  const

Reimplemented from PSIPTable.

Definition at line 718 of file mpegtables.cpp.

Referenced by MPEGStreamData::CreatePMTSingleProgram(), and SIScan::UpdatePMTinDB().

void ProgramMapTable::SetStreamInfoLength ( uint  i,
uint  length 
) [inline, private]

Definition at line 638 of file mpegtables.h.

Referenced by SetStreamProgramInfo().

void ProgramMapTable::SetStreamProgramInfo ( uint  i,
unsigned char *  streamInfo,
uint  infoLength 
) [inline, private]

Definition at line 644 of file mpegtables.h.

Referenced by AppendStream().

void ProgramMapTable::SetProgramInfoLength ( uint  length  )  [inline, private]

Definition at line 651 of file mpegtables.h.

Referenced by RemoveAllStreams(), and SetProgramInfo().

void ProgramMapTable::SetProgramInfo ( unsigned char *  streamInfo,
uint  infoLength 
) [inline, private]

Definition at line 657 of file mpegtables.h.

ProgramMapTable * ProgramMapTable::CreateBlank ( bool  smallPacket = true  )  [static, private]

Definition at line 309 of file mpegtables.cpp.

Referenced by Create().


Member Data Documentation

const uint ProgramMapTable::pmt_header = 4 [static, private]

Definition at line 665 of file mpegtables.h.

Referenced by AppendStream(), Parse(), and RemoveAllStreams().

vector<unsigned char*> ProgramMapTable::_ptrs [mutable, private]


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