X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fass.h;h=2c260e4e785dae5edd638a1dd957b9fb1fe269f2;hb=d07534b5f5f20b4f780f5b0284aca6354da00695;hp=314b43b686bfe118a043c43016344beefba0e363;hpb=bbe95ebdadff24127a7c1c9ccf1e7b71aac96cf8;p=ffmpeg diff --git a/libavcodec/ass.h b/libavcodec/ass.h index 314b43b686b..2c260e4e785 100644 --- a/libavcodec/ass.h +++ b/libavcodec/ass.h @@ -47,6 +47,34 @@ typedef struct FFASSDecoderContext { int readorder; } 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. *