Version 1.1.30

- Fixed minimum lifespan of deleted recordings (thanks to Jaakko Hyvätti).
- Updated French OSD texts (thanks to Olivier Jacques).
- Fixed paging through lists with repeated Left/Right keys.
- Fixed setting the PCR-PID in case it is equal to one of the other PIDs (thanks
  to Oliver Endriss for reporting this one).
- Fixed double call to MainMenuAction() of a plugin if invoked via a hotkey (thanks
  to Kai Moeller for reporting this one).
- Fixed handling dedicated keys.
- Now turning off live PIDs when replaying. This avoids short spikes from other
  channels when switching between Transfer Mode channels, and also lets an ongoing
  replay continue even if a recording is started on the primary device.
- The RCU channel display no longer changes when a recording on a different
  channel starts on the primary device.
- Restoring the current channel in case a recording has switched the transponder.
  If all devices are busy and none of them can provide the current channel, the
  message "Channel not available!" will be displayed.
- Removed the (no longer necessary) 'panic' stuff from cThread.
- Added cStatus::OsdItem() to provide the entire list of menu items to a plugin
  (thanks to Carsten Siebholz).
- The red ("Record") and yellow ("Pause") button in the "Main" menu are no longer
  available when replaying.
This commit is contained in:
Klaus Schmidinger 2003-05-04 18:00:00 +02:00
parent 0686038af3
commit af2a135212
21 changed files with 210 additions and 152 deletions

View File

@ -460,6 +460,8 @@ Oliver Endriss <o.endriss@gmx.de>
for making the "Left" and "Right" buttons set the cursor to the first or last for making the "Left" and "Right" buttons set the cursor to the first or last
list item even if the list consist only of a single page, like, for instance, list item even if the list consist only of a single page, like, for instance,
the Main menu the Main menu
for reporting a bug in setting the PCR-PID in case it is equal to one of the other
PIDs
Reinhard Walter Buchner <rw.buchner@freenet.de> Reinhard Walter Buchner <rw.buchner@freenet.de>
for adding some satellites to 'sources.conf' for adding some satellites to 'sources.conf'
@ -495,6 +497,7 @@ Jaakko Hyv
for adding a check if there is a connection to the keyboard for adding a check if there is a connection to the keyboard
for fixing recording overlapping timers on the same channel in case for fixing recording overlapping timers on the same channel in case
DO_REC_AND_PLAY_ON_PRIMARY_DEVICE and/or DO_MULTIPLE_RECORDINGS is not defined DO_REC_AND_PLAY_ON_PRIMARY_DEVICE and/or DO_MULTIPLE_RECORDINGS is not defined
for fixing the minimum lifespan of deleted recordings
Dennis Noordsij <dennis.noordsij@wiral.com> Dennis Noordsij <dennis.noordsij@wiral.com>
for reporting a small glitch when switching channels for reporting a small glitch when switching channels
@ -551,7 +554,7 @@ Walter Stroebel <walter.stroebel@lifeline.nl>
Paul Gohn <pgohn@nexgo.de> Paul Gohn <pgohn@nexgo.de>
for adding 'Hrvatska radiotelevizija' and 'RTV Slovenija' to ca.conf for adding 'Hrvatska radiotelevizija' and 'RTV Slovenija' to ca.conf
Teemu Rantanen <teemu.rantanen@tekla.com> Teemu Rantanen <tvr@iki.fi>
for increased the maximum possible packet size in remux.c to avoid corrupted streams for increased the maximum possible packet size in remux.c to avoid corrupted streams
with broadcasters that send extremely large PES packets with broadcasters that send extremely large PES packets
for adding TS error checking to remux.c for adding TS error checking to remux.c
@ -618,3 +621,12 @@ Christian Jacobsen <christian.jacobsen@stageholding.de>
Andreas Mair <Andreas.Mair@linogate.com> Andreas Mair <Andreas.Mair@linogate.com>
for reporting a short display of the main menu if a plugin displays its own OSD and for reporting a short display of the main menu if a plugin displays its own OSD and
is started through a user defined key macro is started through a user defined key macro
Olivier Jacques <jacquesolivier@hotmail.com>)
for translating OSD texts to the French language
Kai Moeller <moeller.ki@gmx.de>
for reporting a double call to MainMenuAction() of a plugin if invoked via a hotkey
Carsten Siebholz <c.siebholz@t-online.de>
for adding cStatus::OsdItem() to provide the entire list of menu items to a plugin

24
HISTORY
View File

@ -2084,3 +2084,27 @@ Video Disk Recorder Revision History
- The new SVDRP command STAT can be used to request information about the disk - The new SVDRP command STAT can be used to request information about the disk
usage (thanks to Thomas Koch). usage (thanks to Thomas Koch).
- Fixed faulty calculation of section length in eit.c (thanks to Teemu Rantanen). - Fixed faulty calculation of section length in eit.c (thanks to Teemu Rantanen).
2003-05-04: Version 1.1.30
- Fixed minimum lifespan of deleted recordings (thanks to Jaakko Hyvätti).
- Updated French OSD texts (thanks to Olivier Jacques).
- Fixed paging through lists with repeated Left/Right keys.
- Fixed setting the PCR-PID in case it is equal to one of the other PIDs (thanks
to Oliver Endriss for reporting this one).
- Fixed double call to MainMenuAction() of a plugin if invoked via a hotkey (thanks
to Kai Moeller for reporting this one).
- Fixed handling dedicated keys.
- Now turning off live PIDs when replaying. This avoids short spikes from other
channels when switching between Transfer Mode channels, and also lets an ongoing
replay continue even if a recording is started on the primary device.
- The RCU channel display no longer changes when a recording on a different
channel starts on the primary device.
- Restoring the current channel in case a recording has switched the transponder.
If all devices are busy and none of them can provide the current channel, the
message "Channel not available!" will be displayed.
- Removed the (no longer necessary) 'panic' stuff from cThread.
- Added cStatus::OsdItem() to provide the entire list of menu items to a plugin
(thanks to Carsten Siebholz).
- The red ("Record") and yellow ("Pause") button in the "Main" menu are no longer
available when replaying.

