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

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

 



Patrick Fischer schrieb:

> Hello Klaus,
>
>>
>> Wouldn't it be enough to simply give your receiver a priority
>> of -2 (anything less than -1 would do)? That way any recording
>> and even a Transfer Mode (which uses priority -1) could detach your
>> receiver.
>>  
>> Klaus
>
>
> now I have rewritten all my code. It seems to work.
>
> this function finds a device which can provide a receiver without 
> detach any receiver. (independent of the prio)
>
> bool needdetach = false;
> bool found = false;
> for (int i=0; (i < (cDevice::NumDevices()-1) && !found);i++){
>   device = cDevice::GetDevice(i);
>   if(device->ProvidesChannel(channel,PRIOCHANGECHANNEL,&needdetach) && 
> !needdetach){    
>     //device can Provide Channel and no receiver has to detach           
>     found = true;
>   }else{
>     device = NULL;   
>   }       
> }
> if(device){
>   device->SwitchChannel(channel,false);
>   device->AttachReceiver(receiver);
> }
>
> on the found device i can add myreceiver with Prio -2
>
> additional I observe all myreceiver. If I want to add a new myreceiver 
> to a device I will look at my local List, if I have already added a 
> receiver to the transponder. If I found one I will add my receiver to 
> the same device.
>
> But now I need to recognize if vdr has detached my receiver.
> So I have used void cMyReciver::Activate(bool On) to recognize if it 
> will detach. The Problem is, that it will only be detached if vdr will
> shutdown.

::Please read my last 2 Posts::


I have insert a detachAll() (without PID!!) to the cDevice. An insert a 
calling into cDvbDevice::SetChannelDevice so all receivers will be 
detached if a user switch the channel.
There are two problems:
-vdr will detachAll if the backgroundScanner(EITScanner??) do his job.
-it is not necessary to detachAll if the User switch to a channel on 
same transponder

By the way, I don't understand why a receiver will not detached if the 
channel+PID don't exist anymore. Isn't that the case why I use Prios < -1?

I hope anybody can tell me some ideas.

I move in a circle...

Patrick




[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