Added PDCDescriptor handling to 'libsi'

This commit is contained in:
Klaus Schmidinger
2004-02-22 13:08:04 +01:00
parent 1601918327
commit 45eac6d946
5 changed files with 53 additions and 9 deletions

View File

@@ -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));
}