summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-05-04 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-05-04 18:00:00 +0200
commitaf2a135212088f0cba6bd8f98544b271c2f71bef (patch)
tree2cb92bca5d346a4214f5be25c3388887419585b8 /device.c
parent0686038af36be65b666bce669957c4d94c13f409 (diff)
downloadvdr-patch-lnbsharing-af2a135212088f0cba6bd8f98544b271c2f71bef.tar.gz
vdr-patch-lnbsharing-af2a135212088f0cba6bd8f98544b271c2f71bef.tar.bz2
Version 1.1.30vdr-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.
Diffstat (limited to 'device.c')
-rw-r--r--device.c70
1 files changed, 39 insertions, 31 deletions
diff --git a/device.c b/device.c
index 67da457..9346d3b 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* 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"
@@ -50,8 +50,6 @@ cDevice::cDevice(void)
ciHandler = NULL;
player = NULL;
- playerDetached = false;
-
for (int i = 0; i < MAXRECEIVERS; i++)
receiver[i] = NULL;
@@ -122,13 +120,6 @@ bool cDevice::HasDecoder(void) const
return false;
}
-bool cDevice::PlayerDetached(void)
-{
- bool result = playerDetached;
- playerDetached = false;
- return result;
-}
-
cOsdBase *cDevice::NewOsd(int x, int y)
{
return NULL;
@@ -224,15 +215,19 @@ bool cDevice::HasPid(int Pid) const
bool cDevice::AddPid(int Pid, ePidType PidType)
{
- if (Pid) {
+ if (Pid || PidType == ptPcr) {
int n = -1;
int a = -1;
- for (int i = 0; i < MAXPIDHANDLES; i++) {
- if (pidHandles[i].pid == Pid)
- n = i;
- else if (a < 0 && i >= ptOther && !pidHandles[i].used)
- a = i;
- }
+ if (PidType != ptPcr) { // PPID always has to be explicit
+ for (int i = 0; i < MAXPIDHANDLES; i++) {
+ if (i != ptPcr) {
+ if (pidHandles[i].pid == Pid)
+ n = i;
+ else if (a < 0 && i >= ptOther && !pidHandles[i].used)
+ a = i;
+ }
+ }
+ }
if (n >= 0) {
// The Pid is already in use
if (++pidHandles[n].used == 2 && n <= ptTeletext) {
@@ -263,22 +258,31 @@ bool cDevice::AddPid(int Pid, ePidType PidType)
return true;
}
-void cDevice::DelPid(int Pid)
+void cDevice::DelPid(int Pid, ePidType PidType)
{
- if (Pid) {
- for (int i = 0; i < MAXPIDHANDLES; i++) {
- if (pidHandles[i].pid == Pid) {
- PRINTPIDS("D");
- if (--pidHandles[i].used < 2) {
- SetPid(&pidHandles[i], i, false);
- if (pidHandles[i].used == 0) {
- pidHandles[i].handle = -1;
- pidHandles[i].pid = 0;
- }
+ if (Pid || PidType == ptPcr) {
+ int n = -1;
+ if (PidType == ptPcr)
+ n = PidType; // PPID always has to be explicit
+ else {
+ for (int i = 0; i < MAXPIDHANDLES; i++) {
+ if (pidHandles[i].pid == Pid) {
+ n = i;
+ 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;
}
+bool cDevice::HasProgramme(void)
+{
+ return Replaying() || pidHandles[ptAudio].pid || pidHandles[ptVideo].pid;
+}
+
void cDevice::SetVolumeDevice(int Volume)
{
}
@@ -523,7 +532,6 @@ void cDevice::Detach(cPlayer *Player)
player->device = NULL;
player = NULL;
SetPlayMode(pmNone);
- playerDetached = true;
Audios.ClearAudio();
}
}