[vdr] vdr 1.5.4: cannot tune a transponder with actuator plugin

Klaus Schmidinger Klaus.Schmidinger at cadsoft.de
Sat Jun 23 13:07:41 CEST 2007


On 06/21/07 19:43, Luca Olivetti wrote:
> [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]={ "" };
>        Apids[0]=menuvalue[MI_APID];
>        SChannel->SetPids(menuvalue[MI_VPID],0,Apids,ALangs,Dpids,DLangs,0);
>  
> SChannel->cChannel::SetSatTransponderData(curSource->Code(),menuvalue[MI_FREQUENCY],Pol,menuvalue[MI_SYMBOLRATE],FEC_AUTO);
>        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);
>            return;
>          }
>        }
>        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, 
> cDevice::GetDevice(DvbKarte).
> 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).

Are you sure that your DVB card is device number 0?
Maybe the device you use for replaying (a software player?)
is device 0?

What happens if you set DvbKarte to 1?

Klaus



More information about the vdr mailing list