|
FFmpeg
|
Go to the source code of this file.
Data Structures | |
| struct | FFASSDecoderContext |
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_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. More... | |
| 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... | |
| char * | ff_ass_get_dialog (int readorder, int layer, const char *style, const char *speaker, const char *text) |
| Craft an ASS dialog string. More... | |
| int | ff_ass_add_rect (AVSubtitle *sub, const char *dialog, int readorder, int layer, const char *style, const char *speaker) |
| Add an ASS dialog to a subtitle. More... | |
| int | ff_ass_add_rect2 (AVSubtitle *sub, const char *dialog, int readorder, int layer, const char *style, const char *speaker, unsigned *nb_rect_allocated) |
| Add an ASS dialog to a subtitle. More... | |
| void | ff_ass_decoder_flush (AVCodecContext *avctx) |
| Helper to flush a text subtitles decoder making use of the FFASSDecoderContext. 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... | |
| 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.
Can specify all fields explicitly
| avctx | pointer to the AVCodecContext |
| play_res_x | subtitle frame width |
| play_res_y | subtitle frame height |
| font | name of the default font face to use |
| font_size | default font size to use |
| primary_color | default text color to use (ABGR) |
| secondary_color | default secondary text color to use (ABGR) |
| outline_color | default outline 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 |
| border_style | 1 for outline, 3 for opaque box |
| 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(), 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 84 of file ass.c.
Referenced by ff_ass_subtitle_header_default(), init_decoder(), and microdvd_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 98 of file ass.c.
Referenced by mov_text_init(), my_ass_subtitle_header(), sami_init(), and teletext_init_decoder().
| char* ff_ass_get_dialog | ( | int | readorder, |
| int | layer, | ||
| const char * | style, | ||
| const char * | speaker, | ||
| const char * | text | ||
| ) |
Craft an ASS dialog string.
Definition at line 111 of file ass.c.
Referenced by create_ass_text(), ff_ass_add_rect2(), and gen_sub_ass().
| int ff_ass_add_rect | ( | AVSubtitle * | sub, |
| const char * | dialog, | ||
| int | readorder, | ||
| int | layer, | ||
| const char * | style, | ||
| const char * | speaker | ||
| ) |
Add an ASS dialog to a subtitle.
Definition at line 159 of file ass.c.
Referenced by jacosub_decode_frame(), libaribb24_handle_regions(), microdvd_decode_frame(), mov_text_decode_frame(), mpl2_decode_frame(), realtext_decode_frame(), sami_decode_frame(), srt_decode_frame(), subviewer_decode_frame(), text_decode_frame(), and webvtt_decode_frame().
| int ff_ass_add_rect2 | ( | AVSubtitle * | sub, |
| const char * | dialog, | ||
| int | readorder, | ||
| int | layer, | ||
| const char * | style, | ||
| const char * | speaker, | ||
| unsigned * | nb_rect_allocated | ||
| ) |
Add an ASS dialog to a subtitle.
Definition at line 119 of file ass.c.
Referenced by decode(), and ff_ass_add_rect().
| void ff_ass_decoder_flush | ( | AVCodecContext * | avctx | ) |
Helper to flush a text subtitles decoder making use of the FFASSDecoderContext.
| 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 \N.
| 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 \N |
| keep_ass_markup | braces and backslash will not be escaped if set |
Definition at line 173 of file ass.c.
Referenced by create_ass_text(), and text_decode_frame().
1.8.17