summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2003-04-21 14:57:13 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2003-04-21 14:57:13 +0200
commita54427e28da2d644ca061b0dbbc2bf3cb32bade5 (patch)
tree43ac207c00603f46670667cfa9d434830094987d /menu.c
parent33d670f7d7ce79d4c2996af0c86375edc881df75 (diff)
downloadvdr-a54427e28da2d644ca061b0dbbc2bf3cb32bade5.tar.gz
vdr-a54427e28da2d644ca061b0dbbc2bf3cb32bade5.tar.bz2
Implemented 'pause live video'1.1.28
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/menu.c b/menu.c
index 520187d0..4b7136bc 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.236 2003/04/20 09:21:36 kls Exp $
+ * $Id: menu.c 1.237 2003/04/21 14:57:13 kls Exp $
*/
#include "menu.h"
@@ -2488,7 +2488,7 @@ void cMenuMain::Set(const char *Plugin)
// Color buttons:
- SetHelp(tr("Record"), cDevice::PrimaryDevice()->NumAudioTracks() > 1 ? tr("Language") : NULL, NULL, replaying ? tr("Button$Stop") : cReplayControl::LastReplayed() ? tr("Resume") : NULL);
+ SetHelp(tr("Record"), cDevice::PrimaryDevice()->NumAudioTracks() > 1 ? tr("Language") : NULL, replaying ? NULL : tr("Pause"), replaying ? tr("Button$Stop") : cReplayControl::LastReplayed() ? tr("Resume") : NULL);
Display();
lastActivity = time(NULL);
}
@@ -2560,6 +2560,9 @@ eOSState cMenuMain::ProcessKey(eKeys Key)
}
}
break;
+ case kYellow: if (!HasSubMenu())
+ state = osPause;
+ break;
case kBlue: if (!HasSubMenu())
state = replaying ? osStopReplay : cReplayControl::LastReplayed() ? osReplay : osContinue;
break;
@@ -2936,6 +2939,8 @@ cRecordControl::cRecordControl(cDevice *Device, cTimer *Timer)
if (device->AttachReceiver(recorder)) {
Recording.WriteSummary();
cStatus::MsgRecording(device, Recording.Name());
+ if (!Timer && !cReplayControl::LastReplayed()) // an instant recording, maybe from cRecordControls::PauseLiveVideo()
+ cReplayControl::SetRecording(fileName, Recording.Name());
}
else
DELETENULL(recorder);
@@ -3073,6 +3078,26 @@ bool cRecordControls::StopPrimary(bool DoIt)
return false;
}
+bool cRecordControls::PauseLiveVideo(void)
+{
+ Interface->Open(Setup.OSDwidth, -1);
+ Interface->Status(tr("Pausing live video..."));
+ Interface->Flush();
+ cReplayControl::SetRecording(NULL, NULL); // make sure the new cRecordControl will set cReplayControl::LastReplayed()
+ if (Start()) {
+ sleep(2); // allow recorded file to fill up enough to start replaying
+ cReplayControl *rc = new cReplayControl;
+ cControl::Launch(rc);
+ cControl::Attach();
+ sleep(1); // allow device to replay some frames, so we have a picture
+ Interface->Close();
+ rc->ProcessKey(kPause); // pause, allowing replay mode display
+ return true;
+ }
+ Interface->Close();
+ return false;
+}
+
const char *cRecordControls::GetInstantId(const char *LastInstantId)
{
for (int i = 0; i < MAXRECORDCONTROLS; i++) {