Ticket #13519: 20191125-hdhr-debug.patch

File 20191125-hdhr-debug.patch, 1.9 KB (added by Klaas de Waal, 4 years ago)

HDHR debug output to file ./log/hdhr-dbg.log

  • mythtv/libs/libmythtv/recorders/hdhrstreamhandler.cpp

    diff --git a/mythtv/libs/libmythtv/recorders/hdhrstreamhandler.cpp b/mythtv/libs/libmythtv/recorders/hdhrstreamhandler.cpp
    index 9ab44a402e..a7d4661a8b 100644
    a b HDHRStreamHandler::HDHRStreamHandler(const QString &device, int inputid, 
    104104    , m_majorid(majorid)
    105105{
    106106    setObjectName("HDHRStreamHandler");
     107
     108    // KdW HDHR debug
     109    m_hdhomerun_debug = hdhomerun_debug_create();
     110    hdhomerun_debug_set_filename(m_hdhomerun_debug, "./log/hdhr-dbg.log");
     111    hdhomerun_debug_enable(m_hdhomerun_debug);
    107112}
    108113
    109114/** \fn HDHRStreamHandler::run(void)
    void HDHRStreamHandler::Close(void) 
    365370
    366371bool HDHRStreamHandler::Connect(void)
    367372{
    368     m_device_selector = hdhomerun_device_selector_create(nullptr);
     373    // m_device_selector = hdhomerun_device_selector_create(nullptr);
     374    m_device_selector = hdhomerun_device_selector_create(m_hdhomerun_debug);        // KdW HDHR debug
    369375    if (!m_device_selector)
    370376    {
    371377        LOG(VB_GENERAL, LOG_ERR, LOC + "Unable to create device selector");
  • mythtv/libs/libmythtv/recorders/hdhrstreamhandler.h

    diff --git a/mythtv/libs/libmythtv/recorders/hdhrstreamhandler.h b/mythtv/libs/libmythtv/recorders/hdhrstreamhandler.h
    index 72c60417fb..a8a0c90a94 100644
    a b class HDHRStreamHandler : public StreamHandler 
    8989  private:
    9090    hdhomerun_device_t          *m_hdhomerun_device {nullptr};
    9191    hdhomerun_device_selector_t *m_device_selector  {nullptr};
     92    hdhomerun_debug_t           *m_hdhomerun_debug  {nullptr};    // KdW HDHR debug
    9293    int                          m_tuner            {-1};
    9394    vector<DTVTunerType>         m_tuner_types;
    9495    HDHRTuneMode                 m_tune_mode        {hdhrTuneModeNone}; // debug self check