mpv/sub
wm4 f735a03346 sub: add subtitle charset conversion
This code was once part of subreader.c, then traveled to libass, and now
made its way back to the fork of the fork of the original code, MPlayer.

It works pretty much the same as subreader.c, except that we have to
concatenate some packets to do auto-detection. This is rather annoying,
but for all we know the actual source file could be a binary format.

Unlike subreader.c, the iconv context is reopened on each packet. This
is simpler, and with respect to multibyte encodings, more robust.
Reopening is probably not a very fast, but I suspect subtitle charset
conversion is not an operation that happens often or has to be fast.

Also, this auto-detection is disabled for microdvd - this is the only
format we know that has binary data in its packets, but is actually
decoded to text. FFmpeg doesn't really allow us to solve this properly,
because a) the input packets can be binary, and b) the output will be
checked whether it's UTF-8, and if it's not, the output is thrown away
and an error message is printed. We could just recode the decoded
subtitles before sd_ass if it weren't for that.
2013-06-25 00:11:56 +02:00
..
ass_mp.c sub: add demux_libass wrapper, drop old hacks 2013-06-25 00:11:56 +02:00
ass_mp.h sub: add demux_libass wrapper, drop old hacks 2013-06-25 00:11:56 +02:00
dec_sub.c sub: add subtitle charset conversion 2013-06-25 00:11:56 +02:00
dec_sub.h sub: preload external text subtitles 2013-06-23 22:33:59 +02:00
draw_bmp.c sub: don't crash on GBRP video 2013-03-28 21:46:17 +01:00
draw_bmp.h vo_xv, vo_x11: simplify OSD redrawing 2013-01-13 20:04:12 +01:00
find_subfiles.c sub: remove some global variables 2013-05-30 22:44:18 +02:00
find_subfiles.h sub: remove vobsub reader in favor of ffmpeg vobsub demuxer 2012-12-11 00:37:54 +01:00
img_convert.c img_convert: use multiple bounding boxes for ASS->RGBA 2013-01-13 20:04:16 +01:00
img_convert.h img_convert: add sub_bitmap bounding box functions 2013-01-13 20:04:16 +01:00
osd_dummy.c
osd_font.otf osd: convert OSD font to OpenType 2013-04-27 18:03:19 +02:00
osd_libass.c ass_mp: provide function to add default styles 2013-06-03 22:40:07 +02:00
sd.h sub: add name field to all sub decoders 2013-06-03 22:40:32 +02:00
sd_ass.c sd_ass: fix nonsense 2013-06-25 00:11:54 +02:00
sd_lavc.c sub: add name field to all sub decoders 2013-06-03 22:40:32 +02:00
sd_lavc_conv.c sd_ass: handle libavformat ASS comment packets as well 2013-06-23 22:34:00 +02:00
sd_microdvd.c sd_srt, sd_microdvd: set ASS script resolution 2013-06-03 23:00:39 +02: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: add name field to all sub decoders 2013-06-03 22:40:32 +02:00
sd_srt.c sd_srt, sd_microdvd: set ASS script resolution 2013-06-03 23:00:39 +02:00
spudec.c spudec: restore --sub-forced-only support 2013-05-30 22:40:32 +02:00
spudec.h sub: add sd_spu.c to wrap spudec, cleanup mplayer.c 2013-05-30 22:40:32 +02:00
sub.c Move/rename subreader.c 2013-06-25 00:11:54 +02:00
sub.h sub: refactor 2013-06-01 19:44:16 +02:00