and binaries will be unredistributable [no]
--disable-doc do not build documentation
--disable-ffmpeg disable ffmpeg build
- --enable-avconv enable avconv build
--disable-ffplay disable ffplay build
--disable-ffprobe disable ffprobe build
--disable-ffserver disable ffserver build
--enable-sram allow use of on-chip SRAM
--disable-symver disable symbol versioning
--optflags override optimization-related compiler flags
+ --postproc-version=V build libpostproc version V.
+ Where V can be '$ALT_PP_VER_MAJOR.$ALT_PP_VER_MINOR.$ALT_PP_VER_MICRO' or 'current'. [$postproc_version_default]
Developer options (useful when working on FFmpeg itself):
--enable-coverage build with test coverage instrumentation
}
print_config_asm(){
- enabled $1 && echo "%define $2"
+ enabled $1 && v=1 || v=0
+ echo "%define $2 $v"
}
print_config(){
CONFIG_LIST="
$COMPONENT_LIST
$PROGRAM_LIST
- avconv
avplay
avprobe
avserver
isatty
kbhit
ldbrx
+ libdc1394_1
+ libdc1394_2
llrint
llrintf
local_aligned_16
target_exec
target_os
target_path
+ postproc_version
valgrind
yasmexe
"
mptestsrc_filter_deps="gpl"
negate_filter_deps="lut_filter"
ocv_filter_deps="libopencv"
+pan_filter_deps="swresample"
scale_filter_deps="swscale"
tinterlace_filter_deps="gpl"
yadif_filter_deps="gpl"
postproc_deps="gpl"
# programs
-avconv_deps="avcodec avformat swscale"
ffplay_deps="avcodec avformat swscale sdl"
ffplay_select="buffersink_filter rdft"
ffprobe_deps="avcodec avformat"
-ffserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer !shared"
+ffserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer"
ffserver_extralibs='$ldl'
ffmpeg_deps="avcodec avformat swscale swresample"
ffmpeg_select="buffersink_filter"
libdir_default='${prefix}/lib'
mandir_default='${prefix}/share/man'
shlibdir_default="$libdir_default"
+postproc_version_default="current"
# toolchain
ar_default="ar"
target_os_default=$(tolower $(uname -s))
host_os=$target_os_default
+# alternative libpostproc version
+ALT_PP_VER_MAJOR=51
+ALT_PP_VER_MINOR=2
+ALT_PP_VER_MICRO=101
+ALT_PP_VER=$ALT_PP_VER_MAJOR.$ALT_PP_VER_MINOR.$ALT_PP_VER_MICRO
+
# configurable options
enable $PROGRAM_LIST
die "Must specify target arch and OS when cross-compiling"
fi
-set_default arch target_os
+set_default arch target_os postproc_version
+
+# Check if we should build alternative libpostproc version instead of current
+if test "$postproc_version" = $ALT_PP_VER; then
+ LIBPOSTPROC_VERSION=$ALT_PP_VER
+ LIBPOSTPROC_VERSION_MAJOR=$ALT_PP_VER_MAJOR
+ LIBPOSTPROC_VERSION_MINOR=$ALT_PP_VER_MINOR
+ LIBPOSTPROC_VERSION_MICRO=$ALT_PP_VER_MICRO
+elif test "$postproc_version" != current; then
+ die "Invalid argument to --postproc-version. See --help output."
+fi
ar_default="${cross_prefix}${ar_default}"
cc_default="${cross_prefix}${cc_default}"
enabled gnutls && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init
enabled libaacplus && require "libaacplus >= 2.0.0" aacplus.h aacplusEncOpen -laacplus
enabled libass && require_pkg_config libass ass/ass.h ass_library_init
-enabled libcelt && require libcelt celt/celt.h celt_decoder_create_custom -lcelt0
-enabled libdc1394 && require_pkg_config libdc1394-2 dc1394/dc1394.h dc1394_new
+enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 &&
+ { check_lib celt/celt.h celt_decoder_create_custom -lcelt0 ||
+ die "ERROR: libcelt version must be >= 0.11.0."; }
enabled libdirac && require_pkg_config dirac \
"libdirac_decoder/dirac_parser.h libdirac_encoder/dirac_encoder.h" \
"dirac_decoder_init dirac_encoder_init"
check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
die "ERROR: openssl not found"; }
+# libdc1394 check
+if enabled libdc1394; then
+ { check_lib dc1394/dc1394.h dc1394_new -ldc1394 -lraw1394 &&
+ enable libdc1394_2; } ||
+ { check_lib libdc1394/dc1394_control.h dc1394_create_handle -ldc1394_control -lraw1394 &&
+ enable libdc1394_1; } ||
+ die "ERROR: No version of libdc1394 found "
+fi
+
SDL_CONFIG="${cross_prefix}sdl-config"
if check_pkg_config sdl SDL_version.h SDL_Linked_Version; then
check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
get_version(){
name=$1
file=$source_path/$2
+# This condition will be removed when we stop supporting old libpostproc versions
+if ! test "$name" = LIBPOSTPROC || test "$postproc_version" = current; then
eval $(grep "#define ${name}_VERSION_M" "$file" | awk '{ print $2"="$3 }')
eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
+fi
lcname=$(tolower $name)
eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak
eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak
#define AVUTIL_AVCONFIG_H
EOF
+test "$postproc_version" != current && cat >> $TMPH <<EOF
+#define LIBPOSTPROC_VERSION_MAJOR $LIBPOSTPROC_VERSION_MAJOR
+#define LIBPOSTPROC_VERSION_MINOR $LIBPOSTPROC_VERSION_MINOR
+#define LIBPOSTPROC_VERSION_MICRO $LIBPOSTPROC_VERSION_MICRO
+EOF
+
print_config AV_HAVE_ $TMPH $HAVE_LIST_PUB
echo "#endif /* AVUTIL_AVCONFIG_H */" >> $TMPH