LinuxTV Patchwork [OsdTeletext] detach receiver for VDR 1.7.25

login
register
mail settings
Submitter Udo Richter
Date March 3, 2012, 2:59 p.m.
Message ID <4F5231C4.9000007@gmx.de>
Download mbox | patch
Permalink /patch/12933/
State New
Headers show

Comments

Udo Richter - March 3, 2012, 2:59 p.m.
Hi list,


To actually make use of the new MsgChannelSwitch behavior of VDR 1.7.25,
I've quickly hacked an experimental patch to use this to detach the old
receiver before VDR attempts to switch channel. With this, channel
switching should not jump between receivers for FF cards, avoiding
transfer mode whenever possible. Please test.

Cheers,

Udo
Andreas Brachold - March 3, 2012, 8:40 p.m.
Hello Udo,  

Your patch looks like a dirty hack, but it works here. ;-)

But there is a small syntax error at #ifdef

It should be :
----------------------------------
#if VDRVERSNUM >= 10725
   // Disconnect receiver if channel is 0, will reconnect to new
   // receiver after channel change.
   if (ChannelNumber == 0 && Device->IsPrimaryDevice()) {
      if(receiver)
          delete receiver;
      receiver = NULL;
   }
#endif
----------------------------------

Regards,
Andreas
Udo Richter - March 3, 2012, 8:56 p.m.
Am 03.03.2012 21:40, schrieb Andreas Brachold:
> It should be :
> ----------------------------------
> #if VDRVERSNUM >= 10725

Ouch, you're right, of course...

COMPILER! Y U NO ERROR?

Cheers,

Udo

Patch

--- osdteletext/txtrecv.c.bak	2012-03-03 15:11:53.000000000 +0100
+++ osdteletext/txtrecv.c	2012-03-03 15:19:27.000000000 +0100
@@ -485,6 +485,15 @@ 
 
 void cTxtStatus::ChannelSwitch(const cDevice *Device, int ChannelNumber)
 {
+#ifdef VDRVERSNUM >= 10725
+   // Disconnect receiver if channel is 0, will reconnect to new
+   // receiver after channel change.
+   if (ChannelNumber == 0 && Device->IsPrimaryDevice()) {
+      delete receiver;
+      receiver = NULL;
+   }
+#endif
+
    // ignore if channel is 0
    if (ChannelNumber == 0) return;
 

Privacy Policy