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

Now scanning new transponders before old ones, to make sure transponder changes are recognized

This commit is contained in:
Klaus Schmidinger 2011-08-12 14:37:25 +02:00
parent d2e0898d64
commit 67e7f93d29
4 changed files with 19 additions and 6 deletions

View File

@ -1273,6 +1273,8 @@ Reinhard Nissl <rnissl@gmx.de>
for avoiding an unecessary call to Recordings.ResetResume() for avoiding an unecessary call to Recordings.ResetResume()
for debugging a problem in handling the bitmap color depth for scaled subtitles for debugging a problem in handling the bitmap color depth for scaled subtitles
for making subtitle PIDs be decrypted for making subtitle PIDs be decrypted
for making cEITScanner process new transponders before old ones, to make sure
transponder changes are recognized
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

@ -6676,3 +6676,5 @@ Video Disk Recorder Revision History
- Fixed handling the channelID in cMenuEditChanItem (thanks to Udo Richter). - Fixed handling the channelID in cMenuEditChanItem (thanks to Udo Richter).
- cStringList::Sort() can now be called with a boolean parameter that controls - cStringList::Sort() can now be called with a boolean parameter that controls
case insensitive sorting (suggested by Sundararaj Reel). case insensitive sorting (suggested by Sundararaj Reel).
- Now scanning new transponders before old ones, to make sure transponder changes
are recognized (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: eitscan.c 2.1 2010/02/07 12:12:05 kls Exp $ * $Id: eitscan.c 2.2 2011/08/12 14:18:04 kls Exp $
*/ */
#include "eitscan.h" #include "eitscan.h"
@ -133,12 +133,12 @@ void cEITScanner::Process(void)
if (Channels.Lock(false, 10)) { if (Channels.Lock(false, 10)) {
if (!scanList) { if (!scanList) {
scanList = new cScanList; scanList = new cScanList;
scanList->AddTransponders(&Channels);
if (transponderList) { if (transponderList) {
scanList->AddTransponders(transponderList); scanList->AddTransponders(transponderList);
delete transponderList; delete transponderList;
transponderList = NULL; transponderList = NULL;
} }
scanList->AddTransponders(&Channels);
} }
bool AnyDeviceSwitched = false; bool AnyDeviceSwitched = false;
for (int i = 0; i < cDevice::NumDevices(); i++) { for (int i = 0; i < cDevice::NumDevices(); i++) {

17
nit.c
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: nit.c 2.5 2010/02/16 15:37:05 kls Exp $ * $Id: nit.c 2.6 2011/08/12 14:27:31 kls Exp $
*/ */
#include "nit.h" #include "nit.h"
@ -150,6 +150,7 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
} }
if (Setup.UpdateChannels >= 5) { if (Setup.UpdateChannels >= 5) {
bool found = false; bool found = false;
bool forceTransponderUpdate = false;
for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) { for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) {
if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) { if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) {
int transponder = Channel->Transponder(); int transponder = Channel->Transponder();
@ -164,9 +165,11 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
} }
if (ISTRANSPONDER(cChannel::Transponder(Frequency, dtp.Polarization()), Transponder())) // only modify channels if we're actually receiving this transponder if (ISTRANSPONDER(cChannel::Transponder(Frequency, dtp.Polarization()), Transponder())) // only modify channels if we're actually receiving this transponder
Channel->SetTransponderData(Source, Frequency, SymbolRate, dtp.ToString('S')); Channel->SetTransponderData(Source, Frequency, SymbolRate, dtp.ToString('S'));
else if (Channel->Srate() != SymbolRate || strcmp(Channel->Parameters(), dtp.ToString('S')))
forceTransponderUpdate = true; // get us receiving this transponder
} }
} }
if (!found) { if (!found || forceTransponderUpdate) {
for (int n = 0; n < NumFrequencies; n++) { for (int n = 0; n < NumFrequencies; n++) {
cChannel *Channel = new cChannel; cChannel *Channel = new cChannel;
Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0); Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0);
@ -202,6 +205,7 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
} }
if (Setup.UpdateChannels >= 5) { if (Setup.UpdateChannels >= 5) {
bool found = false; bool found = false;
bool forceTransponderUpdate = false;
for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) { for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) {
if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) { if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) {
int transponder = Channel->Transponder(); int transponder = Channel->Transponder();
@ -216,9 +220,11 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
} }
if (ISTRANSPONDER(Frequency / 1000, Transponder())) // only modify channels if we're actually receiving this transponder if (ISTRANSPONDER(Frequency / 1000, Transponder())) // only modify channels if we're actually receiving this transponder
Channel->SetTransponderData(Source, Frequency, SymbolRate, dtp.ToString('C')); Channel->SetTransponderData(Source, Frequency, SymbolRate, dtp.ToString('C'));
else if (Channel->Srate() != SymbolRate || strcmp(Channel->Parameters(), dtp.ToString('C')))
forceTransponderUpdate = true; // get us receiving this transponder
} }
} }
if (!found) { if (!found || forceTransponderUpdate) {
for (int n = 0; n < NumFrequencies; n++) { for (int n = 0; n < NumFrequencies; n++) {
cChannel *Channel = new cChannel; cChannel *Channel = new cChannel;
Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0); Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0);
@ -261,6 +267,7 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
} }
if (Setup.UpdateChannels >= 5) { if (Setup.UpdateChannels >= 5) {
bool found = false; bool found = false;
bool forceTransponderUpdate = false;
for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) { for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) {
if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) { if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) {
int transponder = Channel->Transponder(); int transponder = Channel->Transponder();
@ -275,9 +282,11 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
} }
if (ISTRANSPONDER(Frequency / 1000000, Transponder())) // only modify channels if we're actually receiving this transponder if (ISTRANSPONDER(Frequency / 1000000, Transponder())) // only modify channels if we're actually receiving this transponder
Channel->SetTransponderData(Source, Frequency, 0, dtp.ToString('T')); Channel->SetTransponderData(Source, Frequency, 0, dtp.ToString('T'));
else if (strcmp(Channel->Parameters(), dtp.ToString('T')))
forceTransponderUpdate = true; // get us receiving this transponder
} }
} }
if (!found) { if (!found || forceTransponderUpdate) {
for (int n = 0; n < NumFrequencies; n++) { for (int n = 0; n < NumFrequencies; n++) {
cChannel *Channel = new cChannel; cChannel *Channel = new cChannel;
Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0); Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0);