[FFmpeg-soc] libavfilter audio work - qualification task
Víctor Paesa
victorpaesa at googlemail.com
Sat Apr 10 00:25:57 CEST 2010
Hi,
On Fri, Apr 9, 2010 at 5:02 PM, S.N. Hemanth Meenakshisundaram
<smeenaks at ucsd.edu> wrote:
> On 04/08/2010 09:54 PM, S.N. Hemanth Meenakshisundaram wrote:
>>
>> On 04/08/2010 10:52 AM, Stefano Sabatini wrote:
>>>
>>> I believe the right syntax is: $(shell freetype-config --cflags)
>>>
>>> anyway this is not the right way to do it, in configure add something
>>> of the kind:
>>> enabled drawtext_filter&& check_lib2 freetype2/freetype.h freetype_init
>>> -lfreetype
>>> ...
>>>
>>> drawtext_filter_deps="freetype2_freetype_h"
>>> drawtext_filter_extralibs="-lfreetype"
>>>
>>> (maybe the last line is not strictly necessary.)
>>>
>> Hi,
>>
>> Attached is drawtext.diff which contains the libavfilter folder Makefile
>> change, allfilters.c change and vf_drawtext.c
>>
>> I removed the Makefile changes and added what you suggested above into the
>> configure script (as in configure.diff).
>> config.err still showed some errors initially and after tweaking it a
>> little, the errors stopped. (My headers are in /usr/include/freetype).
>>
>> Now it shows :
>>
>> check_header ft2build.h
>> ...
>> BEGIN /tmp/ffconf.OwX6Cozb.c
>> 1 #include <ft2build.h>
>> 2 int x;
>> END /tmp/ffconf.OwX6Cozb.c
>> ..
>> check_lib2 FT_FREETYPE_H FT_Init_FreeType -lfreetype
>> check_func_headers FT_FREETYPE_H FT_Init_FreeType -lfreetype
>> check_ld -lfreetype
>>
>> Is this right?
>>
>> Am seeing two problems :
>>
>> 1. Whenever configure is run, it generates config.mak with
>>
>> !CONFIG_DRAWTEXT_FILTER=yes
>>
>> and config.h with
>>
>> #define CONFIG_DRAWTEXT_FILTER 0
>>
>> I have to manually change before it attempts to build vf_drawtext
>>
>>
>> 2.
>>
>> I still see the 'undefined reference to...' linker errors for the freetype
>> calls :(
>>
>> Can you give me some pointers on what could be wrong. For the 1st problem,
>> I tried looking for any other places a new filter needs to be
>> registered/included and couldn't find any. For the 2nd,
>>
>> I am a newbie to configure scripts, so can you please explain what the
>> configure script lines actually mean.
>>
>> Thanks,
>>
> Had missed out uninit earlier. Attaching fixed version. From the config.err
> log, it looks like -lfreetype is included and yet the linking fails. I tried
> building a standalone program using freetype in the same way and it works.
> So the freetype libs and include paths are ok and something must be going
> wrong with configure. Could someone help me out with a quick way to link in
> the library directly so I can test drawtext for now.
In my system, the FreeType includes are buried one directory deeper,
and the output of "freetype-config --libs" says it needs -lz :
Index: configure
===================================================================
--- configure (revision 22749)
+++ configure (working copy)
@@ -2695,6 +2695,12 @@
check_header sys/soundcard.h
check_header soundcard.h
+drawtext_filter_deps="freetype2_freetype_freetype_h"
+drawtext_filter_extralibs="-lfreetype -lz"
+
+check_header ft2build.h
+enabled drawtext_filter && check_lib2 freetype2/freetype/freetype.h
FT_Init_FreeType -lfreetype
+
enabled_any alsa_indev alsa_outdev && check_lib2 alsa/asoundlib.h
snd_pcm_htimestamp -lasound
enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack
Or maybe
+drawtext_filter_extralibs="$(freetype-config --libs)"
Regards,
Víctor
More information about the FFmpeg-soc
mailing list