mirror of https://github.com/mpv-player/mpv
9bb03b7db4
To draw libass subtitles, the code used ASS_Renderer objects created in vf_vo (VO rendering) or vf_ass. They were destroyed and recreated together with the video filter chain. Change the code to use a single persistent renderer instance stored in the main osd_state struct. Because libass seems to misbehave if fonts are changed while a renderer exists (even if ass_set_fonts() is called on the renderer afterwards), the renderer is recreated after adding embedded fonts. The known benefits are simpler code and avoiding delays when switching between timeline parts from different files (libass fontconfig initialization, needed when creating a new renderer, can take a long time in some cases; switching between files rebuilds the video filter chain, and this required recreating the renderers). On the other hand, I'm not sure whether this could cause inefficient bitmap caching in libass; explicitly resetting the renderer in some cases could be beneficial. The new code does not keep the distinction of separate renderers for vsfilter munged aspect vs normal; this means that changing subtitle tracks can lose cache for the previous track. The new code always sets some libass parameters on each rendering call, which were previously only set if they had potentially changed. This should be harmless as libass itself has checks to see if the values differ from previous ones. Conflicts: command.c libmpcodecs/vf_ass.c libmpcodecs/vf_vo.c mplayer.c sub/ass_mp.c |
||
---|---|---|
DOCS | ||
TOOLS | ||
debian | ||
etc | ||
ffmpeg_files | ||
input | ||
libaf | ||
libao2 | ||
libmpcodecs | ||
libmpdemux | ||
libvo | ||
osdep | ||
rpm | ||
stream | ||
sub | ||
timeline | ||
.gitignore | ||
AUTHORS | ||
Copyright | ||
LICENSE | ||
Makefile | ||
README | ||
asxparser.c | ||
asxparser.h | ||
av_log.c | ||
av_log.h | ||
av_opts.c | ||
av_opts.h | ||
bstr.c | ||
bstr.h | ||
cfg-mplayer.h | ||
codec-cfg.c | ||
codec-cfg.h | ||
command.c | ||
command.h | ||
configure | ||
cpudetect.c | ||
cpudetect.h | ||
defaultopts.c | ||
defaultopts.h | ||
fmt-conversion.c | ||
fmt-conversion.h | ||
image_writer.c | ||
image_writer.h | ||
m_config.c | ||
m_config.h | ||
m_option.c | ||
m_option.h | ||
m_property.c | ||
m_property.h | ||
m_struct.c | ||
m_struct.h | ||
mangle.h | ||
metadata.h | ||
mixer.c | ||
mixer.h | ||
mp_core.h | ||
mp_fifo.c | ||
mp_fifo.h | ||
mp_msg.c | ||
mp_msg.h | ||
mp_osd.h | ||
mpbswap.h | ||
mpcommon.c | ||
mpcommon.h | ||
mplayer.c | ||
mplayer.h | ||
options.h | ||
parser-cfg.c | ||
parser-cfg.h | ||
parser-mpcmd.c | ||
parser-mpcmd.h | ||
path.c | ||
path.h | ||
playlist.c | ||
playlist.h | ||
playlist_parser.c | ||
playlist_parser.h | ||
pnm_loader.c | ||
pnm_loader.h | ||
screenshot.c | ||
screenshot.h | ||
subopt-helper.c | ||
subopt-helper.h | ||
talloc.c | ||
talloc.h | ||
version.sh |
README
Compiling with full features requires development files for several external libraries. Below is a list of some important requirements. For more information see the output of './configure --help' for a list of options, or look at the list of enabled and disabled features printed after running './configure'. If you think you have support for some feature installed but configure fails to detect it, the file config.log may contain information about the reasons for the failure. Libraries specific to particular video output methods (you'll want at least one of VDPAU, GL or Xv): - libvdpau (for VDPAU output, best choice for NVIDIA cards) - libGL (OpenGL output) - libXv (XVideo output) general: - libasound (ALSA audio output) - various general X development libraries - libfreetype (for libass) - libfontconfig (for libass) - libass - FFmpeg libraries (libavutil libavcodec libavformat libswscale libpostproc) Most of the above libraries are available in suitable versions on normal Linux distributions. However FFmpeg is an exception (distro versions may be too old to work at all or work well). For that reason you may want to use the separately available build wrapper that first compiles FFmpeg libraries and libass, and then compiles the player statically linked against those.