diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2003-05-24 15:34:30 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2003-05-24 15:34:30 +0200 |
commit | 44dbfe9f384c3519e9c7ce29ae7eb790b544ea5d (patch) | |
tree | 5667f58d7a373dbaa5b2d2310e6818f9f1ac2d09 | |
parent | 609285eb646456991f1c29695f728d38da6f69e9 (diff) | |
download | vdr-44dbfe9f384c3519e9c7ce29ae7eb790b544ea5d.tar.gz vdr-44dbfe9f384c3519e9c7ce29ae7eb790b544ea5d.tar.bz2 |
Fixed channel switching in case the current channel becomes unavailable
-rw-r--r-- | CONTRIBUTORS | 6 | ||||
-rw-r--r-- | HISTORY | 5 | ||||
-rw-r--r-- | vdr.c | 11 |
3 files changed, 20 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index f88a3d85..3a62501a 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -485,6 +485,8 @@ Reinhard Walter Buchner <rw.buchner@freenet.de> Lauri Tischler <lauri.tischler@efore.fi> for helping to test and debug the new channel source and DiSEqC handling for reporting a faulty parameter initialization in menu.c + for reporting a problem in case the original current channel becomes + unavailable due to a recording on a different transponder Andy Carter <fruit@ukgateway.net> for helping to test new DVB-T handling @@ -682,3 +684,7 @@ Niko Tarnanen <niko.tarnanen@hut.fi> and Rolf Ahrenberg <rahrenbe@cc.hut.fi> Ralf Klueber <ralf.klueber@vodafone.com> for reporting a bug in cutting a recording if there is only a single editing mark + +Hermann Gausterer <mrq1@gmx.net> + for suggesting to switch to the recording channel in case the current channel + becomes unavailable @@ -2190,3 +2190,8 @@ Video Disk Recorder Revision History Wiesweg). - Fixed channel switching in the EPG scanner on single device systems. - Completed the Swedish OSD texts (thanks to Tomas Prybil). +- Now switching to the channel used by the most recently started timer in case + the original current channel becomes unavailable due to a recording on a + different transponder. If this fails, a channel up/down switch is attempted as + a fallback solution (thanks to Lauri Tischler for reporting this one, and to + Hermann Gausterer for suggesting to switch to the recording channel). @@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/people/kls/vdr * - * $Id: vdr.c 1.158 2003/05/24 13:35:13 kls Exp $ + * $Id: vdr.c 1.159 2003/05/24 15:17:38 kls Exp $ */ #include <getopt.h> @@ -453,6 +453,7 @@ int main(int argc, char *argv[]) cOsdObject *Menu = NULL; cOsdObject *Temp = NULL; int LastChannel = -1; + int LastTimerChannel = -1; int PreviousChannel = cDevice::CurrentChannel(); time_t LastActivity = 0; int MaxLatencyTime = 0; @@ -471,8 +472,12 @@ int main(int argc, char *argv[]) if (!EITScanner.Active() && cDevice::PrimaryDevice()->HasDecoder() && !cDevice::PrimaryDevice()->HasProgramme()) { static time_t lastTime = 0; if (time(NULL) - lastTime > MINCHANNELWAIT) { - if (!Channels.SwitchTo(cDevice::CurrentChannel())) + if (!Channels.SwitchTo(cDevice::CurrentChannel()) // try to switch to the original channel... + && !(LastTimerChannel > 0 && Channels.SwitchTo(LastTimerChannel)) // ...or the one used by the last timer... + && !cDevice::SwitchChannel(1) // ...or the next higher available one... + && !cDevice::SwitchChannel(-1)) // ...or the next lower available one lastTime = time(NULL); // don't do this too often + LastTimerChannel = -1; } } // Restart the Watchdog timer: @@ -499,6 +504,8 @@ int main(int argc, char *argv[]) if (Timer) { if (!cRecordControls::Start(Timer)) Timer->SetPending(true); + else + LastTimerChannel = Timer->Channel()->Number(); } } // CAM control: |