diff options
author | attila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-09-21 14:21:43 +0000 |
---|---|---|
committer | attila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-09-21 14:21:43 +0000 |
commit | 943904865ff0af25172c788601a585cf2cc590b4 (patch) | |
tree | b38f15a0b0dbd6a4d0e8f2d02399c98de0734367 /mplayer.c | |
parent | 1526dc6cdf8b226c43600eefc6ce137d73dd1f74 (diff) | |
download | mpv-943904865ff0af25172c788601a585cf2cc590b4.tar.bz2 mpv-943904865ff0af25172c788601a585cf2cc590b4.tar.xz |
Forced subtitles patch by Arne Driescher <driescher@mpi-magdeburg.mpg.de>
For a given subtitle language you can now chose to display
only the forced subtitles. Defaut is set to "show all subtitles"
so that current mplayer behaviour is not changed.
For DVD:
Use -forced_subs_only additionally to e.g. -slang en
if you are only interested in the forced subtitles.
For VobSub:
The idx file is now parsed for the "forced subs: ON/OFF" tag
and used according to its settings.
Key:
You can toggle the display of forced subtitles by pressing
"F" (upper case letter).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10918 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -243,6 +243,7 @@ char* audio_lang=NULL; char* dvdsub_lang=NULL; static char* spudec_ifo=NULL; char* filename=NULL; //"MI2-Trailer.avi"; +int forced_subs_only=0; // cache2: int stream_cache_size=-1; @@ -1256,6 +1257,8 @@ if(!use_stdin && !slave_mode){ sub_auto=0; // don't do autosub for textsubs if vobsub found inited_flags|=INITED_VOBSUB; vobsub_set_from_lang(vo_vobsub, dvdsub_lang); + // check if vobsub requested only to display forced subtitles + forced_subs_only=vobsub_get_forced_subs_flag(vo_vobsub); } //============ Open & Sync STREAM --- fork cache2 ==================== @@ -1597,6 +1600,10 @@ if (vo_spudec!=NULL) } +// Apply current settings for forced subs +if (vo_spudec!=NULL) + spudec_set_forced_subs_only(vo_spudec,forced_subs_only); + #ifdef USE_SUB if(sh_video) { // after reading video params we should load subtitles because @@ -3063,6 +3070,12 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still) } #endif break; + case MP_CMD_SUB_FORCED_ONLY: + if (vo_spudec) { + forced_subs_only = forced_subs_only ? 0 : ~0; // toggle state + spudec_set_forced_subs_only(vo_spudec,forced_subs_only); + } + break; case MP_CMD_SCREENSHOT : if(vo_config_count) video_out->control(VOCTRL_SCREENSHOT, NULL); break; |