diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 8c8dc59a..9dc97598 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -73,6 +73,8 @@ Matthias Schniedermeyer 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 for translating OSD texts to the Slovenian language diff --git a/HISTORY b/HISTORY index 4c804eef..75bef2ca 100644 --- a/HISTORY +++ b/HISTORY @@ -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). diff --git a/epg.c b/epg.c index 6c8fea0e..a8328a8b 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 and Rolf Hakenes . * - * $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) diff --git a/epg.h b/epg.h index fa80474e..1def6176 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 and Rolf Hakenes . * - * $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 *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); diff --git a/vdr.5 b/vdr.5 index 7eed461d..e167965a 100644 --- a/vdr.5 +++ b/vdr.5 @@ -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. @is the "channel ID", made up from the parameters defined in 'channels.conf' @is the "name" as in 'channels.conf' (for information only, may be left out) + @is a 32 bit unsigned int, uniquely identifying this event @is the time (as a time_t integer) in UTC when this event starts @is the time (in seconds) that this event will take @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