summaryrefslogtreecommitdiffstats
path: root/sub
Commit message (Collapse)AuthorAgeFilesLines
* sub/ass: use default style, not first style unconditionallyGrigori Goronzy2011-06-141-1/+2
| | | | | | | Turns out it's a bad idea to just always unconditionally use the first style. Make mplayer2 use and set the style according to the track's default_style property. Fixes the -ass-styles option broken with recent libass versions (ticket #40).
* cleanup: shut up more warningsClément Bœsch2011-05-064-10/+11
|
* Merge branch 'mplayer1_changes'Uoti Urpala2011-05-021-0/+4
|\
| * sub/spudec: fix artefacts at right border of subtitlesreimar2011-05-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Fix artefacts at right border of scaled bitmap subtitles by clearing the destination to 0 first if the width is not a multiple of 8. This is necessary because some of the optimized sub drawing functions always draw pixels in multiples of 8, so we cannot rely on any "dirt" in the "unused" borders being ignored. Note that due to the way rendering works, both alpha and the image need to be cleared. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33230 b3059339-0415-0410-9bf9-f77b7e298cf2
* | find_subfiles: fix unintended modification of global filenameUoti Urpala2011-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | Commit a2d28010cc ("cleanup: find_subfiles.c: simplify (mainly using bstr)") was missing a bstrdup() in subtitle search code, and thus the code erroneously modified the original filename string passed in. As a result anything which printed or otherwise used the filename after that would use a lowercase-converted version instead of the actual file name. Fix by adding the bstrdup() to operate on a local copy of the name instead.
* | cleanup: avoid various GCC warningsClément Bœsch2011-04-201-1/+1
| |
* | cleanup: find_subfiles.c: simplify (mainly using bstr)Uoti Urpala2011-04-201-156/+113
| |
* | cleanup: find_subfiles.c: simplify declarations and allocationsClément Bœsch2011-04-201-36/+25
| | | | | | | | | | Also clarify compare_sub_priority() and remove a typedef for the subfn structure in the process.
* | find_subfiles: select subtitle files matching -slangClément Bœsch2011-04-201-57/+59
| | | | | | | | Also simplify subtitle selection a bit.
* | find_subfiles: try to determine if a .sub file is text or vobsubClément Bœsch2011-04-201-0/+14
| | | | | | | | | | | | | | A file with the ambiguous extension .sub could be either VOBsub or MicroDVD. If there's a corresponding .idx file it's certainly VOBsub, so don't add it to the list of potential text subtitles. This will avoid the annoying warning "SUB: Could not determine file format".
* | subs: options: add -sub-pathsClément Bœsch2011-04-202-5/+29
| |
* | find_subfiles: allow subtitle search in multiple directoriesClément Bœsch2011-04-201-117/+103
| |
* | subs: move vobsub loading logic down to find_subfiles.cUoti Urpala2011-04-202-0/+26
| | | | | | | | | | | | | | Analogously to the previous commit, move path handling logic for loading external vobsub files from mplayer.c to find_subfiles.c. Based on a commit from Clément Bœsch but fixed and simplified.
* | subs: move text sub loading logic down to find_subfiles.cClément Bœsch2011-04-202-2/+11
| | | | | | | | | | | | Move path handling for loading external subtitle files from mplayer.c to find_subfiles.c. Now the remaining code in mplayer.c only gets a list of potential filenames and tries opening those.
* | find_subfiles: move sub_filenames() hereClément Bœsch2011-04-204-283/+297
| | | | | | | | | | | | | | | | | | | | Move sub_filenames() and related code from subreader.c to new file find_subfiles.c. This function is used to find subtitle files that should be loaded for the current video; this functionality is not specific to the particular kind of text subtitle handling implemented in subreader.c. Also reindent and prettify the moved code a bit.
* | options: change -alang and -slang to use string list typeClément Bœsch2011-04-202-5/+7
| | | | | | | | | | | | | | | | | | There is no reason to use manual language list splitting when an automatic split function is already available. Some types change from "unsigned char" to "char", but this shouldn't cause issues since [as]lang settings are unlikely to have characters above 127.
* | stream.[ch], ass_mp: new stream function for whole-file readsUoti Urpala2011-03-031-34/+12
|/ | | | | | Add new stream_read_complete() function which reads the complete contents of file. Use that in ass_mp.c which had custom code to do the same.
* 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.