summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-05-11 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-05-11 18:00:00 +0200
commitc84022554aaacc9b1c3d9627501cdbb8276871f6 (patch)
treec26b34a2d420d52b1f88dae9323b1b975373571f /menu.c
parentaf2a135212088f0cba6bd8f98544b271c2f71bef (diff)
downloadvdr-patch-lnbsharing-c84022554aaacc9b1c3d9627501cdbb8276871f6.tar.gz
vdr-patch-lnbsharing-c84022554aaacc9b1c3d9627501cdbb8276871f6.tar.bz2
Version 1.1.31vdr-1.1.31
- Introduced the new function cPlugin::Initialize(), in order to be able to separate the startup of a plugin into an "early" (Initialize()) and "late" (Start()) phase (suggested by Andreas Schultz). Plugin authors should please read the section about "Getting started" in PLUGINS.html and adapt their code if applicable. - Implemented the CableDeliverySystemDescriptor and TerrestrialDeliverySystemDescriptor in libdtv (thanks to Sven Grothklags and Andreas Schultz). - Fixed keeping live video active in case the primary device doesn't have an MPEG decoder (thanks to Wolfgang Goeller for reporting this one). - Implemented cDevice::ActualDevice(), which returns the actual receiving device in case of 'Transfer Mode', or the primary device otherwise. This may be useful for plugins that want to attach a cReceiver to the device where the current live video is actually coming from. - Added VDRVERSNUM to config.h, which can be used by the preprocessor to check the actual VDR version (suggested by Stefan Huelswitt). - Removed the WaitForPut/WaitForGet stuff from cRingBuffer, since it appears to no longer be necessary due to the implementation of cNonBlockingFileReader in dvbplayer.c. Also, the long timeout in WaitForPut caused problems with cReceivers that use a ring buffer and didn't immediately return from their Receive() function if the buffer runs full (thanks to Sascha Volkenandt for reporting this one). - Fixed handling EPG data where the "extended event descriptor" comes before the "short event" or a "time shifted event" (thanks to Jonan Santiago). - Disabled the "Received stuffing section in EIT" log message. - Updated 'channels.conf.terr' for Berlin (thanks to Juri Haberland). - Avoiding short display of the "Main" menu when pressing the "Recordings" button 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). - Changed C++ style comments in libdtv into C style to avoid warnings in gcc 3.x (thanks to Andreas Schultz).
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/menu.c b/menu.c
index 7fc2f36..b8dbf5b 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.241 2003/05/03 15:59:07 kls Exp $
+ * $Id: menu.c 1.243 2003/05/11 13:58:13 kls Exp $
*/
#include "menu.h"
@@ -1704,6 +1704,7 @@ cMenuRecordings::cMenuRecordings(const char *Base, int Level, bool OpenSubMenus)
{
base = Base ? strdup(Base) : NULL;
level = Setup.RecordingDirs ? Level : -1;
+ Display(); // this keeps the higher level menus from showing up briefly when pressing 'Back' during replay
if (!Base) {
Interface->Status(tr("scanning recordings..."));
Interface->Flush();
@@ -1737,7 +1738,6 @@ cMenuRecordings::cMenuRecordings(const char *Base, int Level, bool OpenSubMenus)
else if (OpenSubMenus && Open(true))
return;
}
- Display(); // this keeps the higher level menus from showing up briefly when pressing 'Back' during replay
SetHelpKeys();
}
@@ -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);