diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-02-22 13:08:04 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-02-22 13:08:04 +0100 |
commit | 45eac6d94694aa9081bdd0e06794942c49818ff1 (patch) | |
tree | aade606ef3dd0698faabcc7a2eacef1134b85771 /libsi/descriptor.c | |
parent | 1601918327b72a75b5e5e81405c725ae923f7515 (diff) | |
download | vdr-45eac6d94694aa9081bdd0e06794942c49818ff1.tar.gz vdr-45eac6d94694aa9081bdd0e06794942c49818ff1.tar.bz2 |
Added PDCDescriptor handling to 'libsi'
Diffstat (limited to 'libsi/descriptor.c')
-rw-r--r-- | libsi/descriptor.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/libsi/descriptor.c b/libsi/descriptor.c index 55a6a9c0..0b0019f8 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.5 2004/01/24 14:52:41 kls Exp $ + * $Id: descriptor.c 1.6 2004/02/22 11:11:36 kls Exp $ * * ***************************************************************************/ @@ -529,6 +529,27 @@ void ISO639LanguageDescriptor::Parse() { languageCode[3]=0; } +void PDCDescriptor::Parse() { + unsigned int offset=0; + data.setPointerAndOffset<const descr_pdc>(s, offset); +} + +int PDCDescriptor::getDay() const { + return ((s->pil0 & 0x0F) << 1) | ((s->pil1 & 0x80) >> 7); +} + +int PDCDescriptor::getMonth() const { + return (s->pil1 >> 3) & 0x0F; +} + +int PDCDescriptor::getHour() const { + return ((s->pil1 & 0x07) << 2) | ((s->pil2 & 0xC0) >> 6); +} + +int PDCDescriptor::getMinute() const { + return s->pil2 & 0x3F; +} + void ApplicationSignallingDescriptor::Parse() { entryLoop.setData(data+sizeof(descr_application_signalling), getLength()-sizeof(descr_application_signalling)); } |