Added 'Update channels' setup parameter

This commit is contained in:
Klaus Schmidinger 2004-01-05 12:08:09 +01:00
parent eab7806f20
commit 6096500940
8 changed files with 104 additions and 11 deletions

View File

@ -2546,3 +2546,7 @@ Video Disk Recorder Revision History
Lauri Tischler for reporting this one).
- Fixed a warning about character comparison in libsi/si.c (thanks to Lauri
Tischler for reporting this one).
- The new parameter "Update channels" in the "Setup/DVB" menu can be used to
control if and how channels will be automatically updated (see MANUAL).
This has already been part of the 'autopid' patch by Andreas Schultz and has
now been adopted.

5
MANUAL
View File

@ -498,6 +498,11 @@ Version 1.2
Video format = 4:3 The video format (or aspect ratio) of the tv set in use
(4:3 or 16:9).
Update channels = 3 Controls the automatic channel update function. '0' means
no update, '1' will only update channel names, '2' will
update channel names and PIDs, and '3' will perform all
updates and also add newly found channels.
LNB:
SLOF = 11700 The switching frequency (in MHz) between low and

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: config.c 1.117 2003/10/17 14:11:27 kls Exp $
* $Id: config.c 1.118 2004/01/05 11:45:40 kls Exp $
*/
#include "config.h"
@ -272,6 +272,7 @@ cSetup::cSetup(void)
UseSubtitle = 1;
RecordingDirs = 1;
VideoFormat = 0;
UpdateChannels = 3;
RecordDolbyDigital = 1;
ChannelInfoPos = 0;
OSDwidth = 52;
@ -424,6 +425,7 @@ bool cSetup::Parse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "UseSubtitle")) UseSubtitle = atoi(Value);
else if (!strcasecmp(Name, "RecordingDirs")) RecordingDirs = atoi(Value);
else if (!strcasecmp(Name, "VideoFormat")) VideoFormat = atoi(Value);
else if (!strcasecmp(Name, "UpdateChannels")) UpdateChannels = atoi(Value);
else if (!strcasecmp(Name, "RecordDolbyDigital")) RecordDolbyDigital = atoi(Value);
else if (!strcasecmp(Name, "ChannelInfoPos")) ChannelInfoPos = atoi(Value);
else if (!strcasecmp(Name, "OSDwidth")) OSDwidth = atoi(Value);
@ -474,6 +476,7 @@ bool cSetup::Save(void)
Store("UseSubtitle", UseSubtitle);
Store("RecordingDirs", RecordingDirs);
Store("VideoFormat", VideoFormat);
Store("UpdateChannels", UpdateChannels);
Store("RecordDolbyDigital", RecordDolbyDigital);
Store("ChannelInfoPos", ChannelInfoPos);
Store("OSDwidth", OSDwidth);

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: config.h 1.180 2004/01/05 10:05:57 kls Exp $
* $Id: config.h 1.181 2004/01/05 11:31:54 kls Exp $
*/
#ifndef __CONFIG_H
@ -227,6 +227,7 @@ public:
int UseSubtitle;
int RecordingDirs;
int VideoFormat;
int UpdateChannels;
int RecordDolbyDigital;
int ChannelInfoPos;
int OSDwidth, OSDheight;

