|
MythTV master
|
A PMT table maps a program described in the ProgramAssociationTable to various PID's which describe the multimedia contents of the program. More...
#include <libmythtv/mpeg/mpegtables.h>
Public Member Functions | |
| ProgramMapTable (const ProgramMapTable &table) | |
| ProgramMapTable (const PSIPTable &table) | |
| uint | PCRPID (void) const |
| stream that contains program clock reference. More... | |
| 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, const QString &sistandard) const |
| Returns true iff the stream at index i is a video stream. More... | |
| bool | IsAudio (uint i, const QString &sistandard) const |
| Returns true iff the stream at index i is an audio stream. More... | |
| bool | IsEncrypted (const QString &sistandard) const |
| Returns true iff PMT contains CA descriptor for a vid/aud stream. More... | |
| bool | IsProgramEncrypted (void) const |
| Returns true iff PMT's ProgramInfo contains CA descriptor. More... | |
| bool | IsStreamEncrypted (uint pid) const |
| Returns true iff PMT contains CA descriptor. More... | |
| bool | IsStillPicture (const QString &sistandard) const |
| Returns true iff PMT contains a still-picture video stream. More... | |
| QString | StreamTypeString (uint i) const |
| Returns a string representation of type at stream index i. More... | |
| QString | StreamDescription (uint i, const QString &sistandard) const |
| Returns a better (and more expensive) string representation of type at stream index i than StreamTypeString(uint) More... | |
| QString | GetLanguage (uint i) const |
| Returns the canonical language if we find the iso639 descriptor. More... | |
| uint | GetAudioType (uint i) const |
| Returns the audio type from the iso 639 descriptor. More... | |
| uint | FindPIDs (uint type, std::vector< uint > &pids, const QString &sistandard) const |
| Finds all pids matching type. More... | |
| uint | FindPIDs (uint type, std::vector< uint > &pids, std::vector< uint > &types, const QString &sistandard, bool normalize) const |
| Finds all pids w/types, matching type (useful for AnyVideo/AnyAudio). More... | |
| int | FindPID (uint pid) const |
| Locates stream index of pid. More... | |
| uint | FindUnusedPID (uint desired_pid=0x20) const |
| void | RemoveAllStreams (void) |
| void | AppendStream (uint pid, uint type, unsigned char *streamInfo=nullptr, uint infoLength=0) |
| void | Parse (void) 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 std::vector< uint8_t > &pesdata) | |
| PSIPTable (const PSIPTable &)=default | |
| 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 | SectionLengthRaw (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 std::vector< uint8_t > &pesdata) | |
| PESPacket & | operator= (const PESPacket &pkt)=delete |
| PESPacket (const PESPacket &pkt) | |
| virtual | ~PESPacket () |
| bool | IsClone () const |
| bool | AddTSPacket (const TSPacket *tspacket, int cardid, bool &broken) |
| bool | IsGood () const |
| const TSHeader * | tsheader () const |
| TSHeader * | tsheader () |
| void | GetAsTSPackets (std::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... | |
| virtual bool | HasCRC () const |
| 1 bit Cyclic Redundancy Check 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 |
| bool | VerifyCRC (int cardid, int pid) const |
Static Public Member Functions | |
| static ProgramMapTable | ViewData (const unsigned char *pesdata) |
| static ProgramMapTable * | Create (uint programNumber, uint basepid, uint pcrpid, uint version, std::vector< uint > pids, std::vector< uint > types) |
| static ProgramMapTable * | Create (uint programNumber, uint basepid, uint pcrpid, uint version, const desc_list_t &global_desc, const std::vector< uint > &pids, const std::vector< uint > &types, const std::vector< desc_list_t > &prog_desc) |
Static Public Member Functions inherited from PSIPTable | |
| static PSIPTable | View (const TSPacket &tspacket) |
| static PSIPTable | ViewData (const unsigned char *pesdata) |
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 ProgramMapTable * | CreateBlank (bool smallPacket=true) |
Private Attributes | |
| std::vector< unsigned char * > | m_ptrs |
Static Private Attributes | |
| static const uint | kPmtHeaderMinOffset = 4 |
Additional Inherited Members | |
Static Public Attributes inherited from PSIPTable | |
| static const uint | kPsipOffset = 8 |
Static Public Attributes inherited from PESPacket | |
| static constexpr uint | kMpegCRCSize { 4 } |
Protected Member Functions inherited from PSIPTable | |
| PSIPTable (const TSPacket &tspacket, bool) | |
| QString | XMLValues (uint indent_level) const |
Protected Member Functions inherited from PESPacket | |
| PESPacket ()=default | |
| noop constructor, only for use by derived classes More... | |
| void | Finalize () |
Protected Attributes inherited from PESPacket | |
| unsigned char * | m_pesData { nullptr } |
| Pointer to PES data in full buffer. More... | |
| unsigned char * | m_fullBuffer { nullptr } |
| Pointer to allocated data. More... | |
| uint | m_psiOffset { 0 } |
| AFCOffset + StartOfFieldPointer. More... | |
| uint | m_ccLast { 255 } |
| Continuity counter of last inserted TS Packet. More... | |
| uint | m_pesDataSize { 0 } |
| Number of data bytes (TS header + PES data) More... | |
| uint | m_allocSize { 0 } |
| Total number of bytes we allocated. More... | |
| bool | m_badPacket { false } |
| true if a CRC is not good yet More... | |
Static Protected Attributes inherited from PESPacket | |
| static const uint | kTheMagicNoCRCCRC = 0xFFFFFFFF |
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 675 of file mpegtables.h.
|
inline |
Definition at line 679 of file mpegtables.h.
Referenced by CreateBlank().
|
inlineexplicit |
Definition at line 685 of file mpegtables.h.
| void ProgramMapTable::AppendStream | ( | uint | pid, |
| uint | type, | ||
| unsigned char * | streamInfo = nullptr, |
||
| uint | infoLength = 0 |
||
| ) |
Definition at line 494 of file mpegtables.cpp.
Referenced by Create().
|
static |
Definition at line 431 of file mpegtables.cpp.
|
static |
Definition at line 411 of file mpegtables.cpp.
Referenced by MPEGStreamData::CreatePMTSingleProgram(), and DTVChannel::SetChannelByString().
|
staticprivate |
Definition at line 386 of file mpegtables.cpp.
Referenced by Create().
|
inline |
Locates stream index of pid.
Definition at line 780 of file mpegtables.h.
Referenced by MPEGStreamData::CreatePMTSingleProgram(), FindPIDs(), FindUnusedPID(), and DTVRecorder::HandleSingleProgramPMT().
| uint ProgramMapTable::FindPIDs | ( | uint | type, |
| std::vector< uint > & | pids, | ||
| const QString & | sistandard | ||
| ) | const |
Finds all pids matching type.
| type | StreamType to match |
| pids | vector pids will be added to |
| sistandard | standard to use in determining if this is a A/V stream |
Definition at line 647 of file mpegtables.cpp.
| uint ProgramMapTable::FindPIDs | ( | uint | type, |
| std::vector< uint > & | pids, | ||
| std::vector< uint > & | types, | ||
| const QString & | sistandard, | ||
| bool | normalize | ||
| ) | const |
Finds all pids w/types, matching type (useful for AnyVideo/AnyAudio).
| 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 |
Definition at line 683 of file mpegtables.cpp.
Definition at line 742 of file mpegtables.cpp.
Returns the audio type from the iso 639 descriptor.
Definition at line 1164 of file mpegtables.cpp.
| QString ProgramMapTable::GetLanguage | ( | uint | i | ) | const |
Returns the canonical language if we find the iso639 descriptor.
Definition at line 1148 of file mpegtables.cpp.
Referenced by StreamDescription().
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.
| i | index of stream |
| sistandard | standard to use in determining if this is a A/V stream |
Definition at line 540 of file mpegtables.cpp.
Referenced by FindPIDs(), DTVRecorder::HandlePMT(), DTVSignalMonitor::HandlePMT(), and IsEncrypted().
| bool ProgramMapTable::IsEncrypted | ( | const QString & | sistandard | ) | const |
Returns true iff PMT contains CA descriptor for a vid/aud stream.
| sistandard | standard to use in determining if this is a A/V stream |
Definition at line 556 of file mpegtables.cpp.
Referenced by ChannelScanSM::HandlePMT(), DTVSignalMonitor::HandlePMT(), and DVBRecorder::SetCAMPMT().
| bool ProgramMapTable::IsProgramEncrypted | ( | void | ) | const |
Returns true iff PMT's ProgramInfo contains CA descriptor.
Definition at line 572 of file mpegtables.cpp.
Referenced by IsEncrypted(), and MPEGStreamData::TestDecryption().
| bool ProgramMapTable::IsStillPicture | ( | const QString & | sistandard | ) | const |
Returns true iff PMT contains a still-picture video stream.
Definition at line 622 of file mpegtables.cpp.
Returns true iff PMT contains CA descriptor.
| i | index of stream |
Definition at line 600 of file mpegtables.cpp.
Referenced by IsEncrypted(), and MPEGStreamData::TestDecryption().
Returns true iff the stream at index i is a video 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.
| i | index of stream |
| sistandard | standard to use in determining if this is a A/V stream |
Definition at line 518 of file mpegtables.cpp.
Referenced by FindPIDs(), DTVRecorder::HandlePMT(), DTVSignalMonitor::HandlePMT(), AvFormatDecoder::HasVideo(), IsEncrypted(), IsStillPicture(), and AvFormatDecoder::ScanATSCCaptionStreams().
| void ProgramMapTable::Parse | ( | void | ) | const |
Definition at line 473 of file mpegtables.cpp.
Referenced by MPEGStreamData::CreatePMTSingleProgram().
|
inline |
stream that contains program clock reference.
Definition at line 709 of file mpegtables.h.
Referenced by MPEGStreamData::CreatePMTSingleProgram(), DTVRecorder::HandleSingleProgramPMT(), MPEGStreamData::ProcessTSPacket(), toString(), and toStringXML().
|
inline |
Definition at line 718 of file mpegtables.h.
Referenced by CreateCAPMT(), MPEGStreamData::CreatePMTSingleProgram(), IsProgramEncrypted(), AvFormatDecoder::ScanATSCCaptionStreams(), toString(), and toStringXML().
|
inline |
Definition at line 715 of file mpegtables.h.
Referenced by AppendStream(), CreateCAPMT(), MPEGStreamData::CreatePMTSingleProgram(), IsProgramEncrypted(), Parse(), AvFormatDecoder::ScanATSCCaptionStreams(), toString(), and toStringXML().
|
inline |
Definition at line 712 of file mpegtables.h.
Referenced by MPEGStreamData::CachePMT(), CreateCAPMT(), MPEGStreamData::CreatePMTSingleProgram(), ChannelScanSM::HandlePMT(), DTVSignalMonitor::HandlePMT(), DVBSignalMonitor::HandlePMT(), MPEGStreamData::ProcessPMT(), DVBCam::RemoveDuplicateServices(), DVBCam::SendPMT(), MPEGStreamData::TestDecryption(), toString(), and toStringXML().
|
inline |
Definition at line 789 of file mpegtables.h.
Referenced by Create().
|
inline |
Definition at line 737 of file mpegtables.h.
Referenced by Create().
|
inlineprivate |
Definition at line 822 of file mpegtables.h.
Referenced by Create().
|
inlineprivate |
Definition at line 816 of file mpegtables.h.
|
inline |
Definition at line 743 of file mpegtables.h.
Referenced by Create().
Definition at line 802 of file mpegtables.h.
Definition at line 745 of file mpegtables.h.
Referenced by AppendStream().
|
inlineprivate |
Definition at line 808 of file mpegtables.h.
Referenced by AppendStream().
Definition at line 751 of file mpegtables.h.
Referenced by AppendStream().
|
inline |
Definition at line 733 of file mpegtables.h.
Referenced by AppendStream(), CreateCAPMT(), MPEGStreamData::CreatePMTSingleProgram(), FindPIDs(), DTVRecorder::HandlePMT(), DTVSignalMonitor::HandlePMT(), DTVRecorder::HandleSingleProgramPMT(), AvFormatDecoder::HasVideo(), IsEncrypted(), IsStillPicture(), AvFormatDecoder::ScanATSCCaptionStreams(), AvFormatDecoder::ScanDSMCCStreams(), MPEGStreamData::TestDecryption(), toString(), and toStringXML().
| QString ProgramMapTable::StreamDescription | ( | uint | i, |
| const QString & | sistandard | ||
| ) | const |
Returns a better (and more expensive) string representation of type at stream index i than StreamTypeString(uint)
Definition at line 1187 of file mpegtables.cpp.
Referenced by CreateCAPMT().
|
inline |
Definition at line 730 of file mpegtables.h.
Referenced by CreateCAPMT(), MPEGStreamData::CreatePMTSingleProgram(), FindPIDs(), GetAudioType(), GetLanguage(), IsAudio(), IsStillPicture(), IsStreamEncrypted(), IsVideo(), AvFormatDecoder::ScanATSCCaptionStreams(), AvFormatDecoder::ScanDSMCCStreams(), StreamDescription(), toString(), and toStringXML().
Definition at line 727 of file mpegtables.h.
Referenced by AppendStream(), CreateCAPMT(), MPEGStreamData::CreatePMTSingleProgram(), FindPIDs(), GetAudioType(), GetLanguage(), IsAudio(), IsStillPicture(), IsStreamEncrypted(), IsVideo(), Parse(), AvFormatDecoder::ScanATSCCaptionStreams(), AvFormatDecoder::ScanDSMCCStreams(), StreamDescription(), toString(), and toStringXML().
Definition at line 724 of file mpegtables.h.
Referenced by CreateCAPMT(), MPEGStreamData::CreatePMTSingleProgram(), FindPIDs(), DTVRecorder::HandleSingleProgramPMT(), MPEGStreamData::TestDecryption(), toString(), and toStringXML().
Definition at line 721 of file mpegtables.h.
Referenced by CreateCAPMT(), MPEGStreamData::CreatePMTSingleProgram(), FindPIDs(), DTVRecorder::HandleSingleProgramPMT(), AvFormatDecoder::HasVideo(), IsAudio(), IsVideo(), AvFormatDecoder::ScanDSMCCStreams(), StreamDescription(), MPEGStreamData::TestDecryption(), toString(), and toStringXML().
|
inline |
Returns a string representation of type at stream index i.
Definition at line 763 of file mpegtables.h.
Referenced by toString(), and toStringXML().
|
overridevirtual |
Reimplemented from PSIPTable.
Definition at line 906 of file mpegtables.cpp.
Referenced by Create(), MPEGStreamData::CreatePMTSingleProgram(), ChannelScanSM::HandlePMT(), Parse(), and toString().
|
overridevirtual |
Reimplemented from PSIPTable.
Definition at line 941 of file mpegtables.cpp.
|
inlinestatic |
Definition at line 691 of file mpegtables.h.
|
staticprivate |
Definition at line 830 of file mpegtables.h.
Referenced by AppendStream(), and Parse().
|
mutableprivate |
Definition at line 831 of file mpegtables.h.
Referenced by AppendStream(), and Parse().