Ticket #4339: 070-livetvplay.patch

File 070-livetvplay.patch, 3.1 KB (added by Bill <cizek@…>, 13 years ago)

Partial fix for channel lock problem

  • mythtv/libs/libmythtv/tv_play.cpp

    diff -r -u -X diff.exclude myth.14959.1126a/mythtv/libs/libmythtv/tv_play.cpp myth.14959.1126b/mythtv/libs/libmythtv/tv_play.cpp
     
    521521      // Channel changing state variables
    522522      queuedChanNum(""),
    523523      muteTimer(new QTimer(this)),
    524       lockTimerOn(false),
     524      lockTimerOn(false), tunerIsLocked(false),
    525525      // previous channel functionality state variables
    526526      prevChanKeyCnt(0), prevChanTimer(new QTimer(this)),
    527527      // channel browsing state variables
     
    813813        tvchain = new LiveTVChain();
    814814        tvchain->InitializeNewChain(gContext->GetHostName());
    815815
     816        tunerIsLocked = false;
    816817        ChangeState(kState_WatchingLiveTV);
    817818        switchToRec = NULL;
    818819
     
    42274228    queuedInput   = "";
    42284229    queuedChanNum = "";
    42294230    queuedChanID  = 0;
     4231    tunerIsLocked = false;
    42304232}
    42314233
    42324234void TV::AddKeyToInputQueue(char key)
     
    47504752{
    47514753    QMutexLocker locker(&osdlock);
    47524754
    4753     if (!GetOSD() || browsemode || !queuedChanNum.isEmpty())
     4755    if (browsemode || !queuedChanNum.isEmpty())
    47544756    {
    47554757        if (&lastSignalMsg != &strlist)
    47564758            lastSignalMsg = strlist;
     
    48704872    //GetOSD()->ClearAllText("signal_info");
    48714873    //GetOSD()->SetText("signal_info", infoMap, -1);
    48724874
    4873     GetOSD()->ClearAllText("channel_number");
    4874     GetOSD()->SetText("channel_number", infoMap, osd_prog_info_timeout);
    48754875
    48764876    infoMap["description"] = sigDesc;
    4877     GetOSD()->ClearAllText("program_info");
    4878     GetOSD()->SetText("program_info", infoMap, osd_prog_info_timeout);
     4877    if (GetOSD()) {
     4878        GetOSD()->ClearAllText("channel_number");
     4879        GetOSD()->SetText("channel_number", infoMap, osd_prog_info_timeout);
     4880
     4881        GetOSD()->ClearAllText("program_info");
     4882        GetOSD()->SetText("program_info", infoMap, osd_prog_info_timeout);
     4883    }
    48794884
    48804885    lastSignalMsg.clear();
    48814886    lastSignalMsgTime.start();
    48824887
    48834888    // Turn off lock timer if we have an "All Good" or good PMT
    4884     if (allGood || (pmt == "M"))
     4889    if (allGood || (pmt == "M")) {
     4890        tunerIsLocked = true;
    48854891        lockTimerOn = false;
     4892    }
    48864893}
    48874894
    48884895void TV::UpdateOSDTimeoutMessage(void)
     
    48934900    {
    48944901        QString input = activerecorder->GetInput();
    48954902        uint timeout  = activerecorder->GetSignalLockTimeout(input);
    4896         timed_out = lockTimerOn && ((uint)lockTimer.elapsed() > timeout);
     4903        timed_out = !tunerIsLocked && lockTimerOn && ((uint)lockTimer.elapsed() > timeout);
    48974904    }
    48984905    OSD *osd = GetOSD();
    48994906
  • mythtv/libs/libmythtv/tv_play.h

    diff -r -u -X diff.exclude myth.14959.1126a/mythtv/libs/libmythtv/tv_play.h myth.14959.1126b/mythtv/libs/libmythtv/tv_play.h
     
    513513    // Channel changing timeout notification variables
    514514    QTime   lockTimer;
    515515    bool    lockTimerOn;
     516    bool    tunerIsLocked;
    516517
    517518    // Previous channel functionality state variables
    518519    str_vec_t prevChan;       ///< Previous channels