Ticket #8006: 8006-dbg-v1.patch

File 8006-dbg-v1.patch, 2.7 KB (added by danielk, 10 years ago)

Debugging patch

  • libs/libmythtv/previewgenerator.cpp

     
    7070      timeInSeconds(true),  captureTime(-1),       outFileName(QString::null),
    7171      outSize(0,0)
    7272{
     73    VERBOSE(VB_IMPORTANT, LOC + QString("ctor 0x%1").arg((uint64_t)this,0,16));
     74
    7375    if (!pathname.contains("/"))
    7476        pathname = programInfo.GetPlaybackURL(false, true);
    7577
     
    100102
    101103PreviewGenerator::~PreviewGenerator()
    102104{
     105    VERBOSE(VB_IMPORTANT, LOC + QString("dtor 0x%1").arg((uint64_t)this,0,16));
     106
    103107    TeardownAll();
    104108}
    105109
     
    110114
    111115void PreviewGenerator::TeardownAll(void)
    112116{
     117    VERBOSE(VB_IMPORTANT, LOC +
     118            QString("TeardownAll 0x%1").arg((uint64_t)this,0,16));
     119
    113120    if (!isConnected)
    114121        return;
    115122
     
    140147void PreviewGenerator::AttachSignals(QObject *obj)
    141148{
    142149    QMutexLocker locker(&previewLock);
    143     qRegisterMetaType<bool>("bool &");
    144150    connect(this, SIGNAL(previewThreadDone(const QString&,bool&)),
    145151            obj,  SLOT(  previewThreadDone(const QString&,bool&)),
    146152            Qt::DirectConnection);
     
    156162 */
    157163void PreviewGenerator::disconnectSafe(void)
    158164{
     165    VERBOSE(VB_IMPORTANT, LOC +
     166            QString("disconnectSafe 0x%1").arg((uint64_t)this,0,16));
    159167    QMutexLocker locker(&previewLock);
    160168    QObject::disconnect(this, NULL, NULL, NULL);
    161169    isConnected = false;
  • programs/mythfrontend/playbackboxhelper.cpp

     
     1#include <cassert>
     2
    13#include <algorithm>
    24using namespace std;
    35
     
    494496    QString fn = xfn.mid(max(xfn.lastIndexOf('/') + 1,0));
    495497    QMutexLocker locker(&m_previewGeneratorLock);
    496498
     499    VERBOSE(VB_IMPORTANT, QString("SetPreviewGenerator('%1':'%2', 0x%3)")
     500            .arg(xfn).arg(fn).arg((uint64_t)g));
     501
    497502    if (!g)
    498503    {
    499504        m_previewGeneratorRunning = max(0, (int)m_previewGeneratorRunning - 1);
    500505        PreviewMap::iterator it = m_previewGenerator.find(fn);
    501506        if (it == m_previewGenerator.end())
     507        {
     508            assert(0);
    502509            return false;
     510        }
    503511
    504512        (*it).gen        = NULL;
    505513        (*it).genStarted = false;
     
    573581
    574582void PlaybackBoxHelper::previewThreadDone(const QString &fn, bool &success)
    575583{
     584    VERBOSE(VB_IMPORTANT, LOC + QString("previewThreadDone '%1'").arg(fn));
    576585    success = SetPreviewGenerator(fn, NULL);
    577586    UpdatePreviewGeneratorThreads();
    578587}