From 9599a8fd8a6724e55ec4ad2ba2c975c0850073d9 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 27 May 2000 18:00:00 +0200 Subject: Version 0.05 - Support for more than one DVB card. - Simultaneous record and replay (with two DVB cards). - Instant recordings no longer get the name "instant". They now get the name of the channel, with a prepended '@' character. - Timers that are not given an explicit Name now use the channel name with a prepended '@' character. - If an instant recording is currently active, the Main menu now contains an option to stop that recording. - Timers are now only processed when the Menu is not active. So after editing a timer the effect will take place only after the menu has been closed. In order to avoid missing a timer event by inadvertently leaving the menu open, the menu will be closed automatically after about two minutes of inactivity. - If a recording is currently being replayed, the Main menu now contains an option to stop replaying. - Displaying the recording DVB interface status in the decimal points of the RCU display. - Reduced the number of remote control keys. Modified the key assignments for the PC keyboard to better resemble the "up-down-left-right-ok" layout on menu controlling remote control units. --- config.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) (limited to 'config.c') diff --git a/config.c b/config.c index 0a39cc5..7e02c91 100644 --- a/config.c +++ b/config.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.c 1.5 2000/04/24 09:44:15 kls Exp $ + * $Id: config.c 1.7 2000/05/27 14:44:15 kls Exp $ */ #include "config.h" @@ -23,6 +23,10 @@ tKey keyTable[] = { // "Up" and "Down" must be the first two keys! { kBack, "Back", 0 }, { kLeft, "Left", 0 }, { kRight, "Right", 0 }, + { kRed, "Red", 0 }, + { kGreen, "Green", 0 }, + { kYellow, "Yellow", 0 }, + { kBlue, "Blue", 0 }, { k0, "0", 0 }, { k1, "1", 0 }, { k2, "2", 0 }, @@ -33,18 +37,6 @@ tKey keyTable[] = { // "Up" and "Down" must be the first two keys! { k7, "7", 0 }, { k8, "8", 0 }, { k9, "9", 0 }, - { kRed, "Red", 0 }, - { kGreen, "Green", 0 }, - { kYellow, "Yellow", 0 }, - { kBlue, "Blue", 0 }, - { kRecord, "Record", 0 }, - { kPause, "Pause", 0 }, - { kStop, "Stop", 0 }, - { kBegin, "Begin", 0 }, - { kSearchForward, "SearchForward", 0 }, - { kSearchBack, "SearchBack", 0 }, - { kSkipForward, "SkipForward", 0 }, - { kSkipBack, "SkipBack", 0 }, { kNone, "", 0 }, }; @@ -201,13 +193,15 @@ bool cChannel::Save(FILE *f) return fprintf(f, "%s:%d:%c:%d:%d:%d:%d:%d:%d\n", name, frequency, polarization, diseqc, srate, vpid, apid, ca, pnr) > 0; } -bool cChannel::Switch(void) +bool cChannel::Switch(cDvbApi *DvbApi) { - if (!DvbApi.Recording()) { + if (!DvbApi) + DvbApi = cDvbApi::PrimaryDvbApi; + if (!DvbApi->Recording()) { isyslog(LOG_INFO, "switching to channel %d", Index() + 1); CurrentChannel = Index(); for (int i = 3; --i;) { - if (DvbApi.SetChannel(frequency, polarization, diseqc, srate, vpid, apid, ca, pnr)) + if (DvbApi->SetChannel(frequency, polarization, diseqc, srate, vpid, apid, ca, pnr)) return true; esyslog(LOG_ERR, "retrying"); } @@ -217,10 +211,16 @@ bool cChannel::Switch(void) return false; } -bool cChannel::SwitchTo(int i) +bool cChannel::SwitchTo(int i, cDvbApi *DvbApi) +{ + cChannel *channel = Channels.Get(i); + return channel && channel->Switch(DvbApi); +} + +const char *cChannel::GetChannelName(int i) { cChannel *channel = Channels.Get(i); - return channel && channel->Switch(); + return channel ? channel->name : NULL; } // -- cTimer ----------------------------------------------------------------- @@ -241,7 +241,9 @@ cTimer::cTimer(bool Instant) //TODO VPS??? priority = 99; lifetime = 99; - strcpy(file, Instant ? "instant" : ""); + *file = 0; + if (Instant) + snprintf(file, sizeof(file), "@%s", cChannel::GetChannelName(CurrentChannel)); } int cTimer::TimeToInt(int t) @@ -382,7 +384,7 @@ cTimer *cTimer::GetMatch(void) { cTimer *t = (cTimer *)Timers.First(); while (t) { - if (t->Matches()) + if (!t->recording && t->Matches()) return t; t = (cTimer *)t->Next(); } -- cgit v1.2.3