Fixed setting the time from the DVB data stream

This commit is contained in:
Klaus Schmidinger 2004-05-16 12:58:04 +02:00
parent 26b43bde81
commit 38c8159730
7 changed files with 26 additions and 11 deletions

View File

@ -475,6 +475,8 @@ J
Helmut Auer <vdr@helmutauer.de>
for reporting a superfluous error message in cLockFile
for suggesting to make the "Zap timeout" a setup variable
for fixing a frequency/transponder handling mixup when setting the time from the
DVB data stream
Jeremy Hall <jhall@UU.NET>
for fixing an incomplete initialization of the filter parameters in eit.c

View File

@ -2799,3 +2799,8 @@ Video Disk Recorder Revision History
going wrong here...
- Added missing NULL checks when accessing sectionHandler in device.c (thanks to
Pekka Virtanen).
- Fixed setting the time from the DVB data stream (thanks to Helmut Auer for
pointing out a frequency/transponder handling mixup). This now also takes the
actual source (sat, cable etc.) into account. Please go into "Setup/EPG" and
set the "Set system time" and "Use time from transponder" parameters accordingly
(this is necessary even if you have already set them before!).

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.126 2004/05/16 10:08:09 kls Exp $
* $Id: config.c 1.127 2004/05/16 12:43:55 kls Exp $
*/
#include "config.h"
@ -258,6 +258,7 @@ cSetup::cSetup(void)
LnbFrequHi = 10600;
DiSEqC = 0;
SetSystemTime = 0;
TimeSource = 0;
TimeTransponder = 0;
MarginStart = 2;
MarginStop = 10;
@ -410,6 +411,7 @@ bool cSetup::Parse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "LnbFrequHi")) LnbFrequHi = atoi(Value);
else if (!strcasecmp(Name, "DiSEqC")) DiSEqC = atoi(Value);
else if (!strcasecmp(Name, "SetSystemTime")) SetSystemTime = atoi(Value);
else if (!strcasecmp(Name, "TimeSource")) TimeSource = cSource::FromString(Value);
else if (!strcasecmp(Name, "TimeTransponder")) TimeTransponder = atoi(Value);
else if (!strcasecmp(Name, "MarginStart")) MarginStart = atoi(Value);
else if (!strcasecmp(Name, "MarginStop")) MarginStop = atoi(Value);
@ -469,6 +471,7 @@ bool cSetup::Save(void)
Store("LnbFrequHi", LnbFrequHi);
Store("DiSEqC", DiSEqC);
Store("SetSystemTime", SetSystemTime);
Store("TimeSource", cSource::ToString(TimeSource));
Store("TimeTransponder", TimeTransponder);
Store("MarginStart", MarginStart);
Store("MarginStop", MarginStop);

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.192 2004/05/08 09:18:36 kls Exp $
* $Id: config.h 1.193 2004/05/16 12:41:43 kls Exp $
*/
#ifndef __CONFIG_H
@ -219,6 +219,7 @@ public:
int LnbFrequHi;
int DiSEqC;
int SetSystemTime;
int TimeSource;
int TimeTransponder;
int MarginStart, MarginStop;
int EPGLanguages[I18nNumLanguages + 1];

4
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.299 2004/05/15 14:15:33 kls Exp $
* $Id: menu.c 1.300 2004/05/16 12:47:22 kls Exp $
*/
#include "menu.h"
@ -1795,7 +1795,7 @@ void cMenuSetupEPG::Setup(void)
Add(new cMenuEditIntItem( tr("Setup.EPG$EPG linger time (min)"), &data.EPGLinger, 0));
Add(new cMenuEditBoolItem(tr("Setup.EPG$Set system time"), &data.SetSystemTime));
if (data.SetSystemTime)
Add(new cMenuEditTranItem(tr("Setup.EPG$Use time from transponder"), &data.TimeTransponder));
Add(new cMenuEditTranItem(tr("Setup.EPG$Use time from transponder"), &data.TimeTransponder, &data.TimeSource));
Add(new cMenuEditIntItem( tr("Setup.EPG$Preferred languages"), &numLanguages, 0, I18nNumLanguages));
for (int i = 0; i < numLanguages; i++)
Add(new cMenuEditStraItem(tr("Setup.EPG$Preferred language"), &data.EPGLanguages[i], I18nNumLanguages, I18nLanguages()));

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: menuitems.c 1.17 2004/05/02 10:37:34 kls Exp $
* $Id: menuitems.c 1.18 2004/05/16 12:47:02 kls Exp $
*/
#include "menuitems.h"
@ -502,14 +502,15 @@ eOSState cMenuEditChanItem::ProcessKey(eKeys Key)
// --- cMenuEditTranItem -----------------------------------------------------
cMenuEditTranItem::cMenuEditTranItem(const char *Name, int *Value)
cMenuEditTranItem::cMenuEditTranItem(const char *Name, int *Value, int *Source)
:cMenuEditChanItem(Name, Value)
{
number = 0;
source = Source;
transponder = *Value;
cChannel *channel = Channels.First();
while (channel) {
if (!channel->GroupSep() && ISTRANSPONDER(channel->Frequency(), *Value)) {
if (!channel->GroupSep() && *source == channel->Source() && ISTRANSPONDER(channel->Transponder(), *Value)) {
number = channel->Number();
break;
}
@ -526,8 +527,10 @@ eOSState cMenuEditTranItem::ProcessKey(eKeys Key)
eOSState state = cMenuEditChanItem::ProcessKey(Key);
number = *value;
cChannel *channel = Channels.GetByNumber(*value);
if (channel)
transponder = channel->Frequency();
if (channel) {
*source = channel->Source();
transponder = channel->Transponder();
}
*value = transponder;
return state;
}

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: menuitems.h 1.8 2004/04/30 13:45:28 kls Exp $
* $Id: menuitems.h 1.9 2004/05/16 12:45:14 kls Exp $
*/
#ifndef __MENUITEMS_H
@ -111,9 +111,10 @@ public:
class cMenuEditTranItem : public cMenuEditChanItem {
private:
int number;
int *source;
int transponder;
public:
cMenuEditTranItem(const char *Name, int *Value);
cMenuEditTranItem(const char *Name, int *Value, int *Source);
virtual eOSState ProcessKey(eKeys Key);
};