summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-10-28 16:32:34 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2001-10-28 16:32:34 +0100
commit1cba487e56c12152e1d0b472f2ce5155dfde801e (patch)
tree1423c71c99c400588e6dd6575d4a3a29d9c82f2a
parentfee4982077d5aebadd44afbc2fa3b5f274c93af0 (diff)
downloadvdr-1cba487e56c12152e1d0b472f2ce5155dfde801e.tar.gz
vdr-1cba487e56c12152e1d0b472f2ce5155dfde801e.tar.bz2
Implemented stopping a recording on the primary interface
-rw-r--r--HISTORY5
-rw-r--r--MANUAL14
-rw-r--r--dvbapi.h6
-rw-r--r--i18n.c11
-rw-r--r--menu.c49
-rw-r--r--menu.h3
6 files changed, 79 insertions, 9 deletions
diff --git a/HISTORY b/HISTORY
index 3e4e34b2..acb412f8 100644
--- a/HISTORY
+++ b/HISTORY
@@ -831,7 +831,7 @@ Video Disk Recorder Revision History
- Fixed handling trick modes near the beginning and end of a recording.
- Pressing the "Back" button while replaying a DVD now leads to the DVD menu.
-2001-10-27: Version 0.98
+2001-10-28: Version 0.98
- Completed storing the current audio volume in the setup.conf file (thanks
to Andy Grobb).
@@ -847,3 +847,6 @@ Video Disk Recorder Revision History
- Fixed handling the repeat function in the channel display.
- Avoiding multiple EPG entries for the same event (thanks to Rolf Hakenes
for some valuable information on how to do this).
+- A recording on the primary interface can now be stopped to make it continue
+ on an other free DVB card (if one is free at the moment). See MANUAL for
+ details.
diff --git a/MANUAL b/MANUAL
index 7bb1ec83..a9e42a1b 100644
--- a/MANUAL
+++ b/MANUAL
@@ -310,6 +310,20 @@ Video Disk Recorder User's Manual
A timer can also be programmed by pressing the "Red" button on the "Schedule",
"Now", "Next" or "Event" menus.
+* Stopping a recording on the primary DVB interface
+
+ If the primary DVB interface is currently recording, the user can't switch
+ the channel or replay another recording on that interface. However, if there
+ is an other DVB interface that is currently not recording and provides the
+ necessary conditional access facilities to continue the recording that is
+ currently being performed on the primary DVB interface, the Main menu will
+ contain an option that allows you to stop recording on the primary DVB
+ interface. Select that option to stop the ongoing recording and thus free the
+ primary DVB interface to allow channel switching or replaying. The interrupted
+ recording will be continued on an other free DVB interface. There may be a
+ short discontinuity at that point when replaying that recording later, so you
+ may want to place such an action for instance in a commercial break.
+
* Parameters in the "Setup" menu
Select "Setup" from the "Main" menu to enter the setup menu. From there you can
diff --git a/dvbapi.h b/dvbapi.h
index 557ae5d9..fb9a3fa2 100644
--- a/dvbapi.h
+++ b/dvbapi.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbapi.h 1.55 2001/10/27 12:44:45 kls Exp $
+ * $Id: dvbapi.h 1.56 2001/10/28 15:47:10 kls Exp $
*/
#ifndef __DVBAPI_H
@@ -234,8 +234,6 @@ private:
cPlayBuffer *replayBuffer;
int ca;
int priority;
- int Ca(void) { return ca; }
- // Returns the ca of the current recording session (0..MAXDVBAPI).
int Priority(void) { return priority; }
// Returns the priority of the current recording session (0..MAXPRIORITY),
// or -1 if no recording is currently active.
@@ -244,6 +242,8 @@ private:
void SetModeReplay(void);
void SetModeNormal(bool FromRecording);
public:
+ int Ca(void) { return ca; }
+ // Returns the ca of the current recording session (0..MAXDVBAPI).
int SecondsToFrames(int Seconds);
// Returns the number of frames corresponding to the given number of seconds.
bool Recording(void);
diff --git a/i18n.c b/i18n.c
index 926624a8..764dc338 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.44 2001/09/30 11:31:43 kls Exp $
+ * $Id: i18n.c 1.45 2001/10/28 16:04:58 kls Exp $
*
* Slovenian translations provided by Miha Setina <mihasetina@softhome.net>
* Italian translations provided by Alberto Carraro <bertocar@tin.it>
@@ -376,6 +376,15 @@ const tPhrase Phrases[] = {
"Arręter l'enregistrement?",
"Stoppe opptak?",
},
+ { "on primary interface",
+ "auf dem primären Interface",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ },
{ "Cancel editing?",
"Schneiden abbrechen?",
"Zelite prekiniti urejanje?",
diff --git a/menu.c b/menu.c
index c99e9f03..e5742af9 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.136 2001/10/28 12:00:16 kls Exp $
+ * $Id: menu.c 1.137 2001/10/28 16:03:49 kls Exp $
*/
#include "menu.h"
@@ -1808,11 +1808,15 @@ eOSState cMenuCommands::ProcessKey(eKeys Key)
// --- cMenuMain -------------------------------------------------------------
#define STOP_RECORDING tr(" Stop recording ")
+#define ON_PRIMARY_INTERFACE tr("on primary interface")
cMenuMain::cMenuMain(bool Replaying, eOSState State)
:cOsdMenu(tr("Main"))
{
digit = 0;
+
+ // Basic menu items:
+
Add(new cOsdItem(hk(tr("Schedule")), osSchedule));
Add(new cOsdItem(hk(tr("Channels")), osChannels));
Add(new cOsdItem(hk(tr("Timers")), osTimers));
@@ -1824,8 +1828,20 @@ cMenuMain::cMenuMain(bool Replaying, eOSState State)
Add(new cOsdItem(hk(tr("Setup")), osSetup));
if (Commands.Count())
Add(new cOsdItem(hk(tr("Commands")), osCommands));
+
+ // Replay control:
+
if (Replaying)
Add(new cOsdItem(tr(" Stop replaying"), osStopReplay));
+
+ // Record control:
+
+ if (cRecordControls::StopPrimary()) {
+ char *buffer = NULL;
+ asprintf(&buffer, "%s%s", STOP_RECORDING, ON_PRIMARY_INTERFACE);
+ Add(new cOsdItem(buffer, osStopRecord));
+ }
+
const char *s = NULL;
while ((s = cRecordControls::GetInstantId(s)) != NULL) {
char *buffer = NULL;
@@ -1833,8 +1849,14 @@ cMenuMain::cMenuMain(bool Replaying, eOSState State)
Add(new cOsdItem(buffer, osStopRecord));
delete buffer;
}
+
+ // Editing control:
+
if (cVideoCutter::Active())
Add(new cOsdItem(tr(" Cancel editing"), osCancelEdit));
+
+ // Color buttons:
+
const char *DVDbutton =
#ifdef DVDSUPPORT
cDVD::DiscOk() ? tr("Eject") : NULL;
@@ -1845,6 +1867,9 @@ cMenuMain::cMenuMain(bool Replaying, eOSState State)
Display();
lastActivity = time(NULL);
SetHasHotkeys();
+
+ // Initial submenus:
+
switch (State) {
case osRecordings: AddSubMenu(new cMenuRecordings); break;
#ifdef DVDSUPPORT
@@ -1882,7 +1907,11 @@ eOSState cMenuMain::ProcessKey(eKeys Key)
case osStopRecord: if (Interface->Confirm(tr("Stop recording?"))) {
cOsdItem *item = Get(Current());
if (item) {
- cRecordControls::Stop(item->Text() + strlen(STOP_RECORDING));
+ const char *s = item->Text() + strlen(STOP_RECORDING);
+ if (strcmp(s, ON_PRIMARY_INTERFACE) == 0)
+ cRecordControls::StopPrimary(true);
+ else
+ cRecordControls::Stop(item->Text() + strlen(STOP_RECORDING));
return osEnd;
}
}
@@ -2264,6 +2293,19 @@ void cRecordControls::Stop(cDvbApi *DvbApi)
}
}
+bool cRecordControls::StopPrimary(bool DoIt)
+{
+ if (cDvbApi::PrimaryDvbApi->Recording()) {
+ cDvbApi *dvbApi = cDvbApi::GetDvbApi(cDvbApi::PrimaryDvbApi->Ca(), 0);
+ if (dvbApi) {
+ if (DoIt)
+ Stop(cDvbApi::PrimaryDvbApi);
+ return true;
+ }
+ }
+ return false;
+}
+
const char *cRecordControls::GetInstantId(const char *LastInstantId)
{
for (int i = 0; i < MAXDVBAPI; i++) {
@@ -2358,7 +2400,8 @@ cReplayControl::cReplayControl(void)
timeSearchActive = false;
if (fileName) {
marks.Load(fileName);
- dvbApi->StartReplay(fileName);
+ if (!dvbApi->StartReplay(fileName))
+ Interface->Error(tr("Channel locked (recording)!"));
}
#ifdef DVDSUPPORT
else if (dvd)
diff --git a/menu.h b/menu.h
index b41a935b..250d2ff5 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.33 2001/10/21 14:26:01 kls Exp $
+ * $Id: menu.h 1.34 2001/10/28 15:21:04 kls Exp $
*/
#ifndef _MENU_H
@@ -92,6 +92,7 @@ public:
static bool Start(cTimer *Timer = NULL);
static void Stop(const char *InstantId);
static void Stop(cDvbApi *DvbApi);
+ static bool StopPrimary(bool DoIt = false);
static const char *GetInstantId(const char *LastInstantId);
static void Process(time_t t);
static bool Active(void);