summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-09-15 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-09-15 18:00:00 +0200
commit346f4cd1420bb02bd9cec4059385c9922d64fc3f (patch)
tree69d37a27b1b95df39f390b8ef34225da2234265e /device.c
parent523c4a07aa9112841743fca2ebcce957fde03bc8 (diff)
downloadvdr-patch-lnbsharing-346f4cd1420bb02bd9cec4059385c9922d64fc3f.tar.gz
vdr-patch-lnbsharing-346f4cd1420bb02bd9cec4059385c9922d64fc3f.tar.bz2
Version 1.1.10vdr-1.1.10
- Removed a superfluous error message from cLockFile::Unlock() (reported by Helmut Auer). - Fixed starting a recording of the current channel with only one DVB card (thanks to Stefan Huelswitt for his help). - A previous 'Transfer Mode' is now automatically re-started after a replay stops. - Only calling cStatus::MsgChannelSwitch() if a channel is actually going to be switched or has actually been switched successfully (thanks to Stefan Huelswitt). - The EPG now drops events from "other" streams that have a duration of 86400 seconds or more (this avoids bogus entries like "PROGRAMMES ALLEMANDS"). - Fixed opening /dev/video in cDvbDevice::GrabImage() in case of NEWSTRUCT driver (thanks to Andreas Schultz). - Added a missing StripAudioPackets() to cDvbPlayer::Action() (thanks to Stefan Huelswitt). - Added an EPG bugfix for the latest VOX EPG data format.
Diffstat (limited to 'device.c')
-rw-r--r--device.c43
1 files changed, 23 insertions, 20 deletions
diff --git a/device.c b/device.c
index 72f1fc6..830c3ef 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.19 2002/09/08 14:03:43 kls Exp $
+ * $Id: device.c 1.21 2002/09/15 11:50:19 kls Exp $
*/
#include "device.h"
@@ -47,6 +47,8 @@ cDevice::cDevice(void)
player = NULL;
+ playerDetached = false;
+
for (int i = 0; i < MAXRECEIVERS; i++)
receiver[i] = NULL;
ca = -1;
@@ -108,6 +110,13 @@ 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;
@@ -317,8 +326,6 @@ bool cDevice::SwitchChannel(int Direction)
eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
{
- cStatus::MsgChannelSwitch(this, 0);
-
if (LiveView)
StopReplay();
@@ -335,6 +342,7 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
if (NeedsTransferMode) {
cDevice *CaDevice = GetDevice(Channel, 0);
if (CaDevice) {
+ cStatus::MsgChannelSwitch(this, 0); // only report status if we are actually going to switch the channel
if (CaDevice->SetChannel(Channel, false) == scrOk) // calling SetChannel() directly, not SwitchChannel()!
cControl::Launch(new cTransferControl(CaDevice, Channel->vpid, Channel->apid1, 0, 0, 0));//XXX+
else
@@ -343,15 +351,19 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
else
Result = scrNotAvailable;
}
- else if (!SetChannelDevice(Channel, LiveView))
- Result = scrFailed;
-
- if (Result == scrOk && LiveView && IsPrimaryDevice()) {
- cSIProcessor::SetCurrentServiceID(Channel->pnr);
- currentChannel = Channel->number;
+ else {
+ cStatus::MsgChannelSwitch(this, 0); // only report status if we are actually going to switch the channel
+ if (!SetChannelDevice(Channel, LiveView))
+ Result = scrFailed;
}
- cStatus::MsgChannelSwitch(this, Channel->number);
+ if (Result == scrOk) {
+ if (LiveView && IsPrimaryDevice()) {
+ cSIProcessor::SetCurrentServiceID(Channel->pnr);
+ currentChannel = Channel->number;
+ }
+ cStatus::MsgChannelSwitch(this, Channel->number); // only report status if channel switch successfull
+ }
return Result;
}
@@ -438,6 +450,7 @@ void cDevice::Detach(cPlayer *Player)
player->device = NULL;
player = NULL;
SetPlayMode(pmNone);
+ playerDetached = true;
}
}
@@ -447,16 +460,6 @@ void cDevice::StopReplay(void)
Detach(player);
if (IsPrimaryDevice())
cControl::Shutdown();
- /*XXX+
- if (IsPrimaryDevice()) {
- // let's explicitly switch the channel back in case it was in Transfer Mode:
- cChannel *Channel = Channels.GetByNumber(currentChannel);
- if (Channel) {
- Channel->Switch(this, false);
- usleep(100000); // allow driver to sync in case a new replay will start immediately
- }
- }
- XXX*/
}
}