1
0
mirror of https://github.com/rofafor/vdr-plugin-femon.git synced 2023-10-10 13:36:53 +02:00

Check for SAT>IP devices first.

This commit is contained in:
Rolf Ahrenberg 2015-02-07 17:07:02 +02:00
parent e043190855
commit 667da1f5fe

View File

@ -725,6 +725,7 @@ void cFemonOsd::Show(void)
} }
if (m_DeviceSource == DEVICESOURCE_DVBAPI) { if (m_DeviceSource == DEVICESOURCE_DVBAPI) {
if (!strstr(*cDevice::ActualDevice()->DeviceType(), SATIP_DEVICE)) {
cDvbDevice *dev = getDvbDevice(cDevice::ActualDevice()); cDvbDevice *dev = getDvbDevice(cDevice::ActualDevice());
m_Frontend = dev ? open(*cString::sprintf(FRONTEND_DEVICE, dev->Adapter(), dev->Frontend()), O_RDONLY | O_NONBLOCK) : -1; m_Frontend = dev ? open(*cString::sprintf(FRONTEND_DEVICE, dev->Adapter(), dev->Frontend()), O_RDONLY | O_NONBLOCK) : -1;
if (m_Frontend >= 0) { if (m_Frontend >= 0) {
@ -737,9 +738,6 @@ void cFemonOsd::Show(void)
return; return;
} }
} }
else if (strstr(*cDevice::ActualDevice()->DeviceType(), SATIP_DEVICE)) {
// nop
}
else if (femonConfig.usesvdrp) { else if (femonConfig.usesvdrp) {
if (!SvdrpConnect() || !SvdrpTune()) if (!SvdrpConnect() || !SvdrpTune())
return; return;
@ -749,6 +747,7 @@ void cFemonOsd::Show(void)
return; return;
} }
} }
}
else else
m_Frontend = -1; m_Frontend = -1;
@ -785,7 +784,7 @@ void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber, bool li
eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack(); eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack();
const cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel()); const cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
if (!liveView || !channelNumber || !channel || channel->Number() != channelNumber) if (!device || !liveView || !channelNumber || !channel || channel->Number() != channelNumber)
return; return;
m_DeviceSource = DEVICESOURCE_DVBAPI; m_DeviceSource = DEVICESOURCE_DVBAPI;
@ -802,6 +801,7 @@ void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber, bool li
} }
if (m_DeviceSource == DEVICESOURCE_DVBAPI) { if (m_DeviceSource == DEVICESOURCE_DVBAPI) {
if (!strstr(*device->DeviceType(), SATIP_DEVICE)) {
cDvbDevice *dev = getDvbDevice(cDevice::ActualDevice()); cDvbDevice *dev = getDvbDevice(cDevice::ActualDevice());
m_Frontend = dev ? open(*cString::sprintf(FRONTEND_DEVICE, dev->Adapter(), dev->Frontend()), O_RDONLY | O_NONBLOCK) : -1; m_Frontend = dev ? open(*cString::sprintf(FRONTEND_DEVICE, dev->Adapter(), dev->Frontend()), O_RDONLY | O_NONBLOCK) : -1;
if (m_Frontend >= 0) { if (m_Frontend >= 0) {
@ -814,9 +814,6 @@ void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber, bool li
return; return;
} }
} }
else if (strstr(*cDevice::ActualDevice()->DeviceType(), SATIP_DEVICE)) {
// nop
}
else if (femonConfig.usesvdrp) { else if (femonConfig.usesvdrp) {
if (!SvdrpConnect() || !SvdrpTune()) if (!SvdrpConnect() || !SvdrpTune())
return; return;
@ -826,6 +823,7 @@ void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber, bool li
return; return;
} }
} }
}
if (m_Receiver) { if (m_Receiver) {
m_Receiver->Deactivate(); m_Receiver->Deactivate();
@ -917,7 +915,6 @@ bool cFemonOsd::DeviceSwitch(int direction)
} }
// Do the actual switch if valid device found // Do the actual switch if valid device found
if (d && ValidDevice) { if (d && ValidDevice) {
cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), 0, true);
cControl::Shutdown(); cControl::Shutdown();
if (NeedsDetachAllReceivers) if (NeedsDetachAllReceivers)
d->DetachAllReceivers(); d->DetachAllReceivers();
@ -936,7 +933,6 @@ bool cFemonOsd::DeviceSwitch(int direction)
if (d == cDevice::PrimaryDevice()) if (d == cDevice::PrimaryDevice())
d->ForceTransferMode(); d->ForceTransferMode();
cControl::Launch(new cTransferControl(d, channel)); cControl::Launch(new cTransferControl(d, channel));
cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), channel->Number(), true);
return (true); return (true);
} }
} }