Ticket #608: briefsound.patch

File briefsound.patch, 5.7 KB (added by mythtv@…, 20 years ago)

Proposed patch

  • libs/libmythtv/tv_play.cpp

     
    20272053            if (prbuffer->isDVD())
    20282054            {
    20292055                prbuffer->prevTrack();
    2030                 UpdatePosOSD(0.0, tr("Previous Chapter"), osd_general_timeout);
     2056                UpdateOSD(tr("Previous Chapter"), osd_general_timeout);
    20312057            }
    20322058            else
    20332059            {
     
    20392065            if (prbuffer->isDVD())
    20402066            {
    20412067                prbuffer->nextTrack();
    2042                 UpdatePosOSD(0.0, tr("Next Chapter"), osd_general_timeout);
     2068                UpdateOSD(tr("Next Chapter"), osd_general_timeout);
    20432069            }
    20442070            else
    20452071            {
     
    21812207            if (!handled)
    21822208            {
    21832209                float time = StopFFRew();
    2184                 UpdatePosOSD(time, PlayMesg(), osd_general_timeout);
     2210                if (time != 0.0) UpdatePos(time);
     2211                UpdateOSD(PlayMesg(), osd_general_timeout);
    21852212                handled = true;
    21862213            }
    21872214        }
     
    21892216        if (speed_index)
    21902217        {
    21912218            NormalSpeed();
    2192             UpdatePosOSD(0.0, PlayMesg(), osd_general_timeout);
     2219            UpdateOSD(PlayMesg(), osd_general_timeout);
    21932220            handled = true;
    21942221        }
    21952222    }
     
    23192346                if (prbuffer->isDVD())
    23202347                {
    23212348                    prbuffer->prevTrack();
    2322                     UpdatePosOSD(0.0, tr("Previous Chapter"),
    2323                                  osd_general_timeout);
     2349                    UpdateOSD(tr("Previous Chapter"), osd_general_timeout);
    23242350                }
    23252351                else
    23262352                {
     
    23322358                if (prbuffer->isDVD())
    23332359                {
    23342360                    prbuffer->nextTrack();
    2335                     UpdatePosOSD(0.0, tr("Next Chapter"), osd_general_timeout);
     2361                    UpdateOSD(tr("Next Chapter"), osd_general_timeout);
    23362362                }
    23372363                else
    23382364                {
     
    24792505        speed_index = 0;
    24802506    }
    24812507
    2482 
    24832508    if (activenvp != nvp)
    24842509        return;
    24852510
    2486     UpdatePosOSD(time, PlayMesg(), osd_general_timeout);
     2511    if (time != 0.0) UpdatePos(time);
     2512    UpdateOSD(PlayMesg(), osd_general_timeout);
    24872513
    24882514    gContext->DisableScreensaver();
    24892515}
     
    25262552    if (paused)
    25272553    {
    25282554        activerbuffer->WaitForPause();
    2529         UpdatePosOSD(time, tr("Paused"), -1);
     2555        UpdatePos(time);
     2556        UpdateOSD(tr("Paused"), -1);
    25302557        gContext->RestoreScreensaver();
    25312558    }
    25322559    else
    25332560    {
    2534         UpdatePosOSD(time, PlayMesg(), osd_general_timeout);
     2561        UpdatePos(time);
     2562        UpdateOSD(PlayMesg(), osd_general_timeout);
    25352563        gContext->DisableScreensaver();
    25362564    }
    25372565}
     
    25652593    }
    25662594}
    25672595
    2568 bool TV::UpdatePosOSD(float time, const QString &mesg, int disptime)
     2596bool TV::UpdatePos(float time)
    25692597{
    25702598    bool muted = false;
    25712599
     
    25762604        muted = true;
    25772605    }
    25782606
    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 
    25922607    bool res = false;
    25932608
    25942609    if (time > 0.0)
     
    26022617    return res;
    26032618}
    26042619
     2620void 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
    26052635void TV::DoSeek(float time, const QString &mesg)
    26062636{
    26072637    if (!keyRepeat)
     
    26092639
    26102640    NormalSpeed();
    26112641    time += StopFFRew();
    2612     UpdatePosOSD(time, mesg, osd_general_timeout);
     2642    UpdatePos(time);
     2643    UpdateOSD(mesg, osd_general_timeout);
    26132644
    26142645    if (activenvp->GetLimitKeyRepeat())
    26152646    {
     
    26832714    }
    26842715
    26852716    paused = false;
    2686     UpdatePosOSD(time, mesg, osd_general_timeout);
     2717    UpdatePos(time);
     2718    UpdateOSD(mesg, osd_general_timeout);
    26872719}
    26882720
    26892721float TV::StopFFRew(void)
     
    27272759        else
    27282760        {
    27292761            float time = StopFFRew();
    2730             UpdatePosOSD(time, PlayMesg(), osd_general_timeout);
     2762            UpdatePos(time);
     2763            UpdateOSD(PlayMesg(), osd_general_timeout);
    27312764        }
    27322765    }
    27332766    else
     
    27632796    }
    27642797
    27652798    activenvp->Play(speed, false);
    2766     UpdatePosOSD(0.0, mesg, -1);
     2799    UpdateOSD(mesg, -1);
    27672800}
    27682801
    27692802void TV::DoQueueTranscode(void)
  • libs/libmythtv/tv_play.h

     
    185185    void ChangeColour(bool up, bool recorder);
    186186    void ChangeHue(bool up, bool recorder);
    187187
     188
    188189    void ChangeAudioTrack(int dir);
    189190    void SetAudioTrack(int track);
    190191
     
    219220    void DoInfo(void);
    220221    void DoPlay(void);
    221222    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);
    223225    void DoSeek(float time, const QString &mesg);
    224226    enum ArbSeekWhence {
    225227        ARBSEEK_SET = 0,