1
mirror of https://github.com/mpv-player/mpv synced 2024-11-03 03:19:24 +01:00
mpv/libvo
Uoti Urpala 9bb03b7db4 subs: libass: use a single persistent renderer for subtitles
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
2012-09-18 21:04:46 +02:00
..
aspect.c Remove dead code 2012-08-01 17:07:35 +02:00
aspect.h VO: remove old VO glue 2012-08-07 01:29:56 +02:00
cocoa_common.h cocoa: gl3: support querying of colors bit depth 2012-05-15 10:37:58 +02:00
cocoa_common.m cocoa_common: improve conditional dock hiding from 3259e4a7a 2012-08-28 23:21:07 +02:00
csputils.c video: honor the video's colormatrix and color range flags 2012-08-21 18:17:41 +02:00
csputils.h video: honor the video's colormatrix and color range flags 2012-08-21 18:17:41 +02:00
d3d_shader_yuv_2ch.h vo_direct3d: add hack for using 2 channel textures for 10 bit pixel formats 2012-03-17 21:06:28 +01:00
d3d_shader_yuv.h vo_direct3d: implement YUV conversion using shaders 2012-03-17 21:05:34 +01:00
d3d_shader_yuv.hlsl vo_direct3d: add hack for using 2 channel textures for 10 bit pixel formats 2012-03-17 21:06:28 +01:00
eosd_packer.c libvo, vo_vdpau: make the EOSD packer code from vo_vdpau generic 2011-12-25 20:42:18 +01:00
eosd_packer.h libvo, vo_vdpau: make the EOSD packer code from vo_vdpau generic 2011-12-25 20:42:18 +01:00
fastmemcpy.h VO: remove vo_directfb2 and vo_directx 2012-08-16 17:17:50 +02:00
filter_kernels.c libvo: add vo_gl3 2012-03-31 02:58:52 +02:00
filter_kernels.h libvo: add vo_gl3 2012-03-31 02:58:52 +02:00
geometry.c Add support for -geometry x syntax since the documentation claims 2010-06-05 06:28:58 +00:00
geometry.h Replace casual GPL notices by proper license headers. 2008-09-07 14:09:51 +00:00
gl_common.c VO: remove old VO glue 2012-08-07 01:29:56 +02:00
gl_common.h gl_common: fix compilation on OS X 10.8 2012-08-16 22:25:13 +02:00
gl_header_fixes.h gl_common: move header hacks into gl_header_fixes.h 2012-03-31 02:58:53 +02:00
osd_template.c osd: remove FAST_OSD code 2012-08-07 02:21:19 +02:00
osd.c osd: get rid of useless initialization function 2012-08-20 15:36:05 +02:00
osd.h osd: get rid of useless initialization function 2012-08-20 15:36:05 +02:00
osx_common.c cocoa_common: add HiDPI/retina support 2012-08-16 22:41:09 +02:00
osx_common.h cocoa_common: add HiDPI/retina support 2012-08-16 22:41:09 +02:00
video_out.c video_out: free memory if initializing a VO fails 2012-09-18 21:04:45 +02:00
video_out.h subs: libass: use a single persistent renderer for subtitles 2012-09-18 21:04:46 +02:00
vo_caca.c vo_caca: use new VO API 2012-08-07 01:09:30 +02:00
vo_corevideo.h vo_corevideo: restructure this video output 2012-04-26 21:03:10 +03:00
vo_corevideo.m osx: fix build 2012-08-08 21:23:28 +02:00
vo_direct3d.c win32: fix compilation on MinGW 2012-08-07 01:09:42 +02:00
vo_gl3_shaders.glsl libvo: add vo_gl3 2012-03-31 02:58:52 +02:00
vo_gl3.c Adjust ffmpeg/libav #includes to work with recent upstream changes 2012-08-21 18:22:00 +02:00
vo_gl.c osd: remove FAST_OSD code 2012-08-07 02:21:19 +02:00
vo_image.c vo_image: add outdir option 2012-08-06 17:52:47 +02:00
vo_null.c vo_null: reformat and use new VO API 2012-08-07 01:09:30 +02:00
vo_vdpau.c vo_vdpau: fix crash when vo_vdpau initialization fails 2012-08-16 17:16:32 +02:00
vo_x11.c vo_x11: reformat, use new VO API 2012-08-07 01:09:22 +02:00
vo_xv.c mplayer: do not create X11 state in player frontend 2012-08-03 05:55:02 +02:00
w32_common.c win32: don't crash if vo_w32_uninit() is called without vo_w32_init() 2012-04-24 01:25:10 +02:00
w32_common.h win32: move global variables into a struct & some refactoring 2012-04-14 17:03:11 +02:00
x11_common.c cleanup: remove pointless #defines 2012-09-18 21:04:46 +02:00
x11_common.h cleanup: remove pointless #defines 2012-09-18 21:04:46 +02:00