summaryrefslogtreecommitdiffstats
path: root/sub/sd_ass.c
Commit message (Collapse)AuthorAgeFilesLines
* sd_ass.c: set event->Style to fix --ass-stylesUoti Urpala2011-09-231-0/+1
| | | | | | | | | | | | | Set the "Style" attribute for subtitle events created in sd_ass to match the "default_style" attribute of the track. This is required to make --ass-styles work with recent libass versions (otherwise the event would use style 0, which is a fallback style added by libass now). Commit 378ada847c8eb3a641392691b1a2317f8fc214e0 ("sub/ass: use default style, not first style unconditionally") fixed the same issue for external subtitles converted with mp_ass_read_subdata(); this commit fixes it for muxed ones.
* options: move libass-related options to structUoti Urpala2011-09-031-1/+1
|
* aviheader.h: avoid including demuxer.hUoti Urpala2011-08-191-0/+1
| | | | | | | Remove unnecessary demuxer.h include from aviheader.h. Through stheader.h aviheader.h is included in a lot of files. Add missing mp_msg.h includes to av_sub.c and sd_ass.c (previously hidden by indirect inclusion through demuxer.h and stream.h).
* cleanup: subs: remove global ass_library variableUoti Urpala2011-07-231-2/+2
|
* sub/OSD: move some related files to sub/Uoti Urpala2011-01-261-1/+1
|
* cleanup: rename ass_* functions to mp_ass_*Uoti Urpala2011-01-261-1/+1
| | | | | | | | The various ass_* functions were created when libass was part of the MPlayer tree and the distinction between MPlayer-specific and other functions was less clear. Now that libass is a clearly separate library, using the same ass_* namespace for player functions is ugly. Rename the functions to use mp_ass_ prefix instead.
* subs: use correct font aspect ratio for libass + converted subsUoti Urpala2011-01-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | Rendering of ASS subtitles tries to be bug compatible with VSFilter and stretches fonts when the video is anamorphic (some scripts try to compensate for this VSFilter behavior, so trying to render them "correctly" would give the wrong result). However this behavior is not appropriate for subtitles we converted to ASS format ourselves for libass rendering, as they certainly don't have VSFilter bug workarounds. Change the code to use different behavior for "native" ASS tracks and converted ones. It's questionable whether the VSFilter-compatible behavior is appropriate for external .ass files either, as there could be anamorphic and non-anamorphic versions of the same video and the bug-compatible behavior can only be correct for one alternative at most. However it's probably better to keep it as a default at least, so that extracting a muxed subtitle track and using that does not give behavior different from the original muxed one. The aspect ratio setting is per ASS_Renderer, and changing it resets libass caches. For that reason this commit adds separate renderer instances to use for the "correct" and "VSFilter bug compatible" cases.
* sd_ass: remove subreader use, support plaintext markupUoti Urpala2011-01-181-12/+66
| | | | | | | | | | | Originally, when rendering plaintext subs with libass, the subtitles were first converted to the "struct subtitle" form with sub_add_text() and then from that to libass events. Change sd_ass to convert the subtitles directly to libass events without using the old sub machinery. The new conversion at least fixes some timing issues. Also use the markup support added in the previous commit, so that HTML-style markup is also supported in "plaintext" subs rendered with libass.
* subtitles: add framework for subtitle decodersUoti Urpala2011-01-181-0/+98
Add a framework for subtitle decoder modules that work more like audio/video decoders do, and change libass rendering of demuxed subtitles to use the new framework. The old subtitle code is messy, with details specific to handling particular subtitle types spread over high-level code. This should make it easier to clean things up and fix some bugs/limitations.