|
vdr 2.8.3
|
#include <remux.h>
Public Member Functions | |
| cPatPmtGenerator (const cChannel *Channel=NULL) | |
| void | SetVersions (int PatVersion, int PmtVersion) |
| void | SetPids (int Vpid, int Vtype, int Ppid, int Tpid, const int *Apids, const int *Atypes, const char Alangs[][MAXLANGCODE2], const int *Dpids, const int *Dtypes, const char Dlangs[][MAXLANGCODE2], const int *Spids, const uchar *Stypes, const char Slangs[][MAXLANGCODE2], const uint16_t *CompositionPageIds, const uint16_t *AncillaryPageIds) |
| void | SetChannel (const cChannel *Channel) |
| uchar * | GetPat (void) |
| uchar * | GetPmt (int &Index) |
| int | GetPatPmtSize (void) |
| int | GetPatPmt (uchar *Dest, int Size) |
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 | MakeLanguageDescriptor (uchar *Target, const char *Language) |
| int | MakeCRC (uchar *Target, const uchar *Data, int Length) |
| void | GeneratePmtPid (int Vpid, int Ppid, int Tpid, const int *Apids, const int *Dpids, const int *Spids) |
| void | GeneratePat (void) |
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 | ) |
Definition at line 367 of file remux.c.
References esInfoLength, numPmtPackets, patCounter, patVersion, pmtCounter, pmtPid, pmtVersion, and SetChannel().
|
protected |
Generates a PAT section for later use with GetPat().
Definition at line 486 of file remux.c.
References IncVersion(), MakeCRC(), P_TSID, pat, PATPID, patVersion, pmtPid, TS_PAYLOAD_START, and TS_SYNC_BYTE.
Referenced by SetPids().
|
protected |
| uchar * cPatPmtGenerator::GetPat | ( | void | ) |
Returns a pointer to the PAT section, which consists of exactly one TS packet.
Definition at line 593 of file remux.c.
References IncCounter(), pat, and patCounter.
Referenced by cRecorder::Action(), and cTransfer::Activate().
| int cPatPmtGenerator::GetPatPmt | ( | uchar * | Dest, |
| int | Size ) |
Writes the PAT and all PMT packets to Dest.
Size must be the size of the memory available at Dest, and must be greater than GetPatPmtSize(). Returns the number of bytes written to Dest.
Definition at line 613 of file remux.c.
References GetPatPmtSize(), IncCounter(), numPmtPackets, pat, patCounter, pmt, pmtCounter, and TS_SIZE.
Referenced by cPes2TsConverter::ConvertPesFrame().
| int cPatPmtGenerator::GetPatPmtSize | ( | void | ) |
Returns the combined size of PAT and all PMT packets.
Definition at line 608 of file remux.c.
References numPmtPackets, and TS_SIZE.
Referenced by GetPatPmt().
| 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 if all packets of the PMT section have been fetched.
Definition at line 599 of file remux.c.
References IncCounter(), numPmtPackets, pmt, and pmtCounter.
Referenced by cRecorder::Action(), and cTransfer::Activate().
|
private |
Definition at line 377 of file remux.c.
Referenced by GetPat(), GetPatPmt(), and GetPmt().
|
private |
Definition at line 390 of file remux.c.
References esInfoLength.
Referenced by MakeAC3Descriptor(), MakeLanguageDescriptor(), and MakeSubtitlingDescriptor().
|
private |
Definition at line 384 of file remux.c.
Referenced by GeneratePat(), and SetPids().
Definition at line 456 of file remux.c.
References SI::CRC32::crc32().
Referenced by GeneratePat(), and SetPids().
|
protected |
Definition at line 437 of file remux.c.
References IncEsInfoLength(), and SI::ISO639LanguageDescriptorTag.
Referenced by SetPids().
|
protected |
Definition at line 420 of file remux.c.
References IncEsInfoLength(), and SI::SubtitlingDescriptorTag.
Referenced by SetPids().
| void cPatPmtGenerator::SetChannel | ( | const cChannel * | Channel | ) |
Sets the Channel for which the PAT/PMT shall be generated.
Definition at line 587 of file remux.c.
References cChannel::Alangs(), cChannel::AncillaryPageIds(), cChannel::Apids(), cChannel::Atypes(), cChannel::CompositionPageIds(), cChannel::Dlangs(), cChannel::Dpids(), cChannel::Dtypes(), cChannel::Ppid(), SetPids(), cChannel::Slangs(), cChannel::Spids(), cChannel::Stypes(), cChannel::Tpid(), cChannel::Vpid(), and cChannel::Vtype().
Referenced by cPatPmtGenerator(), cRecorder::cRecorder(), and cTransfer::cTransfer().
| void cPatPmtGenerator::SetPids | ( | int | Vpid, |
| int | Vtype, | ||
| int | Ppid, | ||
| int | Tpid, | ||
| const int * | Apids, | ||
| const int * | Atypes, | ||
| const char | Alangs[][MAXLANGCODE2], | ||
| const int * | Dpids, | ||
| const int * | Dtypes, | ||
| const char | Dlangs[][MAXLANGCODE2], | ||
| const int * | Spids, | ||
| const uchar * | Stypes, | ||
| const char | Slangs[][MAXLANGCODE2], | ||
| const uint16_t * | CompositionPageIds, | ||
| const uint16_t * | AncillaryPageIds ) |
Sets the PIDs this PAT/PMT shall contain.
Definition at line 515 of file remux.c.
References GeneratePat(), GeneratePmtPid(), IncVersion(), MakeAC3Descriptor(), MakeCRC(), MakeLanguageDescriptor(), MakeStream(), MakeSubtitlingDescriptor(), MAX_SECTION_SIZE, MAXLANGCODE2, numPmtPackets, pmt, pmtPid, pmtVersion, TS_PAYLOAD_START, TS_SIZE, and TS_SYNC_BYTE.
Referenced by cPatPmtMaker::MakePatPmt(), and SetChannel().
| 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 581 of file remux.c.
References patVersion, and pmtVersion.
Referenced by cRecorder::GetLastPts().
|
private |
Definition at line 308 of file remux.h.
Referenced by cPatPmtGenerator(), IncEsInfoLength(), and MakeStream().
|
private |
Definition at line 302 of file remux.h.
Referenced by cPatPmtGenerator(), GetPatPmt(), GetPatPmtSize(), GetPmt(), and SetPids().
Definition at line 300 of file remux.h.
Referenced by GeneratePat(), GetPat(), and GetPatPmt().
|
private |
Definition at line 303 of file remux.h.
Referenced by cPatPmtGenerator(), GetPat(), and GetPatPmt().
|
private |
Definition at line 305 of file remux.h.
Referenced by cPatPmtGenerator(), GeneratePat(), and SetVersions().
|
private |
Definition at line 301 of file remux.h.
Referenced by GetPatPmt(), GetPmt(), and SetPids().
|
private |
Definition at line 304 of file remux.h.
Referenced by cPatPmtGenerator(), GetPatPmt(), and GetPmt().
|
private |
Definition at line 307 of file remux.h.
Referenced by cPatPmtGenerator(), GeneratePat(), GeneratePmtPid(), and SetPids().
|
private |
Definition at line 306 of file remux.h.
Referenced by cPatPmtGenerator(), SetPids(), and SetVersions().