mpv/sub
wm4 92a9f11a0b sub: uglify sub decoder with locking
The plan is to make the whole OSD thread-safe, and we start with this.

We just put locks on all entry points (fortunately, dec_sub.c and all
sd_*.c decoders are very closed off, and only the entry points in
dec_sub.h let you access it). I think this is pretty ugly, but at least
it's very simple.

There's a special case with sub_get_bitmaps(): this function returns
pointers to decoder data (specifically, libass images). There's no way
to synchronize this internally, so expose sub_lock/sub_unlock functions.

To make things simpler, and especially because the lock is sort-of
exposed to the outside world, make the locks recursive. Although the
only case where this is actually needed (although trivial) is
sub_set_extradata().

One corner case are ASS subtitles: for some reason, we keep a single
ASS_Renderer instance for subtitles around (probably to avoid rescanning
fonts with ordered chapters), and this ASS_Renderer instance is not
synchronized. Also, demux_libass.c loads ASS_Track objects, which are
directly passed to sd_ass.c. These things are not synchronized (and
would be hard to synchronize), and basically we're out of luck. But I
think for now, accesses happen reasonably serialized, so there is no
actual problem yet, even if we start to access OSD from other threads.
2014-01-17 23:21:17 +01:00
..
ass_mp.c msg: rename mp_msg_log -> mp_msg 2013-12-21 22:13:04 +01:00
ass_mp.h sub/osd: mp_msg conversions 2013-12-21 20:50:13 +01:00
dec_sub.c sub: uglify sub decoder with locking 2014-01-17 23:21:17 +01:00
dec_sub.h sub: uglify sub decoder with locking 2014-01-17 23:21:17 +01:00
draw_bmp.c Split mpvcore/ into common/, misc/, bstr/ 2013-12-17 02:39:45 +01:00
draw_bmp.h Rename sub.c/.h to osd.c/.h 2013-11-24 14:44:58 +01:00
find_subfiles.c vo: dropping subtitle files on the VO window adds them as subtitle files 2014-01-04 01:27:29 +01:00
find_subfiles.h vo: dropping subtitle files on the VO window adds them as subtitle files 2014-01-04 01:27:29 +01:00
img_convert.c Reduce recursive config.h inclusions in headers 2013-12-18 17:12:21 +01:00
img_convert.h Revert "sub: support straight alpha additionally to premultiplied alpha" 2013-08-12 02:49:22 +02:00
osd.c sub: uglify sub decoder with locking 2014-01-17 23:21:17 +01:00
osd.h player: add --secondary-sid for displaying a second subtitle stream 2013-12-24 17:46:14 +01:00
osd_dummy.c Rename sub.c/.h to osd.c/.h 2013-11-24 14:44:58 +01:00
osd_font.otf osc: rename osd_font, add some glyphs 2013-09-08 03:35:04 +02:00
osd_libass.c osd_libass: use bstr_xappend() 2013-12-30 22:49:50 +01:00
sd.h sub/osd: mp_msg conversions 2013-12-21 20:50:13 +01:00
sd_ass.c sub/osd: mp_msg conversions 2013-12-21 20:50:13 +01:00
sd_lavc.c sd_lavc: use mp_lavc_set_extradata() 2014-01-11 01:28:18 +01:00
sd_lavc_conv.c sub/osd: mp_msg conversions 2013-12-21 20:50:13 +01:00
sd_lavf_srt.c Split mpvcore/ into common/, misc/, bstr/ 2013-12-17 02:39:45 +01:00
sd_microdvd.c Split mpvcore/ into common/, misc/, bstr/ 2013-12-17 02:39:45 +01:00
sd_movtext.c sd_ass: disable special handling of subtitles with duration 0 2013-06-25 00:11:54 +02:00
sd_spu.c sub/osd: mp_msg conversions 2013-12-21 20:50:13 +01:00
sd_srt.c sub/osd: mp_msg conversions 2013-12-21 20:50:13 +01:00
spudec.c sub/osd: mp_msg conversions 2013-12-21 20:50:13 +01:00
spudec.h sub/osd: mp_msg conversions 2013-12-21 20:50:13 +01:00