Ticket #2121: commdetectordebug.diff

File commdetectordebug.diff, 1.9 KB (added by cpinkham, 14 years ago)

Patch to print out some debug values for the ClassicCommDetector?

  • programs/mythcommflag/ClassicCommDetector.cpp

     
    200200    int requiredHeadStart = requiredBuffer;
    201201    bool wereRecording = stillRecording;
    202202
     203VERBOSE(VB_IMPORTANT, QString("COMMFLAG: reqcuiredHeadStart = %1").arg(requiredHeadStart));
    203204    emit statusUpdate("Building Head Start Buffer");
    204205    secsSince = recordingStartedAt.secsTo(QDateTime::currentDateTime());
     206VERBOSE(VB_IMPORTANT, QString("COMMFLAG: secsSince = %1").arg(secsSince));
    205207    while (stillRecording && (secsSince < requiredHeadStart))
    206208    {
    207209        emit breathe();
     
    210212
    211213        sleep(2);
    212214        secsSince = recordingStartedAt.secsTo(QDateTime::currentDateTime());
     215VERBOSE(VB_IMPORTANT, QString("COMMFLAG: secsSince = %1").arg(secsSince));
    213216    }
    214217
    215218    if (nvp->OpenFile() < 0)
     
    223226            commDetectBorder, horizSpacing, vertSpacing);
    224227
    225228        requiredHeadStart += max(0,recordingStartedAt.secsTo(startedAt));
     229VERBOSE(VB_IMPORTANT, QString("COMMFLAG: reqcuiredHeadStart = %1").arg(requiredHeadStart));
    226230        requiredHeadStart += logoDetector->getRequiredAvailableBufferForSearch();
     231VERBOSE(VB_IMPORTANT, QString("COMMFLAG: reqcuiredHeadStart = %1").arg(requiredHeadStart));
    227232
    228233        emit statusUpdate("Building Logo Detection Buffer");
    229234        secsSince = recordingStartedAt.secsTo(QDateTime::currentDateTime());
     235VERBOSE(VB_IMPORTANT, QString("COMMFLAG: secsSince = %1").arg(secsSince));
    230236        while (stillRecording && (secsSince < requiredHeadStart))
    231237        {
    232238            emit breathe();
     
    235241
    236242            sleep(2);
    237243            secsSince = recordingStartedAt.secsTo(QDateTime::currentDateTime());
     244VERBOSE(VB_IMPORTANT, QString("COMMFLAG: secsSince = %1").arg(secsSince));
    238245        }
    239246    }
    240247