summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2010-01-08 15:23:34 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2010-01-08 15:23:34 +0100
commitc5dcea7de6b8ea521c856403531d7c99f1ab7eb3 (patch)
tree466a2777bf03ad9a183f9b851cfac0c1c3836289
parent2cc10815edbfa202a34fb16c7c2d81d1814b0ee1 (diff)
downloadvdr-c5dcea7de6b8ea521c856403531d7c99f1ab7eb3.tar.gz
vdr-c5dcea7de6b8ea521c856403531d7c99f1ab7eb3.tar.bz2
Changed the EVCONTENTMASK_* macros to enums and changed "mask" to "group"
-rw-r--r--HISTORY4
-rw-r--r--config.h10
-rw-r--r--eit.c6
-rw-r--r--epg.c28
-rw-r--r--epg.h35
5 files changed, 45 insertions, 38 deletions
diff --git a/HISTORY b/HISTORY
index 84430d59..f5f401b7 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6275,3 +6275,7 @@ Video Disk Recorder Revision History
the others on the same adapter.
- Fixed plugin arguments corruption with glibc 2.11 on x86_64 (thanks to
Anssi Hannula).
+
+2010-01-08: Version 1.7.12
+
+- Changed the EVCONTENTMASK_* macros to enums and changed "mask" to "group".
diff --git a/config.h b/config.h
index f0cc67b7..547b49ba 100644
--- a/config.h
+++ b/config.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.h 2.16 2009/11/22 19:55:04 kls Exp $
+ * $Id: config.h 2.17 2010/01/08 15:21:44 kls Exp $
*/
#ifndef __CONFIG_H
@@ -22,13 +22,13 @@
// VDR's own version number:
-#define VDRVERSION "1.7.11"
-#define VDRVERSNUM 10711 // Version * 10000 + Major * 100 + Minor
+#define VDRVERSION "1.7.12"
+#define VDRVERSNUM 10712 // Version * 10000 + Major * 100 + Minor
// The plugin API's version number:
-#define APIVERSION "1.7.11"
-#define APIVERSNUM 10711 // Version * 10000 + Major * 100 + Minor
+#define APIVERSION "1.7.12"
+#define APIVERSNUM 10712 // Version * 10000 + Major * 100 + Minor
// When loading plugins, VDR searches them by their APIVERSION, which
// may be smaller than VDRVERSION in case there have been no changes to
diff --git a/eit.c b/eit.c
index 72d05cb6..37a4a4be 100644
--- a/eit.c
+++ b/eit.c
@@ -8,7 +8,7 @@
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
* Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>.
*
- * $Id: eit.c 2.10 2010/01/03 15:35:21 kls Exp $
+ * $Id: eit.c 2.11 2010/01/08 15:17:09 kls Exp $
*/
#include "eit.h"
@@ -157,9 +157,9 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bo
SI::ContentDescriptor *cd = (SI::ContentDescriptor *)d;
SI::ContentDescriptor::Nibble Nibble;
int NumContents = 0;
- uchar Contents[MAXEVCONTENTS] = { 0 };
+ uchar Contents[MaxEventContents] = { 0 };
for (SI::Loop::Iterator it3; cd->nibbleLoop.getNext(Nibble, it3); ) {
- if (NumContents < MAXEVCONTENTS) {
+ if (NumContents < MaxEventContents) {
Contents[NumContents] = ((Nibble.getContentNibbleLevel1() & 0xF) << 4) | (Nibble.getContentNibbleLevel2() & 0xF);
NumContents++;
}
diff --git a/epg.c b/epg.c
index e1cfe18d..006a5de0 100644
--- a/epg.c
+++ b/epg.c
@@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
- * $Id: epg.c 2.4 2010/01/03 14:10:20 kls Exp $
+ * $Id: epg.c 2.5 2010/01/08 15:20:28 kls Exp $
*/
#include "epg.h"
@@ -190,7 +190,7 @@ void cEvent::SetComponents(cComponents *Components)
void cEvent::SetContents(uchar *Contents)
{
- for (int i = 0; i < MAXEVCONTENTS; i++)
+ for (int i = 0; i < MaxEventContents; i++)
contents[i] = Contents[i];
}
@@ -250,7 +250,7 @@ bool cEvent::IsRunning(bool OrAboutToStart) const
const char *cEvent::ContentToString(uchar Content)
{
switch (Content & 0xF0) {
- case EVCONTENTMASK_MOVIEDRAMA:
+ case ecgMovieDrama:
switch (Content & 0x0F) {
default:
case 0x00: return tr("Content$Movie/Drama");
@@ -264,7 +264,7 @@ const char *cEvent::ContentToString(uchar Content)
case 0x08: return tr("Content$Adult Movie/Drama");
}
break;
- case EVCONTENTMASK_NEWSCURRENTAFFAIRS:
+ case ecgNewsCurrentAffairs:
switch (Content & 0x0F) {
default:
case 0x00: return tr("Content$News/Current Affairs");
@@ -274,7 +274,7 @@ const char *cEvent::ContentToString(uchar Content)
case 0x04: return tr("Content$Discussion/Inverview/Debate");
}
break;
- case EVCONTENTMASK_SHOW:
+ case ecgShow:
switch (Content & 0x0F) {
default:
case 0x00: return tr("Content$Show/Game Show");
@@ -283,7 +283,7 @@ const char *cEvent::ContentToString(uchar Content)
case 0x03: return tr("Content$Talk Show");
}
break;
- case EVCONTENTMASK_SPORTS:
+ case ecgSports:
switch (Content & 0x0F) {
default:
case 0x00: return tr("Content$Sports");
@@ -300,7 +300,7 @@ const char *cEvent::ContentToString(uchar Content)
case 0x0B: return tr("Content$Martial Sports");
}
break;
- case EVCONTENTMASK_CHILDRENYOUTH:
+ case ecgChildrenYouth:
switch (Content & 0x0F) {
default:
case 0x00: return tr("Content$Children's/Youth Programme");
@@ -311,7 +311,7 @@ const char *cEvent::ContentToString(uchar Content)
case 0x05: return tr("Content$Cartoons/Puppets");
}
break;
- case EVCONTENTMASK_MUSICBALLETDANCE:
+ case ecgMusicBalletDance:
switch (Content & 0x0F) {
default:
case 0x00: return tr("Content$Music/Ballet/Dance");
@@ -323,7 +323,7 @@ const char *cEvent::ContentToString(uchar Content)
case 0x06: return tr("Content$Ballet");
}
break;
- case EVCONTENTMASK_ARTSCULTURE:
+ case ecgArtsCulture:
switch (Content & 0x0F) {
default:
case 0x00: return tr("Content$Arts/Culture");
@@ -340,7 +340,7 @@ const char *cEvent::ContentToString(uchar Content)
case 0x0B: return tr("Content$Fashion");
}
break;
- case EVCONTENTMASK_SOCIALPOLITICALECONOMICS:
+ case ecgSocialPoliticalEconomics:
switch (Content & 0x0F) {
default:
case 0x00: return tr("Content$Social/Political/Economics");
@@ -349,7 +349,7 @@ const char *cEvent::ContentToString(uchar Content)
case 0x03: return tr("Content$Remarkable People");
}
break;
- case EVCONTENTMASK_EDUCATIONALSCIENCE:
+ case ecgEducationalScience:
switch (Content & 0x0F) {
default:
case 0x00: return tr("Content$Education/Science/Factual");
@@ -362,7 +362,7 @@ const char *cEvent::ContentToString(uchar Content)
case 0x07: return tr("Content$Languages");
}
break;
- case EVCONTENTMASK_LEISUREHOBBIES:
+ case ecgLeisureHobbies:
switch (Content & 0x0F) {
default:
case 0x00: return tr("Content$Leisure/Hobbies");
@@ -375,7 +375,7 @@ const char *cEvent::ContentToString(uchar Content)
case 0x07: return tr("Content$Gardening");
}
break;
- case EVCONTENTMASK_SPECIAL:
+ case ecgSpecial:
switch (Content & 0x0F) {
case 0x00: return tr("Content$Original Language");
case 0x01: return tr("Content$Black & White");
@@ -468,7 +468,7 @@ bool cEvent::Parse(char *s)
break;
case 'G': {
memset(contents, 0, sizeof(contents));
- for (int i = 0; i < MAXEVCONTENTS; i++) {
+ for (int i = 0; i < MaxEventContents; i++) {
char *tail = NULL;
int c = strtol(t, &tail, 16);
if (0x00 < c && c <= 0xFF) {
diff --git a/epg.h b/epg.h
index fbc9e061..5555c2e9 100644
--- a/epg.h
+++ b/epg.h
@@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
- * $Id: epg.h 2.3 2010/01/03 14:39:14 kls Exp $
+ * $Id: epg.h 2.4 2010/01/08 15:20:34 kls Exp $
*/
#ifndef __EPG_H
@@ -19,19 +19,22 @@
#define MAXEPGBUGFIXLEVEL 3
-#define MAXEVCONTENTS 4
-#define EVCONTENTMASK_MOVIEDRAMA 0x10
-#define EVCONTENTMASK_NEWSCURRENTAFFAIRS 0x20
-#define EVCONTENTMASK_SHOW 0x30
-#define EVCONTENTMASK_SPORTS 0x40
-#define EVCONTENTMASK_CHILDRENYOUTH 0x50
-#define EVCONTENTMASK_MUSICBALLETDANCE 0x60
-#define EVCONTENTMASK_ARTSCULTURE 0x70
-#define EVCONTENTMASK_SOCIALPOLITICALECONOMICS 0x80
-#define EVCONTENTMASK_EDUCATIONALSCIENCE 0x90
-#define EVCONTENTMASK_LEISUREHOBBIES 0xA0
-#define EVCONTENTMASK_SPECIAL 0xB0
-#define EVCONTENTMASK_USERDEFINED 0xF0
+enum { MaxEventContents = 4 };
+
+enum eEventContentGroup {
+ ecgMovieDrama = 0x10,
+ ecgNewsCurrentAffairs = 0x20,
+ ecgShow = 0x30,
+ ecgSports = 0x40,
+ ecgChildrenYouth = 0x50,
+ ecgMusicBalletDance = 0x60,
+ ecgArtsCulture = 0x70,
+ ecgSocialPoliticalEconomics = 0x80,
+ ecgEducationalScience = 0x90,
+ ecgLeisureHobbies = 0xA0,
+ ecgSpecial = 0xB0,
+ ecgUserDefined = 0xF0
+ };
enum eDumpMode { dmAll, dmPresent, dmFollowing, dmAtTime };
@@ -78,7 +81,7 @@ private:
char *shortText; // Short description of this event (typically the episode name in case of a series)
char *description; // Description of this event
cComponents *components; // The stream components of this event
- uchar contents[MAXEVCONTENTS]; // Contents of this event
+ uchar contents[MaxEventContents]; // Contents of this event
time_t startTime; // Start time of this event
int duration; // Duration of this event in seconds
time_t vps; // Video Programming Service timestamp (VPS, aka "Programme Identification Label", PIL)
@@ -97,7 +100,7 @@ public:
const char *ShortText(void) const { return shortText; }
const char *Description(void) const { return description; }
const cComponents *Components(void) const { return components; }
- uchar Contents(int i = 0) const { return (0 <= i && i < MAXEVCONTENTS) ? contents[i] : 0; }
+ uchar Contents(int i = 0) const { return (0 <= i && i < MaxEventContents) ? contents[i] : 0; }
int ParentalRating(void) const { return parentalRating; }
time_t StartTime(void) const { return startTime; }
time_t EndTime(void) const { return startTime + duration; }