summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS4
-rw-r--r--HISTORY2
-rw-r--r--MANUAL13
-rw-r--r--config.c8
-rw-r--r--config.h3
-rw-r--r--i18n.c34
-rw-r--r--menu.c17
-rw-r--r--menu.h6
-rw-r--r--timers.c8
-rw-r--r--timers.h4
10 files changed, 76 insertions, 23 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index cd336ddc..f9592900 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -646,3 +646,7 @@ Jonan Santiago <jonan-lists-vdr@callisia.com>
Juri Haberland <juri@koschikode.com>
for his help in keeping 'channels.conf.terr' up to date
+
+Alfred Zastrow <vdr@zastrow4u.de>
+ for suggesting to implement separate PausePriority and PauseLifetime parameters for
+ the recordings created when pausing live video
diff --git a/HISTORY b/HISTORY
index 6811ad78..32de2b63 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2137,3 +2137,5 @@ Video Disk Recorder Revision History
or the "Back" button during replay.
- Further increased the timeout until an index file is considerd no longer to be
written.
+- Implemented separate PausePriority and PauseLifetime parameters for the recordings
+ created when pausing live video (suggested by Alfred Zastrow).
diff --git a/MANUAL b/MANUAL
index be9ac526..a8ebee21 100644
--- a/MANUAL
+++ b/MANUAL
@@ -186,10 +186,11 @@ Video Disk Recorder User's Manual
You can start recording the current channel by pressing the "Red" button
in the "VDR" menu. This will create a timer event named "@channelname" that
- starts at the current time and records for two hours.
+ starts at the current time and by default records for 3 hours.
If you want to modify the recording time you need to edit the timer.
Stop instant recording by pressing the "Menu" button and selecting
- "Stop Recording", or by disabling the timer.
+ "Stop Recording", or by disabling the timer. The default priority, lifetime
+ and recording time can be defined in the "Setup/Recording" menu.
* Pausing live video
@@ -201,8 +202,9 @@ Video Disk Recorder User's Manual
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
+ will use the parameters for "Pause priority" and "Pause lifetime" as defined
+ in the "Setup/Recording" menu. Recording time will be the same as for
+ any other instant recording, so by default it will record 3 hours (which
should be enough for any normal broadcast).
* Replaying a Recording
@@ -548,6 +550,9 @@ Video Disk Recorder User's Manual
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.
+
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 ff7a4c05..8a30d3c1 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 1.113 2003/04/12 09:37:48 kls Exp $
+ * $Id: config.c 1.114 2003/05/11 13:50:02 kls Exp $
*/
#include "config.h"
@@ -266,6 +266,8 @@ cSetup::cSetup(void)
PrimaryLimit = 0;
DefaultPriority = 50;
DefaultLifetime = 50;
+ PausePriority = 10;
+ PauseLifetime = 1;
UseSubtitle = 1;
RecordingDirs = 1;
VideoFormat = 0;
@@ -415,6 +417,8 @@ bool cSetup::Parse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "PrimaryLimit")) PrimaryLimit = atoi(Value);
else if (!strcasecmp(Name, "DefaultPriority")) DefaultPriority = atoi(Value);
else if (!strcasecmp(Name, "DefaultLifetime")) DefaultLifetime = atoi(Value);
+ else if (!strcasecmp(Name, "PausePriority")) PausePriority = atoi(Value);
+ else if (!strcasecmp(Name, "PauseLifetime")) PauseLifetime = atoi(Value);
else if (!strcasecmp(Name, "UseSubtitle")) UseSubtitle = atoi(Value);
else if (!strcasecmp(Name, "RecordingDirs")) RecordingDirs = atoi(Value);
else if (!strcasecmp(Name, "VideoFormat")) VideoFormat = atoi(Value);
@@ -462,6 +466,8 @@ bool cSetup::Save(void)
Store("PrimaryLimit", PrimaryLimit);
Store("DefaultPriority", DefaultPriority);
Store("DefaultLifetime", DefaultLifetime);
+ Store("PausePriority", PausePriority);
+ Store("PauseLifetime", PauseLifetime);
Store("UseSubtitle", UseSubtitle);
Store("RecordingDirs", RecordingDirs);
Store("VideoFormat", VideoFormat);
diff --git a/config.h b/config.h
index 22df6132..f474ef9c 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 1.157 2003/05/11 09:12:01 kls Exp $
+ * $Id: config.h 1.158 2003/05/11 13:45:44 kls Exp $
*/
#ifndef __CONFIG_H
@@ -218,6 +218,7 @@ public:
int SortTimers;
int PrimaryLimit;
int DefaultPriority, DefaultLifetime;
+ int PausePriority, PauseLifetime;
int UseSubtitle;
int RecordingDirs;
int VideoFormat;
diff --git a/i18n.c b/i18n.c
index 734e0155..34b24235 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.107 2003/05/01 14:10:18 kls Exp $
+ * $Id: i18n.c 1.108 2003/05/11 13:54:23 kls Exp $
*
* Translations provided by:
*
@@ -2222,6 +2222,38 @@ const tI18nPhrase Phrases[] = {
"Prioritate implicita",
"Default priority",
},
+ { "Setup.Recording$Pause lifetime (d)",
+ "Pause Lebensdauer (d)",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
+ { "Setup.Recording$Pause priority",
+ "Pause Priorität",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
{ "Setup.Recording$Default lifetime (d)",
"Default Lebensdauer (d)",
"Osnovni zivljenski cas (d)",
diff --git a/menu.c b/menu.c
index 16969f3f..b8dbf5b3 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.242 2003/05/11 12:19:11 kls Exp $
+ * $Id: menu.c 1.243 2003/05/11 13:58:13 kls Exp $
*/
#include "menu.h"
@@ -2188,6 +2188,8 @@ cMenuSetupRecord::cMenuSetupRecord(void)
Add(new cMenuEditIntItem( tr("Setup.Recording$Primary limit"), &data.PrimaryLimit, 0, MAXPRIORITY));
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 cMenuEditIntItem( tr("Setup.Recording$Pause priority"), &data.PausePriority, 0, MAXPRIORITY));
+ Add(new cMenuEditIntItem( tr("Setup.Recording$Pause lifetime (d)"), &data.PauseLifetime, 0, MAXLIFETIME));
Add(new cMenuEditBoolItem(tr("Setup.Recording$Use episode name"), &data.UseSubtitle));
Add(new cMenuEditBoolItem(tr("Setup.Recording$Mark instant recording"), &data.MarkInstantRecord));
Add(new cMenuEditStrItem( tr("Setup.Recording$Name instant recording"), data.NameInstantRecord, sizeof(data.NameInstantRecord), tr(FileNameChars)));
@@ -2907,7 +2909,7 @@ eOSState cDisplayVolume::ProcessKey(eKeys Key)
// --- cRecordControl --------------------------------------------------------
-cRecordControl::cRecordControl(cDevice *Device, cTimer *Timer)
+cRecordControl::cRecordControl(cDevice *Device, cTimer *Timer, bool Pause = false)
{
eventInfo = NULL;
instantId = NULL;
@@ -2917,7 +2919,7 @@ cRecordControl::cRecordControl(cDevice *Device, cTimer *Timer)
if (!device) device = cDevice::PrimaryDevice();//XXX
timer = Timer;
if (!timer) {
- timer = new cTimer(true);
+ timer = new cTimer(true, Pause);
Timers.Add(timer);
Timers.Save();
asprintf(&instantId, cDevice::NumDevices() > 1 ? "%s - %d" : "%s", timer->Channel()->Name(), device->CardIndex() + 1);
@@ -3014,14 +3016,15 @@ bool cRecordControl::Process(time_t t)
cRecordControl *cRecordControls::RecordControls[MAXRECORDCONTROLS] = { NULL };
-bool cRecordControls::Start(cTimer *Timer)
+bool cRecordControls::Start(cTimer *Timer, bool Pause)
{
int ch = Timer ? Timer->Channel()->Number() : cDevice::CurrentChannel();
cChannel *channel = Channels.GetByNumber(ch);
if (channel) {
bool NeedsDetachReceivers = false;
- cDevice *device = cDevice::GetDevice(channel, Timer ? Timer->Priority() : Setup.DefaultPriority, &NeedsDetachReceivers);
+ int Priority = Timer ? Timer->Priority() : Pause ? Setup.PausePriority : Setup.DefaultPriority;
+ cDevice *device = cDevice::GetDevice(channel, Priority, &NeedsDetachReceivers);
if (device) {
if (NeedsDetachReceivers)
Stop(device);
@@ -3031,7 +3034,7 @@ bool cRecordControls::Start(cTimer *Timer)
}
for (int i = 0; i < MAXRECORDCONTROLS; i++) {
if (!RecordControls[i]) {
- RecordControls[i] = new cRecordControl(device, Timer);
+ RecordControls[i] = new cRecordControl(device, Timer, Pause);
return true;
}
}
@@ -3087,7 +3090,7 @@ bool cRecordControls::PauseLiveVideo(void)
Interface->Status(tr("Pausing live video..."));
Interface->Flush();
cReplayControl::SetRecording(NULL, NULL); // make sure the new cRecordControl will set cReplayControl::LastReplayed()
- if (Start()) {
+ if (Start(NULL, true)) {
sleep(2); // allow recorded file to fill up enough to start replaying
cReplayControl *rc = new cReplayControl;
cControl::Launch(rc);
diff --git a/menu.h b/menu.h
index fab74a7f..a4045057 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.54 2003/04/21 13:40:45 kls Exp $
+ * $Id: menu.h 1.55 2003/05/11 13:43:58 kls Exp $
*/
#ifndef __MENU_H
@@ -116,7 +116,7 @@ private:
char *fileName;
bool GetEventInfo(void);
public:
- cRecordControl(cDevice *Device, cTimer *Timer = NULL);
+ cRecordControl(cDevice *Device, cTimer *Timer = NULL, bool Pause = false);
virtual ~cRecordControl();
bool Process(time_t t);
bool Uses(cDevice *Device) { return Device == device; }
@@ -131,7 +131,7 @@ class cRecordControls {
private:
static cRecordControl *RecordControls[];
public:
- static bool Start(cTimer *Timer = NULL);
+ static bool Start(cTimer *Timer = NULL, bool Pause = false);
static void Stop(const char *InstantId);
static void Stop(cDevice *Device);
static bool StopPrimary(bool DoIt = false);
diff --git a/timers.c b/timers.c
index 8c982e2d..15429427 100644
--- a/timers.c
+++ b/timers.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: timers.c 1.4 2003/04/27 11:11:45 kls Exp $
+ * $Id: timers.c 1.5 2003/05/11 13:48:49 kls Exp $
*/
#include "timers.h"
@@ -20,7 +20,7 @@
char *cTimer::buffer = NULL;
-cTimer::cTimer(bool Instant)
+cTimer::cTimer(bool Instant, bool Pause)
{
startTime = stopTime = 0;
recording = pending = false;
@@ -35,8 +35,8 @@ cTimer::cTimer(bool Instant)
stop = (stop / 60) * 100 + (stop % 60);
if (stop >= 2400)
stop -= 2400;
- priority = Setup.DefaultPriority;
- lifetime = Setup.DefaultLifetime;
+ priority = Pause ? Setup.PausePriority : Setup.DefaultPriority;
+ lifetime = Pause ? Setup.PauseLifetime : Setup.DefaultLifetime;
*file = 0;
firstday = 0;
summary = NULL;
diff --git a/timers.h b/timers.h
index a179e52c..3b1a3ca4 100644
--- a/timers.h
+++ b/timers.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: timers.h 1.4 2003/02/09 12:49:45 kls Exp $
+ * $Id: timers.h 1.5 2003/05/11 13:35:53 kls Exp $
*/
#ifndef __TIMERS_H
@@ -38,7 +38,7 @@ private:
time_t firstday;
char *summary;
public:
- cTimer(bool Instant = false);
+ cTimer(bool Instant = false, bool Pause = false);
cTimer(const cEventInfo *EventInfo);
virtual ~cTimer();
cTimer& operator= (const cTimer &Timer);