From patchwork Mon Dec 6 15:48:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rolf Ahrenberg X-Patchwork-Id: 12847 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.69) (envelope-from ) id 1PPdIx-00086w-4h for vdr@linuxtv.org; Mon, 06 Dec 2010 16:48:43 +0100 X-tubIT-Incoming-IP: 130.233.228.92 Received: from smtp-2.hut.fi ([130.233.228.92]) by mail.tu-berlin.de (exim-4.69/mailfrontend-b) with esmtps [TLSv1:AES256-SHA:256] for id 1PPdIw-000396-8a; Mon, 06 Dec 2010 16:48:42 +0100 Received: from localhost (katosiko.hut.fi [130.233.228.115]) by smtp-2.hut.fi (8.13.6/8.12.10) with ESMTP id oB6FmeYd013389 for ; Mon, 6 Dec 2010 17:48:40 +0200 Received: from smtp-2.hut.fi ([130.233.228.92]) by localhost (katosiko.hut.fi [130.233.228.115]) (amavisd-new, port 10024) with LMTP id 01992-163 for ; Mon, 6 Dec 2010 17:48:40 +0200 (EET) Received: from kosh.hut.fi (kosh.hut.fi [130.233.228.12]) by smtp-2.hut.fi (8.13.6/8.12.10) with ESMTP id oB6FmYxE013375 for ; Mon, 6 Dec 2010 17:48:34 +0200 Date: Mon, 6 Dec 2010 17:48:34 +0200 (EET) From: Rolf Ahrenberg To: VDR Mailing List In-Reply-To: <16948_1291639211_ZZ0LD0004LJB6YQ3.00_25669_1291639210_4CFCD9AA_25669_2975_1_4CFCD961.4000700@arcor.de> Message-ID: References: <4CFC0BB0.70306@dolze.de> <4CFC1324.9080704@tvdr.de> <16948_1291639211_ZZ0LD0004LJB6YQ3.00_25669_1291639210_4CFCD9AA_25669_2975_1_4CFCD961.4000700@arcor.de> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 X-TKK-Virus-Scanned: by amavisd-new-2.1.2-hutcc at katosiko.hut.fi X-PMX-Version: 5.5.4.371499, Antispam-Engine: 2.7.1.369594, Antispam-Data: 2010.12.6.153621 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' BODY_SIZE_3000_3999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __URI_NO_MAILTO 0, __URI_NO_PATH 0, __URI_NO_WWW 0, __USER_AGENT 0' X-LSpam-Score: -4.6 (----) X-LSpam-Report: No, score=-4.6 required=5.0 tests=AWL=-0.976, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1 autolearn=ham Subject: Re: [vdr] Request: E parameter in channels.conf for epg scan X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Dec 2010 15:48:43 -0000 Status: O X-Status: X-Keywords: X-UID: 23942 On Mon, 6 Dec 2010, Mario Schulz wrote: > Am 05.12.2010 23:33, schrieb Klaus Schmidinger: >> What would that be necessary for? I'd like to prevent EIT scans on IPTV devices. > In its default behaviour VDR will add transponders and channels to the > channels.conf, as a result these will be searched and probably result in > a match and a timer entry, even for uninteresting or undecodable channels. The following patch might expose the necessary API for plugins to create white and/or blacklists for EIT scanning on certain devices/channels. BR, --- rofa diff -Nru vdr-1.7.16-vanilla/device.c vdr-1.7.16-eitscan/device.c --- vdr-1.7.16-vanilla/device.c 2010-09-19 19:42:08.000000000 +0300 +++ vdr-1.7.16-eitscan/device.c 2010-12-06 17:36:33.000000000 +0200 @@ -56,6 +56,11 @@ return true; } +bool cDeviceHook::DeviceProvidesEITScan(const cDevice *Device, const cChannel *Channel) const +{ + return true; +} + // --- cDevice --------------------------------------------------------------- // The default priority for non-primary devices: @@ -594,6 +599,17 @@ return true; } +bool cDevice::DeviceHooksProvidesEITScan(const cChannel *Channel) const +{ + cDeviceHook *Hook = deviceHooks.First(); + while (Hook) { + if (!Hook->DeviceProvidesEITScan(this, Channel)) + return false; + Hook = deviceHooks.Next(Hook); + } + return true; +} + bool cDevice::ProvidesTransponder(const cChannel *Channel) const { return false; diff -Nru vdr-1.7.16-vanilla/device.h vdr-1.7.16-eitscan/device.h --- vdr-1.7.16-vanilla/device.h 2010-09-19 19:42:08.000000000 +0300 +++ vdr-1.7.16-eitscan/device.h 2010-12-06 17:41:18.000000000 +0200 @@ -96,6 +96,8 @@ ///< program ends. virtual bool DeviceProvidesTransponder(const cDevice *Device, const cChannel *Channel) const; ///< Returns true if the given Device can provide the given Channel's transponder. + virtual bool DeviceProvidesEITScan(const cDevice *Device, const cChannel *Channel) const; + ///< Returns true if the given Device can scan EIT on the given Channel's transponder. }; /// The cDevice class is the base from which actual devices can be derived. @@ -204,6 +206,8 @@ static cList deviceHooks; protected: bool DeviceHooksProvidesTransponder(const cChannel *Channel) const; +public: + bool DeviceHooksProvidesEITScan(const cChannel *Channel) const; // SPU facilities diff -Nru vdr-1.7.16-vanilla/eitscan.c vdr-1.7.16-eitscan/eitscan.c --- vdr-1.7.16-vanilla/eitscan.c 2010-09-19 19:42:08.000000000 +0300 +++ vdr-1.7.16-eitscan/eitscan.c 2010-12-06 17:38:40.000000000 +0200 @@ -146,7 +146,7 @@ if (Device) { for (cScanData *ScanData = scanList->First(); ScanData; ScanData = scanList->Next(ScanData)) { const cChannel *Channel = ScanData->GetChannel(); - if (Channel) { + if (Channel && Device->DeviceHooksProvidesEITScan(Channel)) { if (!Channel->Ca() || Channel->Ca() == Device->DeviceNumber() + 1 || Channel->Ca() >= CA_ENCRYPTED_MIN) { if (Device->ProvidesTransponder(Channel)) { if (!Device->Receiving()) {