summaryrefslogtreecommitdiffstats
path: root/libass/ass_parse.h
Commit message (Collapse)AuthorAgeFilesLines
* Parse and animate all colors and alpha values like VSFilterOleg Oshmyan2015-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Allow exactly one of these prefixes in header values: 0x, 0X, &h, &H. Note that "0x0xFFFFFF" is a correct value, as the first 0x is consumed by the parser and the second by the string-to-number conversion following strtol semantics. * Allow arbitrary numbers of leading & and H (and not h) in any order in override tag values. * Reduce header values modulo 2**32 instead of saturating them to LLONG_MIN/MAX. * Saturate override tag values to INT32_MIN/MAX rather than to LLONG_MIN/MAX. * Don't fiddle with bytes in alpha override tag values. (They can be outside of the 0..255 range.) Also change the byte swapping code to be more sensible. Fixes #80. Fixes #145. Fixes #178. Also fixes our behavior in the case described in https://code.google.com/p/xy-vsfilter/issues/detail?id=80.
* Refine list of tags that prevent selective style overrideswm42015-03-061-1/+1
| | | | | | | Somewhat stolen from: https://github.com/Cyberbeing/xy-VSFilter/blob/xy_sub_filter_rc3/src/subtitles/RTS.cpp#L2004 (xy-VSFilter started work on this in commit 014da6d9766417d7886eb867c9f2c14038f2a226)
* Require closing '}' for override tagsOleg Oshmyan2014-06-061-1/+1
| | | | | | | | Like VSFilter. '{' without a following '}' is just text, though in vector drawing mode it still delimits individual drawings. This also lets us nicely avoid '\0' hacks in the \t override tag handler in parse_tag.
* Add a mechanism for selective style overrideswm42014-06-051-0/+1
| | | | | | | | | | | | | | | This adds 2 new API functions: ass_set_selective_style_override() ass_set_selective_style_override_enabled() They can be used to force dialog text to use a specific ASS_Style. It uses a fuzzy heuristic for that, and the quality of results may vary. It does style overriding selectively and tries not to override things that need explicit styling. The heuristic for that isn't set in stone either, and can change with future libass versions. Closes libass#88.
* Terminate drawings immediately on a \p0 tagwm42012-09-291-0/+1
| | | | | | | | | | | | | | | | The parsing code allowed override tags after \p0 to affect the drawing. This is incorrect. Finish the drawing object as soon as \p0 is encountered instead. This requires moving the code executing the style overrides from get_next_char() in ass_parse.c to the main render loop in ass_renderer.c, because we have to re-enter the rendering loop inside of a tag. The old code was simply executing all tags until a new character could be returned to the renderer loop, mutating up the state (RenderContext fields) for the drawing after the drawing was closed, but before it was rendered. This fixes libass issue #47.
* Refactor and fix border generationGrigori Goronzy2012-04-211-0/+1
| | | | | Make sure to update the border appropriately in the second pass, after parsing.
* Separate event parsing and layoutGrigori Goronzy2011-07-041-0/+1
| | | | | | Split up the combined event parsing and layout loop into two passes. State information needed for layout are duplicated in GlyphInfo structures.
* refactor: move karaoke effect parsing into event parserGrigori Goronzy2011-06-061-0/+1
|
* Refactor: effect parsing should be in ass_parse.cGrigori Goronzy2009-09-161-0/+1
| | | | | Move the function apply_transition_effects, which parses event-global effects and adjusts a few state variables, into ass_parse.c.
* Fix inline function prototypesGrigori Goronzy2009-09-021-2/+2
|
* Refactor: move event parsing code into separate fileGrigori Goronzy2009-09-011-0/+37
Move all code related to parsing event lines and processing override tags into a separate file (ass_parse.c).