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

KO Myung-Hun komh78 at gmail.com
Tue Dec 6 13:49:22 CET 2011



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.

By this, FriBidiStrIndex and FriBidiParType need not to be typedefed.

Any problem with this approach ?

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.0.14
Under OS/2 Warp 4 for Korean with FixPak #15
On AMD ThunderBird 1GHz with 512 MB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr



More information about the MPlayer-dev-eng mailing list