echo " and ffmpeg will be unredistributable [default=no]"
echo " --enable-pp enable GPLed postprocessing support [default=no]"
echo " --enable-swscaler software scaler support [default=no]"
+ echo " --enable-avfilter video filter support (replaces vhook) [default=no]"
+ echo " --enable-avfilter-lavf video filters dependant on avformat [default=no]"
echo " --enable-beosthreads use BeOS threads [default=no]"
echo " --enable-os2threads use OS/2 threads [default=no]"
echo " --enable-pthreads use pthreads [default=no]"
decoders
demuxers
encoders
+ filters
indevs
muxers
outdevs
CONFIG_LIST="
$COMPONENT_LIST
+ avfilter
+ avfilter_lavf
avisynth
beos_netserver
ffmpeg
getrusage
imlib2
inet_aton
+ inline_asm
libdc1394_1
libdc1394_2
llrint
tcp_protocol_deps="network"
udp_protocol_deps="network"
+# filters
+vsrc_movie_deps="avfilter_lavf"
+
# programs
ffplay_deps="sdl"
ffserver_deps="ffm_muxer rtp_protocol rtsp_demuxer"
OUTDEV_LIST=$(find_things muxer _MUX libavdevice/alldevices.c)
INDEV_LIST=$(find_things demuxer DEMUX libavdevice/alldevices.c)
PROTOCOL_LIST=$(find_things protocol PROTOCOL libavformat/allformats.c)
+VIDEO_FILTER_LIST=$(find_things vf_ VF_ libavfilter/allfilters.c)
+SRC_FILTER_LIST=$(find_things vsrc_ VSRC_ libavfilter/allfilters.c)
+FILTER_LIST="$SRC_FILTER_LIST $VIDEO_FILTER_LIST"
enable $ARCH_EXT_LIST \
$DECODER_LIST \
$BSF_LIST \
$DEMUXER_LIST \
$MUXER_LIST \
+ $FILTER_LIST \
$PROTOCOL_LIST \
$INDEV_LIST \
$OUTDEV_LIST \
;;
--disable-muxers) disable $MUXER_LIST
;;
+ --disable-filters) disable $FILTER_LIST
+ ;;
--disable-demuxers) disable $DEMUXER_LIST
;;
--disable-parsers) disable $PARSER_LIST
;;
--disable-devices) disable $INDEV_LIST $OUTDEV_LIST
;;
+ --enable-debug=*) debuglevel="$optval"
+ ;;
--enable-*=*|--disable-*=*)
eval `echo "$opt" | sed 's/=/-/;s/--/action=/;s/-/ thing=/;s/-/ name=/'`
case "$thing" in
encoder|decoder|muxer|demuxer|parser|bsf|protocol) $action ${optval}_${thing} ;;
+ filter) $action ${optval} ;;
*) die_unknown "$opt" ;;
esac
;;
emximp -o $(LIBPREF)$(NAME)_dll.lib $(NAME).def;'
SLIB_INSTALL_EXTRA_CMD='install -m 644 $(LIBPREF)$(NAME)_dll.a $(LIBPREF)$(NAME)_dll.lib "$(LIBDIR)"'
SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.a "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.lib'
- vhook="no"
+ disable vhook
;;
interix)
disable vhook
if test -n "`$cc -v 2>&1 | grep xlc`"; then
add_cflags "-qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
else
- add_cflags "-no-cpp-precomp -pipe"
+ add_cflags "-pipe"
check_cflags "-force_cpusubtype_ALL"
check_cflags "-Wno-sign-compare"
disabled shared && add_cflags -mdynamic-no-pic
die "C compiler test failed."
fi
+check_asm inline_asm '""'
+
if enabled x86; then
# check whether EBP is available on x86
# As 'i' is stored on the stack, this program will crash
check_func XOpenDisplay -lX11 &&
check_func XShmCreateImage -lX11 -lXext
-enabled debug && add_cflags -g
+enabled debug && add_cflags -g"$debuglevel"
# add some useful compiler flags if supported
check_cflags -Wdeclaration-after-statement
fi
fi
check_cflags -fno-math-errno
+check_cflags -fno-signed-zeros
# PIC flags for shared library objects where they are needed
if enabled shared; then
enabled_any $BSF_LIST && enable bsfs
enabled_any $DEMUXER_LIST && enable demuxers
enabled_any $MUXER_LIST && enable muxers
+enabled_any $FILTER_LIST && enable filters
enabled_any $INDEV_LIST && enable demuxers
enabled_any $OUTDEV_LIST && enable muxers
enabled_any $PROTOCOL_LIST && enable protocols
$BSF_LIST \
$DEMUXER_LIST \
$MUXER_LIST \
+ $FILTER_LIST \
$INDEV_LIST \
$OUTDEV_LIST \
$PROTOCOL_LIST \
echo "shared ${shared-no}"
echo "postprocessing support ${pp-no}"
echo "software scaler enabled ${swscaler-no}"
+echo "new filter support ${avfilter-no}"
+echo "filters using lavformat ${avfilter-lavf-no}"
echo "video hooking ${vhook-no}"
if enabled vhook; then
echo "Imlib2 support ${imlib2-no}"
echo "x264 enabled ${libx264-no}"
echo "XviD enabled ${libxvid-no}"
echo "zlib enabled ${zlib-no}"
+echo
-for type in decoder encoder parser demuxer muxer protocol bsf indev outdev; do
+for type in decoder encoder parser demuxer muxer protocol filter bsf indev outdev; do
echo "Enabled ${type}s:"
- ucname="\$`toupper $type`_LIST"
- list="`eval echo $ucname`"
- partlist=""
+ eval list=\$$(toupper $type)_LIST
for part in $list; do
- enabled $part && partlist="$partlist $part"
- done
- partlist=`echo $partlist | sed s/_$type//g | tr ' ' '\n' | sort`
- echo $partlist
+ enabled $part && echo ${part%_*}
+ done | sort | pr -3 -t
+ echo
done
enabled nonfree &&
get_version(){
name=$1
file=$source_path/$2
- printf '%s.%s.%s' $(grep "#define ${name}_VERSION_M" "$file" | sed 's/[^0-9]//g')
+ eval $(grep "#define ${name}_VERSION_M" "$file" | awk '{ print $2"="$3 }')
+ eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
}
-sws_version=$(get_version LIBSWSCALE libswscale/swscale.h)
-pp_version=$(get_version LIBPOSTPROC libpostproc/postprocess.h)
-lavc_version=$(get_version LIBAVCODEC libavcodec/avcodec.h)
-lavd_version=$(get_version LIBAVDEVICE libavdevice/avdevice.h)
-lavf_version=$(get_version LIBAVFORMAT libavformat/avformat.h)
-lavu_version=$(get_version LIBAVUTIL libavutil/avutil.h)
+get_version LIBSWSCALE libswscale/swscale.h
+get_version LIBPOSTPROC libpostproc/postprocess.h
+get_version LIBAVCODEC libavcodec/avcodec.h
+get_version LIBAVDEVICE libavdevice/avdevice.h
+get_version LIBAVFORMAT libavformat/avformat.h
+get_version LIBAVUTIL libavutil/avutil.h
+get_version LIBAVFILTER libavfilter/avfilter.h
if enabled shared; then
echo "BUILD_SHARED=yes" >> config.mak
echo "PIC=-fPIC -DPIC" >> config.mak
- echo "SPPMAJOR=${pp_version%%.*}" >> config.mak
- echo "SPPVERSION=$pp_version" >> config.mak
- echo "LAVCMAJOR=${lavc_version%%.*}" >> config.mak
- echo "LAVCVERSION=$lavc_version" >> config.mak
- echo "LAVDMAJOR=${lavd_version%%.*}" >> config.mak
- echo "LAVDVERSION=$lavd_version" >> config.mak
- echo "LAVFMAJOR=${lavf_version%%.*}" >> config.mak
- echo "LAVFVERSION=$lavf_version" >> config.mak
- echo "LAVUMAJOR=${lavu_version%%.*}" >> config.mak
- echo "LAVUVERSION=$lavu_version" >> config.mak
- echo "SWSMAJOR=${sws_version%%.*}" >> config.mak
- echo "SWSVERSION=$sws_version" >> config.mak
+ echo "SPPMAJOR=$LIBPOSTPROC_VERSION_MAJOR" >> config.mak
+ echo "SPPVERSION=$LIBPOSTPROC_VERSION" >> config.mak
+ echo "LAVCMAJOR=$LIBAVCODEC_VERSION_MAJOR" >> config.mak
+ echo "LAVCVERSION=$LIBAVCODEC_VERSION" >> config.mak
+ echo "LAVDMAJOR=$LIBAVDEVICE_VERSION_MAJOR" >> config.mak
+ echo "LAVDVERSION=$LIBAVDEVICE_VERSION" >> config.mak
+ echo "LAVFMAJOR=$LIBAVFORMAT_VERSION_MAJOR" >> config.mak
+ echo "LAVFVERSION=$LIBAVFORMAT_VERSION" >> config.mak
+ echo "LAVUMAJOR=$LIBAVUTIL_VERSION_MAJOR" >> config.mak
+ echo "LAVUVERSION=$LIBAVUTIL_VERSION" >> config.mak
+ echo "LAVFIMAJOR=$LIBAVFILTER_VERSION_MAJOR" >> config.mak
+ echo "LAVFIVERSION=$LIBAVFILTER_VERSION" >> config.mak
+ echo "SWSMAJOR=$LIBSWSCALE_VERSION_MAJOR" >> config.mak
+ echo "SWSVERSION=$LIBSWSCALE_VERSION" >> config.mak
echo "SLIBNAME=${SLIBNAME}" >> config.mak
echo "SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}" >> config.mak
echo "SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}" >> config.mak
$BSF_LIST \
$DEMUXER_LIST \
$MUXER_LIST \
+ $FILTER_LIST \
$PROTOCOL_LIST \
$INDEV_LIST \
$OUTDEV_LIST \
libavcodec/sh4 \
libavcodec/sparc \
libavdevice \
+ libavfilter \
libavformat \
libavutil \
libpostproc \
doc/texi2pod.pl \
libavcodec/Makefile \
libavdevice/Makefile \
+ libavfilter/Makefile \
libavformat/Makefile \
libavutil/Makefile \
libpostproc/Makefile \
EOF
}
-pkgconfig_generate libavutil "FFmpeg utility library" "$lavu_version" -lavutil ""
-pkgconfig_generate_uninstalled libavutil "FFmpeg utility library" "$lavu_version"
+pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" -lavutil ""
+pkgconfig_generate_uninstalled libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION"
-pkgconfig_generate libavcodec "FFmpeg codec library" "$lavc_version" "-lavcodec $extralibs" "$pkg_requires libavutil = $lavu_version"
-pkgconfig_generate_uninstalled libavcodec "FFmpeg codec library" "$lavc_version" "$extralibs" "$pkg_requires libavutil = $lavu_version"
+pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "-lavcodec $extralibs" "$pkg_requires libavutil = $LIBAVUTIL_VERSION"
+pkgconfig_generate_uninstalled libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$extralibs" "$pkg_requires libavutil = $LIBAVUTIL_VERSION"
-pkgconfig_generate libavformat "FFmpeg container format library" "$lavf_version" "-lavformat $extralibs" "$pkg_requires libavcodec = $lavc_version"
-pkgconfig_generate_uninstalled libavformat "FFmpeg container format library" "$lavf_version" "$extralibs" "$pkg_requires libavcodec = $lavc_version"
+pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "-lavformat $extralibs" "$pkg_requires libavcodec = $LIBAVCODEC_VERSION"
+pkgconfig_generate_uninstalled libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "$pkg_requires libavcodec = $LIBAVCODEC_VERSION"
-pkgconfig_generate libavdevice "FFmpeg device handling library" "$lavd_version" "-lavdevice $extralibs" "$pkg_requires libavformat = $lavf_version"
-pkgconfig_generate_uninstalled libavdevice "FFmpeg device handling library" "$lavd_version" "$extralibs" "$pkg_requires libavformat = $lavf_version"
+pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "-lavdevice $extralibs" "$pkg_requires libavformat = $LIBAVFORMAT_VERSION"
+pkgconfig_generate_uninstalled libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "$pkg_requires libavformat = $LIBAVFORMAT_VERSION"
if enabled pp; then
- pkgconfig_generate libpostproc "FFmpeg post processing library" "$pp_version" -lpostproc ""
- pkgconfig_generate_uninstalled libpostproc "FFmpeg post processing library" "$pp_version"
+ pkgconfig_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION" -lpostproc ""
+ pkgconfig_generate_uninstalled libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION"
fi
if enabled swscaler; then
- pkgconfig_generate libswscale "FFmpeg image rescaling library" "$sws_version" -lswscale "libavutil = $lavu_version"
- pkgconfig_generate_uninstalled libswscale "FFmpeg image rescaling library" "$sws_version" "" "libavutil = $lavu_version"
+ pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" -lswscale "libavutil = $LIBAVUTIL_VERSION"
+ pkgconfig_generate_uninstalled libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
else
- pkgconfig_generate libswscale "FFmpeg image rescaling library" "$sws_version" "" "$pkg_requires libavcodec = $lavc_version"
- pkgconfig_generate_uninstalled libswscale "FFmpeg image rescaling library" "$sws_version" "" "$pkg_requires libavcodec = $lavc_version"
+ pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "$pkg_requires libavcodec = $LIBAVCODEC_VERSION"
+ pkgconfig_generate_uninstalled libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "$pkg_requires libavcodec = $LIBAVCODEC_VERSION"
apply libswscale.pc sed s/^Libs:.*$/Libs:/
apply libswscale-uninstalled.pc sed s/^Libs:.*$/Libs:/
fi
+
+if enabled avfilter; then
+ pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "-lavfilter $extralibs" "$pkg_requires libavutil = $LIBAVUTIL_VERSION" ffmpeg
+ pkgconfig_generate_uninstalled libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "$pkg_requires libavutil = $LIBAVUTIL_VERSION"
+fi