Problem with transfer mode, xine plugin and ActualDevice

Message ID 4367C045.9020303@gmx.de
State New
Headers

Commit Message

Reinhard Nissl Nov. 1, 2005, 7:21 p.m. UTC
  Hi,

Luca Olivetti wrote:

>>Could you please proof the case, where this functionality is turned off
>>and you change the primary device in the ways which VDR offers, i. e.
>>setup menu respectively SVDRP interface?
> 
> I tried that and there's no such problem (I used the dvb setup menu, I
> couldn't find the SVDRP command to switch the primary device).
> The difference is that when I do that through the menu vdr will show a
> message telling me that it's switching the primary interface, while I
> see no such message when xine automatically changes over (btw, now with
> xine-plugin 0.7.6 and vdr 1.3.35)

Please test the attached patch.

Bye.
  

Comments

Luca Olivetti Nov. 1, 2005, 7:48 p.m. UTC | #1
En/na Reinhard Nissl ha escrit:

> 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).

Bye
  
Luca Olivetti Nov. 1, 2005, 9:09 p.m. UTC | #2
En/na Luca Olivetti ha escrit:
> En/na Reinhard Nissl ha escrit:
> 
> 
>>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)" ?

Bye
  

Patch

--- ../xine-0.7.6/xineDevice.c	2005-09-11 21:17:06.000000000 +0200
+++ xineDevice.c	2005-11-01 20:17:54.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;
     }