Fixed displaying transponder data when it is modified

This commit is contained in:
Klaus Schmidinger 2008-04-12 13:52:57 +02:00
parent e59c6ac433
commit 0e5bc7773a
4 changed files with 18 additions and 8 deletions

View File

@ -1174,6 +1174,7 @@ Reinhard Nissl <rnissl@gmx.de>
for reporting an invalid access in the section handler when ending VDR for reporting an invalid access in the section handler when ending VDR
for pointing out that cDevice::Transferring() doesn't return the right value in the for pointing out that cDevice::Transferring() doesn't return the right value in the
early stage of channel switching early stage of channel switching
for fixing displaying transponder data when it is modified
Richard Robson <richard_robson@beeb.net> Richard Robson <richard_robson@beeb.net>
for reporting freezing replay if a timer starts while in Transfer Mode from the for reporting freezing replay if a timer starts while in Transfer Mode from the

View File

@ -5738,3 +5738,4 @@ Video Disk Recorder Revision History
Note that the channels.conf file now supports additional parameters, so you may Note that the channels.conf file now supports additional parameters, so you may
want to make sure you have a backup of this file in case you need to go back to want to make sure you have a backup of this file in case you need to go back to
the previous version of VDR! the previous version of VDR!
- Fixed displaying transponder data when it is modified (thanks to Reinhard Nissl).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: channels.c 2.1 2008/04/12 11:02:40 kls Exp $ * $Id: channels.c 2.2 2008/04/12 13:49:12 kls Exp $
*/ */
#include "channels.h" #include "channels.h"
@ -356,7 +356,7 @@ bool cChannel::SetSatTransponderData(int Source, int Frequency, char Polarizatio
Srate = srate; Srate = srate;
if (source != Source || frequency != Frequency || polarization != Polarization || srate != Srate || coderateH != CoderateH || modulation != Modulation || system != System || rollOff != RollOff) { if (source != Source || frequency != Frequency || polarization != Polarization || srate != Srate || coderateH != CoderateH || modulation != Modulation || system != System || rollOff != RollOff) {
cString OldParameters = ParametersToString(); cString OldTransponderData = TransponderDataToString();
source = Source; source = Source;
frequency = Frequency; frequency = Frequency;
polarization = Polarization; polarization = Polarization;
@ -367,7 +367,7 @@ bool cChannel::SetSatTransponderData(int Source, int Frequency, char Polarizatio
rollOff = RollOff; rollOff = RollOff;
schedule = NULL; schedule = NULL;
if (Number()) { if (Number()) {
dsyslog("changing transponder data of channel %d from %d:%s:%s:%d to %d:%s:%s:%d", Number(), frequency, *OldParameters, *cSource::ToString(source), srate, Frequency, *ParametersToString(), *cSource::ToString(Source), Srate); dsyslog("changing transponder data of channel %d from %s to %s", Number(), *OldTransponderData, *TransponderDataToString());
modification |= CHANNELMOD_TRANSP; modification |= CHANNELMOD_TRANSP;
Channels.SetModified(); Channels.SetModified();
} }
@ -378,7 +378,7 @@ bool cChannel::SetSatTransponderData(int Source, int Frequency, char Polarizatio
bool cChannel::SetCableTransponderData(int Source, int Frequency, int Modulation, int Srate, int CoderateH) bool cChannel::SetCableTransponderData(int Source, int Frequency, int Modulation, int Srate, int CoderateH)
{ {
if (source != Source || frequency != Frequency || modulation != Modulation || srate != Srate || coderateH != CoderateH) { if (source != Source || frequency != Frequency || modulation != Modulation || srate != Srate || coderateH != CoderateH) {
cString OldParameters = ParametersToString(); cString OldTransponderData = TransponderDataToString();
source = Source; source = Source;
frequency = Frequency; frequency = Frequency;
modulation = Modulation; modulation = Modulation;
@ -386,7 +386,7 @@ bool cChannel::SetCableTransponderData(int Source, int Frequency, int Modulation
coderateH = CoderateH; coderateH = CoderateH;
schedule = NULL; schedule = NULL;
if (Number()) { if (Number()) {
dsyslog("changing transponder data of channel %d from %d:%s:%s:%d to %d:%s:%s:%d", Number(), frequency, *OldParameters, *cSource::ToString(source), srate, Frequency, *ParametersToString(), *cSource::ToString(Source), Srate); dsyslog("changing transponder data of channel %d from %s to %s", Number(), *OldTransponderData, *TransponderDataToString());
modification |= CHANNELMOD_TRANSP; modification |= CHANNELMOD_TRANSP;
Channels.SetModified(); Channels.SetModified();
} }
@ -397,7 +397,7 @@ bool cChannel::SetCableTransponderData(int Source, int Frequency, int Modulation
bool cChannel::SetTerrTransponderData(int Source, int Frequency, int Bandwidth, int Modulation, int Hierarchy, int CoderateH, int CoderateL, int Guard, int Transmission, int Alpha, int Priority) bool cChannel::SetTerrTransponderData(int Source, int Frequency, int Bandwidth, int Modulation, int Hierarchy, int CoderateH, int CoderateL, int Guard, int Transmission, int Alpha, int Priority)
{ {
if (source != Source || frequency != Frequency || bandwidth != Bandwidth || modulation != Modulation || hierarchy != Hierarchy || coderateH != CoderateH || coderateL != CoderateL || guard != Guard || transmission != Transmission || alpha != Alpha || priority != Priority) { if (source != Source || frequency != Frequency || bandwidth != Bandwidth || modulation != Modulation || hierarchy != Hierarchy || coderateH != CoderateH || coderateL != CoderateL || guard != Guard || transmission != Transmission || alpha != Alpha || priority != Priority) {
cString OldParameters = ParametersToString(); cString OldTransponderData = TransponderDataToString();
source = Source; source = Source;
frequency = Frequency; frequency = Frequency;
bandwidth = Bandwidth; bandwidth = Bandwidth;
@ -411,7 +411,7 @@ bool cChannel::SetTerrTransponderData(int Source, int Frequency, int Bandwidth,
priority = Priority; priority = Priority;
schedule = NULL; schedule = NULL;
if (Number()) { if (Number()) {
dsyslog("changing transponder data of channel %d from %d:%s:%s to %d:%s:%s", Number(), frequency, *OldParameters, *cSource::ToString(source), Frequency, *ParametersToString(), *cSource::ToString(Source)); dsyslog("changing transponder data of channel %d from %s to %s", Number(), *OldTransponderData, *TransponderDataToString());
modification |= CHANNELMOD_TRANSP; modification |= CHANNELMOD_TRANSP;
Channels.SetModified(); Channels.SetModified();
} }
@ -652,6 +652,13 @@ static int PrintParameter(char *p, char Name, int Value)
return Value >= 0 && Value != 999 ? sprintf(p, "%c%d", Name, Value) : 0; return Value >= 0 && Value != 999 ? sprintf(p, "%c%d", Name, Value) : 0;
} }
cString cChannel::TransponderDataToString(void) const
{
if (cSource::IsTerr(source))
return cString::sprintf("%d:%s:%s", frequency, *ParametersToString(), *cSource::ToString(source));
return cString::sprintf("%d:%s:%s:%d", frequency, *ParametersToString(), *cSource::ToString(source), srate);
}
cString cChannel::ParametersToString(void) const cString cChannel::ParametersToString(void) const
{ {
char type = **cSource::ToString(source); char type = **cSource::ToString(source);

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: channels.h 2.1 2008/04/12 10:49:51 kls Exp $ * $Id: channels.h 2.2 2008/04/12 13:46:50 kls Exp $
*/ */
#ifndef __CHANNELS_H #ifndef __CHANNELS_H
@ -156,6 +156,7 @@ private:
mutable const cSchedule *schedule; mutable const cSchedule *schedule;
cLinkChannels *linkChannels; cLinkChannels *linkChannels;
cChannel *refChannel; cChannel *refChannel;
cString TransponderDataToString(void) const;
cString ParametersToString(void) const; cString ParametersToString(void) const;
bool StringToParameters(const char *s); bool StringToParameters(const char *s);
public: public: