diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2010-12-28 23:52:53 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2010-12-28 23:52:53 +0000 |
commit | 2c77c90684e24ef16f7e7c4462e011434cee6a98 (patch) | |
tree | 95a6f69d324c64a8d115e424e76b2fbaf8e669b3 /libavcodec/ass.h | |
parent | 312056c54edd6b37a2781f32331d71b7e967342d (diff) | |
download | ffmpeg-2c77c90684e24ef16f7e7c4462e011434cee6a98.tar.gz |
add SubRip decoder
Originally committed as revision 26119 to svn://svn.ffmpeg.org/ffmpeg/trunk
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 1c847f169b..e04b4cc747 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 |