[FFmpeg-soc] libavfilter audio work - qualification task

S.N. Hemanth Meenakshisundaram smeenaks at ucsd.edu
Fri Apr 9 06:54:05 CEST 2010


On 04/08/2010 10:52 AM, Stefano Sabatini wrote:
> On date Thursday 2010-04-08 08:05:02 -0700, S.N. Hemanth Meenakshisundaram encoded:
> [...]
>    
>> The vf_drawtext filter is almost done but I am having problems
>> linking in the freetype libraries. I attempted the attached changes
>> to the ffmpeg Makefile but I see the following error :
>>
>> ffmpeg/libavfilter/libavfilter.a(vf_drawtext.o): In function `draw_text':
>> ffmpeg/libavfilter/vf_drawtext.c:422: undefined reference to
>> `FT_Get_Kerning'
>>
>> What am I doing wrong?
>>
>> Thanks
>>      
>    
>> Index: Makefile
>> ===================================================================
>> --- Makefile	(revision 22749)
>> +++ Makefile	(working copy)
>> @@ -71,6 +71,9 @@
>>
>>   $(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
>>
>> +libavfilter/vf_drawtext.o libavfilter/vf_drawtext.d: CFLAGS += $(`freetype-config --cflags`)
>> +FF_EXTRALIBS += $(`freetype-config --libs`)
>> +
>>   ffplay_g$(EXESUF): FF_EXTRALIBS += $(SDL_LIBS)
>>   ffserver_g$(EXESUF): FF_LDFLAGS += $(FFSERVERLDFLAGS)
>>      
> 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,


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: drawtext.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100408/7c5ceee8/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: configure.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100408/7c5ceee8/attachment.txt>


More information about the FFmpeg-soc mailing list