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:
parent
327c2a7dd2
commit
3a3d4c2a5a
@ -148,6 +148,8 @@ Stefan Huelswitt <huels@iname.com>
|
|||||||
for reporting a bug when entering an integer value outside the limit
|
for reporting a bug when entering an integer value outside the limit
|
||||||
for adding play mode pmAudioOnlyBlack
|
for adding play mode pmAudioOnlyBlack
|
||||||
for helping to fix starting a recording of the current channel with only one DVB card
|
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>
|
Ulrich Röder <roeder@efr-net.de>
|
||||||
for pointing out that there are channels that have a symbol rate higher than
|
for pointing out that there are channels that have a symbol rate higher than
|
||||||
|
3
HISTORY
3
HISTORY
@ -1468,3 +1468,6 @@ Video Disk Recorder Revision History
|
|||||||
(thanks to Stefan Huelswitt for his help).
|
(thanks to Stefan Huelswitt for his help).
|
||||||
- A previous 'Transfer Mode' is now automatically re-started after a replay
|
- A previous 'Transfer Mode' is now automatically re-started after a replay
|
||||||
stops.
|
stops.
|
||||||
|
- Only calling cStatus::MsgChannelSwitch() if a channel is actually going to
|
||||||
|
be switched or has actually been switched successfully (thanks to Stefan
|
||||||
|
Huelswitt).
|
||||||
|
23
device.c
23
device.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: 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"
|
#include "device.h"
|
||||||
@ -326,8 +326,6 @@ bool cDevice::SwitchChannel(int Direction)
|
|||||||
|
|
||||||
eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
|
eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
|
||||||
{
|
{
|
||||||
cStatus::MsgChannelSwitch(this, 0);
|
|
||||||
|
|
||||||
if (LiveView)
|
if (LiveView)
|
||||||
StopReplay();
|
StopReplay();
|
||||||
|
|
||||||
@ -344,6 +342,7 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
|
|||||||
if (NeedsTransferMode) {
|
if (NeedsTransferMode) {
|
||||||
cDevice *CaDevice = GetDevice(Channel, 0);
|
cDevice *CaDevice = GetDevice(Channel, 0);
|
||||||
if (CaDevice) {
|
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()!
|
if (CaDevice->SetChannel(Channel, false) == scrOk) // calling SetChannel() directly, not SwitchChannel()!
|
||||||
cControl::Launch(new cTransferControl(CaDevice, Channel->vpid, Channel->apid1, 0, 0, 0));//XXX+
|
cControl::Launch(new cTransferControl(CaDevice, Channel->vpid, Channel->apid1, 0, 0, 0));//XXX+
|
||||||
else
|
else
|
||||||
@ -352,15 +351,19 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
|
|||||||
else
|
else
|
||||||
Result = scrNotAvailable;
|
Result = scrNotAvailable;
|
||||||
}
|
}
|
||||||
else if (!SetChannelDevice(Channel, LiveView))
|
else {
|
||||||
Result = scrFailed;
|
cStatus::MsgChannelSwitch(this, 0); // only report status if we are actually going to switch the channel
|
||||||
|
if (!SetChannelDevice(Channel, LiveView))
|
||||||
if (Result == scrOk && LiveView && IsPrimaryDevice()) {
|
Result = scrFailed;
|
||||||
cSIProcessor::SetCurrentServiceID(Channel->pnr);
|
|
||||||
currentChannel = Channel->number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
return Result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user