View File

@ -50,13 +50,13 @@ B1:12110:h:S19.2E:27500:601:602:604:0:28206:0:0:0
Premiere Start:11797:h:S19.2E:27500:255:256:0:101:8:0:0:0 Premiere Start:11797:h:S19.2E:27500:255:256:0:101:8:0:0:0
Premiere 1:11797:h:S19.2E:27500:511:512,513;515:0:101:10:0:0:0 Premiere 1:11797:h:S19.2E:27500:511:512,513;515:0:101:10:0:0:0
Premiere 2:11797:h:S19.2E:27500:1791:1792,1793;1795:0:101:11:0:0:0 Premiere 2:11797:h:S19.2E:27500:1791:1792,1793;1795:0:101:11:0:0:0
Premiere 3:11797:h:S19.2E:27500:2303:2304:0:101:43:0:0:0 Premiere 3:11797:h:S19.2E:27500:2303:2304,2305:0:101:43:0:0:0
Premiere 4:11797:h:S19.2E:27500:767:768:0:101:9:0:0:0 Premiere 4:11797:h:S19.2E:27500:767:768,769:0:101:9:0:0:0
Premiere 5:11797:h:S19.2E:27500:1279:1280:0:101:29:0:0:0 Premiere 5:11797:h:S19.2E:27500:1279:1280,1281:0:101:29:0:0:0
Premiere 6:11797:h:S19.2E:27500:1535:1536:0:101:41:0:0:0 Premiere 6:11797:h:S19.2E:27500:1535:1536:0:101:41:0:0:0
Premiere 7:11797:h:S19.2E:27500:1023:1024:0:101:20:0:0:0 Premiere 7:11797:h:S19.2E:27500:1023:1024:0:101:20:0:0:0
13th Street:11758:h:S19.2E:27500:2303:2304:0:101:42:0:0:0 13th Street:11758:h:S19.2E:27500:2303:2304:0:101:42:0:0:0
Studio Universal:12071:h:S19.2E:27500:2047:2048:0:101:36:0:0:0 Studio Universal:11798:h:S19.2E:27500:2047:2048:0:101:36:0:0:0
Premiere Serie:12031:h:S19.2E:27500:1023:1024:0:101:16:0:0:0 Premiere Serie:12031:h:S19.2E:27500:1023:1024:0:101:16:0:0:0
Disney Channel:11758:h:S19.2E:27500:2559:2560:0:101:34:0:0:0 Disney Channel:11758:h:S19.2E:27500:2559:2560:0:101:34:0:0:0
Premiere Nostalgie:12031:h:S19.2E:27500:2559:2560:0:101:516:0:0:0 Premiere Nostalgie:12031:h:S19.2E:27500:2559:2560:0:101:516:0:0:0
@ -67,7 +67,7 @@ Junior:11758:h:S19.2E:27500:255:256:0:101:19:0:0:0
K-Toon:11758:h:S19.2E:27500:511:512:0:101:12:0:0:0 K-Toon:11758:h:S19.2E:27500:511:512:0:101:12:0:0:0
Krimi&Co:12031:h:S19.2E:27500:1535:1536:0:101:23:0:0:0 Krimi&Co:12031:h:S19.2E:27500:1535:1536:0:101:23:0:0:0
Goldstar TV:11758:h:S19.2E:27500:3839:3840:0:101:518:0:0:0 Goldstar TV:11758:h:S19.2E:27500:3839:3840:0:101:518:0:0:0
Classica:11758:h:S19.2E:27500:767:768:0:101:15:0:0:0 MGM:11758:h:S19.2E:27500:767:768:2:101:515:0:0:0
Sonnenklar TV:12090:v:S19.2E:27500:1023:1024:0:0:32:0:0:0 Sonnenklar TV:12090:v:S19.2E:27500:1023:1024:0:0:32:0:0:0
:Premiere Direkt :Premiere Direkt
Premiere Direkt Portal:12031:h:S19.2E:27500:2815:2816:0:101:18:0:0:0 Premiere Direkt Portal:12031:h:S19.2E:27500:2815:2816:0:101:18:0:0:0

View File

@ -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: config.h 1.154 2003/04/21 16:23:15 kls Exp $ * $Id: config.h 1.155 2003/04/27 15:56:04 kls Exp $
*/ */
#ifndef __CONFIG_H #ifndef __CONFIG_H
@ -19,7 +19,7 @@
#include "device.h" #include "device.h"
#include "tools.h" #include "tools.h"
#define VDRVERSION "1.1.29" #define VDRVERSION "1.1.30"
#define MAXPRIORITY 99 #define MAXPRIORITY 99
#define MAXLIFETIME 99 #define MAXLIFETIME 99

View File

