summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-08-17 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-08-17 18:00:00 +0200
commit5f5dfd7f69963abcdcceed88e649c83e6ea5709e (patch)
tree6e39ad2cd329b1a361e8030c8a6c2ac9be91a44d /vdr.c
parent6c2c3ace8bfe8918b516cc155fbf1104baa107f9 (diff)
downloadvdr-patch-lnbsharing-5f5dfd7f69963abcdcceed88e649c83e6ea5709e.tar.gz
vdr-patch-lnbsharing-5f5dfd7f69963abcdcceed88e649c83e6ea5709e.tar.bz2
Version 1.2.3 (not officially released)vdr-1.2.3
- Fixed the TS to PES repacker so that it works with MPEG1 streams (thanks to Andreas Kool). - Fixed keeping track of the current channel number when moving channels in the "Channels" menu (thanks to Mirko Günther for reporting this one). - Made the plugin library directory configurable via Make.config (thanks to Ludwig Nussel). - Fixed scaling SPU bitmaps in Letterbox mode when playing NTSC material. In order to do this, the cDevice was given a new member function GetVideoSystem(). - Fixed two warnings when compiling with gcc 3.3.1 (thanks to Alfred Zastrow for reporting this). - Made crc32() a static function in libdtv/libsi/si_parser.c to avoid a name clash when using other libraries that also implement a function by that name (thanks to Reinhard Nissl for reporting this one). - Fixed staying off the end of an ongoing recording while replaying in time shift mode (thanks to Rainer Zocholl for reporting this one). - VDR now stops with exit status 2 if one of the configuration files can't be read correctly at program startup (suggested by Rainer Zocholl). - Fixed a crash when starting "Pause live video" twice within the same minute on the same channel. - Fixed freezing replay if a timer starts while in Transfer Mode from the device used by the timer, and the timer needs a different transponder (thanks to Richard Robson for reporting this one). - Fixed toggling channels with the '0' key (thanks to Mirko Günther for reporting this one). - Made the "Zap timeout" (the time until a channel counts as "previous" for switching with '0') a setup variable, available in "Setup/Miscellaneous" (suggested by Helmut Auer). - Removing deleted recordings faster than normal when cutting, to avoid running out of disk space (thanks to Manfred Schmidt-Voigt for reporting this one).
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c43
1 files changed, 21 insertions, 22 deletions
diff --git a/vdr.c b/vdr.c
index 16e8bdd..48ed627 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/vdr
*
- * $Id: vdr.c 1.162 2003/08/02 14:01:32 kls Exp $
+ * $Id: vdr.c 1.165 2003/08/17 08:50:25 kls Exp $
*/
#include <getopt.h>
@@ -57,7 +57,6 @@
#define ACTIVITYTIMEOUT 60 // seconds before starting housekeeping
#define SHUTDOWNWAIT 300 // seconds to wait in user prompt before automatic shutdown
#define MANUALSTART 600 // seconds the next timer must be in the future to assume manual start
-#define ZAPTIMEOUT 3 // seconds until a channel counts as "previous" for switching with '0'
static int Interrupted = 0;
@@ -341,17 +340,19 @@ int main(int argc, char *argv[])
cPlugin::SetConfigDirectory(ConfigDirectory);
- Setup.Load(AddDirectory(ConfigDirectory, "setup.conf"));
- Sources.Load(AddDirectory(ConfigDirectory, "sources.conf"), true);
- Diseqcs.Load(AddDirectory(ConfigDirectory, "diseqc.conf"), true);
- Channels.Load(AddDirectory(ConfigDirectory, "channels.conf"));
- Timers.Load(AddDirectory(ConfigDirectory, "timers.conf"));
- Commands.Load(AddDirectory(ConfigDirectory, "commands.conf"), true);
- RecordingCommands.Load(AddDirectory(ConfigDirectory, "reccmds.conf"), true);
- SVDRPhosts.Load(AddDirectory(ConfigDirectory, "svdrphosts.conf"), true);
- CaDefinitions.Load(AddDirectory(ConfigDirectory, "ca.conf"), true);
- Keys.Load(AddDirectory(ConfigDirectory, "remote.conf"));
- KeyMacros.Load(AddDirectory(ConfigDirectory, "keymacros.conf"), true);
+ if (!(Setup.Load(AddDirectory(ConfigDirectory, "setup.conf")) &&
+ Sources.Load(AddDirectory(ConfigDirectory, "sources.conf"), true, true) &&
+ Diseqcs.Load(AddDirectory(ConfigDirectory, "diseqc.conf"), true, true) &&
+ Channels.Load(AddDirectory(ConfigDirectory, "channels.conf"), false, true) &&
+ Timers.Load(AddDirectory(ConfigDirectory, "timers.conf")) &&
+ Commands.Load(AddDirectory(ConfigDirectory, "commands.conf"), true) &&
+ RecordingCommands.Load(AddDirectory(ConfigDirectory, "reccmds.conf"), true) &&
+ SVDRPhosts.Load(AddDirectory(ConfigDirectory, "svdrphosts.conf"), true) &&
+ CaDefinitions.Load(AddDirectory(ConfigDirectory, "ca.conf"), true) &&
+ Keys.Load(AddDirectory(ConfigDirectory, "remote.conf")) &&
+ KeyMacros.Load(AddDirectory(ConfigDirectory, "keymacros.conf"), true)
+ ))
+ return 2;
// DVB interfaces:
@@ -455,8 +456,8 @@ int main(int argc, char *argv[])
cOsdObject *Temp = NULL;
int LastChannel = -1;
int LastTimerChannel = -1;
- int PreviousChannel = cDevice::CurrentChannel();
- int LastLastChannel = PreviousChannel;
+ int PreviousChannel[2] = { 1, 1 };
+ int PreviousChannelIndex = 0;
time_t LastChannelChanged = time(NULL);
time_t LastActivity = 0;
int MaxLatencyTime = 0;
@@ -498,10 +499,8 @@ int main(int argc, char *argv[])
LastChannel = cDevice::CurrentChannel();
LastChannelChanged = time(NULL);
}
- if (LastLastChannel != LastChannel && time(NULL) - LastChannelChanged >= ZAPTIMEOUT) {
- PreviousChannel = LastLastChannel;
- LastLastChannel = LastChannel;
- }
+ if (time(NULL) - LastChannelChanged >= Setup.ZapTimeout && LastChannel != PreviousChannel[0] && LastChannel != PreviousChannel[1])
+ PreviousChannel[PreviousChannelIndex ^= 1] = LastChannel;
// Timers and Recordings:
if (!Timers.BeingEdited()) {
time_t Now = time(NULL); // must do both following calls with the exact same time!
@@ -680,9 +679,9 @@ int main(int argc, char *argv[])
switch (key) {
// Toggle channels:
case k0: {
- int CurrentChannel = cDevice::CurrentChannel();
- Channels.SwitchTo(PreviousChannel);
- PreviousChannel = CurrentChannel;
+ if (PreviousChannel[PreviousChannelIndex ^ 1] == LastChannel || LastChannel != PreviousChannel[0] && LastChannel != PreviousChannel[1])
+ PreviousChannelIndex ^= 1;
+ Channels.SwitchTo(PreviousChannel[PreviousChannelIndex ^= 1]);
break;
}
// Direct Channel Select: