diff options
Diffstat (limited to 'libavcodec/ass.h')
-rw-r--r-- | libavcodec/ass.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/libavcodec/ass.h b/libavcodec/ass.h index 1c847f1..e04b4cc 100644 --- a/libavcodec/ass.h +++ b/libavcodec/ass.h @@ -25,6 +25,51 @@ #include "avcodec.h" /** + * Default values for ASS style. + * @defgroup ass_default + * @{ + */ +#define ASS_DEFAULT_FONT "Arial" +#define ASS_DEFAULT_FONT_SIZE 16 +#define ASS_DEFAULT_COLOR 0xffffff +#define ASS_DEFAULT_BACK_COLOR 0 +#define ASS_DEFAULT_BOLD 0 +#define ASS_DEFAULT_ITALIC 0 +#define ASS_DEFAULT_UNDERLINE 0 +#define ASS_DEFAULT_ALIGNMENT 2 +/** @} */ + +/** + * 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 + * @param font_size default font size to use + * @param color default text 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 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(AVCodecContext *avctx, + const char *font, int font_size, + int color, int back_color, + int bold, int italic, int underline, + int alignment); + +/** + * Generate a suitable AVCodecContext.subtitle_header for SUBTITLE_ASS + * with default style. + * + * @param avctx pointer to the AVCodecContext + * @return >= 0 on success otherwise an error code <0 + */ +int ff_ass_subtitle_header_default(AVCodecContext *avctx); + +/** * Initialize an AVSubtitle structure for use with ff_ass_add_rect(). * * @param sub pointer to the AVSubtitle |