[vdr] priorities in streamdev
rainer.blickle at googlemail.com
Mon Jul 5 07:28:37 CEST 2010
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
I have another pc (laptop) with vdr installed. There i installed the
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
- 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
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 ?
More information about the vdr