diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2009-08-23 16:04:00 +0200 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2009-08-23 16:04:00 +0200 |
commit | 06bf4c453e22a9bf03f5ec46f7b45593e2cb326c (patch) | |
tree | 8a6f33c4ebde94c5e9e94194378f39cd8cf6926e /remux.c | |
parent | ab6f2ccf424896a80b6e2fdf9ab9313ea4b7f316 (diff) | |
download | vdr-patch-lnbsharing-06bf4c453e22a9bf03f5ec46f7b45593e2cb326c.tar.gz vdr-patch-lnbsharing-06bf4c453e22a9bf03f5ec46f7b45593e2cb326c.tar.bz2 |
Version 1.7.9vdr-1.7.9
- Fixed storing the current OSD size in case the device has
changed it in its setup menu (reported by Reinhard Nissl).
- Fixed cDevice::PlayTsVideo() and cDevice::PlayTsAudio() in case only part of the
buffer has been accepted by the device (reported by Udo Richter).
- Changed the EIT filter setup to save a few handles on devices that do hardware
filtering.
- Fixed deleting expired timers if they have the VPS flag set, but the event they
are assigned to doesn't have a VPS tag.
- Fixed handling file name length on VFAT systems in case they
contain UTF-8 characters (thanks to Rolf Ahrenberg).
- Fixed generating CaPmts in case audio and video are encrypted using different
ECM pids.
- Updated vdr.1 to use the new file names in recording directories.
- Fixed cRecordings::DelByName() to avoid compilation errors with gcc 4.4
(thanks to Matthias Schwarzott).
- Increased the value of MAXFRAMESIZE to better suit HD recordings (thanks to
Reinhard Nissl).
- Implemented full handling of subtitling descriptors (thanks to Mikko Tuumanen).
Diffstat (limited to 'remux.c')
-rw-r--r-- | remux.c | 36 |
1 files changed, 27 insertions, 9 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: remux.c 2.24 2009/06/06 13:24:57 kls Exp $ + * $Id: remux.c 2.26 2009/08/16 15:13:42 kls Exp $ */ #include "remux.h" @@ -198,7 +198,7 @@ int cPatPmtGenerator::MakeAC3Descriptor(uchar *Target) return i; } -int cPatPmtGenerator::MakeSubtitlingDescriptor(uchar *Target, const char *Language) +int cPatPmtGenerator::MakeSubtitlingDescriptor(uchar *Target, const char *Language, uchar SubtitlingType, uint16_t CompositionPageId, uint16_t AncillaryPageId) { int i = 0; Target[i++] = SI::SubtitlingDescriptorTag; @@ -206,11 +206,11 @@ int cPatPmtGenerator::MakeSubtitlingDescriptor(uchar *Target, const char *Langua Target[i++] = *Language++; Target[i++] = *Language++; Target[i++] = *Language++; - Target[i++] = 0x00; // subtitling type - Target[i++] = 0x00; // composition page id hi - Target[i++] = 0x01; // composition page id lo - Target[i++] = 0x00; // ancillary page id hi - Target[i++] = 0x01; // ancillary page id lo + Target[i++] = SubtitlingType; + Target[i++] = CompositionPageId >> 8; + Target[i++] = CompositionPageId & 0xFF; + Target[i++] = AncillaryPageId >> 8; + Target[i++] = AncillaryPageId & 0xFF; IncEsInfoLength(i); return i; } @@ -327,7 +327,7 @@ void cPatPmtGenerator::GeneratePmt(cChannel *Channel) } for (int n = 0; Channel->Spid(n); n++) { i += MakeStream(buf + i, 0x06, Channel->Spid(n)); - i += MakeSubtitlingDescriptor(buf + i, Channel->Slang(n)); + i += MakeSubtitlingDescriptor(buf + i, Channel->Slang(n), Channel->SubtitlingType(n), Channel->CompositionPageId(n), Channel->AncillaryPageId(n)); } int sl = i - SectionLength - 2 + 4; // -2 = SectionLength storage, +4 = length of CRC @@ -610,7 +610,8 @@ bool cPatPmtParser::GetVersions(int &PatVersion, int &PmtVersion) cTsToPes::cTsToPes(void) { data = NULL; - size = length = offset = 0; + size = 0; + Reset(); } cTsToPes::~cTsToPes() @@ -641,6 +642,11 @@ void cTsToPes::PutTs(const uchar *Data, int Length) const uchar *cTsToPes::GetPes(int &Length) { + if (repeatLast) { + repeatLast = false; + Length = lastLength; + return lastData; + } if (offset < length && PesLongEnough(length)) { if (!PesHasLength(data)) // this is a video PES packet with undefined length offset = 6; // trigger setting PES length for initial slice @@ -661,12 +667,16 @@ const uchar *cTsToPes::GetPes(int &Length) p[4] = l / 256; p[5] = l & 0xFF; Length = l + 6; + lastLength = Length; + lastData = p; return p; } else { Length = PesLength(data); if (Length <= length) { offset = Length; // to make sure we break out in case of garbage data + lastLength = Length; + lastData = data; return data; } } @@ -674,9 +684,17 @@ const uchar *cTsToPes::GetPes(int &Length) return NULL; } +void cTsToPes::SetRepeatLast(void) +{ + repeatLast = true; +} + void cTsToPes::Reset(void) { length = offset = 0; + lastData = NULL; + lastLength = 0; + repeatLast = false; } // --- Some helper functions for debugging ----------------------------------- |