@ -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: device.c 1.39 2003/04/12 11:51:04 kls Exp $ * $Id: device.c 1.41 2003/05/03 13:40:15 kls Exp $
*/ */
#include "device.h" #include "device.h"
@ -50,8 +50,6 @@ cDevice::cDevice(void)
ciHandler = NULL; ciHandler = NULL;
player = NULL; player = NULL;
playerDetached = false;
for (int i = 0; i < MAXRECEIVERS; i++) for (int i = 0; i < MAXRECEIVERS; i++)
receiver[i] = NULL; receiver[i] = NULL;
@ -122,13 +120,6 @@ bool cDevice::HasDecoder(void) const
return false; return false;
} }
bool cDevice::PlayerDetached(void)
{
bool result = playerDetached;
playerDetached = false;
return result;
}
cOsdBase *cDevice::NewOsd(int x, int y) cOsdBase *cDevice::NewOsd(int x, int y)
{ {
return NULL; return NULL;
@ -224,15 +215,19 @@ bool cDevice::HasPid(int Pid) const
bool cDevice::AddPid(int Pid, ePidType PidType) bool cDevice::AddPid(int Pid, ePidType PidType)
{ {
if (Pid) { if (Pid || PidType == ptPcr) {
int n = -1; int n = -1;
int a = -1; int a = -1;
for (int i = 0; i < MAXPIDHANDLES; i++) { if (PidType != ptPcr) { // PPID always has to be explicit
if (pidHandles[i].pid == Pid) for (int i = 0; i < MAXPIDHANDLES; i++) {
n = i; if (i != ptPcr) {
else if (a < 0 && i >= ptOther && !pidHandles[i].used) if (pidHandles[i].pid == Pid)
a = i; n = i;
} else if (a < 0 && i >= ptOther && !pidHandles[i].used)
a = i;
}
}
}
if (n >= 0) { if (n >= 0) {
// The Pid is already in use // The Pid is already in use
if (++pidHandles[n].used == 2 && n <= ptTeletext) { if (++pidHandles[n].used == 2 && n <= ptTeletext) {
@ -263,22 +258,31 @@ bool cDevice::AddPid(int Pid, ePidType PidType)
return true; return true;
} }
void cDevice::DelPid(int Pid) void cDevice::DelPid(int Pid, ePidType PidType)
{ {
if (Pid) { if (Pid || PidType == ptPcr) {
for (int i = 0; i < MAXPIDHANDLES; i++) { int n = -1;
if (pidHandles[i].pid == Pid) { if (PidType == ptPcr)
PRINTPIDS("D"); n = PidType; // PPID always has to be explicit
if (--pidHandles[i].used < 2) { else {
SetPid(&pidHandles[i], i, false); for (int i = 0; i < MAXPIDHANDLES; i++) {
if (pidHandles[i].used == 0) { if (pidHandles[i].pid == Pid) {
pidHandles[i].handle = -1; n = i;
pidHandles[i].pid = 0; break;
}
} }
PRINTPIDS("E");
} }
} }
if (n >= 0 && pidHandles[n].used) {
PRINTPIDS("D");
if (--pidHandles[n].used < 2) {
SetPid(&pidHandles[n], n, false);
if (pidHandles[n].used == 0) {
pidHandles[n].handle = -1;
pidHandles[n].pid = 0;
}
}
PRINTPIDS("E");
}
} }
} }
@ -395,6 +399,11 @@ bool cDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
return false; return false;
} }
bool cDevice::HasProgramme(void)
{
return Replaying() || pidHandles[ptAudio].pid || pidHandles[ptVideo].pid;
}
void cDevice::SetVolumeDevice(int Volume) void cDevice::SetVolumeDevice(int Volume)
{ {
} }
@ -523,7 +532,6 @@ void cDevice::Detach(cPlayer *Player)
player->device = NULL; player->device = NULL;
player = NULL; player = NULL;
SetPlayMode(pmNone); SetPlayMode(pmNone);
playerDetached = true;
Audios.ClearAudio(); Audios.ClearAudio();
} }
} }

View File

@ -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: device.h 1.30 2003/04/26 09:49:12 kls Exp $ * $Id: device.h 1.32 2003/05/03 13:35:55 kls Exp $
*/ */
#ifndef __DEVICE_H #ifndef __DEVICE_H
@ -181,6 +181,9 @@ protected:
public: public:
static int CurrentChannel(void) { return primaryDevice ? currentChannel : 0; } static int CurrentChannel(void) { return primaryDevice ? currentChannel : 0; }
///< Returns the number of the current channel on the primary device. ///< Returns the number of the current channel on the primary device.
virtual bool HasProgramme(void);
///< Returns true if the device is currently showing any programme to
///< the user, either through replaying or live.
// PID handle facilities // PID handle facilities
@ -201,7 +204,7 @@ protected:
///< Returns true if this device is currently receiving the given PID. ///< Returns true if this device is currently receiving the given PID.
bool AddPid(int Pid, ePidType PidType = ptOther); bool AddPid(int Pid, ePidType PidType = ptOther);
///< Adds a PID to the set of PIDs this device shall receive. ///< Adds a PID to the set of PIDs this device shall receive.
void DelPid(int Pid); void DelPid(int Pid, ePidType PidType = ptOther);
///< Deletes a PID from the set of PIDs this device shall receive. ///< Deletes a PID from the set of PIDs this device shall receive.
virtual bool SetPid(cPidHandle *Handle, int Type, bool On); virtual bool SetPid(cPidHandle *Handle, int Type, bool On);
///< Does the actual PID setting on this device. ///< Does the actual PID setting on this device.
@ -300,7 +303,6 @@ public:
private: private:
cPlayer *player; cPlayer *player;
bool playerDetached;
protected: protected:
virtual bool CanReplay(void) const; virtual bool CanReplay(void) const;
///< Returns true if this device can currently start a replay session. ///< Returns true if this device can currently start a replay session.
@ -349,8 +351,6 @@ public:
///< Attaches the given player to this device. ///< Attaches the given player to this device.
void Detach(cPlayer *Player); void Detach(cPlayer *Player);
///< Detaches the given player from this device. ///< Detaches the given player from this device.
bool PlayerDetached(void);
///< Returns true if a player has been detached and resets the 'playerDetached' flag.
// Receiver facilities // Receiver facilities

View File

@ -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: dvbdevice.c 1.56 2003/04/27 09:44:17 kls Exp $ * $Id: dvbdevice.c 1.59 2003/05/03 14:03:20 kls Exp $
*/ */
#include "dvbdevice.h" #include "dvbdevice.h"
@ -567,6 +567,24 @@ bool cDvbDevice::SetPid(cPidHandle *Handle, int Type, bool On)
return true; return true;
} }
void cDvbDevice::TurnOffLiveMode(void)
{
// Avoid noise while switching:
CHECK(ioctl(fd_audio, AUDIO_SET_MUTE, true));
CHECK(ioctl(fd_video, VIDEO_SET_BLANK, true));
CHECK(ioctl(fd_audio, AUDIO_CLEAR_BUFFER));
CHECK(ioctl(fd_video, VIDEO_CLEAR_BUFFER));
// Turn off live PIDs:
DelPid(pidHandles[ptAudio].pid);
DelPid(pidHandles[ptVideo].pid);
DelPid(pidHandles[ptPcr].pid, ptPcr);
DelPid(pidHandles[ptTeletext].pid);
DelPid(pidHandles[ptDolby].pid);
}
bool cDvbDevice::ProvidesSource(int Source) const bool cDvbDevice::ProvidesSource(int Source) const
{ {
int type = Source & cSource::st_Mask; int type = Source & cSource::st_Mask;
@ -649,42 +667,18 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
// Turn off live PIDs if necessary: // Turn off live PIDs if necessary:
if (TurnOffLivePIDs) { if (TurnOffLivePIDs)
TurnOffLiveMode();
// Avoid noise while switching:
CHECK(ioctl(fd_audio, AUDIO_SET_MUTE, true));
CHECK(ioctl(fd_video, VIDEO_SET_BLANK, true));
CHECK(ioctl(fd_audio, AUDIO_CLEAR_BUFFER));
CHECK(ioctl(fd_video, VIDEO_CLEAR_BUFFER));
// Turn off live PIDs:
DelPid(pidHandles[ptAudio].pid);
DelPid(pidHandles[ptVideo].pid);
DelPid(pidHandles[ptPcr].pid);
DelPid(pidHandles[ptTeletext].pid);
DelPid(pidHandles[ptDolby].pid);
}
dvbTuner->Set(Channel, DoTune); dvbTuner->Set(Channel, DoTune);
if (DoTune) {
/*XXX do we still need this???
if (!(status & FE_HAS_LOCK)) {
esyslog("ERROR: channel %d not locked on DVB card %d!", Channel->Number(), CardIndex() + 1);
if (LiveView && IsPrimaryDevice())
cThread::RaisePanic();
return false;
}
XXX*/
}
// PID settings: // PID settings:
if (TurnOnLivePIDs) { if (TurnOnLivePIDs) {
aPid1 = Channel->Apid1(); aPid1 = Channel->Apid1();
aPid2 = Channel->Apid2(); aPid2 = Channel->Apid2();
if (!(AddPid(Channel->Ppid(), ptPcr) && AddPid(Channel->Apid1(), ptAudio) && AddPid(Channel->Vpid(), ptVideo))) {//XXX+ dolby dpid1!!! (if audio plugins are attached) int pPid = Channel->Ppid() ? Channel->Ppid() : Channel->Vpid();
if (!(AddPid(pPid, ptPcr) && AddPid(Channel->Apid1(), ptAudio) && AddPid(Channel->Vpid(), ptVideo))) {//XXX+ dolby dpid1!!! (if audio plugins are attached)
esyslog("ERROR: failed to set PIDs for channel %d on device %d", Channel->Number(), CardIndex() + 1); esyslog("ERROR: failed to set PIDs for channel %d on device %d", Channel->Number(), CardIndex() + 1);
return false; return false;
} }
@ -782,6 +776,9 @@ bool cDvbDevice::SetPlayMode(ePlayMode PlayMode)
siProcessor->SetStatus(true); siProcessor->SetStatus(true);
break; break;
case pmAudioVideo: case pmAudioVideo:
if (playMode == pmNone)
TurnOffLiveMode();
// continue with next...
case pmAudioOnlyBlack: case pmAudioOnlyBlack:
if (siProcessor) if (siProcessor)
siProcessor->SetStatus(false); siProcessor->SetStatus(false);

View File

@ -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: dvbdevice.h 1.20 2002/12/15 14:45:29 kls Exp $ * $Id: dvbdevice.h 1.21 2003/05/02 12:21:51 kls Exp $
*/ */
#ifndef __DVBDEVICE_H #ifndef __DVBDEVICE_H
@ -59,6 +59,7 @@ public:
private: private:
cDvbTuner *dvbTuner; cDvbTuner *dvbTuner;
void TurnOffLiveMode(void);
public: public:
virtual bool ProvidesSource(int Source) const; virtual bool ProvidesSource(int Source) const;
virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL) const; virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL) const;

46
i18n.c
View File

@ -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.106 2003/04/21 14:05:17 kls Exp $ * $Id: i18n.c 1.107 2003/05/01 14:10:18 kls Exp $
* *
* Translations provided by: * Translations provided by:
* *
@ -12,7 +12,7 @@
* Italian Alberto Carraro <bertocar@tin.it> * Italian Alberto Carraro <bertocar@tin.it>
* Dutch Arnold Niessen <niessen@iae.nl> <arnold.niessen@philips.com> * Dutch Arnold Niessen <niessen@iae.nl> <arnold.niessen@philips.com>
* Portuguese Paulo Lopes <pmml@netvita.pt> * Portuguese Paulo Lopes <pmml@netvita.pt>
* French Jean-Claude Repetto <jc@repetto.org> * French Jean-Claude Repetto <jc@repetto.org> and Olivier Jacques <jacquesolivier@hotmail.com>
* Norwegian Jørgen Tvedt <pjtvedt@online.no> and Truls Slevigen <truls@slevigen.no> * Norwegian Jørgen Tvedt <pjtvedt@online.no> and Truls Slevigen <truls@slevigen.no>
* Finnish Hannu Savolainen <hannu@opensound.com> and Jaakko Hyvätti <jaakko@hyvatti.iki.fi> * Finnish Hannu Savolainen <hannu@opensound.com> and Jaakko Hyvätti <jaakko@hyvatti.iki.fi>
* Polish Michael Rakowski <mrak@gmx.de> * Polish Michael Rakowski <mrak@gmx.de>
@ -1940,7 +1940,7 @@ const tI18nPhrase Phrases[] = {
"Scrolla pagina nel menu", "Scrolla pagina nel menu",
"Scrollen per pagina", "Scrollen per pagina",
"Scroll da página no menu", "Scroll da página no menu",
"Affichage progr. suivant", "Scrolling par pages",
"Rask rulling i menyer", "Rask rulling i menyer",
"Valikkojen rullaus", "Valikkojen rullaus",
"Przesuwac stronami", "Przesuwac stronami",
@ -1988,7 +1988,7 @@ const tI18nPhrase Phrases[] = {
"Timeout EPG (h)", "Timeout EPG (h)",
"EPG-scan Timeout (h)", "EPG-scan Timeout (h)",
"Expirou o EPG (h)", "Expirou o EPG (h)",
"Temps maxi EPG (h)", "Inactivité avant rech. EPG (h)",
"Ledig tid før EPG-søk (h)", "Ledig tid før EPG-søk (h)",
"Ohjelmatied. odotusaika (h)", "Ohjelmatied. odotusaika (h)",
"Czas do skanu EPG (h)", "Czas do skanu EPG (h)",
@ -2228,7 +2228,7 @@ const tI18nPhrase Phrases[] = {
"Durata predefinita (d)", "Durata predefinita (d)",
"Standaard levensduur (d)", "Standaard levensduur (d)",
"Validade por defeito (d)", "Validade por defeito (d)",
"Durée de vie par défaut (d)", "Durée de vie par défaut (j)",
"Normal levetid timer (d)", "Normal levetid timer (d)",
"Oletus voimassaoloaika (d)", "Oletus voimassaoloaika (d)",
"Pierwotna trwalosc (d)", "Pierwotna trwalosc (d)",
@ -2260,7 +2260,7 @@ const tI18nPhrase Phrases[] = {
"Marca la registrazione", "Marca la registrazione",
"Direkte opnamen markeren", "Direkte opnamen markeren",
"Marca de gravação rápida", "Marca de gravação rápida",
"Enregistrement immédiat", "Marquage enregistr. immédiats",
"Markere direkteopptak", "Markere direkteopptak",
"Merkitse välitön nauh.", "Merkitse välitön nauh.",
"Zaznaczyc natychm. nagranie", "Zaznaczyc natychm. nagranie",
@ -2292,7 +2292,7 @@ const tI18nPhrase Phrases[] = {
"",//TODO "",//TODO
"",//TODO "",//TODO
"",//TODO "",//TODO
"",//TODO "Durée enregistr. immédiat (min)",
"",//TODO "",//TODO
"Pikanauhoituksen pituus (min)", "Pikanauhoituksen pituus (min)",
"",//TODO "",//TODO
@ -2404,7 +2404,7 @@ const tI18nPhrase Phrases[] = {
"Tempo minimo di pausa (min)", // ??? i don't know... "Tempo minimo di pausa (min)", // ??? i don't know...
"Minimale event time-out (min)", "Minimale event time-out (min)",
"Período mínimo de pausa (min)", "Período mínimo de pausa (min)",
"MinEventTimeout (min)", // Too difficult to translate - read the manual! "MinEventTimeout (min)",
"Minste hendelsespause (min)", "Minste hendelsespause (min)",
"Minimi tapahtuman odotus (min)", "Minimi tapahtuman odotus (min)",
"Min. czas do nast. akcji (Event) (min)", "Min. czas do nast. akcji (Event) (min)",
@ -2420,7 +2420,7 @@ const tI18nPhrase Phrases[] = {
"Tempo minimo di inattivita' (min)", "Tempo minimo di inattivita' (min)",
"Minimum gebruikers inactiviteit (min)", "Minimum gebruikers inactiviteit (min)",
"Período mínimo de inactividade (min)", "Período mínimo de inactividade (min)",
"Durée minimale d'inactivité (min)", "Durée minimale d'inact. (min)",
"Minimumstid med inaktivitet (min)", "Minimumstid med inaktivitet (min)",
"Minimi käyttäjän odotus (min)", "Minimi käyttäjän odotus (min)",
"Min. brak aktywnosci uzytkownika (min)", "Min. brak aktywnosci uzytkownika (min)",
@ -2486,7 +2486,7 @@ const tI18nPhrase Phrases[] = {
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO " aàbcçdeéèêfghiîjklmnoôpqrstuùûvxyz0123456789-.#~",
"",// TODO "",// TODO
" abcdefghijklmnopqrstuvxyzåäö0123456789-.#~", " abcdefghijklmnopqrstuvxyzåäö0123456789-.#~",
"",// TODO "",// TODO
@ -2679,7 +2679,7 @@ const tI18nPhrase Phrases[] = {
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "('Menu' pour passer cette touche)",
"",// TODO "",// TODO
"(Paina 'Valikko' jos näppäintä ei ole)", "(Paina 'Valikko' jos näppäintä ei ole)",
"",// TODO "",// TODO
@ -2904,7 +2904,7 @@ const tI18nPhrase Phrases[] = {
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "Lecture",
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
@ -2920,7 +2920,7 @@ const tI18nPhrase Phrases[] = {
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "Pause",
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
@ -2935,7 +2935,7 @@ const tI18nPhrase Phrases[] = {
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "Stop",
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
@ -2952,7 +2952,7 @@ const tI18nPhrase Phrases[] = {
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "Enregistrement",
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
@ -2968,7 +2968,7 @@ const tI18nPhrase Phrases[] = {
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "Avance rapide",
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
@ -2984,7 +2984,7 @@ const tI18nPhrase Phrases[] = {
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "Retour rapide",
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
@ -3016,7 +3016,7 @@ const tI18nPhrase Phrases[] = {
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "Chaîne+",
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
@ -3032,7 +3032,7 @@ const tI18nPhrase Phrases[] = {
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "Chaîne-",
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
@ -3145,7 +3145,7 @@ const tI18nPhrase Phrases[] = {
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "aucun",
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
@ -3161,7 +3161,7 @@ const tI18nPhrase Phrases[] = {
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "auto",
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
@ -3417,7 +3417,7 @@ const tI18nPhrase Phrases[] = {
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "Pause de l'émission en direct...",
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
@ -3433,7 +3433,7 @@ const tI18nPhrase Phrases[] = {
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "Ce plugin n'a pas de paramètres !",
"",// TODO "",// TODO
"Tällä laajennoksella ei ole asetuksia!", "Tällä laajennoksella ei ole asetuksia!",
"",// TODO "",// TODO

8
menu.c
View File

@ -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.240 2003/04/27 12:50:31 kls Exp $ * $Id: menu.c 1.241 2003/05/03 15:59:07 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -2489,7 +2489,7 @@ void cMenuMain::Set(const char *Plugin)
// Color buttons: // Color buttons:
SetHelp(tr("Record"), cDevice::PrimaryDevice()->NumAudioTracks() > 1 ? tr("Language") : NULL, replaying ? NULL : tr("Pause"), replaying ? tr("Button$Stop") : cReplayControl::LastReplayed() ? tr("Resume") : NULL); SetHelp(!replaying ? tr("Record") : NULL, cDevice::PrimaryDevice()->NumAudioTracks() > 1 ? tr("Language") : NULL, replaying ? NULL : tr("Pause"), replaying ? tr("Button$Stop") : cReplayControl::LastReplayed() ? tr("Resume") : NULL);
Display(); Display();
lastActivity = time(NULL); lastActivity = time(NULL);
} }
@ -2547,7 +2547,7 @@ eOSState cMenuMain::ProcessKey(eKeys Key)
default: switch (Key) { default: switch (Key) {
case kRecord: case kRecord:
case kRed: if (!HadSubMenu) case kRed: if (!HadSubMenu)
state = osRecord; state = replaying ? osContinue : osRecord;
break; break;
case kGreen: if (!HadSubMenu) { case kGreen: if (!HadSubMenu) {
int CurrentAudioTrack = -1; int CurrentAudioTrack = -1;
@ -2564,7 +2564,7 @@ eOSState cMenuMain::ProcessKey(eKeys Key)
} }
break; break;
case kYellow: if (!HadSubMenu) case kYellow: if (!HadSubMenu)
state = osPause; state = replaying ? osContinue : osPause;
break; break;
case kBlue: if (!HadSubMenu) case kBlue: if (!HadSubMenu)
state = replaying ? osStopReplay : cReplayControl::LastReplayed() ? osReplay : osContinue; state = replaying ? osStopReplay : cReplayControl::LastReplayed() ? osReplay : osContinue;

10
osd.c
View File

@ -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: osd.c 1.40 2003/03/23 15:41:54 kls Exp $ * $Id: osd.c 1.42 2003/05/03 14:46:38 kls Exp $
*/ */
#include "osd.h" #include "osd.h"
@ -423,6 +423,11 @@ void cOsdMenu::Display(void)
Interface->Help(helpRed, helpGreen, helpYellow, helpBlue); Interface->Help(helpRed, helpGreen, helpYellow, helpBlue);
int count = Count(); int count = Count();
if (count > 0) { if (count > 0) {
for (int i = 0; i < count; i++) {
cOsdItem *item = Get(i);
if (item)
cStatus::MsgOsdItem(item->Text(), i);
}
if (current < 0) if (current < 0)
current = 0; // just for safety - there HAS to be a current item! current = 0; // just for safety - there HAS to be a current item!
int n = 0; int n = 0;
@ -578,7 +583,8 @@ eOSState cOsdMenu::HotKey(eKeys Key)
if (s && (s = skipspace(s)) != NULL) { if (s && (s = skipspace(s)) != NULL) {
if (*s == Key - k1 + '1') { if (*s == Key - k1 + '1') {
current = item->Index(); current = item->Index();
return ProcessKey(kOk); cRemote::Put(kOk, true);
break;
} }
} }
} }

4
rcu.c
View File

@ -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: rcu.c 1.4 2003/04/12 14:37:13 kls Exp $ * $Id: rcu.c 1.5 2003/05/02 14:42:40 kls Exp $
*/ */
#include "rcu.h" #include "rcu.h"
@ -315,7 +315,7 @@ void cRcuRemote::ChannelSwitch(const cDevice *Device, int ChannelNumber)
{ {
if (ChannelNumber && Device->IsPrimaryDevice()) { if (ChannelNumber && Device->IsPrimaryDevice()) {
LOCK_THREAD; LOCK_THREAD;
numberToSend = ChannelNumber; numberToSend = cDevice::CurrentChannel();
} }
} }

View File

@ -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: recording.c 1.75 2003/04/12 09:51:44 kls Exp $ * $Id: recording.c 1.76 2003/04/27 15:52:17 kls Exp $
*/ */
#include "recording.h" #include "recording.h"
@ -78,7 +78,7 @@ void RemoveDeletedRecordings(void)
r0 = r; r0 = r;
r = Recordings.Next(r); r = Recordings.Next(r);
} }
if (r0 && time(NULL) - r0->start > DELETEDLIFETIME * 60) { if (r0 && time(NULL) - r0->start > DELETEDLIFETIME * 3600) {
r0->Remove(); r0->Remove();
RemoveEmptyVideoDirectories(); RemoveEmptyVideoDirectories();
LastRemoveCheck += REMOVELATENCY; LastRemoveCheck += REMOVELATENCY;

View File

@ -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: remote.c 1.36 2002/12/15 15:58:59 kls Exp $ * $Id: remote.c 1.38 2003/05/02 10:49:50 kls Exp $
*/ */
#include "remote.h" #include "remote.h"
@ -58,7 +58,7 @@ void cRemote::Clear(void)
} }
} }
bool cRemote::Put(eKeys Key) bool cRemote::Put(eKeys Key, bool AtFront)
{ {
if (Key != kNone) { if (Key != kNone) {
cMutexLock MutexLock(&mutex); cMutexLock MutexLock(&mutex);
@ -68,9 +68,16 @@ bool cRemote::Put(eKeys Key)
if (d <= 0) if (d <= 0)
d = MaxKeys + d; d = MaxKeys + d;
if (d - 1 > 0) { if (d - 1 > 0) {
keys[in] = Key; if (AtFront) {
if (++in >= MaxKeys) if (--out < 0)
in = 0; out = MaxKeys - 1;
keys[out] = Key;
}
else {
keys[in] = Key;
if (++in >= MaxKeys)
in = 0;
}
keyPressed.Broadcast(); keyPressed.Broadcast();
return true; return true;
} }
@ -123,6 +130,11 @@ bool cRemote::Put(const char *Code, bool Repeat, bool Release)
return false; return false;
} }
bool cRemote::HasKeys(void)
{
return in != out && !(keys[out] & k_Repeat);
}
eKeys cRemote::Get(int WaitMs, char **UnknownCode) eKeys cRemote::Get(int WaitMs, char **UnknownCode)
{ {
for (;;) { for (;;) {

View File

@ -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: remote.h 1.26 2003/04/27 12:05:48 kls Exp $ * $Id: remote.h 1.28 2003/05/02 10:41:35 kls Exp $
*/ */
#ifndef __REMOTE_H #ifndef __REMOTE_H
@ -42,10 +42,10 @@ public:
const char *Name(void) { return name; } const char *Name(void) { return name; }
static void SetLearning(cRemote *Learning) { learning = Learning; } static void SetLearning(cRemote *Learning) { learning = Learning; }
static void Clear(void); static void Clear(void);
static bool Put(eKeys Key); static bool Put(eKeys Key, bool AtFront = false);
static bool PutMacro(eKeys Key); static bool PutMacro(eKeys Key);
static const char *GetPlugin(void) { return plugin; } static const char *GetPlugin(void) { return plugin; }
static bool HasKeys(void) { return in != out; } static bool HasKeys(void);
static eKeys Get(int WaitMs = 1000, char **UnknownCode = NULL); static eKeys Get(int WaitMs = 1000, char **UnknownCode = NULL);
}; };

View File

@ -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: status.c 1.4 2002/07/13 10:49:34 kls Exp $ * $Id: status.c 1.5 2003/05/03 14:47:44 kls Exp $
*/ */
#include "status.h" #include "status.h"
@ -71,6 +71,12 @@ void cStatus::MsgOsdHelpKeys(const char *Red, const char *Green, const char *Yel
sm->OsdHelpKeys(Red, Green, Yellow, Blue); sm->OsdHelpKeys(Red, Green, Yellow, Blue);
} }
void cStatus::MsgOsdItem(const char *Text, int Index)
{
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
sm->OsdItem(Text, Index);
}
void cStatus::MsgOsdCurrentItem(const char *Text) void cStatus::MsgOsdCurrentItem(const char *Text)
{ {
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))

View File

@ -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: status.h 1.5 2002/07/14 10:54:39 kls Exp $ * $Id: status.h 1.6 2003/05/03 14:43:18 kls Exp $
*/ */
#ifndef __STATUS_H #ifndef __STATUS_H
@ -45,6 +45,8 @@ protected:
// If Message is NULL, the status line has been cleared. // If Message is NULL, the status line has been cleared.
virtual void OsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue) {} virtual void OsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue) {}
// The help keys have been set to the given values (may be NULL). // The help keys have been set to the given values (may be NULL).
virtual void OsdItem(const char *Text, int Index) {}
// The OSD displays the given single line Text as menu item at Index.
virtual void OsdCurrentItem(const char *Text) {} virtual void OsdCurrentItem(const char *Text) {}
// The OSD displays the given single line Text as the current menu item. // The OSD displays the given single line Text as the current menu item.
virtual void OsdTextItem(const char *Text, bool Scroll) {} virtual void OsdTextItem(const char *Text, bool Scroll) {}
@ -69,6 +71,7 @@ public:
static void MsgOsdTitle(const char *Title); static void MsgOsdTitle(const char *Title);
static void MsgOsdStatusMessage(const char *Message); static void MsgOsdStatusMessage(const char *Message);
static void MsgOsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue); static void MsgOsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue);
static void MsgOsdItem(const char *Text, int Index);
static void MsgOsdCurrentItem(const char *Text); static void MsgOsdCurrentItem(const char *Text);
static void MsgOsdTextItem(const char *Text, bool Scroll = false); static void MsgOsdTextItem(const char *Text, bool Scroll = false);
static void MsgOsdChannel(const char *Text); static void MsgOsdChannel(const char *Text);

View File

@ -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: thread.c 1.23 2002/11/03 11:00:03 kls Exp $ * $Id: thread.c 1.24 2003/05/03 14:03:32 kls Exp $
*/ */
#include "thread.h" #include "thread.h"
@ -114,8 +114,6 @@ void cMutex::Unlock(void)
// The signal handler is necessary to be able to use SIGIO to wake up any // The signal handler is necessary to be able to use SIGIO to wake up any
// pending 'select()' call. // pending 'select()' call.
time_t cThread::lastPanic = 0;
int cThread::panicLevel = 0;
bool cThread::signalHandlerInstalled = false; bool cThread::signalHandlerInstalled = false;
bool cThread::emergencyExitRequested = false; bool cThread::emergencyExitRequested = false;
@ -191,25 +189,6 @@ void cThread::WakeUp(void)
kill(parentPid, SIGIO); // makes any waiting 'select()' call return immediately kill(parentPid, SIGIO); // makes any waiting 'select()' call return immediately
} }
#define MAXPANICLEVEL 10
void cThread::RaisePanic(void)
{
if (lastPanic > 0) {
if (time(NULL) - lastPanic < 5)
panicLevel++;
else if (panicLevel > 0)
panicLevel--;
}
lastPanic = time(NULL);
if (panicLevel > MAXPANICLEVEL) {
esyslog("ERROR: max. panic level exceeded");
EmergencyExit(true);
}
else
dsyslog("panic level: %d", panicLevel);
}
bool cThread::EmergencyExit(bool Request) bool cThread::EmergencyExit(bool Request)
{ {
if (!Request) if (!Request)

View File

@ -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: thread.h 1.14 2002/08/15 11:40:06 kls Exp $ * $Id: thread.h 1.15 2003/05/03 14:03:36 kls Exp $
*/ */
#ifndef __THREAD_H #ifndef __THREAD_H
@ -48,8 +48,6 @@ private:
cMutex mutex; cMutex mutex;
pid_t parentPid, threadPid; pid_t parentPid, threadPid;
bool running; bool running;
static time_t lastPanic;
static int panicLevel;
static bool emergencyExitRequested; static bool emergencyExitRequested;
static bool signalHandlerInstalled; static bool signalHandlerInstalled;
static void SignalHandler(int signum); static void SignalHandler(int signum);
@ -65,7 +63,6 @@ public:
virtual ~cThread(); virtual ~cThread();
bool Start(void); bool Start(void);
bool Active(void); bool Active(void);
static void RaisePanic(void);
static bool EmergencyExit(bool Request = false); static bool EmergencyExit(bool Request = false);
}; };

11
vdr.1
View File

@ -8,9 +8,9 @@
.\" License as specified in the file COPYING that comes with the .\" License as specified in the file COPYING that comes with the
.\" vdr distribution. .\" vdr distribution.
.\" .\"
.\" $Id: vdr.1 1.6 2002/11/24 16:36:37 kls Exp $ .\" $Id: vdr.1 1.7 2003/05/03 16:16:05 kls Exp $
.\" .\"
.TH vdr 1 "24 Nov 2002" "1.1.0" "Video Disk Recorder" .TH vdr 1 "3 May 2003" "1.1.30" "Video Disk Recorder"
.SH NAME .SH NAME
vdr - the Video Disk Recorder vdr - the Video Disk Recorder
.SH SYNOPSIS .SH SYNOPSIS
@ -94,7 +94,12 @@ in quotes, like for example
\fBvdr -P "abc -a -b xyz"\fR \fBvdr -P "abc -a -b xyz"\fR
which would load a plugin named \fBabc\fR, giving it the command line options which would load a plugin named \fBabc\fR, giving it the command line options
\fB-a\ -b\ xyz\fR. \fB-a\ -b\ xyz\fR. If you want to load all available plugins (without any
particular options) you can use
\fBvdr -P "*"\fR
(note the quotes around the asterisk to prevent wildcard expansion).
.TP .TP
.BI -r\ cmd ,\ --record= cmd .BI -r\ cmd ,\ --record= cmd
Call \fIcmd\fR before and after a recording. Call \fIcmd\fR before and after a recording.

20
vdr.c
View File

@ -22,7 +22,7 @@
* *
* The project's page is at http://www.cadsoft.de/people/kls/vdr * The project's page is at http://www.cadsoft.de/people/kls/vdr
* *
* $Id: vdr.c 1.150 2003/04/21 14:41:41 kls Exp $ * $Id: vdr.c 1.152 2003/05/03 13:39:57 kls Exp $
*/ */
#include <getopt.h> #include <getopt.h>
@ -53,6 +53,7 @@
#include "tools.h" #include "tools.h"
#include "videodir.h" #include "videodir.h"
#define MINCHANNELWAIT 10 // seconds to wait between failed channel switchings
#define ACTIVITYTIMEOUT 60 // seconds before starting housekeeping #define ACTIVITYTIMEOUT 60 // seconds before starting housekeeping
#define SHUTDOWNWAIT 300 // seconds to wait in user prompt before automatic shutdown #define SHUTDOWNWAIT 300 // seconds to wait in user prompt before automatic shutdown
#define MANUALSTART 600 // seconds the next timer must be in the future to assume manual start #define MANUALSTART 600 // seconds the next timer must be in the future to assume manual start
@ -460,9 +461,14 @@ int main(int argc, char *argv[])
} }
// Attach launched player control: // Attach launched player control:
cControl::Attach(); cControl::Attach();
// Make sure Transfer-Mode is re-started after detaching a player: // Make sure we have a visible programme in case device usage has changed:
if (cDevice::PrimaryDevice()->PlayerDetached() && !cDevice::PrimaryDevice()->Replaying()) if (!cDevice::PrimaryDevice()->HasProgramme()) {
Channels.SwitchTo(cDevice::CurrentChannel()); static time_t lastTime = 0;
if (time(NULL) - lastTime > MINCHANNELWAIT) {
if (!Channels.SwitchTo(cDevice::CurrentChannel()))
lastTime = time(NULL); // don't do this too often
}
}
// Restart the Watchdog timer: // Restart the Watchdog timer:
if (WatchdogTimeout > 0) { if (WatchdogTimeout > 0) {
int LatencyTime = WatchdogTimeout - alarm(WatchdogTimeout); int LatencyTime = WatchdogTimeout - alarm(WatchdogTimeout);
@ -503,6 +509,7 @@ int main(int argc, char *argv[])
switch (key) { switch (key) {
// Menu control: // Menu control:
case kMenu: case kMenu:
key = kNone; // nobody else needs to see this key
if (Menu) { if (Menu) {
DELETENULL(Menu); DELETENULL(Menu);
if (!Temp) if (!Temp)
@ -518,14 +525,15 @@ int main(int argc, char *argv[])
if (cControl::Control())\ if (cControl::Control())\
cControl::Control()->Hide();\ cControl::Control()->Hide();\
Menu = new cMenuMain(cControl::Control(), function);\ Menu = new cMenuMain(cControl::Control(), function);\
Temp = NULL; Temp = NULL;\
key = kNone; // nobody else needs to see this key
case kSchedule: DirectMainFunction(osSchedule); break; case kSchedule: DirectMainFunction(osSchedule); break;
case kChannels: DirectMainFunction(osChannels); break; case kChannels: DirectMainFunction(osChannels); break;
case kTimers: DirectMainFunction(osTimers); break; case kTimers: DirectMainFunction(osTimers); break;
case kRecordings: DirectMainFunction(osRecordings); break; case kRecordings: DirectMainFunction(osRecordings); break;
case kSetup: DirectMainFunction(osSetup); break; case kSetup: DirectMainFunction(osSetup); break;
case kCommands: DirectMainFunction(osCommands); break; case kCommands: DirectMainFunction(osCommands); break;
case kUser1 ... kUser9: cRemote::PutMacro(key); break; case kUser1 ... kUser9: cRemote::PutMacro(key); key = kNone; break;
case k_Plugin: DirectMainFunction(osPlugin, cRemote::GetPlugin()); break; case k_Plugin: DirectMainFunction(osPlugin, cRemote::GetPlugin()); break;
// Channel up/down: // Channel up/down:
case kChanUp|k_Repeat: case kChanUp|k_Repeat: