summaryrefslogtreecommitdiff
path: root/libavcodec/ass.h
diff options
context:
space:
mode:
authorJohn Stebbins <jstebbins@jetheaddev.com>2020-04-04 12:33:54 -0600
committerPhilip Langdale <philipl@overt.org>2020-04-10 09:32:13 -0700
commitb8d4a66b29b1dc3f6f48ce85577bfb6b57bd338f (patch)
treeb875726be1abc2045afdf39eacc0be1c51d47448 /libavcodec/ass.h
parentf406dc9ceb92e1a37b7cbfd27c1f38290fe857ec (diff)
downloadffmpeg-b8d4a66b29b1dc3f6f48ce85577bfb6b57bd338f.tar.gz
lavc/movtextdec: allow setting subtitle frame dimensions
Font sizes are relative to the subtitle frame dimensions. If the expected frame dimensions are not known, the font sizes will most likely be incorrect. Signed-off-by: Philip Langdale <philipl@overt.org>
Diffstat (limited to 'libavcodec/ass.h')
-rw-r--r--libavcodec/ass.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/libavcodec/ass.h b/libavcodec/ass.h
index 314b43b686..2c260e4e78 100644
--- a/libavcodec/ass.h
+++ b/libavcodec/ass.h
@@ -49,6 +49,34 @@ typedef struct FFASSDecoderContext {
/**
* Generate a suitable AVCodecContext.subtitle_header for SUBTITLE_ASS.
+ * Can specify all fields explicitly
+ *
+ * @param avctx pointer to the AVCodecContext
+ * @param play_res_x subtitle frame width
+ * @param play_res_y subtitle frame height
+ * @param font name of the default font face to use
+ * @param font_size default font size to use
+ * @param primary_color default text color to use (ABGR)
+ * @param secondary_color default secondary text color to use (ABGR)
+ * @param outline_color default outline color to use (ABGR)
+ * @param back_color default background color to use (ABGR)
+ * @param bold 1 for bold text, 0 for normal text
+ * @param italic 1 for italic text, 0 for normal text
+ * @param underline 1 for underline text, 0 for normal text
+ * @param border_style 1 for outline, 3 for opaque box
+ * @param alignment position of the text (left, center, top...), defined after
+ * the layout of the numpad (1-3 sub, 4-6 mid, 7-9 top)
+ * @return >= 0 on success otherwise an error code <0
+ */
+int ff_ass_subtitle_header_full(AVCodecContext *avctx,
+ int play_res_x, int play_res_y,
+ const char *font, int font_size,
+ int primary_color, int secondary_color,
+ int outline_color, int back_color,
+ int bold, int italic, int underline,
+ int border_style, int alignment);
+/**
+ * Generate a suitable AVCodecContext.subtitle_header for SUBTITLE_ASS.
*
* @param avctx pointer to the AVCodecContext
* @param font name of the default font face to use