vo_vdpau and vo_gl cache the last subtitle bitmaps uploaded to video
card in case they stay the same over multiple frames. Detecting
whether the bitmaps have changed and should be re-uploaded was
somewhat fragile. Change the VO API to provide a bitmap ID which can
be compared with what the VO has to determine whether a new upload of
the bitmaps is needed.
Conflicts:
libvo/vo_gl.c
Note: the changes for vo_gl.c were not merged. Instead, eosd_packer is
modified to use the new way of detecting EOSD changes. This takes care
of vo_gl, vo_gl3 and vo_direct3d, which all render EOSD. They don't
need to be updated in turn.
Remove subtitle selection code setting osd->ass_track directly and
vf_ass/vf_vo code rendering the track directly with libass. Instead,
do track selection and rendering with dec_sub.c functions.
Before, mpctx->set_of_ass_tracks[] contained bare libass tracks
generated from external subtitle files. For use with dec_sub.c, it now
contains struct sh_sub instances with decoder already initialized.
This commit breaks the sub_step command ('g' and 'y' keys) for
libass-rendered subtitles. It could be fixed, but it's so useless -
especially as with the existing implementation there's no practical
way to get subtitle delay back to normal after using it - that I
didn't bother.
Conflicts:
command.c
mp_core.h
mplayer.c
The code in eosd_packer.c/.h is taken from vo_vdpau.c and has been made
independent from vdpau API specifics. This allows other VOs, which need
to pack the small EOSD images into a large surface for efficiency, to use
this code.