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

Patrick Fischer patrick_fischer at gmx.de
Tue Jan 3 14:37:30 CET 2006


next try....
I have still some problems with the detach of a receiver.

So I have written a small demo Plugin to show my Problem.
The demo is a Plugin that only create and attach a receiver to the first 
device at the startup time. If the Plugin will be stopped, it will 
delete the receiver.

There are some debug output Infos for create, destroy, attach and detach 
the receiver

I get this log if I start, wait an stop the Plugin:

Jan  3 13:50:40 localhost vdr[9343]: VDR version 1.3.37 started
.....
Jan  3 13:50:40 localhost vdr[9343]: initializing plugin: receivertest 
(0.0.1): Enter description for 'receivertest' plugin
.....
Jan  3 13:50:40 localhost vdr[9343]: starting plugin: receivertest
Jan  3 13:50:40 localhost vdr[9343]: switching to channel 5
.....
Jan  3 13:50:40 localhost vdr[9343]: should add Receiver to Channel 5 on 
Device 0 with Vpid 545
Jan  3 13:50:40 localhost vdr[9343]: created a new receiver for ZDF with 
prio -1
Jan  3 13:50:40 localhost vdr[9343]: Attach receiver to ZDF
.....
Jan  3 13:50:40 localhost vdr[9343]: switching to channel 5
.....
Jan  3 13:50:40 localhost vdr[9343]: receiving data from channelname=ZDF 
Jan  3 13:50:41 localhost last message repeated 2205 times
.....
Jan  3 13:53:52 localhost vdr[9343]: caught signal 15
Jan  3 13:53:52 localhost vdr[9343]: stopping plugin: receivertest
Jan  3 13:53:52 localhost vdr[9343]: destroy Receiver for Channel ZDF
Jan  3 13:53:52 localhost vdr[9343]: Detach receiver from ZDF
.....
Jan  3 13:53:52 localhost vdr[9343]: deleting plugin: receivertest
.....
Jan  3 13:53:52 localhost vdr[9343]: exiting


And now I got the Problem, if i switch the channel from ZDF to VOX (same 
VPID) I get the data from VOX not from ZDF:
(cutted)
Jan  3 13:50:40 localhost vdr[9343]: switching to channel 5
Jan  3 13:50:40 localhost vdr[9343]: should add Receiver to Channel 5 on 
Device 0 with Vpid 545
Jan  3 13:50:40 localhost vdr[9343]: created a new receiver for ZDF with 
prio -1
Jan  3 13:50:40 localhost vdr[9343]: Attach receiver to ZDF
Jan  3 13:50:40 localhost vdr[9343]: switching to channel 5
Jan  3 13:50:40 localhost vdr[9343]: receiving data from channelname=ZDF 
Jan  3 13:50:41 localhost last message repeated 2205 times
Jan  3 13:50:43 localhost vdr[9343]: switching to channel 13 //VOX same VPID
Jan  3 13:50:43 localhost vdr[9343]: receiving data from channelname=ZDF 
Jan  3 13:50:43 localhost last message repeated 2205 times

The best way would be if VDR would detach the receiver if the original 
VPID can't be received anymore.
cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool 
*NeedsDetachReceivers)
can return if the Receiver need to be detached. But VDR didn't use this 
Info.

My demo Plugin will be attached to this email.
Please read it. I have written over a hour at the demo and this mail! :-(

Greetings
Patrick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: receivertest.c
Type: text/x-csrc
Size: 2424 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/vdr/attachments/20060103/130fadb8/receivertest.c


More information about the vdr mailing list