summaryrefslogtreecommitdiffstats
path: root/libavcodec/ass.h
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2013-10-23 11:20:04 +0200
committerMarton Balint <cus@passwd.hu>2013-11-10 18:57:51 +0100
commitf148954b0ac11123e47eedf24abb99366dc9a3ad (patch)
tree740af248ceb3197370d3438ebd98b39f3d0090da /libavcodec/ass.h
parent65fb59abd27af8e71f3a76e30f4536a878918fb1 (diff)
downloadffmpeg-streaming-f148954b0ac11123e47eedf24abb99366dc9a3ad.zip
ffmpeg-streaming-f148954b0ac11123e47eedf24abb99366dc9a3ad.tar.gz
ass: factor out ff_ass_bprint_dialog
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavcodec/ass.h')
-rw-r--r--libavcodec/ass.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/libavcodec/ass.h b/libavcodec/ass.h
index ef99b58..d267665 100644
--- a/libavcodec/ass.h
+++ b/libavcodec/ass.h
@@ -23,6 +23,7 @@
#define AVCODEC_ASS_H
#include "avcodec.h"
+#include "libavutil/bprint.h"
/**
* @name Default values for ASS style
@@ -90,4 +91,26 @@ int ff_ass_subtitle_header_default(AVCodecContext *avctx);
int ff_ass_add_rect(AVSubtitle *sub, const char *dialog,
int ts_start, int duration, int raw);
+/**
+ * Add an ASS dialog line to an AVBPrint buffer.
+ *
+ * @param buf pointer to an initialized AVBPrint buffer
+ * @param dialog ASS dialog to add to sub
+ * @param ts_start start timestamp for this dialog (in 1/100 second unit)
+ * @param duration duration for this dialog (in 1/100 second unit), can be -1
+ * to last until the end of the presentation
+ * @param raw when set to 2, it indicates that dialog contains an ASS
+ * dialog line as muxed in Matroska
+ * when set to 1, it indicates that dialog contains a whole SSA
+ * dialog line which should be copied as is.
+ * when set to 0, it indicates that dialog contains only the Text
+ * part of the ASS dialog line, the rest of the line
+ * will be generated.
+ * @return number of characters read from dialog. It can be less than the whole
+ * length of dialog, if dialog contains several lines of text.
+ * A negative value indicates an error.
+ */
+int ff_ass_bprint_dialog(AVBPrint *buf, const char *dialog,
+ int ts_start, int duration, int raw);
+
#endif /* AVCODEC_ASS_H */
OpenPOWER on IntegriCloud