summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2015-09-11 08:29:41 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2015-09-11 08:29:41 +0200
commitf1bef11f45f4e3450b51d4c4b5ccf4f52e7039e9 (patch)
tree114d602c8637ed6744007109579ca5b278434fea
parent4e46d2bb3bbcaa72bc106170d9a7dd0ec77ddd0d (diff)
downloadvdr-f1bef11f45f4e3450b51d4c4b5ccf4f52e7039e9.tar.gz
vdr-f1bef11f45f4e3450b51d4c4b5ccf4f52e7039e9.tar.bz2
Implemented the setup option "Recording/Record key handling"
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY5
-rw-r--r--MANUAL12
-rw-r--r--config.c5
-rw-r--r--config.h5
-rw-r--r--menu.c11
-rw-r--r--vdr.c10
7 files changed, 37 insertions, 12 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index b4ac3415..78991c54 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -3357,6 +3357,7 @@ Dietmar Spingler <d_spingler@gmx.de>
for suggesting to add the channel name to log messages that reference a channel
for suggesting to provide a way of using no DVB devices at all
for suggesting that the -V and -h options should list the plugins in alphabetical order
+ for suggesting to implement the setup option "Recording/Record key handling"
Stefan Schallenberg <infos@nafets.de>
for adding the functions IndexOf(), InsertUnique(), AppendUnique() and RemoveElement()
diff --git a/HISTORY b/HISTORY
index bb2919f0..4ab55fd4 100644
--- a/HISTORY
+++ b/HISTORY
@@ -8596,7 +8596,7 @@ Video Disk Recorder Revision History
- Bumped all version numbers to 2.2.0.
- Official release.
-2015-09-10: Version 2.3.1
+2015-09-11: Version 2.3.1
- The new function cOsd::MaxPixmapSize() can be called to determine the maximum size
a cPixmap may have on the current OSD. The 'osddemo' example has been modified
@@ -8820,3 +8820,6 @@ Video Disk Recorder Revision History
"DVB SI table strings" instead of "EPG data".
- The width and height of the OSD are now limited to the actual maximum dimensions
of the output device, taking into account the top and left offset.
+- The new setup option "Recording/Record key handling" can be used to define
+ what happens if the Record key on the remote control is pressed during
+ live tv (suggested by Dietmar Spingler).
diff --git a/MANUAL b/MANUAL
index d5d658ff..971df402 100644
--- a/MANUAL
+++ b/MANUAL
@@ -890,8 +890,13 @@ Version 2.2
means that this recording will never be deleted
automatically.
- Pause priority = 10 The Priority and Lifetime values used when pausing live
- Pause lifetime = 1 video.
+ Record key handling = 2
+ Defines what happens if the Record key on the remote control
+ is pressed during live tv.
+ 0 = no instant recording
+ 1 = confirm instant recording
+ 2 = record instantly
+ The default is 2.
Pause key handling = 2 Defines what happens if the Pause key on the remote control
is pressed during live tv.
@@ -900,6 +905,9 @@ Version 2.2
2 = pause live video
The default is 2.
+ Pause priority = 10 The Priority and Lifetime values used when pausing live
+ Pause lifetime = 1 video.
+
Use episode name = yes Repeating timers use the EPG's 'Episode name' information
to create recording file names in a hierarchical structure
(for instance to gather all episodes of a series in a
diff --git a/config.c b/config.c
index 902775bb..38e22053 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 4.2 2015/09/06 13:17:19 kls Exp $
+ * $Id: config.c 4.3 2015/09/11 08:08:05 kls Exp $
*/
#include "config.h"
@@ -421,6 +421,7 @@ cSetup::cSetup(void)
RcRepeatDelta = 100;
DefaultPriority = 50;
DefaultLifetime = MAXLIFETIME;
+ RecordKeyHandling = 2;
PauseKeyHandling = 2;
PausePriority = 10;
PauseLifetime = 1;
@@ -647,6 +648,7 @@ bool cSetup::Parse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "RcRepeatDelta")) RcRepeatDelta = atoi(Value);
else if (!strcasecmp(Name, "DefaultPriority")) DefaultPriority = atoi(Value);
else if (!strcasecmp(Name, "DefaultLifetime")) DefaultLifetime = atoi(Value);
+ else if (!strcasecmp(Name, "RecordKeyHandling")) RecordKeyHandling = atoi(Value);
else if (!strcasecmp(Name, "PauseKeyHandling")) PauseKeyHandling = atoi(Value);
else if (!strcasecmp(Name, "PausePriority")) PausePriority = atoi(Value);
else if (!strcasecmp(Name, "PauseLifetime")) PauseLifetime = atoi(Value);
@@ -776,6 +778,7 @@ bool cSetup::Save(void)
Store("RcRepeatDelta", RcRepeatDelta);
Store("DefaultPriority", DefaultPriority);
Store("DefaultLifetime", DefaultLifetime);
+ Store("RecordKeyHandling", RecordKeyHandling);
Store("PauseKeyHandling", PauseKeyHandling);
Store("PausePriority", PausePriority);
Store("PauseLifetime", PauseLifetime);
diff --git a/config.h b/config.h
index 299f6aba..e5565da3 100644
--- a/config.h
+++ b/config.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.h 4.4 2015/09/06 09:50:13 kls Exp $
+ * $Id: config.h 4.5 2015/09/11 08:07:34 kls Exp $
*/
#ifndef __CONFIG_H
@@ -296,8 +296,9 @@ public:
int RcRepeatDelay;
int RcRepeatDelta;
int DefaultPriority, DefaultLifetime;
- int PausePriority, PauseLifetime;
+ int RecordKeyHandling;
int PauseKeyHandling;
+ int PausePriority, PauseLifetime;
int UseSubtitle;
int UseVps;
int VpsMargin;
diff --git a/menu.c b/menu.c
index 8c23b4b1..b0ee1adc 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 4.7 2015/09/10 13:29:30 kls Exp $
+ * $Id: menu.c 4.8 2015/09/11 08:28:51 kls Exp $
*/
#include "menu.h"
@@ -3910,6 +3910,7 @@ eOSState cMenuSetupCAM::ProcessKey(eKeys Key)
class cMenuSetupRecord : public cMenuSetupBase {
private:
+ const char *recordKeyHandlingTexts[3];
const char *pauseKeyHandlingTexts[3];
const char *delTimeshiftRecTexts[3];
public:
@@ -3919,6 +3920,9 @@ public:
cMenuSetupRecord::cMenuSetupRecord(void)
{
SetMenuCategory(mcSetupRecord);
+ recordKeyHandlingTexts[0] = tr("no instant recording");
+ recordKeyHandlingTexts[1] = tr("confirm instant recording");
+ recordKeyHandlingTexts[2] = tr("record instantly");
pauseKeyHandlingTexts[0] = tr("do not pause live video");
pauseKeyHandlingTexts[1] = tr("confirm pause live video");
pauseKeyHandlingTexts[2] = tr("pause live video");
@@ -3930,6 +3934,7 @@ cMenuSetupRecord::cMenuSetupRecord(void)
Add(new cMenuEditIntItem( tr("Setup.Recording$Margin at stop (min)"), &data.MarginStop));
Add(new cMenuEditIntItem( tr("Setup.Recording$Default priority"), &data.DefaultPriority, 0, MAXPRIORITY));
Add(new cMenuEditIntItem( tr("Setup.Recording$Default lifetime (d)"), &data.DefaultLifetime, 0, MAXLIFETIME));
+ Add(new cMenuEditStraItem(tr("Setup.Recording$Record key handling"), &data.RecordKeyHandling, 3, recordKeyHandlingTexts));
Add(new cMenuEditStraItem(tr("Setup.Recording$Pause key handling"), &data.PauseKeyHandling, 3, pauseKeyHandlingTexts));
Add(new cMenuEditIntItem( tr("Setup.Recording$Pause priority"), &data.PausePriority, 0, MAXPRIORITY));
Add(new cMenuEditIntItem( tr("Setup.Recording$Pause lifetime (d)"), &data.PauseLifetime, 0, MAXLIFETIME));
@@ -4305,7 +4310,7 @@ bool cMenuMain::Update(bool Force)
stopReplayItem = NULL;
}
// Color buttons:
- SetHelp(!replaying ? tr("Button$Record") : NULL, tr("Button$Audio"), replaying || !Setup.PauseKeyHandling ? NULL : tr("Button$Pause"), replaying ? tr("Button$Stop") : cReplayControl::LastReplayed() ? tr("Button$Resume") : tr("Button$Play"));
+ SetHelp(!replaying && Setup.RecordKeyHandling ? tr("Button$Record") : NULL, tr("Button$Audio"), replaying || !Setup.PauseKeyHandling ? NULL : tr("Button$Pause"), replaying ? tr("Button$Stop") : cReplayControl::LastReplayed() ? tr("Button$Resume") : tr("Button$Play"));
result = true;
}
@@ -4391,7 +4396,7 @@ eOSState cMenuMain::ProcessKey(eKeys Key)
default: switch (Key) {
case kRecord:
case kRed: if (!HadSubMenu)
- state = replaying ? osContinue : osRecord;
+ state = replaying || !Setup.RecordKeyHandling ? osContinue : osRecord;
break;
case kGreen: if (!HadSubMenu) {
cRemote::Put(kAudio, true);
diff --git a/vdr.c b/vdr.c
index 68c8a9e1..6b0bf2b0 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.tvdr.de
*
- * $Id: vdr.c 4.6 2015/09/08 10:00:46 kls Exp $
+ * $Id: vdr.c 4.7 2015/09/11 08:02:50 kls Exp $
*/
#include <getopt.h>
@@ -1310,8 +1310,12 @@ int main(int argc, char *argv[])
// Instant recording:
case kRecord:
if (!cControl::Control()) {
- if (cRecordControls::Start())
- Skins.QueueMessage(mtInfo, tr("Recording started"));
+ if (Setup.RecordKeyHandling) {
+ if (Setup.RecordKeyHandling > 1 || Interface->Confirm(tr("Start recording?"))) {
+ if (cRecordControls::Start())
+ Skins.QueueMessage(mtInfo, tr("Recording started"));
+ }
+ }
key = kNone; // nobody else needs to see this key
}
break;