[MPlayer-dev-eng] Remove libass
Grigori Goronzy
greg at chown.ath.cx
Wed Jul 22 00:55:42 CEST 2009
Diego Biurrun wrote:
>> There are a few possible problems.
>> * It's not possible to statically link libass into the mplayer binary at
>> the moment.
>
> Why?
>
Mostly because it's not support by the build system yet.
>> Please tell me what you think about these changes.
>>
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -125,15 +125,7 @@ SRCS_COMMON-$(LIBA52_INTERNAL) += liba52/crc.c \
>>
>> +SRCS_COMMON-$(LIBASS) += ass_mp.c \
>
> Everything else that is subtitle-related resides in the libvo/
> directory, why not this?
>
No particular reason. It's probably a good idea to move it there.
>> + * You should have received a copy of the GNU General Public License along
>> + * with libass; if not, write to the Free Software Foundation, Inc.,
>
> libass?
>
Missed that one. Oops.
>> +void process_force_style(ass_track_t *track);
>
> Where is this declared?
>
In fact it's obsolete now; a leftover from the old code. ass_mp.c/h were
just copied over from libass/ and run through indent.
>> +#ifndef LIBASS_MP_H
>> +#define LIBASS_MP_H
>
> This is not the correct multiple inclusion guard.
>
Not my fault. :-)
>> +typedef struct {
>> + ass_image_t *imgs;
>> + int changed;
>> +} mp_eosd_images_t;
>
> Please avoid _t typedefs, the _t namespace is reserved by POSIX.
>
Not mine either.
>> --- a/configure
>> +++ b/configure
>> @@ -6077,28 +6077,16 @@ echores "$_fontconfig"
>>
>> +if test "$_ass" = auto -o "$_ass" = yes ; then
>> + if $_pkg_config libass; then
>> + _ass=yes
>> + def_ass='#define CONFIG_ASS'
>> + extra_ldflags="$extra_ldflags $($_pkg_config --libs libass)"
>> + extra_cflags="$extra_cflags $($_pkg_config --cflags libass)"
>> + else
>> + _ass=no
>> + def_ass='#undef CONFIG_ASS'
>> + fi
>
> tabs
>
OK.
>> --- a/libvo/vo_gl.c
>> +++ b/libvo/vo_gl.c
>> @@ -35,8 +35,9 @@
>> #include "fastmemcpy.h"
>> -#include "libass/ass.h"
>> -#include "libass/ass_mp.h"
>> +#ifdef CONFIG_ASS
>> +#include "ass_mp.h"
>> +#endif
>
> Is the #ifdef necessary?
>
Yes. It may be possible to reduce the number of #ifdefs a bit by moving
some checks into ass_mp.h.
Grigori
More information about the MPlayer-dev-eng
mailing list