Ticket #62: dvbtransporteditor.patch

File dvbtransporteditor.patch, 1.2 KB (added by John Pullan <john.pullan@…>, 16 years ago)

change from using videodevice to cardid

  • dvbtransporteditor.cpp

     
    447447    addChild(dvbtid);
    448448    addChild(new DvbTVideoSourceID(*dvbtid,_nVideoSourceID));
    449449
    450     int iVideoDev = -1;
     450    int iCardID = -1;
    451451
    452452    //Work out what kind of card we've got
    453453    MSqlQuery query(MSqlQuery::InitCon());
    454454    QString querystr = QString(
    455            "SELECT capturecard.videodevice FROM cardinput,capturecard "
     455           "SELECT capturecard.cardid FROM cardinput,capturecard "
    456456           " WHERE capturecard.cardid = cardinput.cardid "
    457457           " AND cardinput.sourceid=%1 "
    458458           " AND capturecard.cardtype=\"DVB\"").arg(_nVideoSourceID);
     
    461461    if (query.exec() && query.isActive() && query.size() > 0)
    462462    {
    463463        query.next();
    464         iVideoDev = query.value(0).toInt();
     464        iCardID = query.value(0).toInt();
    465465    }
    466466
    467467    CardUtil::CARD_TYPES nType = CardUtil::ERROR_PROBE;
    468     if (iVideoDev >= 0)
    469         nType = CardUtil::GetCardType(iVideoDev);
     468    if (iCardID >= 0)
     469        nType = CardUtil::GetCardType(iCardID);
    470470
    471471     addChild(new DVBTransportPage(*dvbtid,nType));
    472472}