Mercurial > mplayer.hg
changeset 33701:09bdaa0c82b3
Make vobsub options available in mencoder, though with my test file
it seems to not work quite right but stops adding subtitles after
some minutes.
author | reimar |
---|---|
date | Fri, 01 Jul 2011 17:43:40 +0000 |
parents | e41218a2fe36 |
children | 772268824c8a |
files | cfg-common.h cfg-mplayer.h mencoder.c |
diffstat | 3 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/cfg-common.h Fri Jul 01 15:17:53 2011 +0000 +++ b/cfg-common.h Fri Jul 01 17:43:40 2011 +0000 @@ -34,6 +34,7 @@ #include "libmpdemux/mf.h" #include "libpostproc/postprocess.h" #include "sub/sub.h" +#include "sub/unrar_exec.h" #include "osdep/priority.h" #include "stream/cdd.h" #include "stream/network.h" @@ -589,6 +590,11 @@ {"utf8", &sub_utf8, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"noutf8", &sub_utf8, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"forcedsubsonly", &forced_subs_only, CONF_TYPE_FLAG, 0, 0, 1, NULL}, + {"vobsub", &vobsub_name, CONF_TYPE_STRING, 0, 0, 0, NULL}, + {"vobsubid", &vobsub_id, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL}, +#ifdef CONFIG_UNRAR_EXEC + {"unrarexec", &unrar_executable, CONF_TYPE_STRING, 0, 0, 0, NULL}, +#endif // specify IFO file for VOBSUB subtitle {"ifo", &spudec_ifo, CONF_TYPE_STRING, 0, 0, 0, NULL}, // enable Closed Captioning display
--- a/cfg-mplayer.h Fri Jul 01 15:17:53 2011 +0000 +++ b/cfg-mplayer.h Fri Jul 01 17:43:40 2011 +0000 @@ -35,7 +35,6 @@ #include "libvo/vo_fbdev.h" #include "libvo/vo_zr.h" #include "mp_fifo.h" -#include "sub/unrar_exec.h" const m_option_t vd_conf[]={ @@ -256,13 +255,6 @@ {"menu", "OSD menu support was not compiled in.\n", CONF_TYPE_PRINT,0, 0, 0, NULL}, #endif /* CONFIG_MENU */ - // these should be moved to -common, and supported in MEncoder - {"vobsub", &vobsub_name, CONF_TYPE_STRING, 0, 0, 0, NULL}, - {"vobsubid", &vobsub_id, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL}, -#ifdef CONFIG_UNRAR_EXEC - {"unrarexec", &unrar_executable, CONF_TYPE_STRING, 0, 0, 0, NULL}, -#endif - {"sstep", &step_sec, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL}, {"framedrop", &frame_dropping, CONF_TYPE_FLAG, 0, 0, 1, NULL},
--- a/mencoder.c Fri Jul 01 15:17:53 2011 +0000 +++ b/mencoder.c Fri Jul 01 17:43:40 2011 +0000 @@ -777,6 +777,8 @@ } } + vo_vobsub = vobsub_open(vobsub_name, spudec_ifo, 1, &vo_spudec); + // set up video encoder: if (!curfile) { // curfile is non zero when a second file is opened @@ -806,7 +808,7 @@ } #endif } -else { +else if (!vo_spudec) { init_vo_spudec(stream, sh_video, d_dvdsub ? d_dvdsub->sh : NULL); }