FFmpeg
|
Go to the source code of this file.
Macros | |
#define | ASS_DEFAULT_PLAYRESX 384 |
#define | ASS_DEFAULT_PLAYRESY 288 |
Default values for ASS style | |
#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 |
#define | ASS_DEFAULT_BORDERSTYLE 1 |
Functions | |
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 border_style, int alignment) |
Generate a suitable AVCodecContext.subtitle_header for SUBTITLE_ASS. More... | |
int | ff_ass_subtitle_header_default (AVCodecContext *avctx) |
Generate a suitable AVCodecContext.subtitle_header for SUBTITLE_ASS with default style. More... | |
int | ff_ass_add_rect (AVSubtitle *sub, const char *dialog, int ts_start, int duration, int raw) |
Add an ASS dialog line to an AVSubtitle as a new AVSubtitleRect. More... | |
int | ff_ass_add_rect_bprint (AVSubtitle *sub, AVBPrint *buf, int ts_start, int duration) |
Same as ff_ass_add_rect, but taking an AVBPrint buffer instead of a string, and assuming raw=0. More... | |
int | ff_ass_bprint_dialog (AVBPrint *buf, const char *dialog, int ts_start, int duration, int raw) |
Add an ASS dialog line to an AVBPrint buffer. More... | |
void | ff_ass_bprint_text_event (AVBPrint *buf, const char *p, int size, const char *linebreaks, int keep_ass_markup) |
Escape a text subtitle using ASS syntax into an AVBPrint buffer. More... | |
#define ASS_DEFAULT_PLAYRESX 384 |
Definition at line 28 of file ass.h.
Referenced by ff_ass_subtitle_header(), and srt_to_ass().
#define ASS_DEFAULT_PLAYRESY 288 |
Definition at line 29 of file ass.h.
Referenced by ff_ass_subtitle_header(), and srt_to_ass().
#define ASS_DEFAULT_FONT "Arial" |
Definition at line 35 of file ass.h.
Referenced by ff_ass_subtitle_header_default(), microdvd_init(), and srt_style_apply().
#define ASS_DEFAULT_FONT_SIZE 16 |
Definition at line 36 of file ass.h.
Referenced by ff_ass_subtitle_header_default(), init_decoder(), microdvd_init(), and srt_style_apply().
#define ASS_DEFAULT_COLOR 0xffffff |
Definition at line 37 of file ass.h.
Referenced by ff_ass_subtitle_header_default(), init_decoder(), microdvd_init(), and srt_style_apply().
#define ASS_DEFAULT_BACK_COLOR 0 |
Definition at line 38 of file ass.h.
Referenced by ff_ass_subtitle_header_default(), init_decoder(), and microdvd_init().
#define ASS_DEFAULT_BOLD 0 |
Definition at line 39 of file ass.h.
Referenced by ff_ass_subtitle_header_default(), init_decoder(), microdvd_init(), srt_style_apply(), and webvtt_style_apply().
#define ASS_DEFAULT_ITALIC 0 |
Definition at line 40 of file ass.h.
Referenced by ff_ass_subtitle_header_default(), init_decoder(), microdvd_init(), srt_style_apply(), and webvtt_style_apply().
#define ASS_DEFAULT_UNDERLINE 0 |
Definition at line 41 of file ass.h.
Referenced by ff_ass_subtitle_header_default(), init_decoder(), microdvd_init(), srt_style_apply(), and webvtt_style_apply().
#define ASS_DEFAULT_ALIGNMENT 2 |
Definition at line 42 of file ass.h.
Referenced by ff_ass_subtitle_header_default(), init_decoder(), microdvd_init(), and srt_style_apply().
#define ASS_DEFAULT_BORDERSTYLE 1 |
Definition at line 43 of file ass.h.
Referenced by ff_ass_subtitle_header_default(), microdvd_init(), and mov_text_init().
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 | border_style, | ||
int | alignment | ||
) |
Generate a suitable AVCodecContext.subtitle_header for SUBTITLE_ASS.
avctx | pointer to the AVCodecContext |
font | name of the default font face to use |
font_size | default font size to use |
color | default text color to use (ABGR) |
back_color | default background color to use (ABGR) |
bold | 1 for bold text, 0 for normal text |
italic | 1 for italic text, 0 for normal text |
underline | 1 for underline text, 0 for normal text |
alignment | position of the text (left, center, top...), defined after the layout of the numpad (1-3 sub, 4-6 mid, 7-9 top) |
Definition at line 29 of file ass.c.
Referenced by ff_ass_subtitle_header_default(), init_decoder(), microdvd_init(), and mov_text_init().
int ff_ass_subtitle_header_default | ( | AVCodecContext * | avctx | ) |
Generate a suitable AVCodecContext.subtitle_header for SUBTITLE_ASS with default style.
avctx | pointer to the AVCodecContext |
Definition at line 80 of file ass.c.
Referenced by mov_text_init(), sami_init(), and teletext_init_decoder().
int ff_ass_add_rect | ( | AVSubtitle * | sub, |
const char * | dialog, | ||
int | ts_start, | ||
int | duration, | ||
int | raw | ||
) |
Add an ASS dialog line to an AVSubtitle as a new AVSubtitleRect.
sub | pointer to the AVSubtitle |
dialog | ASS dialog to add to sub |
ts_start | start timestamp for this dialog (in 1/100 second unit) |
duration | duration for this dialog (in 1/100 second unit), can be -1 to last until the end of the presentation |
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. |
Definition at line 145 of file ass.c.
Referenced by ff_ass_add_rect_bprint().
int ff_ass_add_rect_bprint | ( | AVSubtitle * | sub, |
AVBPrint * | buf, | ||
int | ts_start, | ||
int | duration | ||
) |
Same as ff_ass_add_rect, but taking an AVBPrint buffer instead of a string, and assuming raw=0.
Definition at line 181 of file ass.c.
Referenced by decode(), jacosub_decode_frame(), realtext_decode_frame(), and subviewer_decode_frame().
int ff_ass_bprint_dialog | ( | AVBPrint * | buf, |
const char * | dialog, | ||
int | ts_start, | ||
int | duration, | ||
int | raw | ||
) |
Add an ASS dialog line to an AVBPrint buffer.
buf | pointer to an initialized AVBPrint buffer |
dialog | ASS dialog to add to sub |
ts_start | start timestamp for this dialog (in 1/100 second unit) |
duration | duration for this dialog (in 1/100 second unit), can be -1 to last until the end of the presentation |
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. |
Definition at line 107 of file ass.c.
Referenced by ff_ass_add_rect().
void ff_ass_bprint_text_event | ( | AVBPrint * | buf, |
const char * | p, | ||
int | size, | ||
const char * | linebreaks, | ||
int | keep_ass_markup | ||
) |
Escape a text subtitle using ASS syntax into an AVBPrint buffer.
Newline characters will be escaped to .
buf | pointer to an initialized AVBPrint buffer |
p | source text |
size | size of the source text |
linebreaks | additional newline chars, which will be escaped to |
keep_ass_markup | braces and backslash will not be escaped if set |