summaryrefslogtreecommitdiff
path: root/remux.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2015-01-14 10:39:55 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2015-01-14 10:39:55 +0100
commit7062583ab40bec2ee63e84adbbd8e3e1740729bf (patch)
treee7886025fc6714c5db0d88580401a439a2702639 /remux.c
parentb454a0777f54d3cd256b042b446088a77415a434 (diff)
downloadvdr-7062583ab40bec2ee63e84adbbd8e3e1740729bf.tar.gz
vdr-7062583ab40bec2ee63e84adbbd8e3e1740729bf.tar.bz2
Added support for PGS subtitles
Diffstat (limited to 'remux.c')
-rw-r--r--remux.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/remux.c b/remux.c
index 16ae1352..23e83877 100644
--- a/remux.c
+++ b/remux.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: remux.c 3.8 2015/01/14 09:28:24 kls Exp $
+ * $Id: remux.c 3.9 2015/01/14 09:57:09 kls Exp $
*/
#include "remux.h"
@@ -853,6 +853,36 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
}
}
break;
+ case 0x90: // PGS subtitles for BD
+ {
+ dbgpatpmt(" subtitling");
+ char lang[MAXLANGCODE1] = { 0 };
+ SI::Descriptor *d;
+ for (SI::Loop::Iterator it; (d = stream.streamDescriptors.getNext(it)); ) {
+ switch (d->getDescriptorTag()) {
+ case SI::ISO639LanguageDescriptorTag: {
+ SI::ISO639LanguageDescriptor *ld = (SI::ISO639LanguageDescriptor *)d;
+ dbgpatpmt(" '%s'", ld->languageCode);
+ strn0cpy(lang, I18nNormalizeLanguageCode(ld->languageCode), MAXLANGCODE1);
+ if (NumSpids < MAXSPIDS) {
+ spids[NumSpids] = stream.getPid();
+ *slangs[NumSpids] = 0;
+ subtitlingTypes[NumSpids] = 0;
+ compositionPageIds[NumSpids] = 0;
+ ancillaryPageIds[NumSpids] = 0;
+ if (updatePrimaryDevice)
+ cDevice::PrimaryDevice()->SetAvailableTrack(ttSubtitle, NumSpids, stream.getPid(), lang);
+ NumSpids++;
+ spids[NumSpids] = 0;
+ }
+ }
+ break;
+ default: ;
+ }
+ delete d;
+ }
+ }
+ break;
default: ;
}
dbgpatpmt("\n");