From patchwork Wed Jan 2 22:10:51 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Reinhard Nissl X-Patchwork-Id: 12564 Received: from mail.gmx.net ([213.165.64.20]) by www.linuxtv.org with smtp (Exim 4.63) (envelope-from ) id 1JABo3-0006ka-0n for vdr@linuxtv.org; Wed, 02 Jan 2008 23:11:23 +0100 Received: (qmail invoked by alias); 02 Jan 2008 22:10:52 -0000 Received: from p549334E6.dip0.t-ipconnect.de (EHLO [192.168.101.15]) [84.147.52.230] by mail.gmx.net (mp031) with SMTP; 02 Jan 2008 23:10:52 +0100 X-Authenticated: #527675 X-Provags-ID: V01U2FsdGVkX1+1ALF/u+W1HPKOMQWNBEk/3zEv50iWKUq6TQq9GB 335oqGNdwjmtql Message-ID: <477C0BEB.6020104@gmx.de> Date: Wed, 02 Jan 2008 23:10:51 +0100 From: Reinhard Nissl User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.8.1.9) Gecko/20070801 SUSE/2.0.0.9-0.1 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: VDR Mailing List References: <47480207.7010109@gmx.de> <477ABB9E.1090103@gmx.de> <20080102141859.GA10310@gmail.com> <477BA9F4.4020403@gmail.com> <20080102152756.GC10310@gmail.com> <477BAE7D.6080601@gmail.com> <20080102155326.GD10310@gmail.com> <477BBAFD.2070601@gmail.com> <477BD0C4.9040401@gmx.de> <477BD462.2050502@gmail.com> In-Reply-To: <477BD462.2050502@gmail.com> X-Y-GMX-Trusted: 0 Subject: Re: [vdr] [ANNOUNCE] DVB-S2 + H.264 support for VDR-1.5.12 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 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, 02 Jan 2008 22:11:23 -0000 Status: O X-Status: X-Keywords: X-UID: 14977 Hi, Manu Abraham schrieb: >>> The patched version doesn't look at the device capability flags, before issuing a tune ? >>> Or is something else wrong/missing ? >> >> I must admit, I didn't have a look at the source code so far, but >> from what I recall, I don't think that it is that easy. I think, >> a simple check will only make VDR tell you that the channel in >> question cannot be received. >> >> I've experienced myself that VDR used the DVB-S2 card for a DVB-S >> recording and then endlessly tried to switch to a DVB-S2 channel >> using the DVB-S card -- obviously without success. > > How can you ask a DVB-S device to tune to DVB-S2 ? Poor demodulator, > it has to do what it is not even capable of. :) > >> VDR's device selection logic is already quite complex. It has to >> deal with FF cards which have so far been used to watch the DVB-S >> channels, cards which provide CI interfaces and simple receiver >> cards. Moreover it now would have to deal with cards capable of >> doing DVB-S2, with or without CI interface respectively. > > The logic wouldn't be much different. It is the same as requesting a DVB-C > device to be tuned to DVB-S. The CI interface doesn't make the hardware > look any different. > >> As I'm only distributing the DVB-S2 part which Marco Schlüßler >> provided several months ago, I've contacted him and asked him for >> an update. > > Ok, I will ask Marco on the relevant. Thanks for the feedback. Well, I was in contact with Marco already and attached you'll find a minimalistic change which reports "channel not available". Now VDR should already be able to kick a low priority DVB-S recording (or transfer thread) from a DVB-S2 device. Still missing is to prefer DVB-S devices for DVB-S recordings so that DVB-S2 devices remain available for DVB-S2 recordings of same priority. The patch is incremental to the original dvbs2 patch from yesterday, i. e. you can simply apply it to your already patched VDR. Bye. --- ../vdr-1.5.12-dvbs2-other/dvbdevice.c 2008-01-01 22:55:18.000000000 +0100 +++ dvbdevice.c 2008-01-02 22:25:49.000000000 +0100 @@ -798,7 +798,13 @@ bool cDvbDevice::ProvidesSource(int Sour bool cDvbDevice::ProvidesTransponder(const cChannel *Channel) const { - return ProvidesSource(Channel->Source()) && (!cSource::IsSat(Channel->Source()) || !Setup.DiSEqC || Diseqcs.Get(Channel->Source(), Channel->Frequency(), Channel->Polarization())); + if (!ProvidesSource(Channel->Source())) + return false; // doesn't provide source + if (!cSource::IsSat(Channel->Source())) + return true; // source is sufficient + if (Channel->ModulationSystem() && !(frontendType & DVBFE_DELSYS_DVBS2)) + return false; // requires DVB-S2, but device doesn't provide it + return !Setup.DiSEqC || Diseqcs.Get(Channel->Source(), Channel->Frequency(), Channel->Polarization()); } bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers) const @@ -807,7 +813,7 @@ bool cDvbDevice::ProvidesChannel(const c bool hasPriority = Priority < 0 || Priority > this->Priority(); bool needsDetachReceivers = false; - if (ProvidesSource(Channel->Source())) { + if (ProvidesTransponder(Channel)) { result = hasPriority; if (Priority >= 0 && Receiving(true)) { if (dvbTuner->IsTunedTo(Channel)) {