2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2010-06-14 21:41:42 +02:00
|
|
|
#
|
|
|
|
# ffmpeg
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2011-03-01 17:20:00 +01:00
|
|
|
|
2020-01-04 13:09:14 +01:00
|
|
|
FFMPEG_VERSION = 4.2.2
|
2015-10-14 12:34:22 +02:00
|
|
|
FFMPEG_SOURCE = ffmpeg-$(FFMPEG_VERSION).tar.xz
|
2011-03-01 17:20:00 +01:00
|
|
|
FFMPEG_SITE = http://ffmpeg.org/releases
|
2010-06-14 21:41:42 +02:00
|
|
|
FFMPEG_INSTALL_STAGING = YES
|
|
|
|
|
2017-03-30 15:43:34 +02:00
|
|
|
FFMPEG_LICENSE = LGPL-2.1+, libjpeg license
|
2014-10-02 12:11:01 +02:00
|
|
|
FFMPEG_LICENSE_FILES = LICENSE.md COPYING.LGPLv2.1
|
2013-02-07 12:02:33 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_FFMPEG_GPL),y)
|
2017-03-30 15:43:32 +02:00
|
|
|
FFMPEG_LICENSE += and GPL-2.0+
|
2013-02-07 12:02:33 +01:00
|
|
|
FFMPEG_LICENSE_FILES += COPYING.GPLv2
|
|
|
|
endif
|
|
|
|
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS = \
|
2014-10-03 11:50:46 +02:00
|
|
|
--prefix=/usr \
|
2014-01-02 18:59:44 +01:00
|
|
|
--enable-avfilter \
|
|
|
|
--disable-version3 \
|
|
|
|
--enable-logging \
|
|
|
|
--enable-optimizations \
|
|
|
|
--disable-extra-warnings \
|
|
|
|
--enable-avdevice \
|
|
|
|
--enable-avcodec \
|
|
|
|
--enable-avformat \
|
|
|
|
--enable-network \
|
|
|
|
--disable-gray \
|
|
|
|
--enable-swscale-alpha \
|
|
|
|
--disable-small \
|
|
|
|
--enable-dct \
|
|
|
|
--enable-fft \
|
|
|
|
--enable-mdct \
|
|
|
|
--enable-rdft \
|
|
|
|
--disable-crystalhd \
|
|
|
|
--disable-dxva2 \
|
|
|
|
--enable-runtime-cpudetect \
|
|
|
|
--disable-hardcoded-tables \
|
2016-08-15 17:03:36 +02:00
|
|
|
--disable-mipsdsp \
|
2015-10-14 17:58:22 +02:00
|
|
|
--disable-mipsdspr2 \
|
2015-07-24 20:13:47 +02:00
|
|
|
--disable-msa \
|
2014-01-02 18:59:44 +01:00
|
|
|
--enable-hwaccels \
|
2017-07-22 17:13:06 +02:00
|
|
|
--disable-cuda \
|
|
|
|
--disable-cuvid \
|
|
|
|
--disable-nvenc \
|
2014-01-02 18:59:44 +01:00
|
|
|
--disable-avisynth \
|
|
|
|
--disable-frei0r \
|
|
|
|
--disable-libopencore-amrnb \
|
|
|
|
--disable-libopencore-amrwb \
|
|
|
|
--disable-libdc1394 \
|
|
|
|
--disable-libgsm \
|
2015-10-17 14:31:58 +02:00
|
|
|
--disable-libilbc \
|
2014-01-02 18:59:44 +01:00
|
|
|
--disable-libvo-amrwbenc \
|
|
|
|
--disable-symver \
|
2014-02-05 14:50:56 +01:00
|
|
|
--disable-doc
|
2010-06-14 21:41:42 +02:00
|
|
|
|
2017-12-18 07:29:10 +01:00
|
|
|
FFMPEG_DEPENDENCIES += host-pkgconf
|
2014-01-02 18:59:44 +01:00
|
|
|
|
2010-06-14 21:41:42 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_FFMPEG_GPL),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-gpl
|
2010-06-14 21:41:42 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-gpl
|
2010-06-14 21:41:42 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_FFMPEG_NONFREE),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-nonfree
|
2010-06-14 21:41:42 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-nonfree
|
2010-06-14 21:41:42 +02:00
|
|
|
endif
|
|
|
|
|
2010-06-14 21:41:43 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_FFMPEG_FFMPEG),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-ffmpeg
|
2010-06-14 21:41:43 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-ffmpeg
|
2010-06-14 21:41:43 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_FFMPEG_FFPLAY),y)
|
2016-12-06 15:32:37 +01:00
|
|
|
FFMPEG_DEPENDENCIES += sdl2
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-ffplay
|
2016-12-06 15:32:37 +01:00
|
|
|
FFMPEG_CONF_ENV += SDL_CONFIG=$(STAGING_DIR)/usr/bin/sdl2-config
|
2010-06-14 21:41:43 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-ffplay
|
2010-06-14 21:41:43 +02:00
|
|
|
endif
|
|
|
|
|
2014-10-14 20:28:24 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_FFMPEG_AVRESAMPLE),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-avresample
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-avresample
|
|
|
|
endif
|
|
|
|
|
2014-12-02 01:55:35 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_FFMPEG_FFPROBE),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-ffprobe
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-ffprobe
|
|
|
|
endif
|
|
|
|
|
2010-10-07 09:54:00 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_FFMPEG_POSTPROC),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-postproc
|
2010-10-07 09:54:00 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-postproc
|
2010-10-07 09:54:00 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-swscale
|
2010-10-07 09:54:00 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-swscale
|
2010-10-07 09:54:00 +02:00
|
|
|
endif
|
|
|
|
|
2010-06-14 21:41:44 +02:00
|
|
|
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),all)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-encoders \
|
2010-06-14 21:41:44 +02:00
|
|
|
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),--enable-encoder=$(x))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_DECODERS)),all)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-decoders \
|
2010-06-14 21:41:44 +02:00
|
|
|
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_DECODERS)),--enable-decoder=$(x))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_MUXERS)),all)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-muxers \
|
2010-06-14 21:41:44 +02:00
|
|
|
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_MUXERS)),--enable-muxer=$(x))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_DEMUXERS)),all)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-demuxers \
|
2010-06-14 21:41:44 +02:00
|
|
|
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_DEMUXERS)),--enable-demuxer=$(x))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_PARSERS)),all)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-parsers \
|
2010-06-14 21:41:44 +02:00
|
|
|
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_PARSERS)),--enable-parser=$(x))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_BSFS)),all)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-bsfs \
|
2014-01-02 18:59:44 +01:00
|
|
|
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_BSFS)),--enable-bsfs=$(x))
|
2010-06-14 21:41:44 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_PROTOCOLS)),all)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-protocols \
|
2010-06-14 21:41:44 +02:00
|
|
|
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_PROTOCOLS)),--enable-protocol=$(x))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_FILTERS)),all)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-filters \
|
2010-06-14 21:41:44 +02:00
|
|
|
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_FILTERS)),--enable-filter=$(x))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_FFMPEG_INDEVS),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-indevs
|
2017-06-01 22:39:29 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
|
2017-12-18 07:29:10 +01:00
|
|
|
FFMPEG_CONF_OPTS += --enable-alsa
|
2017-06-01 22:39:29 +02:00
|
|
|
FFMPEG_DEPENDENCIES += alsa-lib
|
2017-12-18 07:29:10 +01:00
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-alsa
|
2017-06-01 22:39:29 +02:00
|
|
|
endif
|
2010-06-14 21:41:44 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-indevs
|
2010-06-14 21:41:44 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_FFMPEG_OUTDEVS),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-outdevs
|
2017-06-01 22:39:29 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
|
|
|
|
FFMPEG_DEPENDENCIES += alsa-lib
|
|
|
|
endif
|
2010-06-14 21:41:44 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-outdevs
|
2010-06-14 21:41:44 +02:00
|
|
|
endif
|
|
|
|
|
2010-12-13 17:27:44 +01:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-pthreads
|
2010-12-13 17:27:44 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-pthreads
|
2010-06-14 21:41:42 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-zlib
|
2010-06-14 21:41:42 +02:00
|
|
|
FFMPEG_DEPENDENCIES += zlib
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-zlib
|
2010-06-14 21:41:42 +02:00
|
|
|
endif
|
|
|
|
|
2014-01-02 18:59:44 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_BZIP2),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-bzlib
|
2014-01-02 18:59:44 +01:00
|
|
|
FFMPEG_DEPENDENCIES += bzip2
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-bzlib
|
2014-01-02 18:59:44 +01:00
|
|
|
endif
|
|
|
|
|
2015-10-17 14:31:58 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_FDK_AAC)$(BR2_PACKAGE_FFMPEG_NONFREE),yy)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-libfdk-aac
|
|
|
|
FFMPEG_DEPENDENCIES += fdk-aac
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-libfdk-aac
|
|
|
|
endif
|
|
|
|
|
2018-04-02 10:46:17 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_FFMPEG_GPL)$(BR2_PACKAGE_LIBCDIO_PARANOIA),yy)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-libcdio
|
|
|
|
FFMPEG_DEPENDENCIES += libcdio-paranoia
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-libcdio
|
|
|
|
endif
|
|
|
|
|
2015-10-17 21:38:56 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_GNUTLS),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-gnutls --disable-openssl
|
|
|
|
FFMPEG_DEPENDENCIES += gnutls
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-gnutls
|
2018-04-02 13:58:26 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
2014-01-13 13:11:39 +01:00
|
|
|
# openssl isn't license compatible with GPL
|
|
|
|
ifeq ($(BR2_PACKAGE_FFMPEG_GPL)x$(BR2_PACKAGE_FFMPEG_NONFREE),yx)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-openssl
|
2014-01-13 13:11:39 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-openssl
|
2018-04-02 13:58:26 +02:00
|
|
|
FFMPEG_DEPENDENCIES += openssl
|
2014-01-13 13:11:39 +01:00
|
|
|
endif
|
2014-01-02 18:59:44 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-openssl
|
2014-01-02 18:59:44 +01:00
|
|
|
endif
|
2015-10-17 21:38:56 +02:00
|
|
|
endif
|
2014-01-02 18:59:44 +01:00
|
|
|
|
2016-07-24 17:53:18 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_FFMPEG_GPL)$(BR2_PACKAGE_LIBEBUR128),yy)
|
|
|
|
FFMPEG_DEPENDENCIES += libebur128
|
|
|
|
endif
|
|
|
|
|
2018-07-09 19:47:44 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBDRM),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-libdrm
|
|
|
|
FFMPEG_DEPENDENCIES += libdrm
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-libdrm
|
|
|
|
endif
|
|
|
|
|
2015-10-17 14:31:58 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBOPENH264),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-libopenh264
|
|
|
|
FFMPEG_DEPENDENCIES += libopenh264
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-libopenh264
|
|
|
|
endif
|
|
|
|
|
2014-01-02 18:59:44 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBVORBIS),y)
|
|
|
|
FFMPEG_DEPENDENCIES += libvorbis
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += \
|
2014-01-02 18:59:44 +01:00
|
|
|
--enable-libvorbis \
|
|
|
|
--enable-muxer=ogg \
|
|
|
|
--enable-encoder=libvorbis
|
|
|
|
endif
|
|
|
|
|
2014-07-15 21:19:03 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBVA),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-vaapi
|
2014-07-15 21:19:03 +02:00
|
|
|
FFMPEG_DEPENDENCIES += libva
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-vaapi
|
2014-07-15 21:19:03 +02:00
|
|
|
endif
|
|
|
|
|
2016-07-07 22:49:14 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBVDPAU),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-vdpau
|
|
|
|
FFMPEG_DEPENDENCIES += libvdpau
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-vdpau
|
|
|
|
endif
|
|
|
|
|
2018-01-01 13:44:28 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
|
2017-09-14 17:01:56 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-mmal --enable-omx --enable-omx-rpi \
|
|
|
|
--extra-cflags=-I$(STAGING_DIR)/usr/include/IL
|
2018-01-01 13:44:28 +01:00
|
|
|
FFMPEG_DEPENDENCIES += rpi-userland
|
2017-09-14 17:01:56 +02:00
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-mmal --disable-omx --disable-omx-rpi
|
|
|
|
endif
|
|
|
|
|
2016-08-15 17:03:39 +02:00
|
|
|
# To avoid a circular dependency only use opencv if opencv itself does
|
|
|
|
# not depend on ffmpeg.
|
|
|
|
ifeq ($(BR2_PACKAGE_OPENCV_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV_WITH_FFMPEG),yx)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-libopencv
|
|
|
|
FFMPEG_DEPENDENCIES += opencv
|
2016-09-05 16:51:20 +02:00
|
|
|
else ifeq ($(BR2_PACKAGE_OPENCV3_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV3_WITH_FFMPEG),yx)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-libopencv
|
|
|
|
FFMPEG_DEPENDENCIES += opencv3
|
2016-08-15 17:03:39 +02:00
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-libopencv
|
|
|
|
endif
|
|
|
|
|
2014-09-30 15:28:05 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_OPUS),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-libopus
|
2014-09-30 15:28:05 +02:00
|
|
|
FFMPEG_DEPENDENCIES += opus
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-libopus
|
2014-09-30 15:28:05 +02:00
|
|
|
endif
|
|
|
|
|
2014-09-30 15:28:04 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBVPX),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-libvpx
|
2014-09-30 15:28:04 +02:00
|
|
|
FFMPEG_DEPENDENCIES += libvpx
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-libvpx
|
2014-09-30 15:28:04 +02:00
|
|
|
endif
|
|
|
|
|
2015-08-01 16:20:41 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBASS),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-libass
|
|
|
|
FFMPEG_DEPENDENCIES += libass
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-libass
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBBLURAY),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-libbluray
|
|
|
|
FFMPEG_DEPENDENCIES += libbluray
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-libbluray
|
|
|
|
endif
|
|
|
|
|
2019-02-05 19:19:46 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_INTEL_MEDIASDK),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-libmfx
|
|
|
|
FFMPEG_DEPENDENCIES += intel-mediasdk
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-libmfx
|
|
|
|
endif
|
|
|
|
|
2015-08-01 16:20:41 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_RTMPDUMP),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-librtmp
|
|
|
|
FFMPEG_DEPENDENCIES += rtmpdump
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-librtmp
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LAME),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-libmp3lame
|
|
|
|
FFMPEG_DEPENDENCIES += lame
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-libmp3lame
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBMODPLUG),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-libmodplug
|
|
|
|
FFMPEG_DEPENDENCIES += libmodplug
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-libmodplug
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_SPEEX),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-libspeex
|
|
|
|
FFMPEG_DEPENDENCIES += speex
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-libspeex
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBTHEORA),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-libtheora
|
|
|
|
FFMPEG_DEPENDENCIES += libtheora
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-libtheora
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_WAVPACK),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-libwavpack
|
|
|
|
FFMPEG_DEPENDENCIES += wavpack
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-libwavpack
|
|
|
|
endif
|
|
|
|
|
2017-12-18 07:29:10 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBICONV),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-iconv
|
|
|
|
FFMPEG_DEPENDENCIES += libiconv
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-iconv
|
|
|
|
endif
|
|
|
|
|
2015-01-27 02:22:35 +01:00
|
|
|
# ffmpeg freetype support require fenv.h which is only
|
2015-01-31 08:18:30 +01:00
|
|
|
# available/working on glibc.
|
|
|
|
# The microblaze variant doesn't provide the needed exceptions
|
|
|
|
ifeq ($(BR2_PACKAGE_FREETYPE)$(BR2_TOOLCHAIN_USES_GLIBC)x$(BR2_microblaze),yyx)
|
2015-01-27 02:22:35 +01:00
|
|
|
FFMPEG_CONF_OPTS += --enable-libfreetype
|
|
|
|
FFMPEG_DEPENDENCIES += freetype
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-libfreetype
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-fontconfig
|
|
|
|
FFMPEG_DEPENDENCIES += fontconfig
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-fontconfig
|
|
|
|
endif
|
|
|
|
|
2017-12-18 07:29:11 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_OPENJPEG),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-libopenjpeg
|
|
|
|
FFMPEG_DEPENDENCIES += openjpeg
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-libopenjpeg
|
|
|
|
endif
|
|
|
|
|
2014-10-05 18:29:57 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_X264)$(BR2_PACKAGE_FFMPEG_GPL),yy)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-libx264
|
|
|
|
FFMPEG_DEPENDENCIES += x264
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-libx264
|
|
|
|
endif
|
|
|
|
|
2015-11-01 19:47:29 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_X265)$(BR2_PACKAGE_FFMPEG_GPL),yy)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-libx265
|
|
|
|
FFMPEG_DEPENDENCIES += x265
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-libx265
|
|
|
|
endif
|
|
|
|
|
2019-08-10 10:00:22 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_DAV1D),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-libdav1d
|
|
|
|
FFMPEG_DEPENDENCIES += dav1d
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-libdav1d
|
|
|
|
endif
|
|
|
|
|
2014-01-02 18:59:44 +01:00
|
|
|
ifeq ($(BR2_X86_CPU_HAS_MMX),y)
|
2017-12-18 07:29:10 +01:00
|
|
|
FFMPEG_CONF_OPTS += --enable-x86asm
|
|
|
|
FFMPEG_DEPENDENCIES += host-nasm
|
2014-01-02 18:59:44 +01:00
|
|
|
else
|
2017-12-18 07:29:10 +01:00
|
|
|
FFMPEG_CONF_OPTS += --disable-x86asm
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-mmx
|
2014-01-02 18:59:44 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_X86_CPU_HAS_SSE),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-sse
|
2014-01-02 18:59:44 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-sse
|
2014-01-02 18:59:44 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_X86_CPU_HAS_SSE2),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-sse2
|
2012-01-22 13:04:16 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-sse2
|
2012-01-22 13:04:16 +01:00
|
|
|
endif
|
2014-01-02 18:59:44 +01:00
|
|
|
|
|
|
|
ifeq ($(BR2_X86_CPU_HAS_SSE3),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-sse3
|
2014-01-02 18:59:44 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-sse3
|
2014-01-02 18:59:44 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_X86_CPU_HAS_SSSE3),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-ssse3
|
2014-01-02 18:59:44 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-ssse3
|
2011-02-28 15:18:21 +01:00
|
|
|
endif
|
|
|
|
|
2014-01-02 18:59:45 +01:00
|
|
|
ifeq ($(BR2_X86_CPU_HAS_SSE4),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-sse4
|
2014-01-02 18:59:45 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-sse4
|
2014-01-02 18:59:45 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_X86_CPU_HAS_SSE42),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-sse42
|
2014-01-02 18:59:45 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-sse42
|
2014-01-02 18:59:45 +01:00
|
|
|
endif
|
|
|
|
|
2015-03-18 23:01:11 +01:00
|
|
|
ifeq ($(BR2_X86_CPU_HAS_AVX),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-avx
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-avx
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_X86_CPU_HAS_AVX2),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-avx2
|
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-avx2
|
|
|
|
endif
|
|
|
|
|
2012-12-21 03:40:31 +01:00
|
|
|
# Explicitly disable everything that doesn't match for ARM
|
|
|
|
# FFMPEG "autodetects" by compiling an extended instruction via AS
|
|
|
|
# This works on compilers that aren't built for generic by default
|
2014-10-21 22:26:49 +02:00
|
|
|
ifeq ($(BR2_ARM_CPU_ARMV4),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-armv5te
|
2011-03-01 17:20:00 +01:00
|
|
|
endif
|
2014-10-21 22:26:49 +02:00
|
|
|
ifeq ($(BR2_ARM_CPU_ARMV6)$(BR2_ARM_CPU_ARMV7A),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-armv6
|
2012-12-21 03:40:31 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-armv6 --disable-armv6t2
|
2011-03-01 17:20:00 +01:00
|
|
|
endif
|
2014-10-21 22:26:50 +02:00
|
|
|
ifeq ($(BR2_ARM_CPU_HAS_VFPV2),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-vfp
|
2012-12-21 03:40:31 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-vfp
|
2011-03-01 17:20:00 +01:00
|
|
|
endif
|
2012-12-13 23:25:30 +01:00
|
|
|
ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-neon
|
2017-04-14 11:30:26 +02:00
|
|
|
else ifeq ($(BR2_aarch64),y)
|
|
|
|
FFMPEG_CONF_OPTS += --enable-neon
|
2016-08-10 23:29:03 +02:00
|
|
|
else
|
|
|
|
FFMPEG_CONF_OPTS += --disable-neon
|
2011-03-01 17:20:00 +01:00
|
|
|
endif
|
2012-12-21 03:40:31 +01:00
|
|
|
|
2016-08-10 23:29:04 +02:00
|
|
|
ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y)
|
2014-01-13 22:23:06 +01:00
|
|
|
ifeq ($(BR2_MIPS_SOFT_FLOAT),y)
|
2016-07-02 15:32:15 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-mipsfpu
|
2014-01-13 22:23:06 +01:00
|
|
|
else
|
2016-07-02 15:32:15 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-mipsfpu
|
2014-01-13 22:23:06 +01:00
|
|
|
endif
|
2019-04-07 09:58:16 +02:00
|
|
|
|
2019-05-07 22:35:22 +02:00
|
|
|
# Fix build failure on "addi opcode not supported"
|
2019-04-07 09:58:16 +02:00
|
|
|
ifeq ($(BR2_mips_32r6)$(BR2_mips_64r6),y)
|
|
|
|
FFMPEG_CONF_OPTS += --disable-asm
|
|
|
|
endif
|
2016-08-10 23:29:04 +02:00
|
|
|
endif # MIPS
|
2014-01-13 22:23:06 +01:00
|
|
|
|
2014-05-13 07:28:17 +02:00
|
|
|
ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-altivec
|
2011-05-12 22:12:40 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-altivec
|
2011-05-12 22:12:40 +02:00
|
|
|
endif
|
2011-03-01 17:20:00 +01:00
|
|
|
|
2017-04-15 12:22:36 +02:00
|
|
|
# Uses __atomic_fetch_add_4
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
|
|
|
FFMPEG_CONF_OPTS += --extra-libs=-latomic
|
|
|
|
endif
|
|
|
|
|
2014-12-03 22:41:29 +01:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),)
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --enable-pic
|
2014-09-09 04:06:44 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FFMPEG_CONF_OPTS += --disable-pic
|
2014-01-02 18:59:44 +01:00
|
|
|
endif
|
|
|
|
|
2016-08-15 17:03:37 +02:00
|
|
|
# Default to --cpu=generic for MIPS architecture, in order to avoid a
|
|
|
|
# warning from ffmpeg's configure script.
|
|
|
|
ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y)
|
|
|
|
FFMPEG_CONF_OPTS += --cpu=generic
|
2018-09-12 12:22:53 +02:00
|
|
|
else ifneq ($(GCC_TARGET_CPU),)
|
|
|
|
FFMPEG_CONF_OPTS += --cpu="$(GCC_TARGET_CPU)"
|
|
|
|
else ifneq ($(GCC_TARGET_ARCH),)
|
|
|
|
FFMPEG_CONF_OPTS += --cpu="$(GCC_TARGET_ARCH)"
|
2014-10-21 22:27:10 +02:00
|
|
|
endif
|
|
|
|
|
package/ffmpeg: re-enable package if gcc bug 85180 is present
With Microblaze Gcc version < 8.x the build hangs due to gcc bug
85180: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180. To avoid
this problem, until now, ffmpeg could not be selected on
Microblaze. However, this problem only happens due to optimization,
and can worked around by forcing -O0.
So, when BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y, this commit:
- adds --disable-optimizations to FFMPEG_CONF_OPTS
- passes -O0 to CFLAGS in FFMPEG_CONF_ENV
Then, we remove 'depends on !BR2_microblaze' from Config.in to
re-enable the package.
Note that the comment was talking about gcc bug 71124, but this gcc
bug is a duplicate of 85180. Since all Buildroot packages now use the
reference to gcc bug 85180 and the option is named
BR2_TOOLCHAIN_HAS_GCC_BUG_85180, we use this naming as well for
ffmpeg.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
[Thomas: tweak CFLAGS logic, improve commit log]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-05-22 15:59:01 +02:00
|
|
|
FFMPEG_CFLAGS = $(TARGET_CFLAGS)
|
|
|
|
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
|
|
|
|
FFMPEG_CONF_OPTS += --disable-optimizations
|
|
|
|
FFMPEG_CFLAGS += -O0
|
|
|
|
endif
|
|
|
|
|
|
|
|
FFMPEG_CONF_ENV += CFLAGS="$(FFMPEG_CFLAGS)"
|
2015-10-15 14:22:55 +02:00
|
|
|
FFMPEG_CONF_OPTS += $(call qstrip,$(BR2_PACKAGE_FFMPEG_EXTRACONF))
|
|
|
|
|
2010-06-14 21:41:42 +02:00
|
|
|
# Override FFMPEG_CONFIGURE_CMDS: FFmpeg does not support --target and others
|
|
|
|
define FFMPEG_CONFIGURE_CMDS
|
|
|
|
(cd $(FFMPEG_SRCDIR) && rm -rf config.cache && \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
|
|
|
$(FFMPEG_CONF_ENV) \
|
|
|
|
./configure \
|
2014-10-03 11:50:46 +02:00
|
|
|
--enable-cross-compile \
|
2010-06-14 21:41:42 +02:00
|
|
|
--cross-prefix=$(TARGET_CROSS) \
|
|
|
|
--sysroot=$(STAGING_DIR) \
|
2011-01-01 11:49:01 +01:00
|
|
|
--host-cc="$(HOSTCC)" \
|
2010-06-14 21:41:42 +02:00
|
|
|
--arch=$(BR2_ARCH) \
|
2014-01-02 18:59:44 +01:00
|
|
|
--target-os="linux" \
|
2014-08-10 14:46:46 +02:00
|
|
|
--disable-stripping \
|
2014-09-09 04:06:46 +02:00
|
|
|
--pkg-config="$(PKG_CONFIG_HOST_BINARY)" \
|
2011-06-20 17:59:54 +02:00
|
|
|
$(SHARED_STATIC_LIBS_OPTS) \
|
2014-09-27 21:32:44 +02:00
|
|
|
$(FFMPEG_CONF_OPTS) \
|
2010-06-14 21:41:42 +02:00
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
2017-02-16 04:13:29 +01:00
|
|
|
define FFMPEG_REMOVE_EXAMPLE_SRC_FILES
|
|
|
|
rm -rf $(TARGET_DIR)/usr/share/ffmpeg/examples
|
|
|
|
endef
|
|
|
|
FFMPEG_POST_INSTALL_TARGET_HOOKS += FFMPEG_REMOVE_EXAMPLE_SRC_FILES
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|