1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

The 'event id' in EPG data has been extended to 32 bit

This commit is contained in:
Klaus Schmidinger 2006-02-26 14:13:30 +01:00
parent 168348e7e4
commit c3f5c97ead
5 changed files with 24 additions and 11 deletions

View File

@ -73,6 +73,8 @@ Matthias Schniedermeyer <ms@citd.de>
is currently recording is currently recording
for suggesting to make the SVDRP command LSTT optionally list the channels for suggesting to make the SVDRP command LSTT optionally list the channels
of the timers with their unique channel ids instead of their numbers 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> Miha Setina <mihasetina@softhome.net>
for translating OSD texts to the Slovenian language for translating OSD texts to the Slovenian language

View File

@ -4407,3 +4407,6 @@ Video Disk Recorder Revision History
- Lines tagged with '#' in the 'info.vdr' file of a recording are now silently - 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 ignored when reading that file (suggested by Peter Bieringer). Such lines can
be used by external tools to store arbitrary information. 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).

8
epg.c
View File

@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by * Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * 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" #include "epg.h"
@ -97,7 +97,7 @@ tComponent *cComponents::GetComponent(int Index, uchar Stream, uchar Type)
// --- cEvent ---------------------------------------------------------------- // --- cEvent ----------------------------------------------------------------
cEvent::cEvent(u_int16_t EventID) cEvent::cEvent(tEventID EventID)
{ {
schedule = NULL; schedule = NULL;
eventID = EventID; eventID = EventID;
@ -133,7 +133,7 @@ tChannelID cEvent::ChannelID(void) const
return schedule ? schedule->ChannelID() : tChannelID(); return schedule ? schedule->ChannelID() : tChannelID();
} }
void cEvent::SetEventID(u_int16_t EventID) void cEvent::SetEventID(tEventID EventID)
{ {
if (eventID != EventID) { if (eventID != EventID) {
if (schedule) if (schedule)
@ -694,7 +694,7 @@ const cEvent *cSchedule::GetFollowingEvent(void) const
return p; 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 // 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) // be found, the one with the given StartTime (or NULL if neither can be found)

14
epg.h
View File

@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by * Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * 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 #ifndef __EPG_H
@ -47,11 +47,13 @@ public:
class cSchedule; class cSchedule;
typedef u_int32_t tEventID;
class cEvent : public cListObject { class cEvent : public cListObject {
friend class cSchedule; friend class cSchedule;
private: private:
cSchedule *schedule; // The Schedule this event belongs to 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 tableID; // Table ID this event came from
uchar version; // Version number of section 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 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 vps; // Video Programming Service timestamp (VPS, aka "Programme Identification Label", PIL)
time_t seen; // When this event was last seen in the data stream time_t seen; // When this event was last seen in the data stream
public: public:
cEvent(u_int16_t EventID); cEvent(tEventID EventID);
~cEvent(); ~cEvent();
virtual int Compare(const cListObject &ListObject) const; virtual int Compare(const cListObject &ListObject) const;
tChannelID ChannelID(void) const; tChannelID ChannelID(void) const;
const cSchedule *Schedule(void) const { return schedule; } 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 TableID(void) const { return tableID; }
uchar Version(void) const { return version; } uchar Version(void) const { return version; }
int RunningStatus(void) const { return runningStatus; } int RunningStatus(void) const { return runningStatus; }
@ -89,7 +91,7 @@ public:
cString GetTimeString(void) const; cString GetTimeString(void) const;
cString GetEndTimeString(void) const; cString GetEndTimeString(void) const;
cString GetVpsString(void) const; cString GetVpsString(void) const;
void SetEventID(u_int16_t EventID); void SetEventID(tEventID EventID);
void SetTableID(uchar TableID); void SetTableID(uchar TableID);
void SetVersion(uchar Version); void SetVersion(uchar Version);
void SetRunningStatus(int RunningStatus, cChannel *Channel = NULL); void SetRunningStatus(int RunningStatus, cChannel *Channel = NULL);
@ -140,7 +142,7 @@ public:
const cList<cEvent> *Events(void) const { return &events; } const cList<cEvent> *Events(void) const { return &events; }
const cEvent *GetPresentEvent(void) const; const cEvent *GetPresentEvent(void) const;
const cEvent *GetFollowingEvent(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; const cEvent *GetEventAround(time_t Time) const;
void Dump(FILE *f, const char *Prefix = "", eDumpMode DumpMode = dmAll, time_t AtTime = 0) const; void Dump(FILE *f, const char *Prefix = "", eDumpMode DumpMode = dmAll, time_t AtTime = 0) const;
static bool Read(FILE *f, cSchedules *Schedules); static bool Read(FILE *f, cSchedules *Schedules);

8
vdr.5
View File

@ -8,7 +8,7 @@
.\" License as specified in the file COPYING that comes with the .\" License as specified in the file COPYING that comes with the
.\" vdr distribution. .\" 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" .TH vdr 5 "19 Feb 2006" "1.3.43" "Video Disk Recorder Files"
.SH NAME .SH NAME
@ -632,6 +632,7 @@ tab (@);
l l. l l.
<channel id> @is the "channel ID", made up from the parameters defined in 'channels.conf' <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) <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 <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 <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) <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 This file will be read at program startup in order to restore the results of
previous EPG scans. 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 .SH SEE ALSO
.BR vdr (1) .BR vdr (1)
.SH AUTHOR .SH AUTHOR