Ticket #802: dvbchannel.2.patch

File dvbchannel.2.patch, 3.5 KB (added by nooneimprt4nt@…, 14 years ago)
  • libs/libmythtv/dvbtypes.h

     
    423423        QString lnb_lof_hi,        QString lnb_lof_lo,     QString _sistandard,
    424424        QString hp_code_rate,      QString lp_code_rate,   QString constellation,
    425425        QString transmission_mode, QString guard_interval, QString hierarchy,
    426         QString modulation,        QString bandwidth);
     426        QString modulation,        QString bandwidth,      QString input_name);
    427427
    428428    DVBTuning       tuning;
    429429
     
    436436    uint16_t        transportID;
    437437
    438438    QString         sistandard;
     439    QString         input_name;
    439440    uint8_t         version;
    440441  private:
    441442    mutable QMutex  lock;
  • libs/libmythtv/dvbchannel.cpp

     
    234234
    235235    CHANNEL(QString("Tuned to frequency for channel %1.").arg(chan));
    236236
     237    // It would be nice to use a lookup table like in V4L cards,
     238    // However, it would require using the cardinputid as a key
     239    // because there is no gaurantee of a 1:1 mapping between a
     240    // diseqc <port,pos> to inputname
     241    // If a sb lookup is required, might as well just get the name
     242    // directly (which is what was done during the Parse() call
     243    currentcapchannel = 0;
     244    channelnames[currentcapchannel] = chan_opts.input_name;
    237245    inputChannel[currentcapchannel] = curchannelname;
    238 
     246   
    239247    return true;
    240248}
    241249
     
    250258
    251259bool DVBChannel::SwitchToInput(const QString &input, const QString &chan)
    252260{
    253     currentcapchannel = 0;
    254     if (channelnames.empty())
    255        channelnames[currentcapchannel] = input;
    256 
     261    (void)input;
    257262    return SetChannelByString(chan);
    258263}
    259264
     
    338343        "       lnb_lof_hi,        lnb_lof_lo,     sistandard, "
    339344        "       hp_code_rate,      lp_code_rate,   constellation, "
    340345        "       transmission_mode, guard_interval, hierarchy, "
    341         "       modulation,        bandwidth "
     346        "       modulation,        bandwidth,      inputname"
    342347        "FROM dtv_multiplex, cardinput, capturecard "
    343348        "WHERE dtv_multiplex.sourceid = cardinput.sourceid AND ");
    344349
     
    370375        query.value(12).toString(), query.value(13).toString(),
    371376        query.value(14).toString(), query.value(15).toString(),
    372377        query.value(16).toString(), query.value(17).toString(),
    373         query.value(18).toString(), query.value(19).toString());
     378        query.value(18).toString(), query.value(19).toString(),
     379        query.value(20).toString());
    374380}
    375381
    376382/** \fn DVBChannel::CheckOptions()
  • libs/libmythtv/dvbtypes.cpp

     
    906906    QString lnb_lof_hi,        QString lnb_lof_lo,     QString _sistandard,
    907907    QString hp_code_rate,      QString lp_code_rate,   QString constellation,
    908908    QString trans_mode,        QString guard_interval, QString hierarchy,
    909     QString modulation,        QString bandwidth)
     909    QString modulation,        QString bandwidth,      QString _input_name)
    910910{
    911911    lock.lock();
    912912       
     
    928928        ok = tuning.parseATSC(frequency, modulation);
    929929       
    930930    sistandard = _sistandard;
    931        
     931    input_name = _input_name;
     932
    932933    lock.unlock();
    933934    return ok;
    934935}