From b96325e023cfe9fed5a17009b2ef23797caab906 Mon Sep 17 00:00:00 2001 From: Marton Balint Date: Wed, 23 Oct 2013 20:03:17 +0200 Subject: ass: move text_event_to_ass from textdec.c to ass.c and export it Signed-off-by: Marton Balint --- libavcodec/ass.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libavcodec/ass.h') diff --git a/libavcodec/ass.h b/libavcodec/ass.h index d267665514..2df38e6efa 100644 --- a/libavcodec/ass.h +++ b/libavcodec/ass.h @@ -113,4 +113,16 @@ int ff_ass_add_rect(AVSubtitle *sub, const char *dialog, int ff_ass_bprint_dialog(AVBPrint *buf, const char *dialog, int ts_start, int duration, int raw); +/** + * Escape a text subtitle using ASS syntax into an AVBPrint buffer. + * Newline characters will be escaped to \N. + * + * @param buf pointer to an initialized AVBPrint buffer + * @param p source text + * @param size size of the source text + * @param linebreaks additional newline chars, which will be escaped to \N + * @param keep_ass_markup braces and backslash will not be escaped if set + */ +void ff_ass_bprint_text_event(AVBPrint *buf, const char *p, int size, + const char *linebreaks, int keep_ass_markup); #endif /* AVCODEC_ASS_H */ -- cgit v1.2.3