Ticket #4339: 4339-dbg-v1.patch
File 4339-dbg-v1.patch, 7.4 KB (added by , 16 years ago) |
---|
-
libs/libmythtv/tv_play.h
553 553 // Channel changing timeout notification variables 554 554 QTime lockTimer; 555 555 bool lockTimerOn; 556 QDateTime lastLockSeenTime; 556 557 557 558 // Previous channel functionality state variables 558 559 str_vec_t prevChan; ///< Previous channels -
libs/libmythtv/tv_play.cpp
1466 1466 activerecorder = recorder; 1467 1467 recorder->Setup(); 1468 1468 1469 VERBOSE(VB_IMPORTANT, "HandleStateChange(none,livetv): " 1470 "lockTimer turned off"); 1471 QDateTime timerOffTime = QDateTime::currentDateTime(); 1469 1472 lockTimerOn = false; 1470 1473 1471 1474 SET_NEXT(); … … 1516 1519 } 1517 1520 else 1518 1521 { 1519 lockTimer.start(); 1520 lockTimerOn = true; 1522 if (!lastLockSeenTime.isValid() || 1523 (lastLockSeenTime < timerOffTime)) 1524 { 1525 VERBOSE(VB_IMPORTANT, "HandleStateChange(none,livetv): " 1526 "lockTimer turned on"); 1527 lockTimer.start(); 1528 lockTimerOn = true; 1529 } 1530 else 1531 { 1532 VERBOSE(VB_IMPORTANT, "HandleStateChange(none,livetv): " 1533 "lockTimer NOT turned on, lock seen recently."); 1534 } 1521 1535 } 1522 1536 } 1523 1537 else if (TRANSITION(kState_WatchingLiveTV, kState_None)) … … 2852 2866 } 2853 2867 else if (dialogname == "channel_timed_out") 2854 2868 { 2869 VERBOSE(VB_IMPORTANT, "channel_timed_out: " 2870 "lockTimer turned off"); 2855 2871 lockTimerOn = false; 2856 2872 } 2857 2873 … … 3176 3192 activerecorder->SetSignalMonitoringRate(rate,notify); 3177 3193 UnpauseLiveTV(); 3178 3194 3195 VERBOSE(VB_IMPORTANT, "SIGNALMON lockTimer turned off"); 3179 3196 lockTimerOn = false; 3180 3197 sigMonMode = !sigMonMode; 3181 3198 } … … 3825 3842 if (!pipnvp) 3826 3843 return; 3827 3844 3845 VERBOSE(VB_IMPORTANT, "ToggleActiveWindow:: lockTimer turned on"); 3828 3846 lockTimerOn = false; 3829 3847 if (activenvp == nvp) 3830 3848 { … … 3875 3893 } 3876 3894 } 3877 3895 3896 VERBOSE(VB_IMPORTANT, "SwapPIP lockTimer turned off"); 3878 3897 lockTimerOn = false; 3879 3898 3880 3899 struct pip_info main, pip; … … 4485 4504 4486 4505 // now restart stuff 4487 4506 lastSignalUIInfo.clear(); 4507 VERBOSE(VB_IMPORTANT, "SwitchCards lockTimer turned on"); 4488 4508 lockTimerOn = false; 4489 4509 4490 4510 activerecorder = recorder = testrec; … … 4534 4554 activenvp = nvp; 4535 4555 activerbuffer = prbuffer; 4536 4556 lockTimer.start(); 4557 VERBOSE(VB_IMPORTANT, "SwitchCards lockTimer turned on"); 4537 4558 lockTimerOn = true; 4538 4559 } 4539 4560 } … … 4593 4614 { 4594 4615 // Pause the backend recorder, send command, and then unpause.. 4595 4616 PauseLiveTV(); 4617 VERBOSE(VB_IMPORTANT, "ToggleInputs() lockTimer turned off"); 4596 4618 lockTimerOn = false; 4597 4619 inputname = activerecorder->SetInput(inputname); 4598 4620 UnpauseLiveTV(); … … 5202 5224 GetOSD()->SetSettingsText(displayName, 3); 5203 5225 } 5204 5226 5227 static QString to_comma_list(const QStringList &list) 5228 { 5229 QString ret = ""; 5230 for (QStringList::const_iterator it = list.begin(); it != list.end(); ++it) 5231 ret += *it + ","; 5232 5233 if (ret.length()) 5234 return ret.left(ret.length()-1); 5235 5236 return ""; 5237 } 5238 5205 5239 /** \fn TV::UpdateOSDSignal(const QStringList&) 5206 5240 * \brief Updates Signal portion of OSD... 5207 5241 */ 5208 void TV::UpdateOSDSignal(const QStringList &strlist)5242 void TV::UpdateOSDSignal(const QStringList &strlist) 5209 5243 { 5210 5244 QMutexLocker locker(&osdlock); 5211 5245 5246 VERBOSE(VB_IMPORTANT, "UpdateOSDSignal("<<to_comma_list(strlist) 5247 <<") begin -- lockTimerOn: "<<lockTimerOn); 5248 5212 5249 if (!GetOSD() || browsemode || !queuedChanNum.isEmpty()) 5213 5250 { 5214 5251 if (&lastSignalMsg != &strlist) 5252 { 5253 VERBOSE(VB_IMPORTANT, "UpdateOSDSignal() end " 5254 "-- set lastSignalMsg"); 5215 5255 lastSignalMsg = strlist; 5256 } 5216 5257 return; 5217 5258 } 5218 5259 … … 5341 5382 5342 5383 // Turn off lock timer if we have an "All Good" or good PMT 5343 5384 if (allGood || (pmt == "M")) 5385 { 5344 5386 lockTimerOn = false; 5387 lastLockSeenTime = QDateTime::currentDateTime(); 5388 } 5389 5390 VERBOSE(VB_IMPORTANT, "UpdateOSDSignal() end -- lockTimerOn: " 5391 <<lockTimerOn<<" allGood: "<<allGood 5392 <<QString(" pmt: %1").arg(pmt)); 5345 5393 } 5346 5394 5347 5395 void TV::UpdateOSDTimeoutMessage(void) 5348 5396 { 5397 //VERBOSE(VB_IMPORTANT, "UpdateOSDTimeoutMessage() begin -- lockTimerOn: " 5398 // <<lockTimerOn<<")"); 5399 5349 5400 QString dlg_name("channel_timed_out"); 5350 5401 bool timed_out = false; 5351 5402 if (activerecorder) … … 5380 5431 static QString chan_up = GET_KEY("TV Playback", "CHANNELUP"); 5381 5432 static QString chan_down = GET_KEY("TV Playback", "CHANNELDOWN"); 5382 5433 static QString next_src = GET_KEY("TV Playback", "NEXTSOURCE"); 5383 static QString tog_cards = GET_KEY("TV Playback", "NEXT CARD");5434 static QString tog_cards = GET_KEY("TV Playback", "NEXTINPUT"); 5384 5435 5385 5436 QString message = tr( 5386 5437 "You should have gotten a channel lock by now. " 5387 5438 "You can continue to wait for a signal, or you " 5388 5439 "can change the channels with %1 or %2, change " 5389 "video source (%3), change cards(%4), etc.")5440 "video source (%3), inputs (%4), etc.") 5390 5441 .arg(chan_up).arg(chan_down).arg(next_src).arg(tog_cards); 5391 5442 5392 5443 QStringList options; … … 6266 6317 } 6267 6318 else if (message.left(6) == "SIGNAL") 6268 6319 { 6320 VERBOSE(VB_IMPORTANT, LOC + "Got: " + message); 6269 6321 int cardnum = (QStringList::split(" ", message))[1].toInt(); 6270 6322 QStringList signalList = me->ExtraDataList(); 6271 6323 bool tc = activerecorder && 6272 6324 (activerecorder->GetRecorderNumber() == cardnum); 6273 6325 if (tc && signalList.size()) 6274 6326 { 6327 VERBOSE(VB_IMPORTANT, LOC + "Processed: " + message); 6275 6328 UpdateOSDSignal(signalList); 6276 6329 } 6330 else 6331 { 6332 int ac_rec = -1; 6333 if (activerecorder) 6334 ac_rec = activerecorder->GetRecorderNumber(); 6335 VERBOSE(VB_IMPORTANT, LOC + "Ignored: " + message 6336 <<"\n\t\t\tactiverec: "<<activerecorder 6337 <<" ac->rec: "<<ac_rec); 6338 } 6277 6339 } 6278 6340 else if (recorder && message.left(7) == "SKIP_TO") 6279 6341 { … … 8009 8071 void TV::PauseLiveTV(void) 8010 8072 { 8011 8073 VERBOSE(VB_PLAYBACK, LOC + "PauseLiveTV()"); 8074 8075 VERBOSE(VB_IMPORTANT, "PauseLiveTV() lockTimer turned off 1"); 8012 8076 lockTimerOn = false; 8013 8077 8014 8078 if (activenvp && activerbuffer) … … 8027 8091 lastSignalUIInfo.clear(); 8028 8092 osdlock.unlock(); 8029 8093 8094 VERBOSE(VB_IMPORTANT, "PauseLiveTV() lockTimer turned off 2"); 8030 8095 lockTimerOn = false; 8031 8096 8032 8097 QString input = activerecorder->GetInput(); … … 8035 8100 { 8036 8101 lockTimer.start(); 8037 8102 lockTimerOn = true; 8103 VERBOSE(VB_IMPORTANT, "PauseLiveTV() lockTimer turned on"); 8038 8104 } 8039 8105 } 8040 8106