[FFmpeg-devel] [PATCH] configure: add lavfi dependencies to .pc files.

Alexander Strasser eclipse7 at gmx.net
Sat Feb 18 03:58:23 CET 2012


Hi Nicolas,

  I just got around to read your patch more carefully.

  In general I think it is needed and it looks good to me with my
limited knowledge of FFmpeg configure. Be aware that I didn't test
it though.

  Some very small nits follow inlined.

Nicolas George wrote:
> lavfi have optional filters that depends on some components:
> it is necessary to test which one is enabled to set the correct
> dependencies.
[...]
> +# add_dep lib dep
> +# -> enable ${lib}_deps_${dep}
> +# -> add $dep to ${lib}_deps only once
> +add_dep() {
> +    lib=$1
> +    dep=$2
> +    enabled "${lib}_deps_${dep}" && return 0
> +    enable  "${lib}_deps_${dep}"
> +    prepend "${lib}_deps" $dep
> +}
> +
> +# merge deps lib components
          ^
  The underscore is missing above.

> +# merge all ${component}_deps into ${lib}_deps and ${lib}_deps_*
> +merge_deps() {
> +    lib=$1
> +    shift
> +    for comp in $*; do
> +	enabled $comp || continue
> +	eval "dep=\"\$${comp}_deps\""
> +	for d in $dep; do
> +	    add_dep $lib $d
> +	done
> +    done
> +}

  If I did look it up correctly this shouldn't be/get problematic
performance-wise.

  The indentation looks messed though. Are there tabs in there?

> +
> +merge_deps libavfilter $FILTER_LIST
> +
[...]

> +libavfilter_pc_deps=""
> +enabled libavfilter_deps_avcodec    && prepend libavfilter_pc_deps "libavcodec = $LIBAVCODEC_VERSION,"
> +enabled libavfilter_deps_avformat   && prepend libavfilter_pc_deps "libavformat = $LIBAVFORMAT_VERSION,"
> +enabled libavfilter_deps_swscale    && prepend libavfilter_pc_deps "libswscale = $LIBSWSCALE_VERSION,"
> +enabled libavfilter_deps_swresample && prepend libavfilter_pc_deps "libswresample = $LIBSWRESAMPLE_VERSION,"
> +libavfilter_pc_deps=${libavfilter_pc_deps%, }
> +

  Looks a bit weird at first but should be OK. If we will need
this kind of lists at more places, it should be refactored.

  So if you feel comfortable with your changes and no one else
comments soon, IMHO push.

[...]

  Alexander


More information about the ffmpeg-devel mailing list