[sorry if this turns out to be long]

In the actuator plugin main menu, I offer the possibility to tune to a 
transponder "on the fly", to either quickly see what's there or to 
trigger a transponder scan.
To do that I have this piece of code that worked find under 1.4.x but 
stopped working under 1.5.4:

void cMainMenuActuator::Tune(bool live)
       int Apids[MAXAPIDS + 1] = { 0 };
       int Dpids[MAXDPIDS + 1] = { 0 };
       char ALangs[MAXAPIDS+1][MAXLANGCODE2]={ "" };
       char DLangs[MAXDPIDS+1][MAXLANGCODE2]={ "" };
       cDevice *myDevice=cDevice::GetDevice(DvbKarte);
       if (myDevice==cDevice::ActualDevice()) HasSwitched=true;
       if (HasSwitched && live) {
         if (cDevice::GetDevice(SChannel,0,true)==myDevice) {
           cDevice::PrimaryDevice()->SwitchChannel(SChannel, HasSwitched);
       myDevice->SwitchChannel(SChannel, HasSwitched);

I.e., it creates a dummy channel with the transponder data currently on 
screen and tries to tune it with the card connected to the motor, 
Since I don't have a full-featured card,  it's not the primary card, so 
the line that's executed is the last one.
Putting some printf here and there, it seems that's ultimately calling 
cDevice::SetChannelDevice instead of cDvbDevice::SetChannelDevice, and I 
don't understand why, since DvbKarte is 0 (the first and only card, 
which should be a cDvbDevice).

What should I do to adapt to the new vdr?
(BTW, I noticed that also the LoadEpg plugin stopped working, for a 
similar, but not exactly the same, reason: it switches for a split 
second to the channel with the epg data, then goes back to the previous 
one, so it doesn't get any data).

I suppose that I could just use 
cDevice::PrimaryDevice()->SwitchChannel[*], but then I couldn't be sure 
that the transponder will be definitely tuned by the desired card (it 
would be in my case, but it wouldn't when there's more than a dvb-s card).

[*]actually, I tried, but then my pat and sdt filters didn't work, but 
that's a different matter ;-)


vdr mailing list

Reply via email to