<br><span>Hello,</span><div><br><div class="gmail_quote"><div dir="ltr">On Sun, Feb 25, 2018, 4:57 PM Thomas Guillem <<a href="mailto:thomas@gllm.fr">thomas@gllm.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
On Fri, Feb 23, 2018, at 15:48, Shaleen Jain wrote:<br>
> update functions deprecated in version 1.0<br>
> ---<br>
>  Not tested with complex script subtitles<br>
><br>
>  <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a>                                 |  2 +-<br>
>  modules/text_renderer/freetype/text_layout.c | 11 ++++++++++-<br>
>  2 files changed, 11 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
> index 6573e9b99a..b8a5ed76f0 100644<br>
> --- a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
> +++ b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
> @@ -3227,7 +3227,7 @@ if test "${enable_freetype}" != "no"; then<br>
><br>
>        dnl fribidi support<br>
>        if test "${enable_fribidi}" != "no"; then<br>
> -        PKG_CHECK_MODULES(FRIBIDI, fribidi, [<br>
> +        PKG_CHECK_MODULES(FRIBIDI, [fribidi >= 1.0], [<br>
<br>
You can't do that, this will break build for most OSses (Debian stable is still on 0.19.7 for example). You also need to update the fribidi contrib and make sure it builds for other OSes.<br>
<br>
I'm not sure if we want to force fribidi 1.0 for VLC 4.0. This need to be discussed with everyone.<br>
In the meantime, you can add 1.0 specific functions inside a #ifdef that check the fribidi version.<br></blockquote></div></div><div><br></div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div><div>Thanks for the review. I have sent an updated patch which conditionally adds support for fribidi version 1 and above.</div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
>            have_fribidi="yes"<br>
>            VLC_ADD_CPPFLAGS([skins2], [${FRIBIDI_CFLAGS} -<br>
> DHAVE_FRIBIDI])<br>
>            VLC_ADD_LIBS([skins2], [${FRIBIDI_LIBS}])<br>
> diff --git a/modules/text_renderer/freetype/text_layout.c b/modules/<br>
> text_renderer/freetype/text_layout.c<br>
> index 13efd567b4..476c273ef8 100644<br>
> --- a/modules/text_renderer/freetype/text_layout.c<br>
> +++ b/modules/text_renderer/freetype/text_layout.c<br>
> @@ -153,6 +153,7 @@ typedef struct paragraph_t<br>
><br>
>  #ifdef HAVE_FRIBIDI<br>
>      FriBidiCharType     *p_types;<br>
> +    FriBidiBracketType  *p_btypes;<br>
>      FriBidiLevel        *p_levels;<br>
>      FriBidiStrIndex     *pi_reordered_indices;<br>
>      FriBidiParType       paragraph_type;<br>
> @@ -361,6 +362,7 @@ static paragraph_t *NewParagraph( filter_t<br>
> *p_filter,<br>
>  #ifdef HAVE_FRIBIDI<br>
>      p_paragraph->p_levels = vlc_alloc( i_size, sizeof( *p_paragraph-<br>
> >p_levels ) );<br>
>      p_paragraph->p_types = vlc_alloc( i_size, sizeof( *p_paragraph-<br>
> >p_types ) );<br>
> +    p_paragraph->p_btypes = vlc_alloc( i_size, sizeof( *p_paragraph-<br>
> >p_btypes ) );<br>
>      p_paragraph->pi_reordered_indices =<br>
>              vlc_alloc( i_size, sizeof( *p_paragraph-<br>
> >pi_reordered_indices ) );<br>
><br>
> @@ -398,6 +400,7 @@ error:<br>
>  #ifdef HAVE_FRIBIDI<br>
>      if( p_paragraph->p_levels ) free( p_paragraph->p_levels );<br>
>      if( p_paragraph->p_types ) free( p_paragraph->p_types );<br>
> +    if( p_paragraph->p_btypes ) free( p_paragraph->p_btypes );<br>
>      if( p_paragraph->pi_reordered_indices )<br>
>          free( p_paragraph->pi_reordered_indices );<br>
>  #endif<br>
> @@ -424,6 +427,7 @@ static void FreeParagraph( paragraph_t *p_paragraph )<br>
>  #ifdef HAVE_FRIBIDI<br>
>      free( p_paragraph->pi_reordered_indices );<br>
>      free( p_paragraph->p_types );<br>
> +    free( p_paragraph->p_btypes );<br>
>      free( p_paragraph->p_levels );<br>
>  #endif<br>
><br>
> @@ -436,7 +440,12 @@ static int AnalyzeParagraph( paragraph_t *p_paragraph )<br>
>      fribidi_get_bidi_types(  p_paragraph->p_code_points,<br>
>                               p_paragraph->i_size,<br>
>                               p_paragraph->p_types );<br>
> -    fribidi_get_par_embedding_levels( p_paragraph->p_types,<br>
> +    fribidi_get_bracket_types( p_paragraph->p_code_points,<br>
> +                               p_paragraph->i_size,<br>
> +                               p_paragraph->p_types,<br>
> +                               p_paragraph->p_btypes );<br>
> +    fribidi_get_par_embedding_levels_ex( p_paragraph->p_types,<br>
> +                                      p_paragraph->p_btypes,<br>
>                                        p_paragraph->i_size,<br>
>                                        &p_paragraph->paragraph_type,<br>
>                                        p_paragraph->p_levels );<br>
> --<br>
> 2.16.2<br>
> _______________________________________________<br>
> vlc-devel mailing list<br>
> To unsubscribe or modify your subscription options:<br>
> <a href="https://mailman.videolan.org/listinfo/vlc-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/vlc-devel</a><br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="https://mailman.videolan.org/listinfo/vlc-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/vlc-devel</a></blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><p dir="ltr">Regards,</p>
<p dir="ltr">Shaleen Jain<br>
</p>
</div></div>