From patchwork Tue Nov 1 21:45:22 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reinhard Nissl X-Patchwork-Id: 12078 Received: from mail.gmx.net ([213.165.64.20]) by www.linuxtv.org with smtp (Exim 4.50) id 1EX3x7-0002R5-5c for vdr@linuxtv.org; Tue, 01 Nov 2005 22:45:57 +0100 Received: (qmail invoked by alias); 01 Nov 2005 21:45:24 -0000 Received: from Af3a6.a.pppool.de (EHLO [192.168.101.15]) [213.6.243.166] by mail.gmx.net (mp022) with SMTP; 01 Nov 2005 22:45:24 +0100 X-Authenticated: #527675 Message-ID: <4367E1F2.7090509@gmx.de> Date: Tue, 01 Nov 2005 22:45:22 +0100 From: Reinhard Nissl User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Klaus Schmidinger's VDR Subject: Re: [vdr] Problem with transfer mode, xine plugin and ActualDevice References: <43679260.9060403@ventoso.org> <4367A306.5050308@gmx.de> <4367ABAC.1060501@ventoso.org> <4367C045.9020303@gmx.de> <4367C6AA.8020003@ventoso.org> <4367D97E.707@ventoso.org> In-Reply-To: <4367D97E.707@ventoso.org> X-Y-GMX-Trusted: 0 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: Tue, 01 Nov 2005 21:45:57 -0000 Status: O X-Status: X-Keywords: X-UID: 5789 Hi, Luca Olivetti wrote: >>>Please test the attached patch. >> >>It doesn't work (i.e. it works like without the patch, only there's a >>message telling that the primary device is changing). > > Correction: it works when switching to xine, it doesn't when switching > *from* xine (you forgot the cControl::Shutdown() in the other direction). > BTW, shouldn't the "originalPrimaryDevice = primaryDevice" be inside the > "if (this != primaryDevice)" ? So the revised patch (see attachment) should work now as expected, isn't it? Bye. --- ../xine-0.7.6/xineDevice.c 2005-09-11 21:17:06.000000000 +0200 +++ xineDevice.c 2005-11-01 22:41:23.000000000 +0100 @@ -2582,6 +2590,8 @@ store_frame(jumboPESdata, todo, __LINE__ { if (On) new cXineOsdProvider(*this); + else + cOsdProvider::Shutdown(); originalPrimaryDevice = 0; } @@ -2630,7 +2640,12 @@ store_frame(jumboPESdata, todo, __LINE__ { cDevice *primaryDevice = cDevice::PrimaryDevice(); if (this != primaryDevice) + { + cControl::Shutdown(); + Skins.Message(mtInfo, tr("Switching primary DVB to vdr-xine...")); SetPrimaryDevice(1 + DeviceNumber()); + } + originalPrimaryDevice = primaryDevice; } @@ -2647,7 +2662,11 @@ store_frame(jumboPESdata, todo, __LINE__ && originalPrimaryDevice) { if (this != originalPrimaryDevice) + { + cControl::Shutdown(); SetPrimaryDevice(1 + originalPrimaryDevice->DeviceNumber()); + Skins.Message(mtInfo, tr("Switched primary DVB back from vdr-xine")); + } } }