Ticket #6138: 135-hdhr.skipretune.patch

File 135-hdhr.skipretune.patch, 1.4 KB (added by anonymous, 12 years ago)

Ignore tuning request if we're already tuned to the channel. Was causing glitches during program transitions.

  • mythtv/libs/libmythtv/hdhrstreamhandler.cpp

    diff -r -u -N -X diff.exclude -x release.19714.0117a -x release.19714.0117b release.19714.0117a/mythtv/libs/libmythtv/hdhrstreamhandler.cpp release.19714.0117b/mythtv/libs/libmythtv/hdhrstreamhandler.cpp
     
    309309}
    310310
    311311bool HDHRStreamHandler::TuneChannel(QString chn) {
     312    QString current = TunerGet("channel");
     313    if (current == chn)
     314    {
     315        VERBOSE(VB_CHANNEL, QString(LOC + "Not Re-Tuning channel %1").arg(chn));
     316        return true;
     317    }
     318    VERBOSE(VB_CHANNEL, QString(LOC + "Tuning channel %1").arg(chn));
    312319    return (QString::null != TunerSet("channel", chn));
    313320}
    314321
    315322bool HDHRStreamHandler::TuneProgram(QString pnum) {
     323    VERBOSE(VB_CHANNEL, QString(LOC + "Tuning program %1").arg(pnum));
    316324    return (QString::null != TunerSet("program", pnum, false));
    317325}
    318326
     
    603619bool HDHRStreamHandler::UpdateFilters(void)
    604620{
    605621#ifdef DEBUG_PID_FILTERS
    606     VERBOSE(VB_CHANNEL, "UpdateFilters()");
     622    VERBOSE(VB_CHANNEL, LOC + "UpdateFilters()");
    607623#endif // DEBUG_PID_FILTERS
    608624    QMutexLocker locker(&_pid_lock);
    609625
     
    655671    if (filter != new_filter)
    656672        msg += QString("\n\t\t\t\t'%2'").arg(new_filter);
    657673
    658     VERBOSE(VB_CHANNEL, msg);
     674    VERBOSE(VB_CHANNEL, LOC + msg);
    659675#endif // DEBUG_PID_FILTERS
    660676
    661677    return filter == new_filter;