summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-01-04 12:30:00 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2004-01-04 12:30:00 +0100
commit8976ebcec5ca1ac03c54209b7cc12e9d14915c6b (patch)
tree8562202f489ee585c1252b2cb4a9e61b3e200efe /vdr.c
parent3a1058fe1fca6d10cea42786aa54abf3d0bd0b94 (diff)
downloadvdr-8976ebcec5ca1ac03c54209b7cc12e9d14915c6b.tar.gz
vdr-8976ebcec5ca1ac03c54209b7cc12e9d14915c6b.tar.bz2
Implemented automatic PID switching and channel detection
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/vdr.c b/vdr.c
index 4adb1868..fc12f005 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.171 2003/12/22 13:29:24 kls Exp $
+ * $Id: vdr.c 1.172 2004/01/04 11:12:05 kls Exp $
*/
#include <getopt.h>
@@ -511,6 +511,25 @@ int main(int argc, char *argv[])
dsyslog("max. latency time %d seconds", MaxLatencyTime);
}
}
+ // Handle channel modifications:
+ if (!Channels.BeingEdited() && Channels.Modified()) {
+ if (Channels.Lock(false, 100)) {
+ Channels.Save(); //XXX only after user changes???
+ Timers.Save();
+ for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) {
+ if (Channel && Channel->Modification(CHANNELMOD_RETUNE)) {
+ cRecordControls::ChannelDataModified(Channel);
+ if (Channel->Number() == cDevice::CurrentChannel()) {
+ if (!cDevice::PrimaryDevice()->Replaying()) {
+ isyslog("retuning due to modification of channel %d", Channel->Number());
+ Channels.SwitchTo(Channel->Number());
+ }
+ }
+ }
+ }
+ Channels.Unlock();
+ }
+ }
// Channel display:
if (!EITScanner.Active() && cDevice::CurrentChannel() != LastChannel) {
if (!Menu)