Ticket #1682: 1682.patch
File 1682.patch, 2.9 KB (added by , 18 years ago) |
---|
-
libs/libmythtv/NuppelVideoPlayer.cpp
1556 1556 { 1557 1557 uint origMode = textDisplayMode; 1558 1558 1559 textDesired = enable; 1560 1559 1561 if (!enable) 1560 1562 { 1561 1563 DisableCaptions(origMode); … … 5496 5498 return ret; 5497 5499 } 5498 5500 5501 /** \fn NuppelVideoPlayer::TracksChanged(uint) 5502 * \brief This tries to re-enables captions/subtitles if the user 5503 * wants them and one of the captions/subtitles tracks has 5504 * changed. 5505 */ 5506 void NuppelVideoPlayer::TracksChanged(uint trackType) 5507 { 5508 if (trackType >= kTrackTypeSubtitle && 5509 trackType <= kTrackTypeTeletextCaptions && textDesired) 5510 { 5511 SetCaptionsEnabled(textDesired); 5512 } 5513 } 5514 5499 5515 InteractiveTV *NuppelVideoPlayer::GetInteractiveTV(void) 5500 5516 { 5501 5517 if (!interactiveTV && osd && itvEnabled) -
libs/libmythtv/NuppelVideoPlayer.h
345 345 int GetTrack(uint type) const; 346 346 int ChangeTrack(uint type, int dir); 347 347 void ChangeCaptionTrack(int dir); 348 void TracksChanged(uint trackType); 348 349 349 350 // MHEG/MHI stream selection 350 351 bool ITVHandleAction(const QString &action); … … 604 605 605 606 // Support for captions, teletext, etc. decoded by libav 606 607 QMutex subtitleLock; 608 /// This allows us to enable captions/subtitles later if the streams 609 /// are not immediately available when the video starts playing. 610 bool textDesired; 607 611 bool osdHasSubtitles; 608 612 long long osdSubtitlesExpireAt; 609 613 MythDeque<AVSubtitle> nonDisplayedSubtitles; -
libs/libmythtv/decoderbase.cpp
824 824 return false; 825 825 826 826 tracks[type].push_back(info); 827 828 if (GetNVP()) 829 GetNVP()->TracksChanged(type); 830 827 831 return true; 828 832 } 829 833 830 834 /** \fn DecoderBase::AutoSelectTrack(uint) 831 835 * \brief Select best track. 832 836 * 833 * I fcase there's only one track available, always choose it.837 * In case there's only one track available, always choose it. 834 838 * 835 839 * If there is a user selected track we try to find it. 836 840 * … … 904 908 selTrack = 0; 905 909 } 906 910 911 int oldTrack = currentTrack[type]; 907 912 currentTrack[type] = (selTrack < 0) ? -1 : selTrack; 908 913 StreamInfo tmp = tracks[type][currentTrack[type]]; 909 914 selectedTrack[type] = tmp; … … 917 922 .arg(currentTrack[type]+1) 918 923 .arg(iso639_key_toName(lang)).arg(lang)); 919 924 925 if (GetNVP() && (oldTrack != currentTrack[type])) 926 GetNVP()->TracksChanged(type); 927 920 928 return selTrack; 921 929 } 922 930