22#ifndef AVCODEC_ASS_SPLIT_H
23#define AVCODEC_ASS_SPLIT_H
146 void (*
color)(
void *priv,
unsigned int ,
unsigned int color_id);
158 void (*
move)(
void *priv,
int x1,
int y1,
int x2,
int y2,
int t1,
int t2);
159 void (*
origin)(
void *priv,
int x,
int y);
static AVFormatContext * ctx
static av_cold void close(AVCodecParserContext *s)
void ff_ass_free_dialog(ASSDialog **dialogp)
Free a dialogue obtained from ff_ass_split_dialog().
ASSSplitContext * ff_ass_split(const char *buf)
Split a full ASS file or a ASS header from a string buffer and store the split structure in a newly a...
int ff_ass_split_override_codes(const ASSCodesCallbacks *callbacks, void *priv, const char *buf)
Split override codes out of a ASS "Dialogue" Text field.
ASSStyle * ff_ass_style_get(ASSSplitContext *ctx, const char *style)
Find an ASSStyle structure by its name.
ASSDialog * ff_ass_split_dialog(ASSSplitContext *ctx, const char *buf)
Split one ASS Dialogue line from a string buffer.
void ff_ass_split_free(ASSSplitContext *ctx)
Free all the memory allocated for an ASSSplitContext.
void(* move)(void *priv, int x1, int y1, int x2, int y2, int t1, int t2)
void(* origin)(void *priv, int x, int y)
void(* style)(void *priv, char style, int close)
void(* color)(void *priv, unsigned int, unsigned int color_id)
void(* font_size)(void *priv, int size)
void(* cancel_overrides)(void *priv, const char *style)
void(* alignment)(void *priv, int alignment)
void(* new_line)(void *priv, int forced)
void(* alpha)(void *priv, int alpha, int alpha_id)
void(* text)(void *priv, const char *text, int len)
void(* font_name)(void *priv, const char *name)
Set of callback functions corresponding to each override codes that can be encountered in a "Dialogue...
fields extracted from the [Events] section
int layer
higher numbered layers are drawn over lower numbered
char * style
name of the ASSStyle to use with this dialog
char * text
actual text which will be displayed as a subtitle, can include style override control codes (see ff_a...
int end
end time of the dialog in centiseconds
int start
start time of the dialog in centiseconds
fields extracted from the [Script Info] section
char * collisions
how subtitles are moved to prevent collisions
char * script_type
SSA script format version (eg.
int play_res_y
video height that ASS coords are referring to
float timer
time multiplier to apply to SSA clock (in %)
int play_res_x
video width that ASS coords are referring to
This struct can be casted to ASS to access to the split data.
fields extracted from the [V4(+) Styles] section
int primary_color
color that a subtitle will normally appear in
int italic
whether text is italic (1) or not (0)
int bold
whether text is bold (1) or not (0)
int underline
whether text is underlined (1) or not (0)
char * font_name
font face (case sensitive)
char * name
name of the tyle (case sensitive)
int outline_color
color for outline in ASS, called tertiary in SSA
int alignment
position of the text (left, center, top...), defined after the layout of the numpad (1-3 sub,...
int back_color
color of the subtitle outline or shadow
structure containing the whole split ASS data
int dialogs_count
number of ASSDialog in the dialogs array
int styles_count
number of ASSStyle in the styles array
ASSStyle * styles
array of split out styles
ASSScriptInfo script_info
general information about the SSA script
ASSDialog * dialogs
array of split out dialogs