Ticket #6162: mythtv.diff
File mythtv.diff, 6.0 KB (added by , 15 years ago) |
---|
-
tv_play.cpp
61 61 #endif 62 62 63 63 #define DEBUG_CHANNEL_PREFIX 0 /**< set to 1 to debug channel prefixing */ 64 #define DEBUG_ACTIONS 0/**< set to 1 to debug actions */64 #define DEBUG_ACTIONS 1 /**< set to 1 to debug actions */ 65 65 66 66 #define LOC QString("TV: ") 67 67 #define LOC_WARN QString("TV Warning: ") … … 2116 2116 void TV::timerEvent(QTimerEvent *te) 2117 2117 { 2118 2118 const int timer_id = te->timerId(); 2119 2120 VERBOSE(VB_IMPORTANT, LOC + QString("timerEvent(timerId=%1)").arg(timer_id)); 2119 2121 2120 2122 PlayerContext *mctx = GetPlayerReadLock(0, __FILE__, __LINE__); 2121 2123 if (mctx->IsErrored()) 2122 2124 { 2123 2125 ReturnPlayerLock(mctx); 2124 2126 QThread::exit(1); 2127 VERBOSE(VB_IMPORTANT, LOC + QString("timerEvent(1)")); 2125 2128 return; 2126 2129 } 2127 2130 ReturnPlayerLock(mctx); … … 2134 2137 stateChangeTimerId.find(timer_id) == stateChangeTimerId.end()); 2135 2138 } 2136 2139 if (ignore) 2140 { 2141 VERBOSE(VB_IMPORTANT, LOC + QString("timerEvent(2)")); 2137 2142 return; // Always handle state changes first... 2143 } 2138 2144 2139 2145 bool handled = true; 2140 2146 if (timer_id == lcdTimerId) … … 2165 2171 handled = false; 2166 2172 2167 2173 if (handled) 2174 { 2175 VERBOSE(VB_IMPORTANT, LOC + QString("timerEvent(3)")); 2168 2176 return; 2177 } 2169 2178 2170 2179 // Check if it matches a stateChangeTimerId 2171 2180 PlayerContext *ctx = NULL; … … 2203 2212 } 2204 2213 2205 2214 if (handled) 2215 { 2216 VERBOSE(VB_IMPORTANT, LOC + QString("timerEvent(4)")); 2206 2217 return; 2218 } 2207 2219 2208 2220 // Check if it matches a recorderPlaybackInfoTimerId 2209 2221 bool do_pbinfo_fetch = false; … … 2252 2264 } 2253 2265 2254 2266 if (handled) 2267 { 2268 VERBOSE(VB_IMPORTANT, LOC + QString("timerEvent(5)")); 2255 2269 return; 2270 } 2256 2271 2257 2272 // Check if it matches a signalMonitorTimerId 2258 2273 ctx = NULL; … … 2284 2299 } 2285 2300 2286 2301 if (handled) 2302 { 2303 VERBOSE(VB_IMPORTANT, LOC + QString("timerEvent(6)")); 2287 2304 return; 2305 } 2288 2306 2289 2307 // Check if it matches a tvchainUpdateTimerId 2290 2308 ctx = NULL; … … 2312 2330 } 2313 2331 2314 2332 if (handled) 2333 { 2334 VERBOSE(VB_IMPORTANT, LOC + QString("timerEvent(7)")); 2315 2335 return; 2336 } 2316 2337 2317 2338 // Check if it matches keyListTimerId 2318 2339 QKeyEvent *keyEvent = NULL; … … 2353 2374 } 2354 2375 2355 2376 if (handled) 2377 { 2378 VERBOSE(VB_IMPORTANT, LOC + QString("timerEvent(8)")); 2356 2379 return; 2380 } 2357 2381 2358 2382 // Check if it matches networkControlTimerId 2359 2383 QString netCmd = QString::null; … … 2380 2404 } 2381 2405 2382 2406 if (handled) 2407 { 2408 VERBOSE(VB_IMPORTANT, LOC + QString("timerEvent(9)")); 2383 2409 return; 2410 } 2384 2411 2385 2412 // Check if it matches exitPlayerTimerId 2386 2413 if (timer_id == exitPlayerTimerId) … … 2426 2453 } 2427 2454 2428 2455 if (handled) 2456 { 2457 VERBOSE(VB_IMPORTANT, LOC + QString("timerEvent(10)")); 2429 2458 return; 2459 } 2430 2460 2431 2461 if (timer_id == jumpMenuTimerId) 2432 2462 { … … 2439 2469 } 2440 2470 2441 2471 if (handled) 2472 { 2473 VERBOSE(VB_IMPORTANT, LOC + QString("timerEvent(11)")); 2442 2474 return; 2475 } 2443 2476 2444 2477 if (timer_id == udpNotifyTimerId) 2445 2478 { … … 2453 2486 } 2454 2487 2455 2488 if (handled) 2489 { 2490 VERBOSE(VB_IMPORTANT, LOC + QString("timerEvent(12)")); 2456 2491 return; 2492 } 2457 2493 2458 2494 if (timer_id == switchToInputTimerId) 2459 2495 { … … 2473 2509 } 2474 2510 2475 2511 if (handled) 2512 { 2513 VERBOSE(VB_IMPORTANT, LOC + QString("timerEvent(13)")); 2476 2514 return; 2515 } 2477 2516 2478 2517 if (timer_id == ccInputTimerId) 2479 2518 { … … 2493 2532 } 2494 2533 2495 2534 if (handled) 2535 { 2536 VERBOSE(VB_IMPORTANT, LOC + QString("timerEvent(14)")); 2496 2537 return; 2538 } 2497 2539 2498 2540 if (timer_id == asInputTimerId) 2499 2541 { … … 2513 2555 } 2514 2556 2515 2557 if (handled) 2558 { 2559 VERBOSE(VB_IMPORTANT, LOC + QString("timerEvent(15)")); 2516 2560 return; 2561 } 2517 2562 2518 2563 if (timer_id == queueInputTimerId) 2519 2564 { … … 2542 2587 } 2543 2588 2544 2589 if (handled) 2590 { 2591 VERBOSE(VB_IMPORTANT, LOC + QString("timerEvent(16)")); 2545 2592 return; 2593 } 2546 2594 2547 2595 if (timer_id == browseTimerId) 2548 2596 { … … 2553 2601 } 2554 2602 2555 2603 if (handled) 2604 { 2605 VERBOSE(VB_IMPORTANT, LOC + QString("timerEvent(17)")); 2556 2606 return; 2607 } 2557 2608 2558 2609 // Check unmute.. 2559 2610 ctx = NULL; … … 2584 2635 } 2585 2636 2586 2637 if (handled) 2638 { 2639 VERBOSE(VB_IMPORTANT, LOC + QString("timerEvent(18)")); 2587 2640 return; 2641 } 2588 2642 2589 2643 if (timer_id == updateOSDPosTimerId) 2590 2644 { … … 2614 2668 } 2615 2669 2616 2670 if (handled) 2671 { 2672 VERBOSE(VB_IMPORTANT, LOC + QString("timerEvent(19)")); 2617 2673 return; 2674 } 2618 2675 2619 2676 if (timer_id == errorRecoveryTimerId) 2620 2677 { … … 3019 3076 3020 3077 bool TV::eventFilter(QObject *o, QEvent *e) 3021 3078 { 3079 VERBOSE(VB_IMPORTANT, LOC + QString("eventFilter( 0 )")); 3080 3022 3081 const MythMainWindow *mainWindow = gContext->GetMainWindow(); 3023 3082 if (mainWindow == o) 3024 3083 { … … 3031 3090 mctx->UnlockDeleteNVP(__FILE__, __LINE__); 3032 3091 ReturnPlayerLock(mctx); 3033 3092 } 3093 VERBOSE(VB_IMPORTANT, LOC + QString("eventFilter( 1 )")); 3034 3094 return false; 3035 3095 } 3036 3096 … … 3045 3105 if (!keyListTimerId) 3046 3106 keyListTimerId = StartTimer(1, __LINE__); 3047 3107 3108 VERBOSE(VB_IMPORTANT, LOC + QString("eventFilter( 2 )")); 3048 3109 return true; 3049 3110 } 3050 3111 case QEvent::Paint: … … 3059 3120 ctx->UnlockDeleteNVP(__FILE__, __LINE__); 3060 3121 } 3061 3122 ReturnPlayerLock(mctx); 3123 VERBOSE(VB_IMPORTANT, LOC + QString("eventFilter( 3 )")); 3062 3124 return true; 3063 3125 } 3064 3126 case MythEvent::MythEventMessage: 3065 3127 { 3066 3128 customEvent((QEvent *)e); 3129 VERBOSE(VB_IMPORTANT, LOC + QString("eventFilter( 4 )")); 3067 3130 return true; 3068 3131 } 3069 3132 default: 3133 { 3134 VERBOSE(VB_IMPORTANT, LOC + QString("eventFilter( 5 )")); 3070 3135 return false; 3136 } 3071 3137 } 3072 3138 } 3073 3139