receive data with low prio, so user-action can detach the receiver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have written a quick and dirty patch to build my requested function.
It is too dirty to use it. It only work in the case you use always the 
transfermode.

But now I can show how it should work.

--- vdr-1.3.37_orig/device.c    2005-11-26 13:56:09.000000000 +0100
+++ vdr-1.3.37/device.c 2006-01-03 16:54:18.000000000 +0100
@@ -588,7 +588,23 @@
   // use the card that actually can receive it and transfer data from 
there:

   if (NeedsTransferMode) {
-     cDevice *CaDevice = GetDevice(Channel, 0);
+     bool ntd;
+     cDevice *CaDevice = GetDevice(Channel, 0, &ntd);
+     if (ntd){//detach all receivers from device
+        dsyslog("need to detach all receivers from device");
+        for (int i = 0; i < MAXRECEIVERS; i++) {
+          //  CaDevice->receiver[i]->Detach();
+          if (CaDevice->receiver[i]){
+              dsyslog("%d will be detached",i);
+              CaDevice->receiver[i]->Detach();
+              //CaDevice->receiver[i]->Activate(false);
+              //CaDevice->receiver[i] = NULL;
+              //CaDevice->receiver[i]->device = NULL;
+              //for (int n = 0; n < CaDevice->receiver[i]->numPids; n++)
+              //    DelPid(CaDevice->receiver[i]->pids[n]);
+          }
+        }
+      }
      if (CaDevice && CanReplay()) {
         cStatus::MsgChannelSwitch(this, 0); // only report status if we 
are actually going to switch the channel
         if (CaDevice->SetChannel(Channel, false) == scrOk) // calling 
SetChannel() directly, not SwitchChannel()!



[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux