summaryrefslogtreecommitdiff
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
parent33d670f7d7ce79d4c2996af0c86375edc881df75 (diff)
downloadvdr-a54427e28da2d644ca061b0dbbc2bf3cb32bade5.tar.gz
vdr-a54427e28da2d644ca061b0dbbc2bf3cb32bade5.tar.bz2
Implemented 'pause live video'1.1.28
-rw-r--r--HISTORY5
-rw-r--r--MANUAL18
-rw-r--r--i18n.c18
-rw-r--r--menu.c29
-rw-r--r--menu.h3
-rw-r--r--osd.h3
-rw-r--r--vdr.c35
7 files changed, 95 insertions, 16 deletions
diff --git a/HISTORY b/HISTORY
index c6acd855..439e064e 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2034,7 +2034,7 @@ Video Disk Recorder Revision History
- Fixed handling of Ca parameters with values <= MAXDEVICES, which don't indicate
an actual encrypted channel (thanks to Stefan Huelswitt for reporting this one).
-2003-04-19: Version 1.1.28
+2003-04-21: Version 1.1.28
- Using masks in EIT filtering to reduce the number of filters (thanks to Andreas
Schultz).
@@ -2050,3 +2050,6 @@ Video Disk Recorder Revision History
single card systems!
- Enhanced detection of pending user I/O from CAMs to avoid sluggish reaction
to remote control keypresses.
+- Implemented "pause live video". You can now press "Menu/Yellow" or "Pause" on
+ your remote control while watching live video to start an instant recording
+ of the current programme and immediately start replaying that recording.
diff --git a/MANUAL b/MANUAL
index b5f00d1c..be9ac526 100644
--- a/MANUAL
+++ b/MANUAL
@@ -19,7 +19,7 @@ Video Disk Recorder User's Manual
Back - Menu off VDR menu VDR menu Discard VDR menu Recordings menu
Red - Record Edit Edit ABC/abc Play/Commands(2) Jump
Green - Language New New Ins/Ovr Rewind Skip -60s
- Yellow - - Delete Delete Delete Delete Skip +60s
+ Yellow - Pause live Delete Delete Delete Delete Skip +60s
Blue - Stop/Resume Mark On/Off(1) - Summary Stop
0..9 Ch select - - - Numeric inp. Exec cmd(2) Editing
@@ -31,7 +31,7 @@ Video Disk Recorder User's Manual
following functions:
Play resume normal replay
- Pause pause replay
+ Pause pause replay or live video
Stop stop replay
Record instant recording
FastFwd fast forward
@@ -191,6 +191,20 @@ Video Disk Recorder User's Manual
Stop instant recording by pressing the "Menu" button and selecting
"Stop Recording", or by disabling the timer.
+* Pausing live video
+
+ If you want to pause the live programme you are just watching, simple press
+ "Menu/Yellow" or "Pause" on your remote control. VDR will start an instant
+ recording of the current channel (just as if you had pressed "Menu/Red" or
+ "Record") and immediately begin replaying that recording. Replay will be
+ put into "pause" mode, so you can attend to whatever it was that disturbed
+ your live viewing session. Once you're back, simply press the "Up" or "Play"
+ button and you'll be watching the current channel in time shift mode, right
+ from the point where you left off. The instant recording VDR has started
+ will use the same parameters for priority, lifetime and recording duration
+ as any other instant recording, so by default it will record 3 hours (which
+ should be enough for any normal broadcast).
+
* Replaying a Recording
All recordings are listed in the "Recordings" menu. Browse through the
diff --git a/i18n.c b/i18n.c
index 506e0a57..efeb869b 100644
--- a/i18n.c
+++ b/i18n.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: i18n.c 1.105 2003/04/12 09:39:35 kls Exp $
+ * $Id: i18n.c 1.106 2003/04/21 14:05:17 kls Exp $
*
* Translations provided by:
*
@@ -3411,6 +3411,22 @@ const tI18nPhrase Phrases[] = {
"Caut inregistrari...",
"Felvett adások böngészése...",
},
+ { "Pausing live video...",
+ "Live-Signal wird angehalten...",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
{ "This plugin has no setup parameters!",
"Dieses Plugin hat keine Setup-Parameter!",
"",// TODO
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++) {
diff --git a/menu.h b/menu.h
index 43a0d8f9..fab74a7f 100644
--- a/menu.h
+++ b/menu.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.h 1.53 2003/01/12 14:54:05 kls Exp $
+ * $Id: menu.h 1.54 2003/04/21 13:40:45 kls Exp $
*/
#ifndef __MENU_H
@@ -135,6 +135,7 @@ public:
static void Stop(const char *InstantId);
static void Stop(cDevice *Device);
static bool StopPrimary(bool DoIt = false);
+ static bool PauseLiveVideo(void);
static const char *GetInstantId(const char *LastInstantId);
static cRecordControl *GetRecordControl(const char *FileName);
static void Process(time_t t);
diff --git a/osd.h b/osd.h
index 5f1ec96f..e1efd336 100644
--- a/osd.h
+++ b/osd.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: osd.h 1.38 2002/12/08 12:21:26 kls Exp $
+ * $Id: osd.h 1.39 2003/04/21 13:40:45 kls Exp $
*/
#ifndef __OSD_H
@@ -30,6 +30,7 @@ enum eOSState { osUnknown,
osPlugin,
osSetup,
osCommands,
+ osPause,
osRecord,
osReplay,
osStopRecord,
diff --git a/vdr.c b/vdr.c
index 3f0a7f0d..a160e4cf 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/people/kls/vdr
*
- * $Id: vdr.c 1.149 2003/04/12 13:57:45 kls Exp $
+ * $Id: vdr.c 1.150 2003/04/21 14:41:41 kls Exp $
*/
#include <getopt.h>
@@ -553,6 +553,26 @@ int main(int argc, char *argv[])
cDisplayVolume::Process(key);
key = kNone; // nobody else needs to see these keys
break;
+ // Pausing live video:
+ case kPause:
+ if (!cControl::Control()) {
+ DELETENULL(Menu);
+ Temp = NULL;
+ if (!cRecordControls::PauseLiveVideo())
+ Interface->Error(tr("No free DVB device to record!"));
+ key = kNone; // nobody else needs to see this key
+ }
+ break;
+ // Instant recording:
+ case kRecord:
+ if (!cControl::Control()) {
+ if (cRecordControls::Start())
+ ;//XXX Interface->Info(tr("Recording"));
+ else
+ Interface->Error(tr("No free DVB device to record!"));
+ key = kNone; // nobody else needs to see this key
+ }
+ break;
// Power off:
case kPower: isyslog("Power button pressed");
DELETENULL(Menu);
@@ -577,6 +597,12 @@ int main(int argc, char *argv[])
if (state == osUnknown && ISMODELESSKEY(key) && cControl::Control() && Interact != cControl::Control())
state = cControl::Control()->ProcessKey(key);
switch (state) {
+ case osPause: DELETENULL(Menu);
+ cControl::Shutdown(); // just in case
+ Temp = NULL;
+ if (!cRecordControls::PauseLiveVideo())
+ Interface->Error(tr("No free DVB device to record!"));
+ break;
case osRecord: DELETENULL(Menu);
Temp = NULL;
if (cRecordControls::Start())
@@ -652,13 +678,6 @@ int main(int argc, char *argv[])
break;
// Viewing Control:
case kOk: LastChannel = -1; break; // forces channel display
- // Instant recording:
- case kRecord:
- if (cRecordControls::Start())
- ;//XXX Interface->Info(tr("Recording"));
- else
- Interface->Error(tr("No free DVB device to record!"));
- break;
// Key macros:
case kRed:
case kGreen: