1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Only calling cStatus::MsgChannelSwitch() for actual switching

This commit is contained in:
Klaus Schmidinger 2002-09-15 11:52:43 +02:00
parent 327c2a7dd2
commit 3a3d4c2a5a
3 changed files with 18 additions and 10 deletions

View File

@ -148,6 +148,8 @@ Stefan Huelswitt <huels@iname.com>
for reporting a bug when entering an integer value outside the limit
for adding play mode pmAudioOnlyBlack
for helping to fix starting a recording of the current channel with only one DVB card
for making cStatus::MsgChannelSwitch() only be called if a channel is actually going to
be switched or has actually been switched successfully
Ulrich Röder <roeder@efr-net.de>
for pointing out that there are channels that have a symbol rate higher than

View File

@ -1468,3 +1468,6 @@ Video Disk Recorder Revision History
(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).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: device.c 1.20 2002/09/15 11:05:41 kls Exp $
* $Id: device.c 1.21 2002/09/15 11:50:19 kls Exp $
*/
#include "device.h"
@ -326,8 +326,6 @@ bool cDevice::SwitchChannel(int Direction)
eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
{
cStatus::MsgChannelSwitch(this, 0);
if (LiveView)
StopReplay();
@ -344,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
@ -352,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;
}