From 8b5d4040832f9a11119002fef5144a7d6705f19c Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 10 Nov 2002 18:00:00 +0100 Subject: Version 1.1.16 - Fixed saving the polarization parameter of channels that have a number in the 'source' parameter (thanks to Peter Seyringer for reporting this one). - Updated 'channels.conf.terr' (thanks to Andy Carter). - Updated 'channels.conf.cable' (thanks to Achim Lange). - First step towards a "unique channel ID". The channel ID is a human readable string, made up from several parameters of the channel's definition in the file 'channels.conf' (see man vdr(5) for details). In order for the "unique channel ID" to work, all channel definitions now must be unique with respect to the combination of their Source, Frequency and SID parameters. You may have to fix your 'channels.conf' manually if there are error messages in the log file when loading it. BE SURE TO MAKE A BACKUP COPY OF YOUR 'channels.conf' AND 'timers.conf' FILE BEFORE SWITCHING TO THIS VERSION, AND CHECK VERY CAREFULLY WHETHER YOUR TIMERS ARE STILL SET TO THE RIGHT CHANNELS! When reading an existing 'timers.conf', the channels will be identified as before by their numbers. As soon as this file is written back, the channel numbers will be replaced by the channel IDs. After that it is possible to manually edit the 'channels.conf' file and rearrange the channels without breaking the timers. Note that you can still define new timers manually by using the channel number. VDR will correctly identify the 'channel' parameter in a timer definition and use it as a channel number or a channel ID, respectively. Also, the SVDRP commands that return timer definitions will list them with channel numbers in order to stay compatible with existing applications. The channel ID is also used in the 'epg.data' file to allow EPG information from different sources to be stored, which would previously have been mixed up in case they were using the same 'service ID'. Note that the contents of an existing 'epg.data' file from a previous version will be silently ignored, since it doesn't contain the new channel IDs. When inserting EPG data into VDR via SVDRP you now also need to use the channel IDs. Currently the EPG data received from the DVB data stream only uses the 'Source' and 'Service ID' part of the channel ID. This makes it work for channels with the same service IDs on different sources (like satellites, cable or terrestrial). However, it doesn't work yet if the service IDs are not unique within a specific source. This will be fixed later. - Added missing SID parameters to 'channels.conf'. Some channels have been removed since they are apparently no longer broadcasted. - Removed dropping EPG events from "other" streams that have a duration of 86400 seconds or more (was introduced in version 1.1.10). This has become obsolete by the modification in version 1.1.13, which fixed fetching the current/next information to handle cases where the duration of an event is set wrongly and would last beyond the start time of the next event. Besides, the change in 1.1.10 broke handling EPG data for NVOD channels. - Fixed a compiler warning regarding cMenuChannels::Del() and MenuTimers::Del() hiding the base class virtual functions. --- channels.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'channels.h') diff --git a/channels.h b/channels.h index 7eb818c..52e79b4 100644 --- a/channels.h +++ b/channels.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: channels.h 1.3 2002/10/20 11:50:36 kls Exp $ + * $Id: channels.h 1.4 2002/11/10 13:01:23 kls Exp $ */ #ifndef __CHANNELS_H @@ -41,6 +41,7 @@ private: static char *buffer; static const char *ToText(cChannel *Channel); enum { MaxChannelName = 32 }; // 31 chars + terminating 0! + int __BeginData__; char name[MaxChannelName]; int frequency; // MHz int source; @@ -53,7 +54,6 @@ private: int sid; int number; // Sequence number assigned on load bool groupSep; - //XXX char polarization; int inversion; int bandwidth; @@ -63,13 +63,14 @@ private: int transmission; int guard; int hierarchy; + int __EndData__; const char *ParametersToString(void); bool StringToParameters(const char *s); public: cChannel(void); - cChannel(const cChannel *Channel); + cChannel& operator= (const cChannel &Channel); const char *ToText(void); - bool Parse(const char *s); + bool Parse(const char *s, bool AllowNonUniqueID = false); bool Save(FILE *f); const char *Name(void) const { return name; } int Frequency(void) const { return frequency; } @@ -86,7 +87,6 @@ public: int Number(void) const { return number; } void SetNumber(int Number) { number = Number; } bool GroupSep(void) const { return groupSep; } - //XXX char Polarization(void) const { return polarization; } int Inversion(void) const { return inversion; } int Bandwidth(void) const { return bandwidth; } @@ -96,10 +96,12 @@ public: int Transmission(void) const { return transmission; } int Guard(void) const { return guard; } int Hierarchy(void) const { return hierarchy; } - //XXX bool IsCable(void) { return (source & cSource::st_Mask) == cSource::stCable; } bool IsSat(void) { return (source & cSource::st_Mask) == cSource::stSat; } bool IsTerr(void) { return (source & cSource::st_Mask) == cSource::stTerr; } + uint64 GetChannelID(void) const; + const char *GetChannelIDStr(void) const; + static uint64 StringToChannelID(const char *s); }; class cChannels : public cConfig { @@ -113,7 +115,9 @@ public: int GetNextNormal(int Idx); // Get next normal channel (not group) void ReNumber(void); // Recalculate 'number' based on channel type cChannel *GetByNumber(int Number, int SkipGap = 0); - cChannel *GetByServiceID(unsigned short ServiceId); + cChannel *GetByServiceID(int Source, unsigned short ServiceID); + cChannel *GetByChannelID(uint64 ChannelID); + bool HasUniqueChannelID(cChannel *NewChannel, cChannel *OldChannel = NULL); bool SwitchTo(int Number); int MaxNumber(void) { return maxNumber; } }; -- cgit v1.2.3