Ticket #1599: activescan_mplex.patch

File activescan_mplex.patch, 2.0 KB (added by Janne <janne-mythtv@…>, 15 years ago)
  • libs/libmythtv/eitscanner.cpp

     
    113113            {
    114114                rec->SetChannel(*activeScanNextChan, TVRec::kFlagEITScan);
    115115                VERBOSE(VB_GENERAL, LOC +
    116                         QString("Now looking for EIT data on channel %1")
     116                        QString("Now looking for EIT data on multiplex of "
     117                                "channel %1")
    117118                        .arg(*activeScanNextChan));
    118119            }
    119120
     
    192193    {
    193194        MSqlQuery query(MSqlQuery::InitCon());
    194195        query.prepare(
    195             "SELECT channum, mplexid "
     196            "SELECT min(channum), mplexid "
    196197            "FROM channel, cardinput, capturecard, videosource "
    197198            "WHERE cardinput.sourceid   = channel.sourceid AND "
    198199            "      videosource.sourceid = channel.sourceid AND "
     
    201202            "      useonairguide        = 1                AND "
    202203            "      useeit               = 1                AND "
    203204            "      cardinput.cardid     = :CARDID "
     205            "GROUP BY mplexid "
    204206            "ORDER BY cardinput.sourceid, atscsrcid");
    205207        query.bindValue(":CARDID", rec->GetCaptureCardNum());
    206208
     
    240242    }
    241243
    242244    VERBOSE(VB_EIT, "StartActiveScan called with "<<
    243             activeScanChannels.size()<<" channels");
     245            activeScanChannels.size()<<" multiplexes");
    244246
    245247    // Start at a random channel.This is so that multiple cards with
    246248    // the same source don't all scan the same channels in the same
     
    249251    {
    250252        uint randomStart = random() % activeScanChannels.size();
    251253        activeScanNextChan = activeScanChannels.at(randomStart);
    252     }
    253254
    254     if (activeScanChannels.size())
    255     {
    256255        activeScanNextTrig = QDateTime::currentDateTime();
    257256        activeScanTrigTime = max_seconds_per_source;
    258257        // Add a little randomness to trigger time so multiple