Ticket #8153: external_subtitle_menu.patch

File external_subtitle_menu.patch, 2.1 KB (added by Jim Stichnoth <stichnot@…>, 11 years ago)
  • libs/libmythtv/NuppelVideoPlayer.cpp

     
    8989#define LOC_WARN QString("NVP(%1), Warning: ").arg(dbg_ident(this),0,36)
    9090#define LOC_ERR  QString("NVP(%1), Error: ").arg(dbg_ident(this),0,36)
    9191
    92 uint track_type_to_display_mode[kTrackTypeCount+2] =
     92uint track_type_to_display_mode[kTrackTypeCount+3] =
    9393{
    9494    kDisplayNone,
    9595    kDisplayAVSubtitle,
     
    9898    kDisplayTeletextCaptions,
    9999    kDisplayNone,
    100100    kDisplayNUVTeletextCaptions,
     101    kDisplayTextSubtitle,
    101102};
    102103
    103104NuppelVideoPlayer::NuppelVideoPlayer(bool muted)
  • libs/libmythtv/NuppelVideoPlayer.h

     
    418418    bool PosMapFromEnc(unsigned long long          start,
    419419                       QMap<long long, long long> &posMap);
    420420
     421    uint GetTextSubtitlesCount(void) const
     422    {
     423        return textSubtitles.GetSubtitleCount();
     424    }
     425
    421426  protected:
    422427    void DisplayPauseFrame(void);
    423428    void DisplayNormalFrame(void);
  • libs/libmythtv/tv_play.cpp

     
    34703470    else if (action.left(6) == "TOGGLE")
    34713471    {
    34723472        int type = to_track_type(action.mid(6));
     3473        if (type == kTrackTypeSubtitle &&
     3474            ctx->nvp->GetTextSubtitlesCount() > 0)
     3475            type = kTrackTypeTextSubtitle;
    34733476        if (type == kTrackTypeTeletextMenu)
    34743477        {
    34753478            handled = true;
     
    1085410857    }
    1085510858    ctx->UnlockDeleteNVP(__FILE__, __LINE__);
    1085610859
    10857     if (tracks.empty())
     10860    if (tracks.empty() &&
     10861        !(type == kTrackTypeSubtitle && ctx->nvp->GetTextSubtitlesCount() > 0))
    1085810862        return false;
    1085910863
    1086010864    if ((kTrackTypeAudio == type) && tracks.size() <= 1)