Ticket #12495: 12495_debug2.patch

File 12495_debug2.patch, 4.5 KB (added by gigem, 9 years ago)
  • mythtv/libs/libmythtv/diseqc.cpp

    diff --git a/mythtv/libs/libmythtv/diseqc.cpp b/mythtv/libs/libmythtv/diseqc.cpp
    index 24da65e..dad678c 100644
    a b DiSEqCDevTrees DiSEqCDev::m_trees; 
    247247 */
    248248DiSEqCDevTree *DiSEqCDev::FindTree(uint cardid)
    249249{
     250    LOG(VB_CHANNEL, LOG_INFO, LOC +
     251        QString("### DiSEqCDev::FindTree() cardid = %1").arg(cardid));
    250252    return m_trees.FindTree(cardid);
    251253}
    252254
    DiSEqCDevTrees::~DiSEqCDevTrees() 
    276278 */
    277279DiSEqCDevTree *DiSEqCDevTrees::FindTree(uint cardid)
    278280{
     281    LOG(VB_CHANNEL, LOG_INFO, LOC +
     282        QString("### DiSEqCDevTrees::FindTree() cardid = %1").arg(cardid));
     283
    279284    QMutexLocker lock(&m_trees_lock);
    280285
    281286    cardid_to_diseqc_tree_t::iterator it = m_trees.find(cardid);
    282287    if (it != m_trees.end())
     288    {
     289        LOG(VB_CHANNEL, LOG_INFO, LOC +
     290            QString("### DiSEqCDevTrees::FindTree() found existing tree"));
    283291        return *it;
     292    }
    284293
    285294    DiSEqCDevTree *tree = new DiSEqCDevTree;
    286295    tree->Load(cardid);
    DiSEqCDevTree::~DiSEqCDevTree() 
    330339 */
    331340bool DiSEqCDevTree::Load(uint cardid)
    332341{
     342    LOG(VB_CHANNEL, LOG_INFO, LOC +
     343        QString("### DiSEqCDevTree::Load() cardid = %1").arg(cardid));
     344
    333345    // clear children
    334346    delete m_root;
    335347    m_delete.clear();
    bool DiSEqCDevTree::Load(uint cardid) 
    349361    }
    350362    else if (!query.next())
    351363    {
     364        LOG(VB_CHANNEL, LOG_INFO, LOC +
     365            QString("### DiSEqCDevSettings::Load() no results found"));
    352366        return m_root;
    353367    }
    354368
     369    LOG(VB_CHANNEL, LOG_INFO, LOC +
     370        QString("### DiSEqCDevSettings::Load() result = %1")
     371        .arg(query.value(0).toUInt()));
    355372    if (query.value(0).toUInt())
    356373    {
    357374        m_root = DiSEqCDevDevice::CreateById(
    bool DiSEqCDevTree::Load(uint cardid) 
    362379        LOG(VB_GENERAL, LOG_WARNING, LOC +
    363380            QString("No device tree for cardid %1").arg(cardid));
    364381    }
     382    LOG(VB_CHANNEL, LOG_INFO, LOC +
     383        QString("### DiSEqCDevSettings::Load() m_root = %1")
     384        .arg((uint64_t)m_root, 0, 16));
    365385
    366386    return m_root;
    367387}
    DiSEqCDevDevice *DiSEqCDevDevice::FindDevice(uint dev_id) 
    886906
    887907DiSEqCDevDevice *DiSEqCDevDevice::CreateById(DiSEqCDevTree &tree, uint devid)
    888908{
     909    LOG(VB_CHANNEL, LOG_INFO, LOC +
     910        QString("### DiSEqCDevDevice::CreateById() devid = %1").arg(devid));
     911
    889912    // load settings from DB
    890913    MSqlQuery query(MSqlQuery::InitCon());
    891914    query.prepare(
    DiSEqCDevDevice *DiSEqCDevDevice::CreateById(DiSEqCDevTree &tree, uint devid) 
    907930        return NULL;
    908931    }
    909932
     933    LOG(VB_CHANNEL, LOG_INFO, LOC +
     934        QString("### DiSEqCDevDevice::CreateById() results = %1, %2")
     935        .arg(query.value(0).toString()).arg(query.value(1).toString()));
     936
    910937    dvbdev_t      type = DevTypeFromString(query.value(0).toString());
    911938    QString       desc = query.value(1).toString();
    912939    DiSEqCDevDevice *node = CreateByType(tree, type, devid);
    913940
     941    LOG(VB_CHANNEL, LOG_INFO, LOC +
     942        QString("### DiSEqCDevDevice::CreateById() results = %1, %2")
     943        .arg((uint64_t)node, 0, 16));
     944
    914945    if (node)
    915946    {
    916947        node->SetDescription(desc);
  • mythtv/libs/libmythtv/recorders/dvbchannel.cpp

    diff --git a/mythtv/libs/libmythtv/recorders/dvbchannel.cpp b/mythtv/libs/libmythtv/recorders/dvbchannel.cpp
    index 9564b05..a199269 100644
    a b bool DVBChannel::Open(DVBChannel *who) 
    179179{
    180180    LOG(VB_CHANNEL, LOG_INFO, LOC + "Opening DVB channel");
    181181
     182    if (!m_inputid)
     183        InitializeInput();
     184
     185    if (!m_inputid)
     186    {
     187        LOG(VB_GENERAL, LOG_ERR, LOC + "Programmer error, no parent.");
     188        return false;
     189    }
     190
    182191    QMutexLocker locker(&hw_lock);
    183192
    184193    if (fd_frontend >= 0)
    bool DVBChannel::Open(DVBChannel *who) 
    269278        QString("Using DVB card %1, with frontend '%2'.")
    270279            .arg(device).arg(frontend_name));
    271280
     281    LOG(VB_CHANNEL, LOG_INFO, LOC +
     282        QString("### tunerType.IsDiSEqCSupported() = %1")
     283        .arg(tunerType.IsDiSEqCSupported()));
    272284    // Turn on the power to the LNB
    273285    if (tunerType.IsDiSEqCSupported())
    274286    {
    275 
     287        LOG(VB_CHANNEL, LOG_INFO, LOC +
     288            QString("### calling diseqc_dev.FindTree(%1)").arg(m_inputid));
    276289        diseqc_tree = diseqc_dev.FindTree(m_inputid);
     290        LOG(VB_CHANNEL, LOG_INFO, LOC +
     291            QString("### diseqc_tree = %1").arg((uint64_t)diseqc_tree, 0, 16));
    277292        if (diseqc_tree)
    278293        {
    279294            bool is_SCR = false;