diff options
author | Clément Bœsch <u@pkh.me> | 2014-10-11 16:10:51 +0200 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2014-10-15 19:25:06 +0200 |
commit | d9f272fe33063350127d1d6632804f4f0fd8dd9c (patch) | |
tree | 241f9c4417b98b839d392475894f40309855ce62 /libavcodec/ass_split.c | |
parent | 40b9f28641b696c6bb73ce49dc97c2ce2700cbdb (diff) | |
download | ffmpeg-streaming-d9f272fe33063350127d1d6632804f4f0fd8dd9c.zip ffmpeg-streaming-d9f272fe33063350127d1d6632804f4f0fd8dd9c.tar.gz |
avcodec/ass_split: extend recognized fields in ASS splitter
This simplifies the logic for the fix in the next commit.
Diffstat (limited to 'libavcodec/ass_split.c')
-rw-r--r-- | libavcodec/ass_split.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c index 413e9c8..fea38e7 100644 --- a/libavcodec/ass_split.c +++ b/libavcodec/ass_split.c @@ -44,7 +44,7 @@ typedef struct { int size; int offset; int offset_count; - ASSFields fields[10]; + ASSFields fields[24]; } ASSSection; static const ASSSection ass_sections[] = { @@ -68,11 +68,25 @@ static const ASSSection ass_sections[] = { {"Fontname", ASS_STR, offsetof(ASSStyle, font_name) }, {"Fontsize", ASS_INT, offsetof(ASSStyle, font_size) }, {"PrimaryColour",ASS_COLOR,offsetof(ASSStyle, primary_color)}, + {"SecondaryColour",ASS_COLOR,offsetof(ASSStyle, secondary_color)}, + {"OutlineColour",ASS_COLOR,offsetof(ASSStyle, outline_color)}, {"BackColour", ASS_COLOR,offsetof(ASSStyle, back_color) }, {"Bold", ASS_INT, offsetof(ASSStyle, bold) }, {"Italic", ASS_INT, offsetof(ASSStyle, italic) }, {"Underline", ASS_INT, offsetof(ASSStyle, underline) }, + {"StrikeOut", ASS_INT, offsetof(ASSStyle, strikeout) }, + {"ScaleX", ASS_FLT, offsetof(ASSStyle, scalex) }, + {"ScaleY", ASS_FLT, offsetof(ASSStyle, scaley) }, + {"Spacing", ASS_FLT, offsetof(ASSStyle, spacing) }, + {"Angle", ASS_FLT, offsetof(ASSStyle, angle) }, + {"BorderStyle", ASS_INT, offsetof(ASSStyle, border_style) }, + {"Outline", ASS_FLT, offsetof(ASSStyle, outline) }, + {"Shadow", ASS_FLT, offsetof(ASSStyle, shadow) }, {"Alignment", ASS_INT, offsetof(ASSStyle, alignment) }, + {"MarginL", ASS_INT, offsetof(ASSStyle, margin_l) }, + {"MarginR", ASS_INT, offsetof(ASSStyle, margin_r) }, + {"MarginV", ASS_INT, offsetof(ASSStyle, margin_v) }, + {"Encoding", ASS_INT, offsetof(ASSStyle, encoding) }, {0}, } }, @@ -86,10 +100,20 @@ static const ASSSection ass_sections[] = { {"Fontname", ASS_STR, offsetof(ASSStyle, font_name) }, {"Fontsize", ASS_INT, offsetof(ASSStyle, font_size) }, {"PrimaryColour",ASS_COLOR,offsetof(ASSStyle, primary_color)}, + {"SecondaryColour", ASS_COLOR, offsetof(ASSStyle, secondary_color) }, + {"TertiaryColour", ASS_COLOR, offsetof(ASSStyle, outline_color) }, {"BackColour", ASS_COLOR,offsetof(ASSStyle, back_color) }, {"Bold", ASS_INT, offsetof(ASSStyle, bold) }, {"Italic", ASS_INT, offsetof(ASSStyle, italic) }, + {"BorderStyle", ASS_INT, offsetof(ASSStyle, border_style) }, + {"Outline", ASS_FLT, offsetof(ASSStyle, outline) }, + {"Shadow", ASS_FLT, offsetof(ASSStyle, shadow) }, {"Alignment", ASS_ALGN, offsetof(ASSStyle, alignment) }, + {"MarginL", ASS_INT, offsetof(ASSStyle, margin_l) }, + {"MarginR", ASS_INT, offsetof(ASSStyle, margin_r) }, + {"MarginV", ASS_INT, offsetof(ASSStyle, margin_v) }, + {"AlphaLevel", ASS_INT, offsetof(ASSStyle, alpha_level) }, + {"Encoding", ASS_INT, offsetof(ASSStyle, encoding) }, {0}, } }, @@ -103,6 +127,11 @@ static const ASSSection ass_sections[] = { {"Start", ASS_TIMESTAMP, offsetof(ASSDialog, start) }, {"End", ASS_TIMESTAMP, offsetof(ASSDialog, end) }, {"Style", ASS_STR, offsetof(ASSDialog, style) }, + {"Name", ASS_STR, offsetof(ASSDialog, name) }, + {"MarginL", ASS_INT, offsetof(ASSDialog, margin_l) }, + {"MarginR", ASS_INT, offsetof(ASSDialog, margin_r) }, + {"MarginV", ASS_INT, offsetof(ASSDialog, margin_v) }, + {"Effect", ASS_STR, offsetof(ASSDialog, effect) }, {"Text", ASS_STR, offsetof(ASSDialog, text) }, {0}, } |