mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Implemented stopping a recording on the primary interface
This commit is contained in:
parent
fee4982077
commit
1cba487e56
5
HISTORY
5
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.
|
||||
|
14
MANUAL
14
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
|
||||
|
6
dvbapi.h
6
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);
|
||||
|
11
i18n.c
11
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?",
|
||||
|
47
menu.c
47
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,6 +1907,10 @@ eOSState cMenuMain::ProcessKey(eKeys Key)
|
||||
case osStopRecord: if (Interface->Confirm(tr("Stop recording?"))) {
|
||||
cOsdItem *item = Get(Current());
|
||||
if (item) {
|
||||
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)
|
||||
|
3
menu.h
3
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);
|
||||
|
Loading…
Reference in New Issue
Block a user