From patchwork Wed Aug 23 15:51:24 2006 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anssi Hannula X-Patchwork-Id: 12376 Received: from pne-smtpout3-sn1.fre.skanova.net ([81.228.11.120]) by www.linuxtv.org with esmtp (Exim 4.50) id 1GFv1Y-0000qA-9E for vdr@linuxtv.org; Wed, 23 Aug 2006 17:52:12 +0200 Received: from mail.onse.fi (80.223.77.223) by pne-smtpout3-sn1.fre.skanova.net (7.2.075) id 44A130990021A348 for vdr@linuxtv.org; Wed, 23 Aug 2006 17:51:41 +0200 Received: from [10.0.0.3] (kone [10.0.0.3]) by mail.onse.fi (Postfix) with ESMTP id 4C9E2470C366 for ; Wed, 23 Aug 2006 18:51:24 +0300 (EEST) Message-ID: <44EC797C.6020902@gmail.com> Date: Wed, 23 Aug 2006 18:51:24 +0300 From: Anssi Hannula User-Agent: Thunderbird 1.5.0.5 (X11/20060818) MIME-Version: 1.0 To: VDR Mailing List Subject: Re: [vdr] Re: VDR prefers my CI DVB device for recordings and blocks it unnecessarily References: <20060820230505.17688GcOzDp244@wizard.castle> <44E8EB72.2040906@gmx.de> <44E9536B.500@cadsoft.de> <44E9B129.3060501@gmail.com> In-Reply-To: <44E9B129.3060501@gmail.com> X-Enigmail-Version: 0.94.0.0 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: Wed, 23 Aug 2006 15:52:12 -0000 Status: O X-Status: X-Keywords: X-UID: 10495 Anssi Hannula wrote: > Klaus Schmidinger wrote: >> In this particular case I guess the recording really shouldn't >> start on the primary card, because the osdteletext plugin isn't >> a "real" recording process. >> >> So how shall we distinguish between cReceivers that do actual >> recordings and such that just receive, e.g., teletext data? >> Or those that receive a radio channel for streaming it to >> a remote client? Where's the limit? > > Hm, every cReceiver which doesn't receive critical data has -1 priority. > The only exception is the transfer-mode, which has -1 too. And here's the patch. diff -Nurp -x '*~' vdr-1.4.1-5/device.c vdr-1.4.1-5-mod/device.c --- vdr-1.4.1-5/device.c 2006-08-20 21:59:20.000000000 +0300 +++ vdr-1.4.1-5-mod/device.c 2006-08-23 18:41:26.000000000 +0300 @@ -292,7 +292,7 @@ cDevice *cDevice::GetDevice(const cChann // to their individual severity, where the one listed first will make the most // difference, because it results in the most significant bit of the result. uint imp = 0; - imp <<= 1; imp |= !device[i]->Receiving(true) || ndr; // use receiving devices if we don't need to detach existing receivers + imp <<= 1; imp |= !device[i]->Receiving() && device[i] != cTransferControl::ReceiverDevice() || ndr; // use receiving devices if we don't need to detach existing receivers imp <<= 1; imp |= device[i]->Receiving(); // avoid devices that are receiving imp <<= 1; imp |= device[i] == cTransferControl::ReceiverDevice(); // avoid the Transfer Mode receiver device imp <<= 8; imp |= min(max(device[i]->Priority() + MAXPRIORITY, 0), 0xFF); // use the device with the lowest priority (+MAXPRIORITY to assure that values -99..99 can be used)