summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-09-23 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-09-23 18:00:00 +0200
commit66bab90b60048a46e401ea506d3aa65c43779700 (patch)
tree376b0ed146b41a61eb6a8910d03fdcb7621aa78d /menu.c
parent156831036e9b0fcbfc719033cc89e08c1985cad6 (diff)
downloadvdr-patch-lnbsharing-66bab90b60048a46e401ea506d3aa65c43779700.tar.gz
vdr-patch-lnbsharing-66bab90b60048a46e401ea506d3aa65c43779700.tar.bz2
Version 0.96vdr-0.96
- Made VDR compile with libdvdread-0.9.1 (thanks to Andreas Schultz). Note that you now _need_ version 0.9.1 of libdvdread to compile VDR with DVD support! - Several fixes to the replay mode display (thanks to Stefan Huelswitt): no more replay mode display when pressing the "Green" or "Yellow" button (Skip +/-60s); fixed timeout when pressing '0' to set an editing mark while the progress display is not shown; mode display is shown after progress display is closed; pressing "Ok" while the mode display is on brings up the progress display; no more unnecessary display of "normal play mode". - Supplying the new frontend parameter 'Inversion' (currently it is always set to INVERSION_AUTO, which should work with all channels on Astra). - Removing unnecessary double quotes from EPG Subtitle in EPGBugfixLevel >=1. - EPG info is now updated if the contents changes but the ID remains the same. - Fixed handling SVDRP commands whith more than one blank between the command word and the options. - The current volume setting is now saved to setup.conf and restored at the next program start. - New command line option '-r' to define a command that gets called before and after each recording (see INSTALL for details). - Implemented a check to see whether the system time is running linearly. - Writing the current time (as seen by VDR) into the log file when starting a timer recording (this may help debugging cases where timers don't start at the expected time). - Made the volume, mute and power keys work when a menu is active, too (thanks to Matthias Weingart).
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c36
1 files changed, 27 insertions, 9 deletions
diff --git a/menu.c b/menu.c
index 98fd302..23b16e2 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 1.120 2001/09/15 10:36:31 kls Exp $
+ * $Id: menu.c 1.127 2001/09/23 10:58:48 kls Exp $
*/
#include "menu.h"
@@ -2108,6 +2108,7 @@ cRecordControl::cRecordControl(cDvbApi *DvbApi, cTimer *Timer)
{
eventInfo = NULL;
instantId = NULL;
+ fileName = NULL;
dvbApi = DvbApi;
if (!dvbApi) dvbApi = cDvbApi::PrimaryDvbApi;//XXX
timer = Timer;
@@ -2128,7 +2129,9 @@ cRecordControl::cRecordControl(cDvbApi *DvbApi, cTimer *Timer)
Summary = eventInfo->GetExtendedDescription();
}
cRecording Recording(timer, Subtitle, Summary);
- if (dvbApi->StartRecord(Recording.FileName(), Channels.GetByNumber(timer->channel)->ca, timer->priority))
+ fileName = strdup(Recording.FileName());
+ cRecordingUserCommand::InvokeCommand(RUC_BEFORERECORDING, fileName);
+ if (dvbApi->StartRecord(fileName, Channels.GetByNumber(timer->channel)->ca, timer->priority))
Recording.WriteSummary();
Interface->DisplayRecording(dvbApi->CardIndex(), true);
}
@@ -2140,6 +2143,7 @@ cRecordControl::~cRecordControl()
{
Stop(true);
delete instantId;
+ delete fileName;
}
bool cRecordControl::GetEventInfo(void)
@@ -2184,6 +2188,7 @@ void cRecordControl::Stop(bool KeepInstant)
}
timer = NULL;
Interface->DisplayRecording(dvbApi->CardIndex(), false);
+ cRecordingUserCommand::InvokeCommand(RUC_AFTERRECORDING, fileName);
}
}
@@ -2386,10 +2391,11 @@ void cReplayControl::ClearLastReplayed(const char *FileName)
void cReplayControl::Show(int Seconds)
{
+ if (modeOnly)
+ Hide();
if (!visible) {
shown = ShowProgress(true);
- if (shown && Seconds > 0)
- timeoutShow = time(NULL) + Seconds;
+ timeoutShow = (shown && Seconds > 0) ? time(NULL) + Seconds : 0;
}
}
@@ -2397,7 +2403,11 @@ void cReplayControl::Hide(void)
{
if (visible) {
Interface->Close();
- needsFastResponse = visible = modeOnly = false;
+ needsFastResponse = visible = false;
+ if (!modeOnly)
+ ShowMode();
+ else
+ modeOnly = false;
}
}
@@ -2419,15 +2429,19 @@ void cReplayControl::ShowMode(void)
bool Play, Forward;
int Speed;
if (dvbApi->GetReplayMode(Play, Forward, Speed)) {
+ bool NormalPlay = (Play && Speed == -1);
if (!visible) {
+ if (NormalPlay)
+ return; // no need to do indicate ">" unless there was a different mode displayed before
// open small display
Interface->Open(9, -1);
Interface->Clear();
visible = modeOnly = true;
}
- timeoutShow = (modeOnly && !timeoutShow && Speed == -1 && Play) ? time(NULL) + MODETIMEOUT : 0;
+ if (modeOnly && !timeoutShow && NormalPlay)
+ timeoutShow = time(NULL) + MODETIMEOUT;
const char *Mode;
if (Speed == -1) Mode = Play ? " > " : " || ";
else if (Play) Mode = Forward ? " X>> " : " <<X ";
@@ -2696,9 +2710,9 @@ eOSState cReplayControl::ProcessKey(eKeys Key)
case kRight: dvbApi->Forward(); break;
case kRed: TimeSearch(); break;
case kGreen|k_Repeat:
- case kGreen: dvbApi->SkipSeconds(-60); break;
+ case kGreen: dvbApi->SkipSeconds(-60); DoShowMode = false; break;
case kYellow|k_Repeat:
- case kYellow: dvbApi->SkipSeconds(60); break;
+ case kYellow: dvbApi->SkipSeconds( 60); DoShowMode = false; break;
case kBlue: Hide();
dvbApi->StopReplay();
return osEnd;
@@ -2721,7 +2735,11 @@ eOSState cReplayControl::ProcessKey(eKeys Key)
switch (Key) {
// Menu control:
case kMenu: Hide(); return osMenu; // allow direct switching to menu
- case kOk: visible ? Hide() : Show(); break;
+ case kOk: if (visible && !modeOnly)
+ Hide();
+ else
+ Show();
+ break;
case kBack: return osRecordings;
default: return osUnknown;
}