[vlc-devel] [PATCH 17/19] ttml codec: add displayAlign attribute support
Francois Cartegnie
fcvlcdev at free.fr
Wed Aug 31 12:42:46 CEST 2016
Le 31/08/2016 à 19:20, Stanislas Plessia a écrit :
> ---
> modules/codec/substtml.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/modules/codec/substtml.c b/modules/codec/substtml.c
> index 695dcf0..14eee3f 100644
> --- a/modules/codec/substtml.c
> +++ b/modules/codec/substtml.c
> @@ -354,6 +354,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_LEFT;
> + 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 ) )
>
You should read the spec, not just look at example pictures.
Unless you fully support regions, handling of displayAlign is pointless
here.
Francois
More information about the vlc-devel
mailing list