[MPlayer-dev-eng] [PATCH] build: fix lavfi dependencies (swscale and swresample).

Clément Bœsch ubitux at gmail.com
Tue Feb 7 10:45:32 CET 2012


On Mon, Feb 06, 2012 at 09:18:04PM +0100, Reinhard Tartler wrote:
> On Sun, Feb 5, 2012 at 6:48 PM, Nicolas George
> <nicolas.george at normalesup.org> wrote:
> > ---
> >  Makefile  |    3 ++-
> >  configure |    1 +
> >  2 files changed, 3 insertions(+), 1 deletions(-)
> >
> >
> > Note: it only takes care of the internal version. As far as I know, using
> > libavfilter with external ffmpeg was not supported anyway.
> >
> > Clément: I believe your patch has unnecessary bits: when linking against
> > external libavfilter (if supported), libswresample (and libswscale) should
> > come automatically either through pkg-config or the dependencies of the
> > shared object files. That only leaves the case of statically linked external
> > libavfilter without pkg-config: we can live with that.
> >
> > Regards,
> >
> > --
> >  Nicolas George
> >
> >
> > diff --git a/Makefile b/Makefile
> > index 8e80b9e..17a1189 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -689,7 +689,8 @@ SRCS_MENCODER = mencoder.c \
> >                 $(SRCS_MENCODER-yes)
> >
> >  # (linking) order matters for these libraries
> > -FFMPEGPARTS = libpostproc libswscale libavfilter libavformat libavcodec libavutil
> > +FFMPEGPARTS_ALL = libpostproc libavfilter libavformat libavcodec libswscale libswresample libavutil
> > +FFMPEGPARTS = $(foreach part, $(FFMPEGPARTS_ALL), $(if $(wildcard ffmpeg/$(part)), $(part)))
> >  FFMPEGLIBS  = $(foreach part, $(FFMPEGPARTS), ffmpeg/$(part)/$(part).a)
> >  FFMPEGFILES = $(foreach part, $(FFMPEGPARTS), $(wildcard $(addprefix ffmpeg/$(part)/,*.[chS] /*/*.[chS] /*/*.asm)))
> >
> > diff --git a/configure b/configure
> > index 00e2fd7..0decbd5 100755
> > --- a/configure
> > +++ b/configure
> > @@ -8160,6 +8160,7 @@ CONFIG_AVFORMAT = $ffmpeg_a
> >  CONFIG_AVUTIL   = $ffmpeg_a
> >  CONFIG_POSTPROC = $ffmpeg_a
> >  CONFIG_SWSCALE  = $ffmpeg_a
> > +CONFIG_SWRESAMPLE = $ffmpeg_a
> >
> >  ASFLAGS    = \$(CFLAGS)
> >  AS_DEPFLAGS= $DEPFLAGS
> > --
> > 1.7.8.3
> 
> I can confirm that this patch fixes the compilation failure with
> ./configure --enable-vf-lavfi and FFmpeg.
> 

Thank you for your tests :)

> Moreover this patch doesn't break compilation against Libav as long as
> --enable-vf-liavfi is not passed. With this flag, I get the following
> errors:
> 
> cc -MD -MP -Wundef -Wall -Wno-switch -Wno-parentheses -Wpointer-arith
> -Wredundant-decls -Wstrict-prototypes -Wmissing-prototypes
> -Wdisabled-optimization -Wno-pointer-sign
> -Wdeclaration-after-statement -std=gnu99
> -Werror-implicit-function-declaration -O4 -march=native -mtune=native
> -pipe -ffast-math -fomit-frame-pointer -fno-tree-vectorize
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
> -Ilibdvdread4 -I. -Iffmpeg  -D_REENTRANT -I/usr/include/directfb
> -I/usr/include/     -D_REENTRANT    -I/usr/include/freetype2
> -I/usr/include/dirac   -I/usr/include/schroedinger-1.0
> -I/usr/include/orc-0.4   -c -o libaf/af_lavcac3enc.o
> libaf/af_lavcac3enc.c
> libmpcodecs/vf_lavfi.c: In function 'mpi_to_bufref':
> libmpcodecs/vf_lavfi.c:67:15: error: 'AVFilterBufferRefVideoProps' has
> no member named 'sample_aspect_ratio'
> libmpcodecs/vf_lavfi.c: In function 'mpsink_query_formats':
> libmpcodecs/vf_lavfi.c:110:5: error: implicit declaration of function
> 'avfilter_set_common_pixel_formats'
> [-Werror=implicit-function-declaration]
> libmpcodecs/vf_lavfi.c: In function 'config':
> libmpcodecs/vf_lavfi.c:272:13: error: implicit declaration of function
> 'av_rescale' [-Werror=implicit-function-declaration]
> libmpcodecs/vf_lavfi.c: In function 'lavfi_open':
> libmpcodecs/vf_lavfi.c:380:5: error: implicit declaration of function
> 'avfilter_inout_alloc' [-Werror=implicit-function-declaration]
> libmpcodecs/vf_lavfi.c:380:13: warning: assignment makes pointer from
> integer without a cast [enabled by default]
> libmpcodecs/vf_lavfi.c:381:13: warning: assignment makes pointer from
> integer without a cast [enabled by default]
> libmpcodecs/vf_lavfi.c:392:5: warning: passing argument 3 of
> 'avfilter_graph_parse' from incompatible pointer type [enabled by
> default]
> ffmpeg/libavfilter/avfiltergraph.h:119:5: note: expected 'struct
> AVFilterInOut *' but argument is of type 'struct AVFilterInOut **'
> libmpcodecs/vf_lavfi.c:392:5: warning: passing argument 4 of
> 'avfilter_graph_parse' from incompatible pointer type [enabled by
> default]
> ffmpeg/libavfilter/avfiltergraph.h:119:5: note: expected 'struct
> AVFilterInOut *' but argument is of type 'struct AVFilterInOut **'
> libmpcodecs/vf_lavfi.c:403:5: error: implicit declaration of function
> 'avfilter_inout_free' [-Werror=implicit-function-declaration]
> cc1: some warnings being treated as errors
> 

I guess this is because lavfi improved a lot this year, especially with
the audio support, and thus API changed.

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20120207/3069c289/attachment.asc>


More information about the MPlayer-dev-eng mailing list