Ticket #475: channelchange.diff
File channelchange.diff, 5.4 KB (added by , 19 years ago) |
---|
-
libs/libmythtv/tv_play.cpp
915 915 916 916 QString filters = ""; 917 917 918 918 channeltuned = false; 919 919 920 nvp = new NuppelVideoPlayer(playbackinfo); 920 921 nvp->SetParentWidget(myWindow); 921 922 nvp->SetRingBuffer(prbuffer); … … 2446 2447 2447 2448 void TV::ToggleInputs(void) 2448 2449 { 2449 if ( activenvp == nvp)2450 if (paused) 2450 2451 { 2451 if (paused) 2452 { 2453 osd->EndPause(); 2454 gContext->DisableScreensaver(); 2455 paused = false; 2456 } 2452 osd->EndPause(); 2453 gContext->DisableScreensaver(); 2454 paused = false; 2457 2455 } 2458 2456 2459 2457 activenvp->Pause(false); … … 2468 2466 activenvp->ResetPlaying(); 2469 2467 activenvp->Play(normal_speed, true, false); 2470 2468 2471 if (activenvp == nvp) 2472 { 2473 UpdateOSDInput(); 2474 UpdateLCD(); 2475 } 2469 UpdateOSDInput(); 2470 UpdateLCD(); 2476 2471 } 2477 2472 2478 2473 void TV::ToggleChannelFavorite(void) … … 2484 2479 { 2485 2480 bool muted = false; 2486 2481 2487 if (!force && (activenvp == nvp) &&showBufferedWarnings)2482 if (!force && showBufferedWarnings) 2488 2483 { 2489 2484 int behind = activenvp->GetSecondsBehind(); 2490 2485 if (behind > bufferedChannelThreshold) … … 2518 2513 muted = true; 2519 2514 } 2520 2515 2521 if ( activenvp == nvp)2516 if (paused) 2522 2517 { 2523 if (paused) 2524 { 2525 osd->EndPause(); 2526 gContext->DisableScreensaver(); 2527 paused = false; 2528 } 2518 osd->EndPause(); 2519 gContext->DisableScreensaver(); 2520 paused = false; 2529 2521 } 2530 2522 2531 2523 activenvp->Pause(false); … … 2547 2539 2548 2540 activenvp->Play(normal_speed, true, false); 2549 2541 2542 UpdateOSD(); 2543 UpdateLCD(); 2544 2550 2545 if (activenvp == nvp) 2551 2546 { 2552 UpdateOSD();2553 UpdateLCD();2554 2547 AddPreviousChannel(); 2555 2548 } 2556 2549 … … 2640 2633 } 2641 2634 } 2642 2635 2643 if ( activenvp == nvp &&osd)2636 if (osd) 2644 2637 { 2645 2638 QMap<QString, QString> infoMap; 2646 2639 … … 2664 2657 if (browsemode) 2665 2658 { 2666 2659 BrowseChannel(chan); 2667 if ( activenvp == nvp &&osd)2660 if (osd) 2668 2661 osd->HideSet("channel_number"); 2669 2662 } 2670 2663 else … … 2677 2670 { 2678 2671 bool muted = false; 2679 2672 2680 if (!channame_vector.empty() && channame_vector.back() == name )2673 if (!channame_vector.empty() && channame_vector.back() == name && channeltuned) 2681 2674 return; 2682 2675 2683 2676 if (!activerecorder->CheckChannel(name)) 2684 2677 return; 2685 2678 2686 if (!force && (activenvp == nvp) &&showBufferedWarnings)2679 if (!force && showBufferedWarnings) 2687 2680 { 2688 2681 int behind = activenvp->GetSecondsBehind(); 2689 2682 if (behind > bufferedChannelThreshold) … … 2717 2710 muted = true; 2718 2711 } 2719 2712 2720 if (activenvp == nvp)2721 {2722 2713 if (paused) 2723 2714 { 2724 2715 osd->EndPause(); 2725 2716 gContext->DisableScreensaver(); 2726 2717 paused = false; 2727 2718 } 2728 }2729 2719 2730 2720 activenvp->Pause(false); 2731 2721 // all we care about is the ringbuffer being paused, here.. … … 2746 2736 2747 2737 activenvp->Play(normal_speed, true, false); 2748 2738 2739 UpdateOSD(); 2740 UpdateLCD(); 2741 2749 2742 if (activenvp == nvp) 2750 2743 { 2751 UpdateOSD();2752 UpdateLCD();2753 2744 AddPreviousChannel(); 2754 2745 } 2755 2746 2756 2747 if (muted) 2757 2748 muteTimer->start(kMuteTimeout * 2, true); 2749 channeltuned = true; 2758 2750 } 2759 2751 2760 2752 void TV::AddPreviousChannel(void) … … 2788 2780 channame_vector.size(); 2789 2781 2790 2782 // Display channel name in the OSD for up to 1 second. 2791 if (activenvp == nvp && osd) 2792 { 2793 osd->HideSet("program_info"); 2783 osd->HideSet("program_info"); 2794 2784 2795 2785 QMap<QString, QString> infoMap; 2796 2786 2797 infoMap["channum"] = channame_vector[vector]; 2798 infoMap["callsign"] = ""; 2799 osd->ClearAllText("channel_number"); 2800 osd->SetText("channel_number", infoMap, 1); 2801 } 2787 infoMap["channum"] = channame_vector[vector]; 2788 infoMap["callsign"] = ""; 2789 osd->ClearAllText("channel_number"); 2790 osd->SetText("channel_number", infoMap, 1); 2802 2791 2803 2792 // Reset the timer 2804 2793 prevChannelTimer->stop(); … … 2832 2821 } 2833 2822 2834 2823 //Turn off the OSD Channel Num so the channel changes right away 2835 if (activenvp == nvp && osd) 2836 osd->HideSet("channel_number"); 2824 osd->HideSet("channel_number"); 2837 2825 } 2838 2826 2839 2827 bool TV::ClearOSD(void) … … 3523 3511 3524 3512 void TV::BrowseStart(void) 3525 3513 { 3526 if (activenvp != nvp)3527 return;3528 3529 3514 if (paused) 3530 3515 return; 3531 3516 … … 3646 3631 3647 3632 QString msg = QString("%1 \"%2\"").arg(tr("Record")).arg(title); 3648 3633 3649 if (activenvp == nvp) 3650 osd->SetSettingsText(msg, 3); 3634 osd->SetSettingsText(msg, 3); 3651 3635 3652 3636 delete program_info; 3653 3637 } … … 3667 3651 osd->ClearAllText("browse_info"); 3668 3652 osd->SetText("browse_info", infoMap, -1); 3669 3653 3670 if (activenvp == nvp) 3671 osd->SetSettingsText(tr("Record"), 3); 3654 osd->SetSettingsText(tr("Record"), 3); 3672 3655 3673 3656 delete program_info; 3674 3657 } -
libs/libmythtv/tv_play.h
271 271 272 272 // Channel changing state variables 273 273 bool channelqueued; 274 bool channeltuned; 274 275 char channelKeys[5]; 275 276 int channelkeysstored; 276 277 QString lastCC; // last channel