Ticket #10490: 10490-debug-start-new-rec-every-30-sec.patch

File 10490-debug-start-new-rec-every-30-sec.patch, 2.1 KB (added by danielk, 12 years ago)

Just the testing part of the previous patch (the fix portions of which have been applied).

  • mythtv/libs/libmythtv/tv_rec.cpp

    diff --git a/mythtv/libs/libmythtv/tv_rec.cpp b/mythtv/libs/libmythtv/tv_rec.cpp
    index bf15151..991f29a 100644
    a b void TVRec::run(void) 
    13001300                pendingRecordings.find(cardid) != pendingRecordings.end();
    13011301            pendingRecLock.unlock();
    13021302
     1303            const int time_out = 30;
     1304            bool debug_start_new = false;
     1305            if (!debugNextRecTime.isValid())
     1306                debugNextRecTime = now.addSecs(time_out+90);
     1307            if (now >= debugNextRecTime)
     1308            {
     1309                debug_start_new = true;
     1310                debugNextRecTime = now.addSecs(time_out);
     1311            }
     1312
    13031313            if (has_rec && (has_finish || (now > recordEndTime)))
    13041314            {
    13051315                SetPseudoLiveTVRecording(NULL);
    13061316            }
    13071317            else if (!has_rec && !rec_soon && curRecording &&
    1308                      (now >= curRecording->GetScheduledEndTime()))
     1318                     (now >= curRecording->GetScheduledEndTime() ||
     1319                      debug_start_new))
    13091320            {
    13101321                if (!switchingBuffer)
    13111322                {
    void TVRec::run(void) 
    13161327                        now.toString(Qt::ISODate) + " >= " +
    13171328                        curRecording->GetScheduledEndTime(ISODate) +
    13181329                        QString("(%1) ))")
    1319                         .arg(now >= curRecording->GetScheduledEndTime()));
     1330                        .arg(now >= curRecording->GetScheduledEndTime()) +
     1331                        QString("debug_start_new(%1) ))")
     1332                        .arg(debug_start_new));
    13201333
    13211334                    switchingBuffer = true;
    13221335
  • mythtv/libs/libmythtv/tv_rec.h

    diff --git a/mythtv/libs/libmythtv/tv_rec.h b/mythtv/libs/libmythtv/tv_rec.h
    index ce54bff..018fcf4 100644
    a b class MTV_PUBLIC TVRec : public SignalMonitorListener, public QRunnable 
    387387
    388388    // LiveTV file chain
    389389    LiveTVChain *tvchain;
     390    QDateTime debugNextRecTime;
    390391
    391392    // RingBuffer info
    392393    RingBuffer  *ringBuffer;