vdr
2.2.0
|
#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) |
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) |
Private Member Functions | |
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 |
cPatPmtGenerator::cPatPmtGenerator | ( | const cChannel * | Channel = NULL | ) |
|
protected |
Generates a PAT section for later use with GetPat().
Definition at line 527 of file remux.c.
References P_TSID, PATPID, TS_PAYLOAD_START, and TS_SYNC_BYTE.
|
protected |
Generates a PMT section for the given Channel, for later use with GetPmt().
Definition at line 556 of file remux.c.
References cChannel::Alang(), cChannel::AncillaryPageId(), cChannel::Apid(), cChannel::Atype(), cChannel::CompositionPageId(), cChannel::Dlang(), cChannel::Dpid(), cChannel::Dtype(), MAX_SECTION_SIZE, 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().
|
protected |
Generates a PMT pid that doesn't collide with any of the actual pids of the Channel.
Definition at line 512 of file remux.c.
References cChannel::Apids(), cChannel::Dpids(), MAXPID, P_PMT_PID, cChannel::Ppid(), SETPID, SETPIDS, cChannel::Spids(), cChannel::Tpid(), and cChannel::Vpid().
uchar * cPatPmtGenerator::GetPat | ( | void | ) |
Returns a pointer to the PAT section, which consists of exactly one TS packet.
Definition at line 645 of file remux.c.
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..
Definition at line 651 of file remux.c.
Referenced by cRecorder::Action(), and cTransfer::Activate().
|
private |
|
private |
Definition at line 497 of file remux.c.
References SI::CRC32::crc32().
|
protected |
Definition at line 478 of file remux.c.
References SI::ISO639LanguageDescriptorTag.
|
protected |
Definition at line 438 of file remux.c.
References SI::SubtitlingDescriptorTag.
|
protected |
Definition at line 455 of file remux.c.
References SI::TeletextDescriptorTag, tTeletextSubtitlePage::ttxtLanguage, tTeletextSubtitlePage::ttxtPage, and tTeletextSubtitlePage::ttxtType.
void cPatPmtGenerator::SetChannel | ( | const cChannel * | Channel | ) |
Sets the Channel for which the PAT/PMT shall be generated.
Definition at line 636 of file remux.c.
Referenced by cRecorder::cRecorder(), and cTransfer::cTransfer().
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 630 of file remux.c.
Referenced by cRecorder::cRecorder().
|
private |