Ticket #1573: eit_1.diff

File eit_1.diff, 2.9 KB (added by Mark.Buechler@…, 18 years ago)

Configurable EIT Active scan delay

  • mythtv/libs/libmythtv/tv_rec.cpp

     
    7878#define LOC QString("TVRec(%1): ").arg(cardid)
    7979#define LOC_ERR QString("TVRec(%1) Error: ").arg(cardid)
    8080
    81 /// How many seconds after entering kState_None should we start EIT Scanner
    82 const uint TVRec::kEITScanStartTimeout = 60; /* 1 minute */
    83 
    8481/// How many milliseconds the signal monitor should wait between checks
    8582const uint TVRec::kSignalMonitoringRate = 50; /* msec */
    8683
     
    773770    {
    774771        // Add some randomness to avoid all cards starting
    775772        // EIT scanning at nearly the same time.
    776         uint timeout = kEITScanStartTimeout + random() % 59;
     773        uint idle_start = gContext->GetNumSetting("EITCrawIdleStart", 1);
     774        uint timeout = (idle_start * 60) + random() % 59;
    777775        eitScanStartTime = eitScanStartTime.addSecs(timeout);
    778776    }
    779777    else
     
    12121210
    12131211    // Add some randomness to avoid all cards starting
    12141212    // EIT scanning at nearly the same time.
    1215     uint timeout = kEITScanStartTimeout + random() % 59;
     1213    uint idle_start = gContext->GetNumSetting("EITCrawIdleStart", 1);
     1214    uint timeout = (idle_start * 60) + random() % 59;
    12161215    eitScanStartTime = QDateTime::currentDateTime().addSecs(timeout);
    12171216
    12181217    while (HasFlags(kFlagRunMainLoop))
  • mythtv/libs/libmythtv/tv_rec.h

     
    408408    int retune_requests;
    409409
    410410  public:
    411     static const uint kEITScanStartTimeout;
    412411    static const uint kSignalMonitoringRate;
    413412
    414413    // General State flags
  • mythtv/setup/backendsettings.cpp

     
    252252    return gc;
    253253};
    254254
     255static GlobalSpinBox *EITCrawIdleStart()
     256{
     257    GlobalSpinBox *gc = new GlobalSpinBox("EITCrawIdleStart", 1, 120, 1);
     258    gc->setLabel(QObject::tr("Backend Idle Before EIT Craw (mins)"));
     259    gc->setValue(1);
     260    QString help = QObject::tr(
     261        "The amount of idle time, in minutes, to wait before listings "
     262        "data is collected.");
     263    gc->setHelpText(help);
     264    return gc;
     265}
    255266
    256267static GlobalSpinBox *WOLbackendReconnectWaitTime()
    257268{
     
    670681    group2a1->setLabel(QObject::tr("EIT Scanner Options"));               
    671682    group2a1->addChild(EITTransportTimeout());
    672683    group2a1->addChild(EITIgnoresSource());
     684    group2a1->addChild(EITCrawIdleStart());
    673685    addChild(group2a1);
    674686
    675687    VerticalConfigurationGroup* group3 = new VerticalConfigurationGroup(false);