diff options
-rw-r--r-- | DOCS/man/en/mplayer.1 | 24 | ||||
-rw-r--r-- | Makefile | 32 | ||||
-rw-r--r-- | TOOLS/subrip.c | 4 | ||||
-rw-r--r-- | cfg-common.h | 3 | ||||
-rw-r--r-- | cfg-mplayer.h | 1 | ||||
-rw-r--r-- | command.c | 71 | ||||
-rw-r--r-- | defaultopts.c | 6 | ||||
-rw-r--r-- | libmenu/menu.c | 4 | ||||
-rw-r--r-- | libmenu/menu_cmdlist.c | 2 | ||||
-rw-r--r-- | libmenu/menu_console.c | 2 | ||||
-rw-r--r-- | libmenu/menu_list.c | 2 | ||||
-rw-r--r-- | libmenu/menu_txt.c | 2 | ||||
-rw-r--r-- | libmenu/vf_menu.c | 4 | ||||
-rw-r--r-- | libmpcodecs/vf.h | 9 | ||||
-rw-r--r-- | libmpcodecs/vf_ass.c | 50 | ||||
-rw-r--r-- | libmpcodecs/vf_expand.c | 2 | ||||
-rw-r--r-- | libmpcodecs/vf_vo.c | 78 | ||||
-rw-r--r-- | libmpdemux/demux_lavf.c | 10 | ||||
-rw-r--r-- | libmpdemux/demux_mkv.c | 64 | ||||
-rw-r--r-- | libmpdemux/demux_mov.c | 2 | ||||
-rw-r--r-- | libmpdemux/demux_ogg.c | 4 | ||||
-rw-r--r-- | libmpdemux/demux_ty.c | 2 | ||||
-rw-r--r-- | libmpdemux/demux_ty_osd.c | 4 | ||||
-rw-r--r-- | libmpdemux/demuxer.c | 38 | ||||
-rw-r--r-- | libmpdemux/demuxer.h | 6 | ||||
-rw-r--r-- | libmpdemux/stheader.h | 5 | ||||
-rw-r--r-- | libmpdemux/video.c | 2 | ||||
-rw-r--r-- | libvo/old_vo_wrapper.c | 2 | ||||
-rw-r--r-- | libvo/vesa_lvo.c | 2 | ||||
-rw-r--r-- | libvo/video_out.h | 7 | ||||
-rw-r--r-- | libvo/vo_aa.c | 4 | ||||
-rw-r--r-- | libvo/vo_caca.c | 2 | ||||
-rw-r--r-- | libvo/vo_corevideo.m | 2 | ||||
-rw-r--r-- | libvo/vo_dfbmga.c | 2 | ||||
-rw-r--r-- | libvo/vo_dga.c | 2 | ||||
-rw-r--r-- | libvo/vo_direct3d.c | 4 | ||||
-rw-r--r-- | libvo/vo_directfb2.c | 2 | ||||
-rw-r--r-- | libvo/vo_directx.c | 2 | ||||
-rw-r--r-- | libvo/vo_dxr2.c | 2 | ||||
-rw-r--r-- | libvo/vo_dxr3.c | 2 | ||||
-rw-r--r-- | libvo/vo_fbdev.c | 2 | ||||
-rw-r--r-- | libvo/vo_fbdev2.c | 2 | ||||
-rw-r--r-- | libvo/vo_gl.c | 6 | ||||
-rw-r--r-- | libvo/vo_gl2.c | 2 | ||||
-rw-r--r-- | libvo/vo_kva.c | 2 | ||||
-rw-r--r-- | libvo/vo_mga.c | 2 | ||||
-rw-r--r-- | libvo/vo_quartz.c | 2 | ||||
-rw-r--r-- | libvo/vo_s3fb.c | 2 | ||||
-rw-r--r-- | libvo/vo_sdl.c | 2 | ||||
-rw-r--r-- | libvo/vo_svga.c | 2 | ||||
-rw-r--r-- | libvo/vo_tdfxfb.c | 2 | ||||
-rw-r--r-- | libvo/vo_vdpau.c | 8 | ||||
-rw-r--r-- | libvo/vo_vesa.c | 2 | ||||
-rw-r--r-- | libvo/vo_wii.c | 2 | ||||
-rw-r--r-- | libvo/vo_x11.c | 2 | ||||
-rw-r--r-- | libvo/vo_xmga.c | 2 | ||||
-rw-r--r-- | libvo/vo_xv.c | 2 | ||||
-rw-r--r-- | libvo/vo_xvmc.c | 2 | ||||
-rw-r--r-- | libvo/vo_xvr100.c | 2 | ||||
-rw-r--r-- | libvo/vo_yuv4mpeg.c | 2 | ||||
-rw-r--r-- | libvo/vosub_vidix.c | 2 | ||||
-rw-r--r-- | m_option.c | 2 | ||||
-rw-r--r-- | mp_core.h | 9 | ||||
-rw-r--r-- | mpcommon.c | 345 | ||||
-rw-r--r-- | mpcommon.h | 30 | ||||
-rw-r--r-- | mplayer.c | 391 | ||||
-rw-r--r-- | mplayer.h | 5 | ||||
-rw-r--r-- | options.h | 1 | ||||
-rw-r--r-- | stream/stream_dvdnav.c | 2 | ||||
-rw-r--r-- | sub/ass_mp.c (renamed from ass_mp.c) | 56 | ||||
-rw-r--r-- | sub/ass_mp.h (renamed from ass_mp.h) | 19 | ||||
-rw-r--r-- | sub/av_sub.c (renamed from av_sub.c) | 47 | ||||
-rw-r--r-- | sub/av_sub.h (renamed from av_sub.h) | 4 | ||||
-rw-r--r-- | sub/dec_sub.c | 72 | ||||
-rw-r--r-- | sub/dec_sub.h | 14 | ||||
-rw-r--r-- | sub/find_sub.c (renamed from find_sub.c) | 6 | ||||
-rw-r--r-- | sub/font_load.c (renamed from libvo/font_load.c) | 0 | ||||
-rw-r--r-- | sub/font_load.h (renamed from libvo/font_load.h) | 0 | ||||
-rw-r--r-- | sub/font_load_ft.c (renamed from libvo/font_load_ft.c) | 0 | ||||
-rw-r--r-- | sub/osd_font.h (renamed from libvo/osd_font.h) | 0 | ||||
-rw-r--r-- | sub/sd.h | 16 | ||||
-rw-r--r-- | sub/sd_ass.c | 154 | ||||
-rw-r--r-- | sub/spudec.c (renamed from spudec.c) | 3 | ||||
-rw-r--r-- | sub/spudec.h (renamed from spudec.h) | 0 | ||||
-rw-r--r-- | sub/sub.c (renamed from libvo/sub.c) | 2 | ||||
-rw-r--r-- | sub/sub.h (renamed from libvo/sub.h) | 6 | ||||
-rw-r--r-- | sub/sub_cc.c (renamed from sub_cc.c) | 2 | ||||
-rw-r--r-- | sub/sub_cc.h (renamed from sub_cc.h) | 0 | ||||
-rw-r--r-- | sub/subassconvert.c | 502 | ||||
-rw-r--r-- | sub/subassconvert.h | 27 | ||||
-rw-r--r-- | sub/subreader.c (renamed from subreader.c) | 154 | ||||
-rw-r--r-- | sub/subreader.h (renamed from subreader.h) | 4 | ||||
-rw-r--r-- | sub/unrar_exec.c (renamed from unrar_exec.c) | 0 | ||||
-rw-r--r-- | sub/unrar_exec.h (renamed from unrar_exec.h) | 0 | ||||
-rw-r--r-- | sub/vobsub.c (renamed from vobsub.c) | 0 | ||||
-rw-r--r-- | sub/vobsub.h (renamed from vobsub.h) | 0 |
96 files changed, 1625 insertions, 768 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index cc5f912053..ae13cac060 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -2088,14 +2088,17 @@ FIXME: Document this. Also see \-vf expand. . .TP -.B \-ass (FreeType only) -Turn on SSA/ASS subtitle rendering. -With this option, libass will be used for SSA/ASS -external subtitles and Matroska tracks. +.B \-ass, \-noass (FreeType only) +Use libass to render all text subtitles. +This enables support for the native styling of SSA/ASS subtitles, +and also support for some styling features in other subtitle formats by +conversion to ASS markup. +Enabled by default if the player was compiled with libass support. .br .I NOTE: -Unlike normal OSD, libass uses fontconfig by default. To disable it, use -\-nofontconfig. +Some of the other subtitle options were written for the old non-libass +subtitle rendering system and may not work the same way or at all with +libass rendering enabled. . .TP .B \-ass\-border\-color <value> @@ -2272,13 +2275,8 @@ With Fontconfig, this option determines the Fontconfig font pattern. .PD 1 . .TP -.B \-fontconfig (fontconfig only) -Enables the usage of fontconfig managed fonts. -.br -.I NOTE: -By default fontconfig is used for libass-rendered subtitles and not used for -OSD. With \-fontconfig it is used for both libass and OSD, with \-nofontconfig -it is not used at all. +.B \-fontconfig, \-nofontconfig (fontconfig only) +Enables the use of fontconfig managed fonts. Enabled by default. . .TP .B \-forcedsubsonly @@ -27,7 +27,7 @@ SRCS_AUDIO_INPUT-$(ALSA1X) += stream/ai_alsa1x.c SRCS_AUDIO_INPUT-$(ALSA9) += stream/ai_alsa.c SRCS_AUDIO_INPUT-$(OSS) += stream/ai_oss.c SRCS_COMMON-$(AUDIO_INPUT) += $(SRCS_AUDIO_INPUT-yes) -SRCS_COMMON-$(BITMAP_FONT) += libvo/font_load.c +SRCS_COMMON-$(BITMAP_FONT) += sub/font_load.c SRCS_COMMON-$(CDDA) += stream/stream_cdda.c \ stream/cdinfo.c SRCS_COMMON-$(CDDB) += stream/stream_cddb.c @@ -101,7 +101,6 @@ SRCS_COMMON-$(FASTMEMCPY) += libvo/aclib.c SRCS_COMMON-$(FFMPEG) += libmpcodecs/vf_pp.c \ av_opts.c \ libaf/af_lavcac3enc.c \ - av_sub.c \ libaf/af_lavcresample.c \ libmpcodecs/ad_ffmpeg.c \ libmpcodecs/vd_ffmpeg.c \ @@ -111,6 +110,7 @@ SRCS_COMMON-$(FFMPEG) += libmpcodecs/vf_pp.c \ libmpcodecs/vf_uspp.c \ libmpdemux/demux_lavf.c \ stream/stream_ffmpeg.c \ + sub/av_sub.c \ # Requires a new enough libavutil that installs eval.h SRCS_COMMON-$(FFMPEG_EVAL_API) += libmpcodecs/vf_geq.c \ @@ -122,7 +122,7 @@ SRCS_COMMON-$(FFMPEG_INTERNALS) += libmpcodecs/vf_fspp.c \ libmpcodecs/vf_qp.c \ libmpcodecs/vf_spp.c \ -SRCS_COMMON-$(FREETYPE) += libvo/font_load_ft.c +SRCS_COMMON-$(FREETYPE) += sub/font_load_ft.c SRCS_COMMON-$(FTP) += stream/stream_ftp.c SRCS_COMMON-$(GIF) += libmpdemux/demux_gif.c SRCS_COMMON-$(HAVE_POSIX_SELECT) += libmpcodecs/vf_bmovl.c @@ -130,8 +130,9 @@ SRCS_COMMON-$(HAVE_SYS_MMAN_H) += libaf/af_export.c osdep/mmap_anon.c SRCS_COMMON-$(JPEG) += libmpcodecs/vd_ijpg.c SRCS_COMMON-$(LADSPA) += libaf/af_ladspa.c SRCS_COMMON-$(LIBA52) += libmpcodecs/ad_liba52.c -SRCS_COMMON-$(LIBASS) += ass_mp.c \ - libmpcodecs/vf_ass.c \ +SRCS_COMMON-$(LIBASS) += libmpcodecs/vf_ass.c \ + sub/ass_mp.c \ + sub/sd_ass.c \ SRCS_COMMON-$(LIBBLURAY) += stream/stream_bluray.c SRCS_COMMON-$(LIBBS2B) += libaf/af_bs2b.c @@ -268,7 +269,7 @@ SRCS_COMMON-$(TV_DSHOW) += stream/tvi_dshow.c \ SRCS_COMMON-$(TV_V4L1) += stream/tvi_v4l.c stream/audio_in.c SRCS_COMMON-$(TV_V4L2) += stream/tvi_v4l2.c stream/audio_in.c -SRCS_COMMON-$(UNRAR_EXEC) += unrar_exec.c +SRCS_COMMON-$(UNRAR_EXEC) += sub/unrar_exec.c SRCS_COMMON-$(VCD) += stream/stream_vcd.c SRCS_COMMON-$(VORBIS) += libmpcodecs/ad_libvorbis.c \ libmpdemux/demux_ogg.c @@ -327,7 +328,6 @@ SRCS_COMMON = asxparser.c \ cpudetect.c \ defaultopts.c \ edl.c \ - find_sub.c \ fmt-conversion.c \ m_config.c \ m_option.c \ @@ -338,12 +338,8 @@ SRCS_COMMON = asxparser.c \ path.c \ playtree.c \ playtreeparser.c \ - spudec.c \ - sub_cc.c \ subopt-helper.c \ - subreader.c \ talloc.c \ - vobsub.c \ libaf/af.c \ libaf/af_center.c \ libaf/af_channels.c \ @@ -503,7 +499,6 @@ SRCS_COMMON = asxparser.c \ libmpdemux/yuv4mpeg.c \ libmpdemux/yuv4mpeg_ratio.c \ libvo/osd.c \ - libvo/sub.c \ osdep/findfiles.c \ osdep/numcores.c \ osdep/$(GETCH) \ @@ -515,6 +510,14 @@ SRCS_COMMON = asxparser.c \ stream/stream_mf.c \ stream/stream_null.c \ stream/url.c \ + sub/sub.c \ + sub/sub_cc.c \ + sub/dec_sub.c \ + sub/find_sub.c \ + sub/spudec.c \ + sub/subassconvert.c \ + sub/subreader.c \ + sub/vobsub.c \ $(SRCS_COMMON-yes) @@ -687,6 +690,7 @@ DIRS = . \ stream/freesdp \ stream/librtsp \ stream/realrtsp \ + sub \ tremor \ TOOLS \ vidix \ @@ -913,8 +917,8 @@ toolsclean: TOOLS/bmovl-test$(EXESUF): -lSDL_image -TOOLS/subrip$(EXESUF): vobsub.o spudec.o unrar_exec.o libvo/aclib.o \ - libswscale/libswscale.a libavutil/libavutil.a $(TEST_OBJS) +TOOLS/subrip$(EXESUF): sub/vobsub.o sub/spudec.o sub/unrar_exec.o \ + libvo/aclib.o \ libswscale/libswscale.a libavutil/libavutil.a $(TEST_OBJS) TOOLS/vfw2menc$(EXESUF): -lwinmm -lole32 diff --git a/TOOLS/subrip.c b/TOOLS/subrip.c index 85ee1c78e0..fb9395c413 100644 --- a/TOOLS/subrip.c +++ b/TOOLS/subrip.c @@ -31,8 +31,8 @@ #include <sys/types.h> #include <sys/wait.h> #include "libvo/video_out.h" -#include "vobsub.h" -#include "spudec.h" +#include "sub/vobsub.h" +#include "sub/spudec.h" /* linking hacks */ char *mplayer_version; diff --git a/cfg-common.h b/cfg-common.h index 7f4123cc56..e56d87b3de 100644 --- a/cfg-common.h +++ b/cfg-common.h @@ -379,7 +379,8 @@ const m_option_t common_opts[] = { {"priority", &proc_priority, CONF_TYPE_STRING, 0, 0, 0, NULL}, #endif {"codecpath", &codec_path, CONF_TYPE_STRING, 0, 0, 0, NULL}, - {"noconfig", (void *) noconfig_opts, CONF_TYPE_SUBCONFIG, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 0, NULL}, + OPT_CHOICE("noconfig", noconfig, CONF_GLOBAL | CONF_NOCFG | CONF_PRE_PARSE, + ({"off", 0}, {"user", 1}, {"system", 2}, {"all", 3})), // ------------------------- stream options -------------------- diff --git a/cfg-mplayer.h b/cfg-mplayer.h index ff5dd8a2c8..003e7f9c54 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -294,6 +294,7 @@ const m_option_t mplayer_opts[]={ {"lircconf", &lirc_configfile, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL}, #endif + {"leak-report", "", CONF_TYPE_PRINT, 0, 0, 0, (void*)1}, // these should be removed when gmplayer is forgotten {"gui", "Internal GUI was removed. Use some other frontend instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, {"nogui", "Internal GUI was removed, -nogui is no longer valid.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, @@ -31,7 +31,8 @@ #include "libmpdemux/stheader.h" #include "codec-cfg.h" #include "mplayer.h" -#include "libvo/sub.h" +#include "sub/sub.h" +#include "sub/dec_sub.h" #include "m_option.h" #include "m_property.h" #include "m_config.h" @@ -40,7 +41,7 @@ #include "libmpcodecs/vd.h" #include "mp_osd.h" #include "libvo/video_out.h" -#include "libvo/font_load.h" +#include "sub/font_load.h" #include "playtree.h" #include "libao2/audio_out.h" #include "mpcommon.h" @@ -48,10 +49,10 @@ #include "libmpcodecs/dec_video.h" #include "libmpcodecs/dec_audio.h" #include "libmpcodecs/dec_teletext.h" -#include "vobsub.h" -#include "spudec.h" +#include "sub/vobsub.h" +#include "sub/spudec.h" #include "path.h" -#include "ass_mp.h" +#include "sub/ass_mp.h" #include "stream/tv.h" #include "stream/stream_radio.h" #include "stream/pvr.h" @@ -193,15 +194,16 @@ static void log_sub(struct MPContext *mpctx) char *fname; FILE *f; int i; + struct subtitle *vo_sub_last = mpctx->vo_sub_last; - if (subdata == NULL || vo_sub_last == NULL) + if (mpctx->subdata == NULL || vo_sub_last == NULL) return; fname = get_path("subtitle_log"); f = fopen(fname, "a"); if (!f) return; fprintf(f, "----------------------------------------------------------\n"); - if (subdata->sub_uses_time) { + if (mpctx->subdata->sub_uses_time) { fprintf(f, "N: %s S: %02ld:%02ld:%02ld.%02ld E: %02ld:%02ld:%02ld.%02ld\n", mpctx->filename, vo_sub_last->start / 360000, @@ -1522,7 +1524,6 @@ static int mp_property_sub(m_option_t *prop, int action, void *arg, demux_stream_t *const d_sub = mpctx->d_sub; int source = -1, reset_spu = 0; int source_pos = -1; - char *sub_name; update_global_sub_size(mpctx); const int global_sub_size = mpctx->global_sub_size; @@ -1541,13 +1542,15 @@ static int mp_property_sub(m_option_t *prop, int action, void *arg, return M_PROPERTY_ERROR; *(char **) arg = malloc(64); (*(char **) arg)[63] = 0; - sub_name = 0; - if (subdata) - sub_name = subdata->filename; + char *sub_name = NULL; + if (mpctx->subdata) + sub_name = mpctx->subdata->filename; #ifdef CONFIG_ASS - if (ass_track && ass_track->name) - sub_name = ass_track->name; + if (mpctx->osd->ass_track) + sub_name = mpctx->osd->ass_track->name; #endif + if (!sub_name && mpctx->subdata) + sub_name = mpctx->subdata->filename; if (sub_name) { const char *tmp = mp_basename(sub_name); @@ -1644,7 +1647,7 @@ static int mp_property_sub(m_option_t *prop, int action, void *arg, mpctx->global_sub_pos, source); mpctx->set_of_sub_pos = -1; - subdata = NULL; + mpctx->subdata = NULL; vobsub_id = -1; opts->sub_id = -1; @@ -1653,21 +1656,25 @@ static int mp_property_sub(m_option_t *prop, int action, void *arg, reset_spu = 1; d_sub->id = -2; } -#ifdef CONFIG_ASS - ass_track = 0; -#endif + mpctx->osd->ass_track = NULL; + uninit_player(mpctx, INITIALIZED_SUB); if (source == SUB_SOURCE_VOBSUB) { vobsub_id = vobsub_get_id_by_index(vo_vobsub, source_pos); |