summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c31
1 files changed, 28 insertions, 3 deletions
diff --git a/menu.c b/menu.c
index e63d707..4b7136b 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.235 2003/04/12 09:40:48 kls Exp $
+ * $Id: menu.c 1.237 2003/04/21 14:57:13 kls Exp $
*/
#include "menu.h"
@@ -1636,7 +1636,7 @@ cOsdObject *CamControl(void)
cDevice *Device = cDevice::GetDevice(d);
if (Device) {
cCiHandler *CiHandler = Device->CiHandler();
- if (CiHandler) {
+ if (CiHandler && CiHandler->HasUserIO()) {
cCiMenu *CiMenu = CiHandler->GetMenu();
if (CiMenu)
return new cMenuCam(CiMenu);
@@ -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++) {