Hi everybody,
i have a question regarding the streamdev plugin. I have 2 tv cards, both gets accessed with the pvrinput plugin, but the problem i have would be the same with dvb devices. I also watch TV on the PC with the two cards.
I have another pc (laptop) with vdr installed. There i installed the streamdev-client plugin.
When switching the channel on the laptop with the up/down keys, the live picture gets interrupted with a black screen for about half a second. My wife doesn't like this very much.
I had a look into the source code and found following: - The receiver of the pc has the priority 0, the receiver of the streamdev-server 1. - When switching with the up/down keys, the streamdev-client sends an "PROV"-Message to the streamdev-server. The streamdev-server tries to get a device (Method cServerConnection::GetDevice). The Receiver of the "old" streamdev-channel is still receiving. - The Method cServerConnection::GetDevice calls cDevice::GetDevice. The priority in the function call is 1. In the cDevice::GetDevice method the devices gets iterated, calling on each device the method cDevice::ProvidesChannel. Because the priority property of this call is 1, the "old" receiver of the streamdev-server has also a priority of 1 and the live-receiver has the priority of 0, the only device which can provide the channel is the device of the live-tv. - In the latter of the method cDevice::GetDevice the live-receiver gets detached via "d->DetachAllReceivers".
Later in the code of cServerConnection::GetDevice, if the Method cDevice::GetDevice doesn't return a device, the current receiver gets detached. In my infrastructure this doesnt happend because the live receiver will nearly always gets detached ( The only exception is when a timer records). To prevent this, i changed the code in that way that the streamdev-receiver gets detached before calling cDevice::GetDevice).
Is the detaching of live-tv an known issue or is this a feature ? Should have the live tv receiver a priority greather than streamdev-receiver ? If so, the live-tv wouldn't get detached ?
Regards, Rainer
Hi Rainer,
On Mon, 5 Jul 2010 07:28:37 +0200, Rainer Blickle wrote
thanks for tracking this issue down and for the detailed bugreport. The DetachAllReceivers part in cDevice::GetDevice(...) was introduced in VDR 1.5.0. This change effectively turned this method from being a "query only" method into something with side effects.
The proper (though not nice) solution seems to be copying cDevice::GetDevice(...) into streamdev server, leaving out the problematic parts.
I quickly hacked together a patch at http://www.vdr-developer.org/mantisbt/view.php?id=582. It's totally untested, but maybe you want to give it a try. Might take a while until I have time to test it.
Regards, Frank
Hi Frank,
my first (and also not nice) fix on my dev system was to detach the current receiver before calling cDevice::GetDevice. But this is also only a quickfix because when a timer records, the live tv will be stopped because of the priority.
My first not-quickfix idea was to add a additional boolean parameter to the cDevice::GetDevice method, for convenience with a default value (e.g. detachIfNecessary). If this value is true, the method would detach the receiver. If this value is false, the method wouldn't detach. With a value of false, the Method would still be a query method.
Regards, Rainer
2010/7/6 Frank Schmirler vdr@schmirler.de:
"Frank Schmirler" vdr@schmirler.de writes:
[...]
Hi,
The patch applies to the source, it even compiles. but it's unusable because of one unresolved symbol. (tested with the getdevice-0.3.diff patch and a clean vdr source tree)
"Frank Schmirler" vdr@schmirler.de writes:
Ok, thanks i'll test that right away. Have you had a look at http://projects.vdr-developer.org/issues/show/10 ?
On Tue, 27 Jul 2010 15:07:23 +0200, syrius.ml wrote
Have you had a look at http://projects.vdr-developer.org/issues/show/10 ?
Yep: http://www.linuxtv.org/pipermail/vdr/2010-July/023243.html Hope Klaus integrates the patch.
Frank
Am 13.03.2011 15:18, schrieb Klaus Schmidinger:
That would be me, actually. This was on the list last July: http://www.linuxtv.org/pipermail/vdr/2010-July/023240.html
Contact me if you have any questions.
Cheers,
Udo
2011/3/13 Klaus Schmidinger Klaus.Schmidinger@tvdr.de:
It's mentioned in the E-Mail: http://projects.vdr-developer.org/issues/show/10
Am 13.03.2011 15:42, schrieb Klaus Schmidinger:
In a hurry, right? *g*
Patch is in http://projects.vdr-developer.org/issues/show/10 , last post, vdr-1.7.12-detachreceiver-4.diff.
Cheers,
Udo
On 13.03.2011 15:58, Udo Richter wrote:
Well, just don't feel like going on a scavanger hunt ;-)
Patch is in http://projects.vdr-developer.org/issues/show/10 , last post, vdr-1.7.12-detachreceiver-4.diff.
Thanks, I'll take a look.
Klaus
On Tue, 27 Jul 2010 16:47:29 +0200, syrius.ml wrote
untested,
but maybe you want to give it a try. Might take a while until I have
time to
test it.
Ok it works as expected for VTP.
Fine. Thanks for testing.
I have not been able to reproduce this on my machine, except when the server VDR was not suspended and no idle device was available. Fixed that in getdevice-0.5.diff.
Frank
"Frank Schmirler" vdr@schmirler.de writes:
Thanks Frank.
Just an offtopic note: i'm using 2 streamdev-client instances, in the setup menu i get streamdev-client and streamdev-client2. when I change an option from one instance it gets changed in the other's instance menu as well. (it's just an ui issue, setup.conf is updated correctly)
"Frank Schmirler" vdr@schmirler.de writes:
I can't find getdevice-0.5.diff anymore (http://www.vdr-developer.org/mantisbt/view.php?id=582 is broken)
I've just tested streamdev 0.5-CVS + suspend.diff from your website. It seems to behave like before. (as described on top of this message)
would getdevice-0.5.diff still apply on top of this streamdev version ?
Thanks.
Hi,
On Sun, 19 Sep 2010 12:59:43 +0200, syrius.ml wrote
getdevice-1.0.diff is already part of the CVS snapshot on http://vdr.schmirler.de. Changes from getdevice-0.5:
- ProvidesChannel: No need to detach if actual device is already tuned to requested transponder - Added dsyslog messages to help troubleshouting channel switch issues
Please run VDR with full logging (-l 3) and check the logs - maybe the new dsyslog messages shed some light on the problem.
Frank