summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2015-03-13 12:12:33 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2015-03-13 12:12:33 +0100
commit70eb639c417b46bc7bac205069feb755e9ade96e (patch)
treefe63cb23abdbcb1a5ae104f779dafde7f05fcf87
parent52b1e2a9ff81edd447de9d721f3df86f8380bc78 (diff)
downloadvdr-70eb639c417b46bc7bac205069feb755e9ade96e.tar.gz
vdr-70eb639c417b46bc7bac205069feb755e9ade96e.tar.bz2
Fixed setting the source value of newly created channels, in case the NIT is received from a different, but very close satellite position
-rw-r--r--HISTORY4
-rw-r--r--channels.c14
-rw-r--r--channels.h3
-rw-r--r--sdt.c3
4 files changed, 20 insertions, 4 deletions
diff --git a/HISTORY b/HISTORY
index 3b4e2b8b..a02066ab 100644
--- a/HISTORY
+++ b/HISTORY
@@ -8596,7 +8596,7 @@ Video Disk Recorder Revision History
- Bumped all version numbers to 2.2.0.
- Official release.
-2015-03-12: Version 2.3.1
+2015-03-13: Version 2.3.1
- The new function cOsd::MaxPixmapSize() can be called to determine the maximum size
a cPixmap may have on the current OSD. The 'osddemo' example has been modified
@@ -8611,3 +8611,5 @@ Video Disk Recorder Revision History
You can get the latest version of this plugin from the author's repository at
https://bitbucket.org/powARman/dvbhddevice.
- Added a section about Output Devices to the INSTALL file.
+- Fixed setting the source value of newly created channels, in case the NIT is
+ received from a different, but very close satellite position.
diff --git a/channels.c b/channels.c
index 564088f4..f8b9e920 100644
--- a/channels.c
+++ b/channels.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: channels.c 3.8 2015/02/01 13:47:05 kls Exp $
+ * $Id: channels.c 4.1 2015/03/13 11:34:28 kls Exp $
*/
#include "channels.h"
@@ -229,6 +229,18 @@ bool cChannel::SetTransponderData(int Source, int Frequency, int Srate, const ch
return true;
}
+void cChannel::SetSource(int Source)
+{
+ if (source != Source) {
+ if (Number()) {
+ dsyslog("changing source of channel %d (%s) from %s to %s", Number(), name, *cSource::ToString(source), *cSource::ToString(Source));
+ modification |= CHANNELMOD_TRANSP;
+ Channels.SetModified();
+ }
+ source = Source;
+ }
+}
+
void cChannel::SetId(int Nid, int Tid, int Sid, int Rid)
{
if (nid != Nid || tid != Tid || sid != Sid || rid != Rid) {
diff --git a/channels.h b/channels.h
index 33238821..95e11952 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 3.3 2015/02/01 13:30:26 kls Exp $
+ * $Id: channels.h 4.1 2015/03/13 11:20:50 kls Exp $
*/
#ifndef __CHANNELS_H
@@ -193,6 +193,7 @@ public:
time_t Seen(void) { return seen; }
void CopyTransponderData(const cChannel *Channel);
bool SetTransponderData(int Source, int Frequency, int Srate, const char *Parameters, bool Quiet = false);
+ void SetSource(int Source);
void SetId(int Nid, int Tid, int Sid, int Rid = 0);
void SetLcn(int Lcn);
void SetName(const char *Name, const char *ShortName, const char *Provider);
diff --git a/sdt.c b/sdt.c
index 4e6748d8..b75a243a 100644
--- a/sdt.c
+++ b/sdt.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: sdt.c 3.4 2015/01/04 14:33:35 kls Exp $
+ * $Id: sdt.c 4.1 2015/03/13 11:39:42 kls Exp $
*/
#include "sdt.h"
@@ -105,6 +105,7 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
}
else if (*pn && Setup.UpdateChannels >= 4) {
channel = Channels.NewChannel(Channel(), pn, ps, pp, sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId());
+ channel->SetSource(source); // in case this comes from a satellite with a slightly different position
patFilter->Trigger(SiSdtService.getServiceId());
}
}