[MPlayer-dev-eng] [HACK/RFC] libass without fribidi

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Dec 6 23:01:41 CET 2011


On 6 Dec 2011, at 13:49, KO Myung-Hun <komh78 at gmail.com> wrote:
> Reimar Döffinger wrote:
>> On Mon, Dec 05, 2011 at 09:02:23PM +0900, KO Myung-Hun wrote:
>>>> ===================================================================
>>>> --- libass/ass_shaper.h    (revision 34388)
>>>> +++ libass/ass_shaper.h    (working copy)
>>>> @@ -21,7 +21,12 @@
>>>> 
>>>> #include "config.h"
>>>> 
>>>> +#ifdef CONFIG_FRIBIDI
>>>> #include <fribidi/fribidi.h>
>>>> +#else
>>>> +typedef int FriBidiParType;
>>>> +typedef int FriBidiStrIndex;
>>>> +#endif
>>>> #include "ass_render.h"
>>>> 
>>> 
>>> Is there a special reason typedefing only these two types ?
>> 
>> They are the only ones used in the header.
>> 
>>> Why don't you guard all the FriBidi stuffs with CONFIG_FRIBIDI ?
>> 
>> Because I wanted to keep it minimal.
>> And IMO it's a rather bad idea API-design-wise to have this header
>> depend on Fribidi anyway, so in case someone upstream would be
>> interested this would give a slight disincentive against making the
>> header depend even more on fribidi.
> 
> I'm sorry that you seemed to misunderstand me or I misunderstood you.
> 
> For clarity, what I meant is, that it would be better to place the all
> stuffs related to fribidi in #ifdef CONFIG_FRIBIDI...#endif block.
> 
> For examples, ass_shaper_set_base_direction(), ass_shaper_reorder() and
> resolve_base_direction() should be placed in #ifdef
> CONFIG_FRIBIDI...#endif block.

But then I'd have to put an ifdef around any place where they are used and the changes certainly wouldn't be constraint to the new ass_shaper files anymore.
> 


More information about the MPlayer-dev-eng mailing list