mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Fixed handling primary device on headless systems
This commit is contained in:
parent
552f5fc4e7
commit
fe97a38e77
@ -2561,6 +2561,7 @@ Markus Ehrnsperger <markus.ehrnsperger@googlemail.com>
|
|||||||
any more
|
any more
|
||||||
for removing syslog calls in child process after fork()
|
for removing syslog calls in child process after fork()
|
||||||
for adding the move constructor to cString for better performance
|
for adding the move constructor to cString for better performance
|
||||||
|
for fixing handling primary device on headless systems
|
||||||
|
|
||||||
Werner Färber <w.faerber@gmx.de>
|
Werner Färber <w.faerber@gmx.de>
|
||||||
for reporting a bug in handling the cPluginManager::Active() result when pressing
|
for reporting a bug in handling the cPluginManager::Active() result when pressing
|
||||||
|
3
HISTORY
3
HISTORY
@ -9863,7 +9863,7 @@ Video Disk Recorder Revision History
|
|||||||
- The recording info of the default skins now shows the frame parameters of the
|
- The recording info of the default skins now shows the frame parameters of the
|
||||||
recording at the end of the description (if such information is available).
|
recording at the end of the description (if such information is available).
|
||||||
|
|
||||||
2024-01-21:
|
2024-01-22:
|
||||||
|
|
||||||
- Changed installing config files to handle potentially broken 'cp -n'.
|
- Changed installing config files to handle potentially broken 'cp -n'.
|
||||||
- Fixed height calculation in progress display (thanks to Matthias Senzel).
|
- Fixed height calculation in progress display (thanks to Matthias Senzel).
|
||||||
@ -9881,3 +9881,4 @@ Video Disk Recorder Revision History
|
|||||||
Ehrnsperger).
|
Ehrnsperger).
|
||||||
- Added the total number of errors when logging new recording errors.
|
- Added the total number of errors when logging new recording errors.
|
||||||
- Added '/' to the list of fuzzy characters for pattern timers.
|
- Added '/' to the list of fuzzy characters for pattern timers.
|
||||||
|
- Fixed handling primary device on headless systems (thanks to Markus Ehrnsperger).
|
||||||
|
10
device.c
10
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 5.9 2024/01/18 10:58:39 kls Exp $
|
* $Id: device.c 5.10 2024/01/22 12:10:30 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
@ -807,10 +807,6 @@ bool cDevice::MaySwitchTransponder(const cChannel *Channel) const
|
|||||||
bool cDevice::SwitchChannel(const cChannel *Channel, bool LiveView)
|
bool cDevice::SwitchChannel(const cChannel *Channel, bool LiveView)
|
||||||
{
|
{
|
||||||
if (LiveView) {
|
if (LiveView) {
|
||||||
if (!PrimaryDevice()->CanReplay()) {
|
|
||||||
isyslog("can't switch to live channel %d %s (%s)", Channel->Number(), *Channel->GetChannelID().ToString(), Channel->Name());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
isyslog("switching to channel %d %s (%s)", Channel->Number(), *Channel->GetChannelID().ToString(), Channel->Name());
|
isyslog("switching to channel %d %s (%s)", Channel->Number(), *Channel->GetChannelID().ToString(), Channel->Name());
|
||||||
cControl::Shutdown(); // prevents old channel from being shown too long if GetDevice() takes longer
|
cControl::Shutdown(); // prevents old channel from being shown too long if GetDevice() takes longer
|
||||||
// and, if decrypted, this removes the now superfluous PIDs from the CAM, too
|
// and, if decrypted, this removes the now superfluous PIDs from the CAM, too
|
||||||
@ -880,7 +876,7 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
|
|||||||
DELETENULL(dvbSubtitleConverter);
|
DELETENULL(dvbSubtitleConverter);
|
||||||
}
|
}
|
||||||
|
|
||||||
cDevice *Device = (LiveView && IsPrimaryDevice()) ? GetDevice(Channel, LIVEPRIORITY, true) : this;
|
cDevice *Device = (LiveView && IsPrimaryDevice(false)) ? GetDevice(Channel, LIVEPRIORITY, true) : this;
|
||||||
|
|
||||||
bool NeedsTransferMode = LiveView && Device != PrimaryDevice();
|
bool NeedsTransferMode = LiveView && Device != PrimaryDevice();
|
||||||
// If the CAM slot wants the TS data, we need to switch to Transfer Mode:
|
// If the CAM slot wants the TS data, we need to switch to Transfer Mode:
|
||||||
@ -927,7 +923,7 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Result == scrOk) {
|
if (Result == scrOk) {
|
||||||
if (LiveView && IsPrimaryDevice()) {
|
if (LiveView && IsPrimaryDevice(false)) {
|
||||||
if (patFilter) // this is only for FF DVB cards!
|
if (patFilter) // this is only for FF DVB cards!
|
||||||
patFilter->Request(Channel->Sid());
|
patFilter->Request(Channel->Sid());
|
||||||
currentChannel = Channel->Number();
|
currentChannel = Channel->Number();
|
||||||
|
4
device.h
4
device.h
@ -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.h 5.2 2022/01/24 16:53:45 kls Exp $
|
* $Id: device.h 5.3 2024/01/22 12:10:30 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DEVICE_H
|
#ifndef __DEVICE_H
|
||||||
@ -217,7 +217,7 @@ protected:
|
|||||||
///< May be dropped in a future version, if a better solution is found.
|
///< May be dropped in a future version, if a better solution is found.
|
||||||
///< Do not use otherwise!
|
///< Do not use otherwise!
|
||||||
public:
|
public:
|
||||||
bool IsPrimaryDevice(void) const { return this == primaryDevice && HasDecoder(); }
|
bool IsPrimaryDevice(bool CheckDecoder = true) const { return this == primaryDevice && (!CheckDecoder || HasDecoder()); }
|
||||||
int CardIndex(void) const { return cardIndex; }
|
int CardIndex(void) const { return cardIndex; }
|
||||||
///< Returns the card index of this device (0 ... MAXDEVICES - 1).
|
///< Returns the card index of this device (0 ... MAXDEVICES - 1).
|
||||||
int DeviceNumber(void) const;
|
int DeviceNumber(void) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user