summaryrefslogtreecommitdiffstats
path: root/sub
Commit message (Collapse)AuthorAgeFilesLines
* cleanup: remove some casts of memalign() return valuediego2011-02-151-2/+2
| | | | | | | Do not pointlessly cast the return value of memalign(). memalign() returns void*, which is compatible with any pointer in C. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32850 b3059339-0415-0410-9bf9-f77b7e298cf2
* Merge branch 'sub'Uoti Urpala2011-01-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * sub: sub/OSD: move some related files to sub/ subtitles: options: enable -ass by default subtitles: change default libass rendering style demux_mkv, chapters: change millisecond arithmetic to ns cleanup: rename ass_* functions to mp_ass_* subs: use correct font aspect ratio for libass + converted subs cleanup: some random minor code simplification and cleanup vf_vo: fix EOSD change detection bug sd_ass: remove subreader use, support plaintext markup subtitles: style support for common SubRip tags and MicroDVD core: ordered chapters: fix bad subtitle parameter subs/demux: don't try to enable sub track when creating it subtitles/demux: store duration instead of endpts in demux packets subtitles: add framework for subtitle decoders options: add special -leak-report option subtitles: remove code trying to handle text subs with libavcodec cleanup: move MP_NOPTS_VALUE definition to mpcommon.h subtitles: move global ass_track to struct osd_state core: move most mpcommon.c contents to mplayer.c core: move global "subdata" and "vo_sub_last" to mpctx subtitles: remove sub_last_pts hack options: move -noconfig to option struct, simplify
* sub/OSD: move some related files to sub/Uoti Urpala2011-01-2622-1/+10677
|
* 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: style support for common SubRip tags and MicroDVDUoti Urpala2011-01-182-0/+529
| | | | | | | | | | | SubRip subtitles have no "official" spec for any styling support, but various tags are in common use; previous code filtered out text between <> to remove HTML-style tags. Add support for those tags and for MicroDVD subtitle styling. The style display is implemented by converting the subtitles to the ASS subtitle format and displaying them with libass, so libass needs to be enabled. Original patch by Clément Bœsch <ubitux@gmail.com>.
* subtitles: add framework for subtitle decodersUoti Urpala2011-01-184-0/+200
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.