70
i18n.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: i18n.c 1.137 2003/12/13 11:09:17 kls Exp $
* $Id: i18n.c 1.138 2004/01/05 11:56:24 kls Exp $
*
* Translations provided by:
*
@ -2261,6 +2261,74 @@ const tI18nPhrase Phrases[] = {
"Video formátum",
"Format del vídeo",
},
{ "Setup.DVB$Update channels",
"Kanäle aktualisieren",
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
},
{ "names only",
"nur Namen",
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
},
{ "names and PIDs",
"Namen und PIDs",
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
},
{ "add new channels",
"neue Kanäle hinzufügen",
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
},
{ "Setup.LNB$SLOF (MHz)",
"SLOF (MHz)",
"Frekvenca preklopa (MHz)",

10
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: menu.c 1.276 2004/01/04 11:12:43 kls Exp $
* $Id: menu.c 1.277 2004/01/05 11:51:33 kls Exp $
*/
#include "menu.h"
@ -2045,6 +2045,8 @@ cMenuSetupEPG::cMenuSetupEPG(void)
// --- cMenuSetupDVB ---------------------------------------------------------
class cMenuSetupDVB : public cMenuSetupBase {
private:
const char *updateChannelsTexts[4];
public:
cMenuSetupDVB(void);
virtual eOSState ProcessKey(eKeys Key);
@ -2052,9 +2054,15 @@ public:
cMenuSetupDVB::cMenuSetupDVB(void)
{
updateChannelsTexts[0] = tr("no");
updateChannelsTexts[1] = tr("names only");
updateChannelsTexts[2] = tr("names and PIDs");
updateChannelsTexts[3] = tr("add new channels");
SetSection(tr("DVB"));
Add(new cMenuEditIntItem( tr("Setup.DVB$Primary DVB interface"), &data.PrimaryDVB, 1, cDevice::NumDevices()));
Add(new cMenuEditBoolItem(tr("Setup.DVB$Video format"), &data.VideoFormat, "4:3", "16:9"));
Add(new cMenuEditStraItem(tr("Setup.DVB$Update channels"), &data.UpdateChannels, 4, updateChannelsTexts));
}
eOSState cMenuSetupDVB::ProcessKey(eKeys Key)

10
pat.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: pat.c 1.3 2004/01/04 12:27:06 kls Exp $
* $Id: pat.c 1.4 2004/01/05 11:42:30 kls Exp $
*/
#include "pat.h"
@ -368,9 +368,11 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
delete d;
}
}
Channel->SetPids(Vpid, Ppid, Apids[0], Apids[1], Dpids[0], Dpids[1], Tpid);
Channel->SetCaIds(CaDescriptors->CaIds());
Channel->SetCaDescriptors(CaDescriptorHandler.AddCaDescriptors(CaDescriptors));
if (Setup.UpdateChannels >= 2) {
Channel->SetPids(Vpid, Ppid, Apids[0], Apids[1], Dpids[0], Dpids[1], Tpid);
Channel->SetCaIds(CaDescriptors->CaIds());
Channel->SetCaDescriptors(CaDescriptorHandler.AddCaDescriptors(CaDescriptors));
}
}
lastPmtScan = 0; // this triggers the next scan
Channels.Unlock();

8
sdt.c
View File

@ -4,11 +4,12 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: sdt.c 1.1 2004/01/04 11:54:42 kls Exp $
* $Id: sdt.c 1.2 2004/01/05 11:40:24 kls Exp $
*/
#include "sdt.h"
#include "channels.h"
#include "config.h"
#include "libsi/section.h"
#include "libsi/descriptor.h"
@ -80,14 +81,15 @@ cSDT::cSDT(int Source, int Transponder, uchar &lastSdtVersion, cPatFilter *PatFi
}
if (Channel) {
Channel->SetId(getOriginalNetworkId(), getTransportStreamId(), SiSdtService.getServiceId());
Channel->SetName(pn);
if (Setup.UpdateChannels >= 1)
Channel->SetName(pn);
// Using SiSdtService.getFreeCaMode() is no good, because some
// tv stations set this flag even for non-encrypted channels :-(
// The special value 0xFFFF was supposed to mean "unknown encryption"
// and would have been overwritten with real CA values later:
// Channel->SetCa(SiSdtService.getFreeCaMode() ? 0xFFFF : 0);
}
else if (*pn) {
else if (*pn && Setup.UpdateChannels >= 3) {
Channel = Channels.NewChannel(Source, Transponder, pn, getOriginalNetworkId(), getTransportStreamId(), SiSdtService.getServiceId());
PatFilter->Trigger();
}