Christian Wieninger wrote: > Am Dienstag, 23. Mai 2006 22:01 schrieb Andreas Brugger: >> This isn't as easy as I thought ... > > no it isn't ;-) But I think my patch should solve the problem. At least it > works fine here. So let's see what Klaus is thinking of it (if he is reading > this). I believe the main problem with the current GetDevice() function is that it doesn't query *all* devices, but rather selects the "first best" device. The attached patch implements a new way of selecting the device. It makes sure all devices are queried and selects the one with the least "impact". The various criteria are represented as parts of an integer number, and in the end the device with the smallest value wins. The most important criteria are pushed into the integer first, resulting in the highest order bits, thus making the most difference. In this patch the new calculation is done in parallel to the old one, and the result is logged in case the decision would be different. The final result is still taken from the old calculation, but once you find the new one stable enough, you can enable the 'return dd' line. There is a lot of debug output in there, so that we can see the individual parts of the decision making. This will be removed in the final version. Please give this a try, and let me know whether it fixes all known problems. Klaus -------------- next part -------------- A non-text attachment was scrubbed... Name: vdr-1.4.0-getdevice.diff Type: text/x-patch Size: 1921 bytes Desc: not available Url : http://www.linuxtv.org/pipermail/vdr/attachments/20060526/62a2dede/vdr-1.4.0-getdevice.bin