summaryrefslogtreecommitdiff
path: root/libsi/descriptor.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-09-03 15:19:00 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-09-03 15:19:00 +0200
commit2f4526e55ec1bdf3ff0e2a71411cb2ae3bed6f5c (patch)
treeff2f47a18c65729236270c432edfb72dd6b004f9 /libsi/descriptor.c
parent9e864aba12553c2bd5a157cf94b7fee49c6d88ce (diff)
downloadvdr-2f4526e55ec1bdf3ff0e2a71411cb2ae3bed6f5c.tar.gz
vdr-2f4526e55ec1bdf3ff0e2a71411cb2ae3bed6f5c.tar.bz2
Added support for multiple audio language codes in ISO639LanguageDescriptors to 'libsi'
Diffstat (limited to 'libsi/descriptor.c')
-rw-r--r--libsi/descriptor.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/libsi/descriptor.c b/libsi/descriptor.c
index 207b7c25..cc3a0169 100644
--- a/libsi/descriptor.c
+++ b/libsi/descriptor.c
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: descriptor.c 1.14 2004/10/16 09:51:05 kls Exp $
+ * $Id: descriptor.c 1.15 2005/09/03 15:16:49 kls Exp $
* *
***************************************************************************/
@@ -655,14 +655,32 @@ LinkageType LinkageDescriptor::getLinkageType() const {
}
void ISO639LanguageDescriptor::Parse() {
- unsigned int offset=0;
- data.setPointerAndOffset<const descr_iso_639_language>(s, offset);
+ languageLoop.setData(data+sizeof(descr_iso_639_language), getLength()-sizeof(descr_iso_639_language));
+
+ //all this is for backwards compatibility only
+ Loop::Iterator it;
+ Language first;
+ if (languageLoop.getNext(first, it)) {
+ languageCode[0]=first.languageCode[0];
+ languageCode[1]=first.languageCode[1];
+ languageCode[2]=first.languageCode[2];
+ languageCode[3]=0;
+ } else
+ languageCode[0]=0;
+}
+
+void ISO639LanguageDescriptor::Language::Parse() {
+ s=data.getData<const descr_iso_639_language_loop>();
languageCode[0]=s->lang_code1;
languageCode[1]=s->lang_code2;
languageCode[2]=s->lang_code3;
languageCode[3]=0;
}
+AudioType ISO639LanguageDescriptor::Language::getAudioType() {
+ return (AudioType)s->audio_type;
+}
+
void PDCDescriptor::Parse() {
unsigned int offset=0;
data.setPointerAndOffset<const descr_pdc>(s, offset);