--enable-libxcb-shm X11 shm communication [auto]
--enable-libxcb-xfixes X11 mouse rendering [auto]
--enable-libxvid MPEG-4 ASP video encoding
+ --enable-mbedtls crypto
--enable-openssl crypto
--enable-zlib compression [autodetect]
append CFLAGS_HEADERS $($cflags_filter "$@")
}
-add_asflags(){
- append ASFLAGS $($asflags_filter "$@")
-}
-
add_objcflags(){
append OBJCFLAGS $($objcflags_filter "$@")
}
+add_asflags(){
+ append ASFLAGS $($asflags_filter "$@")
+}
+
add_ldflags(){
append LDFLAGS $($ldflags_filter "$@")
}
append LDSOFLAGS $($ldflags_filter "$@")
}
-add_stripflags(){
- append STRIPFLAGS "$@"
-}
-
add_extralibs(){
prepend extralibs $($ldflags_filter "$@")
}
+add_stripflags(){
+ append STRIPFLAGS "$@"
+}
+
add_host_cppflags(){
append host_cppflags "$@"
}
"$@" >> $logfile 2>&1
}
+cc_e(){
+ eval printf '%s\\n' $CC_E
+}
+
cc_o(){
eval printf '%s\\n' $CC_O
}
-cc_e(){
- eval printf '%s\\n' $CC_E
+as_o(){
+ eval printf '%s\\n' $AS_O
+}
+
+x86asm_o(){
+ eval printf '%s\\n' $X86ASM_O
+}
+
+ld_o(){
+ eval printf '%s\\n' $LD_O
+}
+
+hostcc_e(){
+ eval printf '%s\\n' $HOSTCC_E
+}
+
+hostcc_o(){
+ eval printf '%s\\n' $HOSTCC_O
}
test_cc(){
test_cmd $cc $CPPFLAGS $CFLAGS "$@" $(cc_e $TMPO) $TMPC
}
-as_o(){
- eval printf '%s\\n' $AS_O
-}
-
test_as(){
log test_as "$@"
cat > $TMPS
test_cmd $as $CPPFLAGS $ASFLAGS "$@" $AS_C $(as_o $TMPO) $TMPS
}
-x86asm_o(){
- eval printf '%s\\n' $X86ASM_O
-}
-
test_x86asm(){
log test_x86asm "$@"
echo "$1" > $TMPASM
test_x86asm "$@" && enable $name
}
-ld_o(){
- eval printf '%s\\n' $LD_O
-}
-
test_ld(){
log test_ld "$@"
flags=$(filter_out '-l*' "$@")
test_stripflags "$@" && add_stripflags "$@"
}
-check_header(){
- log check_header "$@"
+check_headers(){
+ log check_headers "$@"
headers=$1
shift
disable_sanitized $headers
require_cc(){
log require_cc "$@"
name="$1"
- shift
- test_code cc "$@" || die "ERROR: $name failed"
+ check_cc "$@" || die "ERROR: $name failed"
}
-require_header(){
- log require_header "$@"
+require_headers(){
+ log require_headers "$@"
headers="$1"
- check_header "$@" || die "ERROR: $headers not found"
+ check_headers "$@" || die "ERROR: $headers not found"
}
require_cpp_condition(){
log require_cpp_condition "$@"
condition="$2"
- test_cpp_condition "$@" || die "ERROR: $condition not satisfied"
+ check_cpp_condition "$@" || die "ERROR: $condition not satisfied"
}
require_pkg_config(){
check_pkg_config "$@" || die "ERROR: $pkg_version not found"
}
-hostcc_e(){
- eval printf '%s\\n' $HOSTCC_E
-}
-
-hostcc_o(){
- eval printf '%s\\n' $HOSTCC_O
-}
-
test_host_cc(){
log test_host_cc "$@"
cat > $TMPC
libopencore_amrwb
libvo_aacenc
libvo_amrwbenc
+ mbedtls
"
EXTERNAL_LIBRARY_LIST="
"
SYSTEM_LIBRARIES="
+ bcrypt
sdl
vaapi_1
vaapi_drm
vaapi_x11
vdpau_x11
- wincrypt
"
TOOLCHAIN_FEATURES="
# protocols
ffrtmpcrypt_protocol_conflict="librtmp_protocol"
-ffrtmpcrypt_protocol_deps_any="gmp openssl"
+ffrtmpcrypt_protocol_deps_any="gmp mbedtls openssl"
ffrtmpcrypt_protocol_select="tcp_protocol"
ffrtmphttp_protocol_conflict="librtmp_protocol"
ffrtmphttp_protocol_select="http_protocol"
https_protocol_select="tls_protocol"
https_protocol_suggest="zlib"
icecast_protocol_select="http_protocol"
-librtmp_protocol_deps="librtmp"
-librtmpe_protocol_deps="librtmp"
-librtmps_protocol_deps="librtmp"
-librtmpt_protocol_deps="librtmp"
-librtmpte_protocol_deps="librtmp"
mmsh_protocol_select="http_protocol"
mmst_protocol_select="network"
-libsrt_protocol_deps="libsrt"
-libsrt_protocol_select="network"
rtmp_protocol_conflict="librtmp_protocol"
rtmp_protocol_select="tcp_protocol"
rtmp_protocol_suggest="zlib"
sctp_protocol_select="network"
srtp_protocol_select="rtp_protocol srtp"
tcp_protocol_select="network"
-tls_protocol_deps_any="gnutls openssl"
+tls_protocol_deps_any="gnutls mbedtls openssl"
tls_protocol_select="tcp_protocol"
udp_protocol_select="network"
unix_protocol_deps="sys_un_h"
unix_protocol_select="network"
+# external library protocols
+librtmp_protocol_deps="librtmp"
+librtmpe_protocol_deps="librtmp"
+librtmps_protocol_deps="librtmp"
+librtmpt_protocol_deps="librtmp"
+librtmpte_protocol_deps="librtmp"
+libsrt_protocol_deps="libsrt"
+libsrt_protocol_select="network"
+
# filters
asyncts_filter_deps="avresample"
blackframe_filter_deps="gpl"
avformat_extralibs="libm_extralibs"
avfilter_extralibs="pthreads_extralibs libm_extralibs"
avresample_extralibs="libm_extralibs"
-avutil_extralibs="clock_gettime_extralibs cuda_extralibs cuvid_extralibs d3d11va_extralibs libm_extralibs libmfx_extralibs nanosleep_extralibs pthreads_extralibs user32_extralibs vaapi_extralibs vaapi_drm_extralibs vaapi_x11_extralibs vdpau_x11_extralibs wincrypt_extralibs"
+avutil_extralibs="bcrypt_extralibs clock_gettime_extralibs cuda_extralibs cuvid_extralibs d3d11va_extralibs libm_extralibs libmfx_extralibs nanosleep_extralibs pthreads_extralibs user32_extralibs vaapi_extralibs vaapi_drm_extralibs vaapi_x11_extralibs vdpau_x11_extralibs"
swscale_extralibs="libm_extralibs"
# programs
enabled_all gnutls openssl &&
die "GnuTLS and OpenSSL must not be enabled at the same time."
+enabled_all gnutls mbedtls &&
+ die "GnuTLS and mbedTLS must not be enabled at the same time."
+
+enabled_all openssl mbedtls &&
+ die "OpenSSL and mbedTLS must not be enabled at the same time."
+
# Disable all the library-specific components if the library itself
# is disabled, see AVCODEC_LIST and following _LIST variables.
enabled x86_64 && objformat="macho64" || objformat="macho32"
enabled_any pic shared ||
{ check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; }
- check_header dispatch/dispatch.h &&
+ check_headers dispatch/dispatch.h &&
add_cppflags '-I\$(SRC_PATH)/compat/dispatch_semaphore'
if test -n "$sysroot"; then
is_in -isysroot $cc $CPPFLAGS $CFLAGS || check_cppflags -isysroot $sysroot
check_type "sys/types.h sys/socket.h" socklen_t
# Prefer arpa/inet.h over winsock2
- if check_header arpa/inet.h ; then
+ if check_headers arpa/inet.h ; then
check_func closesocket
- elif check_header winsock2.h ; then
+ elif check_headers winsock2.h ; then
check_func_headers winsock2.h closesocket -lws2 &&
network_extralibs="-lws2" ||
{ check_func_headers winsock2.h closesocket -lws2_32 &&
check_func_headers windows.h Sleep
check_func_headers windows.h VirtualAlloc
-check_header direct.h
-check_header dxgidebug.h
-check_header dxva.h
-check_header dxva2api.h
-check_header io.h
-check_header malloc.h
-check_header poll.h
-check_header sys/param.h
-check_header sys/resource.h
-check_header sys/select.h
-check_header sys/time.h
-check_header sys/un.h
-check_header unistd.h
-check_header valgrind/valgrind.h
-check_header VideoDecodeAcceleration/VDADecoder.h
-check_header windows.h
+check_headers direct.h
+check_headers dxgidebug.h
+check_headers dxva.h
+check_headers dxva2api.h
+check_headers io.h
+check_headers malloc.h
+check_headers poll.h
+check_headers sys/param.h
+check_headers sys/resource.h
+check_headers sys/select.h
+check_headers sys/time.h
+check_headers sys/un.h
+check_headers unistd.h
+check_headers valgrind/valgrind.h
+check_headers VideoDecodeAcceleration/VDADecoder.h
+check_headers windows.h
# it seems there are versions of clang in some distros that try to use the
# gcc headers, which explodes for stdatomic
# so we also check that atomics actually work here
check_builtin stdatomic stdatomic.h "atomic_int foo; atomic_store(&foo, 0)"
+check_lib bcrypt "windows.h bcrypt.h" BCryptGenRandom -lbcrypt &&
+ check_cpp_condition bcrypt bcrypt.h "defined BCRYPT_RNG_ALGORITHM"
check_lib ole32 "windows.h" CoTaskMemFree -lole32
check_lib shell32 "windows.h shellapi.h" CommandLineToArgvW -lshell32
-check_lib wincrypt "windows.h wincrypt.h" CryptGenRandom -ladvapi32
check_lib psapi "windows.h psapi.h" GetProcessMemoryInfo -lpsapi
check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss
done
# these are off by default, so fail if requested and not available
-enabled amf && require_cpp_condition AMF/core/Version.h "(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 | AMF_VERSION_BUILD_NUM) >= 0x0001000400040001"
-enabled avisynth && require_header avisynth/avisynth_c.h
-enabled avxsynth && require_header avxsynth/avxsynth_c.h
+enabled amf && require_cpp_condition amf AMF/core/Version.h "(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 | AMF_VERSION_BUILD_NUM) >= 0x0001000400040001"
+enabled avisynth && require_headers avisynth/avisynth_c.h
+enabled avxsynth && require_headers avxsynth/avxsynth_c.h
enabled cuda && require cuda cuda.h cuInit -lcuda
enabled cuvid && require cuvid cuviddec.h cuvidCreateDecoder -lnvcuvid
-enabled frei0r && require_header frei0r.h
+enabled frei0r && require_headers frei0r.h
enabled gnutls && require_pkg_config gnutls gnutls gnutls/gnutls.h gnutls_global_init &&
check_lib gmp gmp.h mpz_export -lgmp
enabled libaom && require_pkg_config libaom "aom >= 0.1.0" aom/aom_codec.h aom_codec_version
enabled libwavpack && require libwavpack wavpack/wavpack.h WavpackOpenFileOutput -lwavpack
enabled libwebp && require_pkg_config libwebp libwebp webp/encode.h WebPGetEncoderVersion
enabled libx264 && require_pkg_config libx264 x264 "stdint.h x264.h" x264_encoder_encode &&
- require_cpp_condition x264.h "X264_BUILD >= 118" &&
+ require_cpp_condition libx264 x264.h "X264_BUILD >= 118" &&
check_cpp_condition libx262 x264.h "X264_MPEG2"
enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get &&
- require_cpp_condition x265.h "X265_BUILD >= 57"
+ require_cpp_condition libx265 x265.h "X265_BUILD >= 57"
enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode -lxavs
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
+enabled mbedtls && require mbedtls mbedtls/ssl.h mbedtls_ssl_init -lmbedtls -lmbedcrypto -lmbedx509
enabled mmal && { check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host ||
{ ! enabled cross_compile &&
add_cflags -isystem/opt/vc/include/ -isystem/opt/vc/include/interface/vmcs_host/linux -isystem/opt/vc/include/interface/vcos/pthreads -fgnu89-inline &&
check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host; } ||
die "ERROR: mmal not found" &&
check_func_headers interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS"; }
-enabled nvenc && require_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 6"
-enabled omx && require_header OMX_Core.h
-enabled omx_rpi && { check_header OMX_Core.h ||
- { ! enabled cross_compile && add_cflags -isystem/opt/vc/include/IL && check_header OMX_Core.h ; } ||
+enabled nvenc && require_cpp_condition nvenc nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 6"
+enabled omx && require_headers OMX_Core.h
+enabled omx_rpi && { check_headers OMX_Core.h ||
+ { ! enabled cross_compile && add_cflags -isystem/opt/vc/include/IL && check_headers OMX_Core.h ; } ||
die "ERROR: OpenMAX IL headers not found"; } && enable omx
enabled openssl && { { check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||
check_pkg_config openssl openssl openssl/ssl.h SSL_library_init; } ||
enabled avplay &&
test_pkg_config sdl "sdl >= 1.2.1 sdl < 1.3.0" SDL_events.h SDL_PollEvent
-check_header linux/fb.h
-check_header linux/videodev2.h
+check_headers linux/fb.h
+check_headers linux/videodev2.h
check_struct linux/videodev2.h "struct v4l2_frmivalenum" discrete
-check_header AVFoundation/AVFoundation.h
+check_headers AVFoundation/AVFoundation.h
-check_header sys/videoio.h
+check_headers sys/videoio.h
check_lib user32 "windows.h winuser.h" GetShellWindow -luser32
check_lib vfw32 "windows.h vfw.h" capCreateCaptureWindow -lvfw32
check_cpp_condition vfwcap_defines vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER"
# check for ioctl_meteor.h, ioctl_bt848.h and alternatives
-check_header "dev/bktr/ioctl_meteor.h dev/bktr/ioctl_bt848.h" ||
- check_header "machine/ioctl_meteor.h machine/ioctl_bt848.h" ||
- check_header "dev/video/meteor/ioctl_meteor.h dev/video/bktr/ioctl_bt848.h" ||
- check_header "dev/ic/bt8xx.h"
+check_headers "dev/bktr/ioctl_meteor.h dev/bktr/ioctl_bt848.h" ||
+ check_headers "machine/ioctl_meteor.h machine/ioctl_bt848.h" ||
+ check_headers "dev/video/meteor/ioctl_meteor.h dev/video/bktr/ioctl_bt848.h" ||
+ check_headers "dev/ic/bt8xx.h"
-check_header sys/soundcard.h
+check_headers sys/soundcard.h
enabled alsa_indev &&
check_lib alsa alsa/asoundlib.h snd_pcm_htimestamp -lasound