diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2006-02-26 14:13:30 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2006-02-26 14:13:30 +0100 |
commit | c3f5c97eadb3fc84cd0c25410e2a4bc6eb873ed8 (patch) | |
tree | 17d38599baf7bf9f2918aa22048500e3f54703f5 | |
parent | 168348e7e4025d51e2a9cce5415cbd92a7622a45 (diff) | |
download | vdr-c3f5c97eadb3fc84cd0c25410e2a4bc6eb873ed8.tar.gz vdr-c3f5c97eadb3fc84cd0c25410e2a4bc6eb873ed8.tar.bz2 |
The 'event id' in EPG data has been extended to 32 bit
-rw-r--r-- | CONTRIBUTORS | 2 | ||||
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | epg.c | 8 | ||||
-rw-r--r-- | epg.h | 14 | ||||
-rw-r--r-- | vdr.5 | 8 |
5 files changed, 24 insertions, 11 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 8c8dc59a..9dc97598 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -73,6 +73,8 @@ Matthias Schniedermeyer <ms@citd.de> is currently recording for suggesting to make the SVDRP command LSTT optionally list the channels of the timers with their unique channel ids instead of their numbers + for suggesting to extend the 'event id' in EPG data to 32 bit, so that external tools + can generate ids that don't collide with those from the DVB data stream Miha Setina <mihasetina@softhome.net> for translating OSD texts to the Slovenian language @@ -4407,3 +4407,6 @@ Video Disk Recorder Revision History - Lines tagged with '#' in the 'info.vdr' file of a recording are now silently ignored when reading that file (suggested by Peter Bieringer). Such lines can be used by external tools to store arbitrary information. +- The 'event id' in EPG data has been extended to 32 bit, so that external tools + can generate ids that don't collide with those from the DVB data stream + (suggested by Matthias Schniedermeyer). @@ -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 1.62 2006/02/25 12:30:27 kls Exp $ + * $Id: epg.c 1.63 2006/02/26 13:54:44 kls Exp $ */ #include "epg.h" @@ -97,7 +97,7 @@ tComponent *cComponents::GetComponent(int Index, uchar Stream, uchar Type) // --- cEvent ---------------------------------------------------------------- -cEvent::cEvent(u_int16_t EventID) +cEvent::cEvent(tEventID EventID) { schedule = NULL; eventID = EventID; @@ -133,7 +133,7 @@ tChannelID cEvent::ChannelID(void) const return schedule ? schedule->ChannelID() : tChannelID(); } -void cEvent::SetEventID(u_int16_t EventID) +void cEvent::SetEventID(tEventID EventID) { if (eventID != EventID) { if (schedule) @@ -694,7 +694,7 @@ const cEvent *cSchedule::GetFollowingEvent(void) const return p; } -const cEvent *cSchedule::GetEvent(u_int16_t EventID, time_t StartTime) const +const cEvent *cSchedule::GetEvent(tEventID EventID, time_t StartTime) const { // Returns either the event info with the given EventID or, if that one can't // be found, the one with the given StartTime (or NULL if neither can be found) @@ -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 1.32 2006/02/19 12:51:41 kls Exp $ + * $Id: epg.h 1.33 2006/02/26 13:58:57 kls Exp $ */ #ifndef __EPG_H @@ -47,11 +47,13 @@ public: class cSchedule; +typedef u_int32_t tEventID; + class cEvent : public cListObject { friend class cSchedule; private: cSchedule *schedule; // The Schedule this event belongs to - u_int16_t eventID; // Event ID of this event + tEventID eventID; // Event ID of this event uchar tableID; // Table ID this event came from uchar version; // Version number of section this event came from int runningStatus; // 0=undefined, 1=not running, 2=starts in a few seconds, 3=pausing, 4=running @@ -64,12 +66,12 @@ private: time_t vps; // Video Programming Service timestamp (VPS, aka "Programme Identification Label", PIL) time_t seen; // When this event was last seen in the data stream public: - cEvent(u_int16_t EventID); + cEvent(tEventID EventID); ~cEvent(); virtual int Compare(const cListObject &ListObject) const; tChannelID ChannelID(void) const; const cSchedule *Schedule(void) const { return schedule; } - u_int16_t EventID(void) const { return eventID; } + tEventID EventID(void) const { return eventID; } uchar TableID(void) const { return tableID; } uchar Version(void) const { return version; } int RunningStatus(void) const { return runningStatus; } @@ -89,7 +91,7 @@ public: cString GetTimeString(void) const; cString GetEndTimeString(void) const; cString GetVpsString(void) const; - void SetEventID(u_int16_t EventID); + void SetEventID(tEventID EventID); void SetTableID(uchar TableID); void SetVersion(uchar Version); void SetRunningStatus(int RunningStatus, cChannel *Channel = NULL); @@ -140,7 +142,7 @@ public: const cList<cEvent> *Events(void) const { return &events; } const cEvent *GetPresentEvent(void) const; const cEvent *GetFollowingEvent(void) const; - const cEvent *GetEvent(u_int16_t EventID, time_t StartTime = 0) const; + const cEvent *GetEvent(tEventID EventID, time_t StartTime = 0) const; const cEvent *GetEventAround(time_t Time) const; void Dump(FILE *f, const char *Prefix = "", eDumpMode DumpMode = dmAll, time_t AtTime = 0) const; static bool Read(FILE *f, cSchedules *Schedules); @@ -8,7 +8,7 @@ .\" License as specified in the file COPYING that comes with the .\" vdr distribution. .\" -.\" $Id: vdr.5 1.53 2006/02/26 12:01:21 kls Exp $ +.\" $Id: vdr.5 1.54 2006/02/26 14:10:00 kls Exp $ .\" .TH vdr 5 "19 Feb 2006" "1.3.43" "Video Disk Recorder Files" .SH NAME @@ -632,6 +632,7 @@ tab (@); l l. <channel id> @is the "channel ID", made up from the parameters defined in 'channels.conf' <channel name> @is the "name" as in 'channels.conf' (for information only, may be left out) +<event id> @is a 32 bit unsigned int, uniquely identifying this event <start time> @is the time (as a time_t integer) in UTC when this event starts <duration> @is the time (in seconds) that this event will take <table id> @is a hex number that indicates the table this event is contained in (if this is left empty or 0 this event will not be overwritten or modified by data that comes from the DVB stream) @@ -648,6 +649,11 @@ l l. This file will be read at program startup in order to restore the results of previous EPG scans. + +Note that the \fBevent id\fR that comes from the DVB data stream is actually +just 16 bit wide. The internal representation in VDR allows for 32 bit to +be used, so that external tools can generate EPG data that is guaranteed +not to collide with the ids of existing data. .SH SEE ALSO .BR vdr (1) .SH AUTHOR |