Go to the documentation of this file.
22 #ifndef AVCODEC_ASS_SPLIT_H
23 #define AVCODEC_ASS_SPLIT_H
126 int cache,
int *number);
159 void (*text)(
void *priv,
const char *
text,
int len);
160 void (*new_line)(
void *priv,
int forced);
161 void (*style)(
void *priv,
char style,
int close);
162 void (*
color)(
void *priv,
unsigned int ,
unsigned int color_id);
164 void (*font_name)(
void *priv,
const char *
name);
165 void (*font_size)(
void *priv,
int size);
167 void (*cancel_overrides)(
void *priv,
const char *style);
174 void (*move)(
void *priv,
int x1,
int y1,
int x2,
int y2,
int t1,
int t2);
175 void (*origin)(
void *priv,
int x,
int y);
float timer
time multiplier to apply to SSA clock (in %)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Set of callback functions corresponding to each override codes that can be encountered in a "Dialogue...
int end
end time of the dialog in centiseconds
int alignment
position of the text (left, center, top...), defined after the layout of the numpad (1-3 sub,...
static av_cold int end(AVCodecContext *avctx)
static const OMX_CALLBACKTYPE callbacks
ASSStyle * styles
array of split out styles
void(* style)(void *priv, char style, int close)
ASSStyle * ff_ass_style_get(ASSSplitContext *ctx, const char *style)
Find an ASSStyle structure by its name.
char * style
name of the ASSStyle to use with this dialog
char * font_name
font face (case sensitive)
void ff_ass_split_free(ASSSplitContext *ctx)
Free all the memory allocated for an ASSSplitContext.
ASSDialog * dialogs
array of split out dialogs
int start
start time of the dialog in centiseconds
ASSDialog * ff_ass_split_dialog(ASSSplitContext *ctx, const char *buf, int cache, int *number)
Split one or several ASS "Dialogue" lines from a string buffer and store them in an already initializ...
int play_res_y
video height that ASS coords are referring to
int ff_ass_split_override_codes(const ASSCodesCallbacks *callbacks, void *priv, const char *buf)
Split override codes out of a ASS "Dialogue" Text field.
structure containing the whole split ASS data
int play_res_x
video width that ASS coords are referring to
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 primary_color
color that a subtitle will normally appear in
void(* alpha)(void *priv, int alpha, int alpha_id)
fields extracted from the [Script Info] section
char * script_type
SSA script format version (eg.
This struct can be casted to ASS to access to the split data.
fields extracted from the [V4(+) Styles] section
ASSDialog * ff_ass_split_dialog2(ASSSplitContext *ctx, const char *buf)
Split one ASS Dialogue line from a string buffer.
int underline
whether text is underlined (1) or not (0)
char * text
actual text which will be displayed as a subtitle, can include style override control codes (see ff_a...
char * name
name of the tyle (case sensitive)
int italic
whether text is italic (1) or not (0)
char * collisions
how subtitles are moved to prevent collisions
void ff_ass_free_dialog(ASSDialog **dialogp)
Free a dialogue obtained from ff_ass_split_dialog2().
int back_color
color of the subtitle outline or shadow
int styles_count
number of ASSStyle in the styles array
int dialogs_count
number of ASSDialog in the dialogs array
int outline_color
color for outline in ASS, called tertiary in SSA
fields extracted from the [Events] section
static const int16_t alpha[]
void(* alignment)(void *priv, int alignment)
int layer
higher numbered layers are drawn over lower numbered
int bold
whether text is bold (1) or not (0)
void(* text)(void *priv, const char *text, int len)
ASSScriptInfo script_info
general information about the SSA script