vdr
1.7.27
|
#include <remux.h>
Public Member Functions | |
cPatPmtGenerator (const cChannel *Channel=NULL) | |
void | SetVersions (int PatVersion, int PmtVersion) |
void | SetChannel (const cChannel *Channel) |
uchar * | GetPat (void) |
uchar * | GetPmt (int &Index) |
cPatPmtGenerator (const cChannel *Channel=NULL) | |
void | SetVersions (int PatVersion, int PmtVersion) |
void | SetChannel (const cChannel *Channel) |
uchar * | GetPat (void) |
uchar * | GetPmt (int &Index) |
Protected Member Functions | |
int | MakeStream (uchar *Target, uchar Type, int Pid) |
int | MakeAC3Descriptor (uchar *Target, uchar Type) |
int | MakeSubtitlingDescriptor (uchar *Target, const char *Language, uchar SubtitlingType, uint16_t CompositionPageId, uint16_t AncillaryPageId) |
int | MakeTeletextDescriptor (uchar *Target, const tTeletextSubtitlePage *pages, int pageCount) |
int | MakeLanguageDescriptor (uchar *Target, const char *Language) |
int | MakeCRC (uchar *Target, const uchar *Data, int Length) |
void | GeneratePmtPid (const cChannel *Channel) |
void | GeneratePat (void) |
void | GeneratePmt (const cChannel *Channel) |
int | MakeStream (uchar *Target, uchar Type, int Pid) |
int | MakeAC3Descriptor (uchar *Target, uchar Type) |
int | MakeSubtitlingDescriptor (uchar *Target, const char *Language, uchar SubtitlingType, uint16_t CompositionPageId, uint16_t AncillaryPageId) |
int | MakeTeletextDescriptor (uchar *Target, const tTeletextSubtitlePage *pages, int pageCount) |
int | MakeLanguageDescriptor (uchar *Target, const char *Language) |
int | MakeCRC (uchar *Target, const uchar *Data, int Length) |
void | GeneratePmtPid (const cChannel *Channel) |
void | GeneratePat (void) |
void | GeneratePmt (const cChannel *Channel) |
Private Member Functions | |
void | IncCounter (int &Counter, uchar *TsPacket) |
void | IncVersion (int &Version) |
void | IncEsInfoLength (int Length) |
void | IncCounter (int &Counter, uchar *TsPacket) |
void | IncVersion (int &Version) |
void | IncEsInfoLength (int Length) |
Private Attributes | |
uchar | pat [TS_SIZE] |
uchar | pmt [MAX_PMT_TS][TS_SIZE] |
int | numPmtPackets |
int | patCounter |
int | pmtCounter |
int | patVersion |
int | pmtVersion |
int | pmtPid |
uchar * | esInfoLength |
Definition at line 159 of file include/vdr/remux.h.
cPatPmtGenerator::cPatPmtGenerator | ( | const cChannel * | Channel = NULL | ) |
Definition at line 151 of file remux.c.
References esInfoLength, numPmtPackets, patCounter, patVersion, pmtCounter, pmtPid, pmtVersion, and SetChannel().
cPatPmtGenerator::cPatPmtGenerator | ( | const cChannel * | Channel = NULL | ) |
void cPatPmtGenerator::GeneratePat | ( | void | ) | [protected] |
Generates a PAT section for later use with GetPat().
Definition at line 294 of file remux.c.
References IncVersion(), MakeCRC(), P_TSID, pat, PATPID, patVersion, pmtPid, TS_PAYLOAD_START, and TS_SYNC_BYTE.
Referenced by SetChannel().
void cPatPmtGenerator::GeneratePat | ( | void | ) | [protected] |
Generates a PAT section for later use with GetPat().
void cPatPmtGenerator::GeneratePmt | ( | const cChannel * | Channel | ) | [protected] |
Generates a PMT section for the given Channel, for later use with GetPmt().
Definition at line 323 of file remux.c.
References cChannel::Alang(), cChannel::AncillaryPageId(), cChannel::Apid(), cChannel::Atype(), cChannel::CompositionPageId(), cChannel::Dlang(), cChannel::Dpid(), cChannel::Dtype(), IncVersion(), MakeAC3Descriptor(), MakeCRC(), MakeLanguageDescriptor(), MakeStream(), MakeSubtitlingDescriptor(), MakeTeletextDescriptor(), MAX_SECTION_SIZE, numPmtPackets, pmt, pmtPid, pmtVersion, cChannel::Ppid(), cChannel::Slang(), cChannel::Spid(), cChannel::SubtitlingType(), cChannel::TeletextSubtitlePages(), cChannel::TotalTeletextSubtitlePages(), cChannel::Tpid(), TS_PAYLOAD_START, TS_SIZE, TS_SYNC_BYTE, cChannel::Vpid(), and cChannel::Vtype().
Referenced by SetChannel().
void cPatPmtGenerator::GeneratePmt | ( | const cChannel * | Channel | ) | [protected] |
Generates a PMT section for the given Channel, for later use with GetPmt().
void cPatPmtGenerator::GeneratePmtPid | ( | const cChannel * | Channel | ) | [protected] |
Generates a PMT pid that doesn't collide with any of the actual pids of the Channel.
Definition at line 279 of file remux.c.
References cChannel::Apids(), cChannel::Dpids(), MAXPID, P_PMT_PID, pmtPid, cChannel::Ppid(), SETPID, SETPIDS, cChannel::Spids(), cChannel::Tpid(), and cChannel::Vpid().
Referenced by SetChannel().
void cPatPmtGenerator::GeneratePmtPid | ( | const cChannel * | Channel | ) | [protected] |
Generates a PMT pid that doesn't collide with any of the actual pids of the Channel.
uchar * cPatPmtGenerator::GetPat | ( | void | ) |
Returns a pointer to the PAT section, which consists of exactly one TS packet.
Definition at line 412 of file remux.c.
References IncCounter(), pat, and patCounter.
Referenced by cRecorder::Action(), and cTransfer::Activate().
uchar* cPatPmtGenerator::GetPat | ( | void | ) |
Returns a pointer to the PAT section, which consists of exactly one TS packet.
uchar * cPatPmtGenerator::GetPmt | ( | int & | Index | ) |
Returns a pointer to the Index'th TS packet of the PMT section.
Index must be initialized to 0 and will be incremented by each call to GetPmt(). Returns NULL is all packets of the PMT section have been fetched..
Definition at line 418 of file remux.c.
References IncCounter(), numPmtPackets, pmt, and pmtCounter.
Referenced by cRecorder::Action(), and cTransfer::Activate().
uchar* cPatPmtGenerator::GetPmt | ( | int & | Index | ) |
Returns a pointer to the Index'th TS packet of the PMT section.
Index must be initialized to 0 and will be incremented by each call to GetPmt(). Returns NULL is all packets of the PMT section have been fetched..
void cPatPmtGenerator::IncCounter | ( | int & | Counter, |
uchar * | TsPacket | ||
) | [private] |
void cPatPmtGenerator::IncCounter | ( | int & | Counter, |
uchar * | TsPacket | ||
) | [private] |
void cPatPmtGenerator::IncEsInfoLength | ( | int | Length | ) | [private] |
void cPatPmtGenerator::IncEsInfoLength | ( | int | Length | ) | [private] |
Definition at line 174 of file remux.c.
References esInfoLength.
Referenced by MakeAC3Descriptor(), MakeLanguageDescriptor(), MakeSubtitlingDescriptor(), and MakeTeletextDescriptor().
void cPatPmtGenerator::IncVersion | ( | int & | Version | ) | [private] |
void cPatPmtGenerator::IncVersion | ( | int & | Version | ) | [private] |
Definition at line 168 of file remux.c.
Referenced by GeneratePat(), and GeneratePmt().
int cPatPmtGenerator::MakeAC3Descriptor | ( | uchar * | Target, |
uchar | Type | ||
) | [protected] |
int cPatPmtGenerator::MakeAC3Descriptor | ( | uchar * | Target, |
uchar | Type | ||
) | [protected] |
int cPatPmtGenerator::MakeCRC | ( | uchar * | Target, |
const uchar * | Data, | ||
int | Length | ||
) | [protected] |
Definition at line 264 of file remux.c.
References SI::CRC32::crc32().
Referenced by GeneratePat(), and GeneratePmt().
int cPatPmtGenerator::MakeCRC | ( | uchar * | Target, |
const uchar * | Data, | ||
int | Length | ||
) | [protected] |
int cPatPmtGenerator::MakeLanguageDescriptor | ( | uchar * | Target, |
const char * | Language | ||
) | [protected] |
Definition at line 245 of file remux.c.
References IncEsInfoLength(), and SI::ISO639LanguageDescriptorTag.
Referenced by GeneratePmt().
int cPatPmtGenerator::MakeLanguageDescriptor | ( | uchar * | Target, |
const char * | Language | ||
) | [protected] |
int cPatPmtGenerator::MakeStream | ( | uchar * | Target, |
uchar | Type, | ||
int | Pid | ||
) | [protected] |
int cPatPmtGenerator::MakeStream | ( | uchar * | Target, |
uchar | Type, | ||
int | Pid | ||
) | [protected] |
int cPatPmtGenerator::MakeSubtitlingDescriptor | ( | uchar * | Target, |
const char * | Language, | ||
uchar | SubtitlingType, | ||
uint16_t | CompositionPageId, | ||
uint16_t | AncillaryPageId | ||
) | [protected] |
int cPatPmtGenerator::MakeSubtitlingDescriptor | ( | uchar * | Target, |
const char * | Language, | ||
uchar | SubtitlingType, | ||
uint16_t | CompositionPageId, | ||
uint16_t | AncillaryPageId | ||
) | [protected] |
Definition at line 205 of file remux.c.
References IncEsInfoLength(), and SI::SubtitlingDescriptorTag.
Referenced by GeneratePmt().
int cPatPmtGenerator::MakeTeletextDescriptor | ( | uchar * | Target, |
const tTeletextSubtitlePage * | pages, | ||
int | pageCount | ||
) | [protected] |
int cPatPmtGenerator::MakeTeletextDescriptor | ( | uchar * | Target, |
const tTeletextSubtitlePage * | pages, | ||
int | pageCount | ||
) | [protected] |
Definition at line 222 of file remux.c.
References IncEsInfoLength(), SI::TeletextDescriptorTag, tTeletextSubtitlePage::ttxtLanguage, tTeletextSubtitlePage::ttxtPage, and tTeletextSubtitlePage::ttxtType.
Referenced by GeneratePmt().
void cPatPmtGenerator::SetChannel | ( | const cChannel * | Channel | ) |
Sets the Channel for which the PAT/PMT shall be generated.
Definition at line 403 of file remux.c.
References GeneratePat(), GeneratePmt(), and GeneratePmtPid().
Referenced by cPatPmtGenerator(), cRecorder::cRecorder(), and cTransfer::cTransfer().
void cPatPmtGenerator::SetChannel | ( | const cChannel * | Channel | ) |
Sets the Channel for which the PAT/PMT shall be generated.
void cPatPmtGenerator::SetVersions | ( | int | PatVersion, |
int | PmtVersion | ||
) |
Sets the version numbers for the generated PAT and PMT, in case this generator is used to, e.g., continue a previously interrupted recording (in which case the numbers given should be derived from the PAT/PMT versions last used in the existing recording, incremented by 1.
If the given numbers exceed the allowed range of 0..31, the higher bits will automatically be cleared. SetVersions() needs to be called before SetChannel() in order to have an effect from the very start.
Definition at line 397 of file remux.c.
References patVersion, and pmtVersion.
Referenced by cRecorder::cRecorder().
void cPatPmtGenerator::SetVersions | ( | int | PatVersion, |
int | PmtVersion | ||
) |
Sets the version numbers for the generated PAT and PMT, in case this generator is used to, e.g., continue a previously interrupted recording (in which case the numbers given should be derived from the PAT/PMT versions last used in the existing recording, incremented by 1.
If the given numbers exceed the allowed range of 0..31, the higher bits will automatically be cleared. SetVersions() needs to be called before SetChannel() in order to have an effect from the very start.
uchar * cPatPmtGenerator::esInfoLength [private] |
Definition at line 169 of file include/vdr/remux.h.
Referenced by cPatPmtGenerator(), IncEsInfoLength(), and MakeStream().
int cPatPmtGenerator::numPmtPackets [private] |
Definition at line 163 of file include/vdr/remux.h.
Referenced by cPatPmtGenerator(), GeneratePmt(), and GetPmt().
uchar cPatPmtGenerator::pat [private] |
Definition at line 161 of file include/vdr/remux.h.
Referenced by GeneratePat(), and GetPat().
int cPatPmtGenerator::patCounter [private] |
Definition at line 164 of file include/vdr/remux.h.
Referenced by cPatPmtGenerator(), and GetPat().
int cPatPmtGenerator::patVersion [private] |
Definition at line 166 of file include/vdr/remux.h.
Referenced by cPatPmtGenerator(), GeneratePat(), and SetVersions().
uchar cPatPmtGenerator::pmt [private] |
Definition at line 162 of file include/vdr/remux.h.
Referenced by GeneratePmt(), and GetPmt().
int cPatPmtGenerator::pmtCounter [private] |
Definition at line 165 of file include/vdr/remux.h.
Referenced by cPatPmtGenerator(), and GetPmt().
int cPatPmtGenerator::pmtPid [private] |
Definition at line 168 of file include/vdr/remux.h.
Referenced by cPatPmtGenerator(), GeneratePat(), GeneratePmt(), and GeneratePmtPid().
int cPatPmtGenerator::pmtVersion [private] |
Definition at line 167 of file include/vdr/remux.h.
Referenced by cPatPmtGenerator(), GeneratePmt(), and SetVersions().