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.
|
- 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.
|
- 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
|
- Completed storing the current audio volume in the setup.conf file (thanks
|
||||||
to Andy Grobb).
|
to Andy Grobb).
|
||||||
@ -847,3 +847,6 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed handling the repeat function in the channel display.
|
- Fixed handling the repeat function in the channel display.
|
||||||
- Avoiding multiple EPG entries for the same event (thanks to Rolf Hakenes
|
- Avoiding multiple EPG entries for the same event (thanks to Rolf Hakenes
|
||||||
for some valuable information on how to do this).
|
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",
|
A timer can also be programmed by pressing the "Red" button on the "Schedule",
|
||||||
"Now", "Next" or "Event" menus.
|
"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
|
* Parameters in the "Setup" menu
|
||||||
|
|
||||||
Select "Setup" from the "Main" menu to enter the setup menu. From there you can
|
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
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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
|
#ifndef __DVBAPI_H
|
||||||
@ -234,8 +234,6 @@ private:
|
|||||||
cPlayBuffer *replayBuffer;
|
cPlayBuffer *replayBuffer;
|
||||||
int ca;
|
int ca;
|
||||||
int priority;
|
int priority;
|
||||||
int Ca(void) { return ca; }
|
|
||||||
// Returns the ca of the current recording session (0..MAXDVBAPI).
|
|
||||||
int Priority(void) { return priority; }
|
int Priority(void) { return priority; }
|
||||||
// Returns the priority of the current recording session (0..MAXPRIORITY),
|
// Returns the priority of the current recording session (0..MAXPRIORITY),
|
||||||
// or -1 if no recording is currently active.
|
// or -1 if no recording is currently active.
|
||||||
@ -244,6 +242,8 @@ private:
|
|||||||
void SetModeReplay(void);
|
void SetModeReplay(void);
|
||||||
void SetModeNormal(bool FromRecording);
|
void SetModeNormal(bool FromRecording);
|
||||||
public:
|
public:
|
||||||
|
int Ca(void) { return ca; }
|
||||||
|
// Returns the ca of the current recording session (0..MAXDVBAPI).
|
||||||
int SecondsToFrames(int Seconds);
|
int SecondsToFrames(int Seconds);
|
||||||
// Returns the number of frames corresponding to the given number of seconds.
|
// Returns the number of frames corresponding to the given number of seconds.
|
||||||
bool Recording(void);
|
bool Recording(void);
|
||||||
|
11
i18n.c
11
i18n.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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>
|
* Slovenian translations provided by Miha Setina <mihasetina@softhome.net>
|
||||||
* Italian translations provided by Alberto Carraro <bertocar@tin.it>
|
* Italian translations provided by Alberto Carraro <bertocar@tin.it>
|
||||||
@ -376,6 +376,15 @@ const tPhrase Phrases[] = {
|
|||||||
"Arrêter l'enregistrement?",
|
"Arrêter l'enregistrement?",
|
||||||
"Stoppe opptak?",
|
"Stoppe opptak?",
|
||||||
},
|
},
|
||||||
|
{ "on primary interface",
|
||||||
|
"auf dem primären Interface",
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
},
|
||||||
{ "Cancel editing?",
|
{ "Cancel editing?",
|
||||||
"Schneiden abbrechen?",
|
"Schneiden abbrechen?",
|
||||||
"Zelite prekiniti urejanje?",
|
"Zelite prekiniti urejanje?",
|
||||||
|
49
menu.c
49
menu.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "menu.h"
|
||||||
@ -1808,11 +1808,15 @@ eOSState cMenuCommands::ProcessKey(eKeys Key)
|
|||||||
// --- cMenuMain -------------------------------------------------------------
|
// --- cMenuMain -------------------------------------------------------------
|
||||||
|
|
||||||
#define STOP_RECORDING tr(" Stop recording ")
|
#define STOP_RECORDING tr(" Stop recording ")
|
||||||
|
#define ON_PRIMARY_INTERFACE tr("on primary interface")
|
||||||
|
|
||||||
cMenuMain::cMenuMain(bool Replaying, eOSState State)
|
cMenuMain::cMenuMain(bool Replaying, eOSState State)
|
||||||
:cOsdMenu(tr("Main"))
|
:cOsdMenu(tr("Main"))
|
||||||
{
|
{
|
||||||
digit = 0;
|
digit = 0;
|
||||||
|
|
||||||
|
// Basic menu items:
|
||||||
|
|
||||||
Add(new cOsdItem(hk(tr("Schedule")), osSchedule));
|
Add(new cOsdItem(hk(tr("Schedule")), osSchedule));
|
||||||
Add(new cOsdItem(hk(tr("Channels")), osChannels));
|
Add(new cOsdItem(hk(tr("Channels")), osChannels));
|
||||||
Add(new cOsdItem(hk(tr("Timers")), osTimers));
|
Add(new cOsdItem(hk(tr("Timers")), osTimers));
|
||||||
@ -1824,8 +1828,20 @@ cMenuMain::cMenuMain(bool Replaying, eOSState State)
|
|||||||
Add(new cOsdItem(hk(tr("Setup")), osSetup));
|
Add(new cOsdItem(hk(tr("Setup")), osSetup));
|
||||||
if (Commands.Count())
|
if (Commands.Count())
|
||||||
Add(new cOsdItem(hk(tr("Commands")), osCommands));
|
Add(new cOsdItem(hk(tr("Commands")), osCommands));
|
||||||
|
|
||||||
|
// Replay control:
|
||||||
|
|
||||||
if (Replaying)
|
if (Replaying)
|
||||||
Add(new cOsdItem(tr(" Stop replaying"), osStopReplay));
|
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;
|
const char *s = NULL;
|
||||||
while ((s = cRecordControls::GetInstantId(s)) != NULL) {
|
while ((s = cRecordControls::GetInstantId(s)) != NULL) {
|
||||||
char *buffer = NULL;
|
char *buffer = NULL;
|
||||||
@ -1833,8 +1849,14 @@ cMenuMain::cMenuMain(bool Replaying, eOSState State)
|
|||||||
Add(new cOsdItem(buffer, osStopRecord));
|
Add(new cOsdItem(buffer, osStopRecord));
|
||||||
delete buffer;
|
delete buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Editing control:
|
||||||
|
|
||||||
if (cVideoCutter::Active())
|
if (cVideoCutter::Active())
|
||||||
Add(new cOsdItem(tr(" Cancel editing"), osCancelEdit));
|
Add(new cOsdItem(tr(" Cancel editing"), osCancelEdit));
|
||||||
|
|
||||||
|
// Color buttons:
|
||||||
|
|
||||||
const char *DVDbutton =
|
const char *DVDbutton =
|
||||||
#ifdef DVDSUPPORT
|
#ifdef DVDSUPPORT
|
||||||
cDVD::DiscOk() ? tr("Eject") : NULL;
|
cDVD::DiscOk() ? tr("Eject") : NULL;
|
||||||
@ -1845,6 +1867,9 @@ cMenuMain::cMenuMain(bool Replaying, eOSState State)
|
|||||||
Display();
|
Display();
|
||||||
lastActivity = time(NULL);
|
lastActivity = time(NULL);
|
||||||
SetHasHotkeys();
|
SetHasHotkeys();
|
||||||
|
|
||||||
|
// Initial submenus:
|
||||||
|
|
||||||
switch (State) {
|
switch (State) {
|
||||||
case osRecordings: AddSubMenu(new cMenuRecordings); break;
|
case osRecordings: AddSubMenu(new cMenuRecordings); break;
|
||||||
#ifdef DVDSUPPORT
|
#ifdef DVDSUPPORT
|
||||||
@ -1882,7 +1907,11 @@ eOSState cMenuMain::ProcessKey(eKeys Key)
|
|||||||
case osStopRecord: if (Interface->Confirm(tr("Stop recording?"))) {
|
case osStopRecord: if (Interface->Confirm(tr("Stop recording?"))) {
|
||||||
cOsdItem *item = Get(Current());
|
cOsdItem *item = Get(Current());
|
||||||
if (item) {
|
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;
|
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)
|
const char *cRecordControls::GetInstantId(const char *LastInstantId)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < MAXDVBAPI; i++) {
|
for (int i = 0; i < MAXDVBAPI; i++) {
|
||||||
@ -2358,7 +2400,8 @@ cReplayControl::cReplayControl(void)
|
|||||||
timeSearchActive = false;
|
timeSearchActive = false;
|
||||||
if (fileName) {
|
if (fileName) {
|
||||||
marks.Load(fileName);
|
marks.Load(fileName);
|
||||||
dvbApi->StartReplay(fileName);
|
if (!dvbApi->StartReplay(fileName))
|
||||||
|
Interface->Error(tr("Channel locked (recording)!"));
|
||||||
}
|
}
|
||||||
#ifdef DVDSUPPORT
|
#ifdef DVDSUPPORT
|
||||||
else if (dvd)
|
else if (dvd)
|
||||||
|
3
menu.h
3
menu.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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
|
#ifndef _MENU_H
|
||||||
@ -92,6 +92,7 @@ public:
|
|||||||
static bool Start(cTimer *Timer = NULL);
|
static bool Start(cTimer *Timer = NULL);
|
||||||
static void Stop(const char *InstantId);
|
static void Stop(const char *InstantId);
|
||||||
static void Stop(cDvbApi *DvbApi);
|
static void Stop(cDvbApi *DvbApi);
|
||||||
|
static bool StopPrimary(bool DoIt = false);
|
||||||
static const char *GetInstantId(const char *LastInstantId);
|
static const char *GetInstantId(const char *LastInstantId);
|
||||||
static void Process(time_t t);
|
static void Process(time_t t);
|
||||||
static bool Active(void);
|
static bool Active(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user