From patchwork Sun Jun 18 19:56:57 2006 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herbert Poetzl X-Patchwork-Id: 12340 Received: from mail.13thfloor.at ([212.16.62.50]) by www.linuxtv.org with esmtp (Exim 4.50) id 1Fs3OE-000741-JC for vdr@linuxtv.org; Sun, 18 Jun 2006 21:56:58 +0200 Received: by mail.13thfloor.at (Postfix, from userid 1001) id 526FE3FC65; Sun, 18 Jun 2006 21:56:57 +0200 (CEST) Date: Sun, 18 Jun 2006 21:56:57 +0200 From: Herbert Poetzl To: Rolf.Ahrenberg@sci.fi Message-ID: <20060618195657.GA5046@MAIL.13thfloor.at> References: <20060617230135.GA422@MAIL.13thfloor.at> Mime-Version: 1.0 Content-Disposition: inline In-Reply-To: <20060617230135.GA422@MAIL.13thfloor.at> User-Agent: Mutt/1.5.6i Cc: vdr@linuxtv.org Subject: [vdr] Re: femon cleanup/SVDRP enhancement X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 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: Sun, 18 Jun 2006 19:56:58 -0000 Status: O X-Status: X-Keywords: X-UID: 9832 On Sun, Jun 18, 2006 at 01:01:36AM +0200, Herbert Poetzl wrote: > > Hi Rolf! Folks! > > the first patch moves most of the value-to-string > conversions from femonosd.c to femontools.c and > declares them properly in the femontools.h file. > the osd part is updated to utilize them. > > the second patch extends the SVDRP interface of > femon by a basic INFO command (which can easily > be extended in the future), giving output like > this: > > PLUG femon INFO > 900- Frequency: 11158 Mhz Source: S13.0E > 900- Srate: 27500 Polarization: V > 900- Inversion: Auto Coderate: Auto, Auto > 900- Vpid: 369 Ppid: 369 Tpid: 0 > 900- Sid: 13108 Nid: 0 Tid: 0 Rid: 0 > 900- Apid: 370 > 900- Dpid: 0 > 900 CA: 1801 > > would be nice to get some feedback > > TIA, > Herbert > > [patch zapped] here is a small but important fix to the previous patches, which showed up while testing channels with more than one *pid best, Herbert --- femon-1.0.1.2/femontools.c 2006-06-18 21:49:57.000000000 +0200 +++ femon-1.0.1.3/femontools.c 2006-06-18 21:36:31.000000000 +0200 @@ -41,19 +41,16 @@ cString getFrontendInfo(int cardIndex) int freq = channel->Frequency(); while (freq > 20000) freq /= 1000; - cString apid_str = cString::sprintf("%5d", channel->Apid(0)); - value = 1; - while (channel->Apid(value) && (value < MAXAPIDS)) + cString apid_str = cString::sprintf("%5d", channel->Apid(value=0)); + while (channel->Apid(++value) && (value < MAXAPIDS)) apid_str = cString::sprintf("%s, %d", *apid_str, channel->Apid(value)); - cString dpid_str = cString::sprintf("%5d", channel->Dpid(0)); - value = 1; - while (channel->Dpid(value) && (value < MAXDPIDS)) + cString dpid_str = cString::sprintf("%5d", channel->Dpid(value=0)); + while (channel->Dpid(++value) && (value < MAXDPIDS)) dpid_str = cString::sprintf("%s, %d", *dpid_str, channel->Dpid(value)); - cString ca_str = cString::sprintf(" %04x", channel->Ca(0)); - value = 1; - while (channel->Ca(value) && (value < MAXCAIDS)) + cString ca_str = cString::sprintf(" %04x", channel->Ca(value=0)); + while (channel->Ca(++value) && (value < MAXCAIDS)) ca_str = cString::sprintf("%s, %04x", *ca_str, channel->Ca(value)); return cString::sprintf(