From 18bb52554f8dbaa72cfb6ca72ebd64c04b738950 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 10 Mar 2019 12:10:01 +0100 Subject: [PATCH] Fixed accessing the actual frontend on multi frontend devices --- CONTRIBUTORS | 1 + HISTORY | 1 + dvbdevice.c | 8 +++++++- dvbdevice.h | 4 ++-- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 3d6399de..eb88b196 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -3569,6 +3569,7 @@ Helmut Binder for fixing switching through encrypted channels with the Up/Down keys for deactivating MTD support if a non MCD capable CAM is inserted after removing a previously used CAM that is MCD capable + for fixing accessing the actual frontend on multi frontend devices Ulrich Eckhardt for reporting a problem with shutdown after user inactivity in case a plugin is diff --git a/HISTORY b/HISTORY index 6cd17ad8..6ca76642 100644 --- a/HISTORY +++ b/HISTORY @@ -9373,3 +9373,4 @@ Video Disk Recorder Revision History manuals of multi frontend DVB cards. - Reverted the change "The EIT filter no longer parses data from "other TS"...". It led to missing EPG data on channels from Canal Digital Norway (reported by Stian B. Barmen). +- Fixed accessing the actual frontend on multi frontend devices (thanks to Helmut Binder). diff --git a/dvbdevice.c b/dvbdevice.c index c708aef9..9835645b 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 4.18 2018/10/29 12:22:11 kls Exp $ + * $Id: dvbdevice.c 4.19 2019/03/10 12:03:20 kls Exp $ */ #include "dvbdevice.h" @@ -571,6 +571,7 @@ public: bool ProvidesDeliverySystem(int DeliverySystem) const; bool ProvidesModulation(int System, int StreamId, int Modulation) const; bool ProvidesFrontend(const cChannel *Channel, bool Activate = false) const; + int Frontend(void) const { return frontend; } int FrontendType(void) const { return frontendType; } const char *FrontendName(void) { return dvbFrontend->FrontendName(); } int NumProvidedSystems(void) const { return numDeliverySystems + numModulations; } @@ -1869,6 +1870,11 @@ int DvbOpen(const char *Name, int Adapter, int Frontend, int Mode, bool ReportEr return fd; } +int cDvbDevice::Frontend(void) const +{ + return dvbTuner ? dvbTuner->Frontend() : frontend; +} + bool cDvbDevice::Exists(int Adapter, int Frontend) { cString FileName = DvbName(DEV_DVB_FRONTEND, Adapter, Frontend); diff --git a/dvbdevice.h b/dvbdevice.h index 530e8ba7..4e8f82ee 100644 --- a/dvbdevice.h +++ b/dvbdevice.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.h 4.5 2018/10/20 11:39:11 kls Exp $ + * $Id: dvbdevice.h 4.6 2019/03/10 12:01:15 kls Exp $ */ #ifndef __DVBDEVICE_H @@ -189,7 +189,7 @@ public: cDvbDevice(int Adapter, int Frontend); virtual ~cDvbDevice(); int Adapter(void) const { return adapter; } - int Frontend(void) const { return frontend; } + int Frontend(void) const; virtual cString DeviceType(void) const; virtual cString DeviceName(void) const; static bool BondDevices(const char *Bondings);