vdr
2.0.6
|
#include <remux.h>
Public Member Functions | |
cPatPmtParser (bool UpdatePrimaryDevice=false) | |
void | Reset (void) |
void | ParsePat (const uchar *Data, int Length) |
void | ParsePmt (const uchar *Data, int Length) |
bool | ParsePatPmt (const uchar *Data, int Length) |
bool | GetVersions (int &PatVersion, int &PmtVersion) const |
bool | IsPmtPid (int Pid) const |
int | Vpid (void) const |
int | Ppid (void) const |
int | Vtype (void) const |
int | Tpid (void) |
const int * | Apids (void) const |
const int * | Dpids (void) const |
const int * | Spids (void) const |
int | Apid (int i) const |
int | Dpid (int i) const |
int | Spid (int i) const |
int | Atype (int i) const |
int | Dtype (int i) const |
const char * | Alang (int i) const |
const char * | Dlang (int i) const |
const char * | Slang (int i) const |
uchar | SubtitlingType (int i) const |
uint16_t | CompositionPageId (int i) const |
uint16_t | AncillaryPageId (int i) const |
const tTeletextSubtitlePage * | TeletextSubtitlePages () const |
int | TotalTeletextSubtitlePages () const |
Protected Member Functions | |
int | SectionLength (const uchar *Data, int Length) |
Private Attributes | |
uchar | pmt [MAX_SECTION_SIZE] |
int | pmtSize |
int | patVersion |
int | pmtVersion |
int | pmtPids [MAX_PMT_PIDS+1] |
int | vpid |
int | ppid |
int | vtype |
int | tpid |
int | apids [MAXAPIDS+1] |
int | atypes [MAXAPIDS+1] |
char | alangs [MAXAPIDS][MAXLANGCODE2] |
int | dpids [MAXDPIDS+1] |
int | dtypes [MAXDPIDS+1] |
char | dlangs [MAXDPIDS][MAXLANGCODE2] |
int | spids [MAXSPIDS+1] |
char | slangs [MAXSPIDS][MAXLANGCODE2] |
uchar | subtitlingTypes [MAXSPIDS] |
uint16_t | compositionPageIds [MAXSPIDS] |
uint16_t | ancillaryPageIds [MAXSPIDS] |
bool | updatePrimaryDevice |
int | totalTtxtSubtitlePages |
tTeletextSubtitlePage | teletextSubtitlePages [MAXTXTPAGES] |
cPatPmtParser::cPatPmtParser | ( | bool | UpdatePrimaryDevice = false | ) |
Definition at line 662 of file remux.c.
References Reset(), and updatePrimaryDevice.
|
inline |
|
inline |
Definition at line 425 of file remux.h.
References ancillaryPageIds, and MAXSPIDS.
|
inline |
Definition at line 415 of file remux.h.
References apids, and MAXAPIDS.
Referenced by cDvbHdFfDevice::PlayTsAudio().
|
inline |
|
inline |
Definition at line 418 of file remux.h.
References atypes, and MAXAPIDS.
Referenced by cDvbHdFfDevice::PlayTsAudio().
|
inline |
Definition at line 424 of file remux.h.
References compositionPageIds, and MAXSPIDS.
|
inline |
|
inline |
Definition at line 416 of file remux.h.
References dpids, and MAXDPIDS.
Referenced by cDvbHdFfDevice::PlayTsAudio().
|
inline |
|
inline |
Definition at line 419 of file remux.h.
References dtypes, and MAXDPIDS.
Referenced by cDvbHdFfDevice::PlayTsAudio().
bool cPatPmtParser::GetVersions | ( | int & | PatVersion, |
int & | PmtVersion | ||
) | const |
Returns true if a valid PAT/PMT has been parsed and stores the current version numbers in the given variables.
Definition at line 976 of file remux.c.
References patVersion, and pmtVersion.
Referenced by cFileName::GetLastPatPmtVersions().
|
inline |
Returns true if Pid the one of the PMT pids as defined by the current PAT.
If no PAT has been received yet, false will be returned.
Definition at line 397 of file remux.h.
References pmtPids.
Referenced by cIndexFileGenerator::Action(), cCuttingThread::FixFrame(), cNaluStreamProcessor::GetBuffer(), cFileName::GetLastPatPmtVersions(), cCuttingThread::GetPendingPackets(), ParsePatPmt(), cDevice::PlayTs(), and cDevice::StillPicture().
void cPatPmtParser::ParsePat | ( | const uchar * | Data, |
int | Length | ||
) |
Parses the PAT data from the single TS packet in Data.
Length is always TS_SIZE.
Definition at line 678 of file remux.c.
References SI::PAT::associationLoop, SI::CRCSection::CheckCRCAndParse(), dbgpatpmt, esyslog, SI::NumberedSection::getCurrentNextIndicator(), SI::NumberedSection::getLastSectionNumber(), SI::PAT::Association::getPid(), SI::NumberedSection::getSectionNumber(), SI::PAT::Association::getServiceId(), SI::PAT::getTransportStreamId(), SI::NumberedSection::getVersionNumber(), SI::PAT::Association::isNITPid(), MAX_PMT_PIDS, patVersion, pmtPids, and TsPayloadOffset().
Referenced by cIndexFileGenerator::Action(), cNaluStreamProcessor::GetBuffer(), cFileName::GetLastPatPmtVersions(), ParsePatPmt(), cDevice::PlayTs(), and cDevice::StillPicture().
bool cPatPmtParser::ParsePatPmt | ( | const uchar * | Data, |
int | Length | ||
) |
Parses the given Data (which may consist of several TS packets, typically an entire frame) and extracts the PAT and PMT.
Returns true if a valid PAT/PMT has been detected.
Definition at line 957 of file remux.c.
References IsPmtPid(), ParsePat(), ParsePmt(), PATPID, patVersion, pmtVersion, TS_SIZE, TS_SYNC_BYTE, and TsPid().
Referenced by cCuttingThread::FixFrame().
void cPatPmtParser::ParsePmt | ( | const uchar * | Data, |
int | Length | ||
) |
Parses the PMT data from the single TS packet in Data.
Length is always TS_SIZE. The PMT may consist of several TS packets, which are delivered to the parser through several subsequent calls to ParsePmt(). The whole PMT data will be processed once the last packet has been received.
Definition at line 710 of file remux.c.
References SI::AC3DescriptorTag, alangs, ancillaryPageIds, apids, atypes, SI::CRCSection::CheckCRCAndParse(), cDevice::ClrAvailableTracks(), compositionPageIds, dbgpatpmt, dlangs, dpids, dtypes, SI::EnhancedAC3DescriptorTag, cDevice::EnsureAudioTrack(), cDevice::EnsureSubtitleTrack(), esyslog, SI::SubtitlingDescriptor::Subtitling::getAncillaryPageId(), SI::SubtitlingDescriptor::Subtitling::getCompositionPageId(), SI::NumberedSection::getCurrentNextIndicator(), SI::Descriptor::getDescriptorTag(), SI::NumberedSection::getLastSectionNumber(), SI::DescriptorLoop::getNext(), SI::PMT::getPCRPid(), SI::PMT::Stream::getPid(), SI::NumberedSection::getSectionNumber(), SI::PMT::getServiceId(), SI::PMT::Stream::getStreamType(), SI::SubtitlingDescriptor::Subtitling::getSubtitlingType(), SI::TeletextDescriptor::Teletext::getTeletextMagazineNumber(), SI::TeletextDescriptor::Teletext::getTeletextPageNumber(), SI::TeletextDescriptor::Teletext::getTeletextType(), SI::NumberedSection::getVersionNumber(), I18nNormalizeLanguageCode(), SI::ISO639LanguageDescriptorTag, SI::TeletextDescriptor::Teletext::languageCode, SI::SubtitlingDescriptor::Subtitling::languageCode, SI::ISO639LanguageDescriptor::languageCode, SI::ISO639LanguageDescriptor::Language::languageCode, SI::ISO639LanguageDescriptor::languageLoop, MAXAPIDS, MAXDPIDS, MAXLANGCODE1, MAXSPIDS, MAXTXTPAGES, pmt, pmtSize, pmtVersion, ppid, cDevice::PrimaryDevice(), SectionLength(), cDevice::SetAvailableTrack(), Setup, slangs, spids, SI::PMT::Stream::streamDescriptors, SI::PMT::streamLoop, strn0cpy(), SI::SubtitlingDescriptorTag, SI::SubtitlingDescriptor::subtitlingLoop, subtitlingTypes, SI::TeletextDescriptorTag, SI::TeletextDescriptor::teletextLoop, teletextSubtitlePages, totalTtxtSubtitlePages, tpid, TsPayloadOffset(), TsPayloadStart(), ttAudio, ttDolby, ttSubtitle, tTeletextSubtitlePage::ttxtMagazine, tTeletextSubtitlePage::ttxtPage, tTeletextSubtitlePage::ttxtType, updatePrimaryDevice, cSetup::UseDolbyDigital, vpid, and vtype.
Referenced by cIndexFileGenerator::Action(), cNaluStreamProcessor::GetBuffer(), cFileName::GetLastPatPmtVersions(), ParsePatPmt(), cDevice::PlayTs(), and cDevice::StillPicture().
|
inline |
Returns the PCR pid as defined by the current PMT, or 0 if no PCR pid has been detected, yet.
Definition at line 403 of file remux.h.
References ppid.
Referenced by cDevice::PlayTs().
void cPatPmtParser::Reset | ( | void | ) |
Resets the parser.
This function must be called whenever a new stream is parsed.
Definition at line 668 of file remux.c.
References patVersion, pmtPids, pmtSize, pmtVersion, ppid, tpid, vpid, and vtype.
Referenced by cDevice::AttachPlayer(), cPatPmtParser(), and cDevice::Detach().
|
inlineprotected |
Definition at line 374 of file remux.h.
Referenced by ParsePmt().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 423 of file remux.h.
References MAXSPIDS, and subtitlingTypes.
|
inline |
Definition at line 426 of file remux.h.
References teletextSubtitlePages.
Referenced by cDevice::PlayTs().
|
inline |
Definition at line 427 of file remux.h.
References totalTtxtSubtitlePages.
Referenced by cDevice::PlayTs().
|
inline |
Returns the teletext pid as defined by the current PMT, or 0 if no teletext pid has been detected, yet.
Definition at line 409 of file remux.h.
References tpid.
Referenced by cDevice::PlayTs().
|
inline |
Returns the video pid as defined by the current PMT, or 0 if no video pid has been detected, yet.
Definition at line 400 of file remux.h.
References vpid.
Referenced by cIndexFileGenerator::Action(), cCuttingThread::FixFrame(), cNaluStreamProcessor::GetBuffer(), cCuttingThread::GetPendingPackets(), cDevice::PlayTs(), and cDevice::StillPicture().
|
inline |
Returns the video stream type as defined by the current PMT, or 0 if no video stream type has been detected, yet.
Definition at line 406 of file remux.h.
References vtype.
Referenced by cIndexFileGenerator::Action(), cCuttingThread::FixFrame(), and cNaluStreamProcessor::GetBuffer().
|
private |
Definition at line 361 of file remux.h.
Referenced by Alang(), and ParsePmt().
|
private |
Definition at line 369 of file remux.h.
Referenced by AncillaryPageId(), and ParsePmt().
|
private |
Definition at line 359 of file remux.h.
Referenced by Apid(), Apids(), and ParsePmt().
|
private |
Definition at line 360 of file remux.h.
Referenced by Atype(), and ParsePmt().
|
private |
Definition at line 368 of file remux.h.
Referenced by CompositionPageId(), and ParsePmt().
|
private |
Definition at line 364 of file remux.h.
Referenced by Dlang(), and ParsePmt().
|
private |
Definition at line 362 of file remux.h.
Referenced by Dpid(), Dpids(), and ParsePmt().
|
private |
Definition at line 363 of file remux.h.
Referenced by Dtype(), and ParsePmt().
|
private |
Definition at line 352 of file remux.h.
Referenced by GetVersions(), ParsePat(), ParsePatPmt(), and Reset().
|
private |
Definition at line 350 of file remux.h.
Referenced by ParsePmt().
|
private |
Definition at line 354 of file remux.h.
Referenced by IsPmtPid(), ParsePat(), and Reset().
|
private |
Definition at line 351 of file remux.h.
Referenced by ParsePmt(), and Reset().
|
private |
Definition at line 353 of file remux.h.
Referenced by GetVersions(), ParsePatPmt(), ParsePmt(), and Reset().
|
private |
Definition at line 356 of file remux.h.
Referenced by ParsePmt(), Ppid(), and Reset().
|
private |
Definition at line 366 of file remux.h.
Referenced by ParsePmt(), and Slang().
|
private |
Definition at line 365 of file remux.h.
Referenced by ParsePmt(), Spid(), and Spids().
Definition at line 367 of file remux.h.
Referenced by ParsePmt(), and SubtitlingType().
|
private |
Definition at line 372 of file remux.h.
Referenced by ParsePmt(), and TeletextSubtitlePages().
|
private |
Definition at line 371 of file remux.h.
Referenced by ParsePmt(), and TotalTeletextSubtitlePages().
|
private |
Definition at line 358 of file remux.h.
Referenced by ParsePmt(), Reset(), and Tpid().
|
private |
Definition at line 370 of file remux.h.
Referenced by cPatPmtParser(), and ParsePmt().
|
private |
Definition at line 355 of file remux.h.
Referenced by ParsePmt(), Reset(), and Vpid().
|
private |
Definition at line 357 of file remux.h.
Referenced by ParsePmt(), Reset(), and Vtype().