Ticket #608: briefsound.patch
File briefsound.patch, 5.7 KB (added by , 18 years ago) |
---|
-
libs/libmythtv/tv_play.cpp
2027 2053 if (prbuffer->isDVD()) 2028 2054 { 2029 2055 prbuffer->prevTrack(); 2030 Update PosOSD(0.0,tr("Previous Chapter"), osd_general_timeout);2056 UpdateOSD(tr("Previous Chapter"), osd_general_timeout); 2031 2057 } 2032 2058 else 2033 2059 { … … 2039 2065 if (prbuffer->isDVD()) 2040 2066 { 2041 2067 prbuffer->nextTrack(); 2042 Update PosOSD(0.0,tr("Next Chapter"), osd_general_timeout);2068 UpdateOSD(tr("Next Chapter"), osd_general_timeout); 2043 2069 } 2044 2070 else 2045 2071 { … … 2181 2207 if (!handled) 2182 2208 { 2183 2209 float time = StopFFRew(); 2184 UpdatePosOSD(time, PlayMesg(), osd_general_timeout); 2210 if (time != 0.0) UpdatePos(time); 2211 UpdateOSD(PlayMesg(), osd_general_timeout); 2185 2212 handled = true; 2186 2213 } 2187 2214 } … … 2189 2216 if (speed_index) 2190 2217 { 2191 2218 NormalSpeed(); 2192 Update PosOSD(0.0,PlayMesg(), osd_general_timeout);2219 UpdateOSD(PlayMesg(), osd_general_timeout); 2193 2220 handled = true; 2194 2221 } 2195 2222 } … … 2319 2346 if (prbuffer->isDVD()) 2320 2347 { 2321 2348 prbuffer->prevTrack(); 2322 UpdatePosOSD(0.0, tr("Previous Chapter"), 2323 osd_general_timeout); 2349 UpdateOSD(tr("Previous Chapter"), osd_general_timeout); 2324 2350 } 2325 2351 else 2326 2352 { … … 2332 2358 if (prbuffer->isDVD()) 2333 2359 { 2334 2360 prbuffer->nextTrack(); 2335 Update PosOSD(0.0,tr("Next Chapter"), osd_general_timeout);2361 UpdateOSD(tr("Next Chapter"), osd_general_timeout); 2336 2362 } 2337 2363 else 2338 2364 { … … 2479 2505 speed_index = 0; 2480 2506 } 2481 2507 2482 2483 2508 if (activenvp != nvp) 2484 2509 return; 2485 2510 2486 UpdatePosOSD(time, PlayMesg(), osd_general_timeout); 2511 if (time != 0.0) UpdatePos(time); 2512 UpdateOSD(PlayMesg(), osd_general_timeout); 2487 2513 2488 2514 gContext->DisableScreensaver(); 2489 2515 } … … 2526 2552 if (paused) 2527 2553 { 2528 2554 activerbuffer->WaitForPause(); 2529 UpdatePosOSD(time, tr("Paused"), -1); 2555 UpdatePos(time); 2556 UpdateOSD(tr("Paused"), -1); 2530 2557 gContext->RestoreScreensaver(); 2531 2558 } 2532 2559 else 2533 2560 { 2534 UpdatePosOSD(time, PlayMesg(), osd_general_timeout); 2561 UpdatePos(time); 2562 UpdateOSD(PlayMesg(), osd_general_timeout); 2535 2563 gContext->DisableScreensaver(); 2536 2564 } 2537 2565 } … … 2565 2593 } 2566 2594 } 2567 2595 2568 bool TV::UpdatePos OSD(float time, const QString &mesg, int disptime)2596 bool TV::UpdatePos(float time) 2569 2597 { 2570 2598 bool muted = false; 2571 2599 … … 2576 2604 muted = true; 2577 2605 } 2578 2606 2579 if (activenvp == nvp)2580 {2581 QString desc = "";2582 int pos = nvp->calcSliderPos(desc);2583 bool slidertype = StateIsLiveTV(GetState());2584 int osdtype = (doSmartForward) ? kOSDFunctionalType_SmartForward :2585 kOSDFunctionalType_Default;2586 if (GetOSD())2587 GetOSD()->StartPause(pos, slidertype, mesg, desc, disptime,2588 osdtype);2589 update_osd_pos = true;2590 }2591 2592 2607 bool res = false; 2593 2608 2594 2609 if (time > 0.0) … … 2602 2617 return res; 2603 2618 } 2604 2619 2620 void TV::UpdateOSD(const QString &mesg, int disptime) 2621 { 2622 if (activenvp != nvp) return; 2623 2624 QString desc = ""; 2625 int pos = nvp->calcSliderPos(desc); 2626 bool slidertype = StateIsLiveTV(GetState()); 2627 int osdtype = (doSmartForward) ? kOSDFunctionalType_SmartForward : 2628 kOSDFunctionalType_Default; 2629 if (GetOSD()) 2630 GetOSD()->StartPause(pos, slidertype, mesg, desc, disptime, 2631 osdtype); 2632 update_osd_pos = true; 2633 } 2634 2605 2635 void TV::DoSeek(float time, const QString &mesg) 2606 2636 { 2607 2637 if (!keyRepeat) … … 2609 2639 2610 2640 NormalSpeed(); 2611 2641 time += StopFFRew(); 2612 UpdatePosOSD(time, mesg, osd_general_timeout); 2642 UpdatePos(time); 2643 UpdateOSD(mesg, osd_general_timeout); 2613 2644 2614 2645 if (activenvp->GetLimitKeyRepeat()) 2615 2646 { … … 2683 2714 } 2684 2715 2685 2716 paused = false; 2686 UpdatePosOSD(time, mesg, osd_general_timeout); 2717 UpdatePos(time); 2718 UpdateOSD(mesg, osd_general_timeout); 2687 2719 } 2688 2720 2689 2721 float TV::StopFFRew(void) … … 2727 2759 else 2728 2760 { 2729 2761 float time = StopFFRew(); 2730 UpdatePosOSD(time, PlayMesg(), osd_general_timeout); 2762 UpdatePos(time); 2763 UpdateOSD(PlayMesg(), osd_general_timeout); 2731 2764 } 2732 2765 } 2733 2766 else … … 2763 2796 } 2764 2797 2765 2798 activenvp->Play(speed, false); 2766 Update PosOSD(0.0,mesg, -1);2799 UpdateOSD(mesg, -1); 2767 2800 } 2768 2801 2769 2802 void TV::DoQueueTranscode(void) -
libs/libmythtv/tv_play.h
185 185 void ChangeColour(bool up, bool recorder); 186 186 void ChangeHue(bool up, bool recorder); 187 187 188 188 189 void ChangeAudioTrack(int dir); 189 190 void SetAudioTrack(int track); 190 191 … … 219 220 void DoInfo(void); 220 221 void DoPlay(void); 221 222 void DoPause(void); 222 bool UpdatePosOSD(float time, const QString &mesg, int disptime); 223 bool UpdatePos(float time); 224 void UpdateOSD(const QString &mesg, int disptime); 223 225 void DoSeek(float time, const QString &mesg); 224 226 enum ArbSeekWhence { 225 227 ARBSEEK_SET = 0,