[vlc-devel] [PATCH 17/19] ttml codec: add displayAlign attribute support
Stanislas Plessia
stplessia at gmail.com
Mon Aug 29 16:01:15 CEST 2016
---
modules/codec/substtml.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/modules/codec/substtml.c b/modules/codec/substtml.c
index f20eb19..62fb5ac 100644
--- a/modules/codec/substtml.c
+++ b/modules/codec/substtml.c
@@ -344,6 +344,15 @@ static ttml_style_t* ParseTTMLStyle( decoder_t *p_dec, xml_reader_t* p_reader, c
else if( !strcasecmp ( "end", val ) )
p_ttml_style->i_align = SUBPICTURE_ALIGN_BOTTOM | SUBPICTURE_ALIGN_RIGHT;
}
+ else if( !strcasecmp( "tts:displayAlign", attr ) )
+ {
+ if( !strcasecmp ( "before", val ) )
+ p_ttml_style->i_align = SUBPICTURE_ALIGN_TOP | SUBPICTURE_ALIGN_LEFT;
+ else if( !strcasecmp ( "after", val ) )
+ p_ttml_style->i_align = SUBPICTURE_ALIGN_BOTTOM | SUBPICTURE_ALIGN_RIGHT;
+ else if( !strcasecmp ( "center", val ) )
+ p_ttml_style->i_align = SUBPICTURE_ALIGN_BOTTOM;
+ }
else if( !strcasecmp( "tts:fontStyle", attr ) )
{
if( !strcasecmp ( "italic", val ) || !strcasecmp ( "oblique", val ) )
--
2.7.4
More information about the vlc-devel
mailing list