Hi Rob,

for your (and only for your) problem there could be an easier solution:

When doing a channel switch streamdev queries for a new device while
the current device is still active (means receivers are attached to
the device). If no device could be found, streamdev detaches itself
and queries again.

If streamdev only queries for a device after detaching itself, the
pvrinput device gets closed and reopened again incl. executing the
channel switch thing. This is a really hack with some disadvantages
(e.g. like larger channel switch times in case of multiple channels in
a transponder) but i guess this would help.

I guess doing the following line should be sufficient in
server/connection.c (streamdev-version 0.5.0-CVS):

bool cServerConnection::ProvidesChannel(const cChannel *Channel, int Priority)
        const cChannel *current = 
        const cChannel *current = 

<<<     cDevice *device = CheckDlevice(Channel, Priority, false);
>>>     cDevice *device = 0;
        if (!device || (device == cDevice::ActualDevice()
                        && !cSuspendCtl::IsActive()
                        && StreamdevServerSetup.SuspendMode != smAlways
                        && current != NULL
                        && !TRANSPONDER(Channel, current))) {
                // mustn't switch actual device
                // maybe a device would be free if THIS connection did turn off 
its streams?
                device = CheckDevice(Channel, Priority, false);

2011/6/9 Rainer Blickle <rainer.blic...@googlemail.com>:
> Hi Rob,
>> Can we put a check in streamdev to check if it's a pvrinput device and
>> recall even if the frequency is the same?
> if i got it right the pvr devices hasn't to be retuned when switching
> the channel, but the externchannelswitch-script has to be executed.
> IMO it isn't a good idea to check for a pvrinput device in the
> softdevice server. These two plug-ins shouldn't have any dependencies.
> What you really need is that the external channel script gets executed
> If some "constraints" are fullfilled. My first idea is to extend the
> core vdr for a callback function which informs plugins about
> attaching/detaching receivers to/from a device and retuning of a
> device.
> With this informations a plugin could execute such 
> externchannelswitch-scripts.
> But i think there is a problem that can't be fixed with this approach:
> When watch live tv on channel 1 and streamdev requests channel 2, vdr
> cannot handle this. Why? : vdr/streamdev doesn't know that 2 different
> pvrinput-devices are needed. Correct me if i'm wrong

vdr mailing list

Reply via email to