From patchwork Sun Mar 27 15:48:03 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Olivetti X-Patchwork-Id: 11829 Received: from 232.red-213-97-27.pooles.rima-tde.net ([213.97.27.232]) by www.linuxtv.org with esmtp (Exim 4.34) id 1DFa05-0001B5-MY for vdr@linuxtv.org; Sun, 27 Mar 2005 17:48:30 +0200 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by 232.Red-213-97-27.pooles.rima-tde.net (Postfix) with ESMTP id CB7B4189FAE5 for ; Sun, 27 Mar 2005 17:48:11 +0200 (CEST) Message-ID: <4246D5B3.8060209@ventoso.org> Date: Sun, 27 Mar 2005 17:48:03 +0200 From: Luca Olivetti User-Agent: Mozilla Thunderbird 0.9 (X11/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Klaus Schmidinger's VDR Subject: Re: [vdr] How to get a notification of a completed transponder scan? References: <424427D2.4040806@ventoso.org> <4246BDA6.5030506@ventoso.org> In-Reply-To: <4246BDA6.5030506@ventoso.org> X-Enigmail-Version: 0.89.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Klaus Schmidinger's VDR List-Id: Klaus Schmidinger's VDR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2005 15:48:30 -0000 Status: O X-Status: X-Keywords: X-UID: 1141 Luca Olivetti wrote: > Luca Olivetti wrote: > >> Currently both the channelscan and the actuator plugin offer an option >> to scan a complete satellite by tuning to each transponder and then >> waiting for 10 seconds. >> Is it possible to get a notification when all of the transponder data >> has been received? (I's assume it'd take less than 10 seconds, so a >> complete satellite scan should be noticeably faster). > > > Per chance is the most suitable place doing the following test right > before the end of cSdtFilter::Process in sdt.c? > > if (sdt.getSectionNumber() == sdt.getLastSectionNumber()) ..... > > (the ..... is something to notify the device that all data has been > received, but before modifying the guts of device.[ch] I'd like to be > sure this is the correct place). I just couldn't wait ;-) WDYT about the attached patch? Bye --- device.c.fastscan 2005-03-27 16:08:42.978265685 +0200 +++ device.c 2005-03-27 16:15:48.696586409 +0200 @@ -489,6 +489,12 @@ sectionHandler->Detach(Filter); } +bool cDevice::EndOfScan(void) +{ + if (sdtFilter) return sdtFilter->EndOfScan(); + return false; +} + bool cDevice::ProvidesSource(int Source) const { return false; --- device.h.fastscan 2005-03-27 16:08:49.640207866 +0200 +++ device.h 2005-03-27 16:15:48.696586000 +0200 @@ -9,6 +9,7 @@ #ifndef __DEVICE_H #define __DEVICE_H +#define FASTSCAN_PATCHED #include "csa.h" #include "ci.h" @@ -279,6 +280,8 @@ ///< Attaches the given filter to this device. void Detach(cFilter *Filter); ///< Detaches the given filter from this device. + bool EndOfScan(void); + ///< All sdt data received after a channel switch // Common Interface facilities: --- sdt.c.fastscan 2005-03-27 16:00:37.754124228 +0200 +++ sdt.c 2005-03-27 17:39:19.497295538 +0200 @@ -18,6 +18,7 @@ cSdtFilter::cSdtFilter(cPatFilter *PatFilter) { patFilter = PatFilter; + endOfScan = false; Set(0x11, 0x42); // SDT } @@ -25,6 +26,7 @@ { cFilter::SetStatus(On); sectionSyncer.Reset(); + endOfScan = false; } void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length) @@ -123,4 +125,8 @@ } } Channels.Unlock(); + if (sdt.getSectionNumber() == sdt.getLastSectionNumber()) { + endOfScan = true; + //printf ("sdt, end of scan\n"); + } } --- sdt.h.fastscan 2005-03-27 16:01:09.309180845 +0200 +++ sdt.h 2005-03-27 16:04:09.267159174 +0200 @@ -17,10 +17,12 @@ private: cSectionSyncer sectionSyncer; cPatFilter *patFilter; + bool endOfScan; protected: virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length); public: cSdtFilter(cPatFilter *PatFilter); + bool EndOfScan(void) { return endOfScan; }; virtual void SetStatus(bool On); };