diff options
-rw-r--r-- | CONTRIBUTORS | 2 | ||||
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | channels.h | 8 | ||||
-rw-r--r-- | sdt.c | 11 | ||||
-rw-r--r-- | sources.h | 5 |
5 files changed, 23 insertions, 6 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 918a686d..ddea624b 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -603,6 +603,8 @@ Gerhard Steiner <steiner@mail.austria.com> for reporting a problem with newly created timers in case they are not confirmed with "Ok" for reporting an occasional "Broken pipe" error in SVDRP connections + for reporting that some cable channels don't mark short channel names according + to the standard Jaakko Hyvätti <jaakko@hyvatti.iki.fi> for translating OSD texts to the Finnish language @@ -3516,3 +3516,6 @@ Video Disk Recorder Revision History 2005-05-14: Version 1.3.25 - Updated the Estonian OSD texts (thanks to Arthur Konovalov). +- Some cable providers don't mark short channel names according to the standard, + but rather go their own way and use "name>short name". VDR now splits at this + character for cable channels (thanks to Gerhard Steiner for reporting this one). @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: channels.h 1.28 2005/05/07 13:07:09 kls Exp $ + * $Id: channels.h 1.29 2005/05/14 09:31:45 kls Exp $ */ #ifndef __CHANNELS_H @@ -176,9 +176,9 @@ public: int Transmission(void) const { return transmission; } int Guard(void) const { return guard; } int Hierarchy(void) const { return hierarchy; } - bool IsCable(void) const { return (source & cSource::st_Mask) == cSource::stCable; } - bool IsSat(void) const { return (source & cSource::st_Mask) == cSource::stSat; } - bool IsTerr(void) const { return (source & cSource::st_Mask) == cSource::stTerr; } + bool IsCable(void) const { return cSource::IsCable(source); } + bool IsSat(void) const { return cSource::IsSat(source); } + bool IsTerr(void) const { return cSource::IsTerr(source); } tChannelID GetChannelID(void) const; int Modification(int Mask = CHANNELMOD_ALL); bool SetSatTransponderData(int Source, int Frequency, char Polarization, int Srate, int CoderateH); @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: sdt.c 1.13 2004/10/31 12:10:20 kls Exp $ + * $Id: sdt.c 1.14 2005/05/14 09:39:46 kls Exp $ */ #include "sdt.h" @@ -62,6 +62,15 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length sd->serviceName.getText(NameBuf, ShortNameBuf, sizeof(NameBuf), sizeof(ShortNameBuf)); char *pn = compactspace(NameBuf); char *ps = compactspace(ShortNameBuf); + if (!*ps && cSource::IsCable(Source())) { + // Some cable providers don't mark short channel names according to the + // standard, but rather go their own way and use "name>short name": + char *p = strchr(pn, '>'); + if (p && p > pn) { + *p++ = 0; + strcpy(ShortNameBuf, p); + } + } sd->providerName.getText(ProviderNameBuf, sizeof(ProviderNameBuf)); char *pp = compactspace(ProviderNameBuf); if (channel) { @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: sources.h 1.3 2004/12/26 11:59:21 kls Exp $ + * $Id: sources.h 1.4 2005/05/14 09:30:41 kls Exp $ */ #ifndef __SOURCES_H @@ -35,6 +35,9 @@ public: static cString ToString(int Code); static int FromString(const char *s); static int FromData(eSourceType SourceType, int Position = 0, bool East = false); + static bool IsCable(int Code) { return (Code & st_Mask) == stCable; } + static bool IsSat(int Code) { return (Code & st_Mask) == stSat; } + static bool IsTerr(int Code) { return (Code & st_Mask) == stTerr; } }; class cSources : public cConfig<cSource> { |