2016-01-27 15:11:12 +00:00
|
|
|
SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video."
|
|
|
|
DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, \
|
|
|
|
mux, demux, stream, filter and play pretty much anything that humans and machines \
|
|
|
|
have created. It supports the most obscure ancient formats up to the cutting edge."
|
|
|
|
HOMEPAGE = "https://www.ffmpeg.org/"
|
2013-08-05 16:47:39 +00:00
|
|
|
SECTION = "libs"
|
2014-06-30 14:23:21 +00:00
|
|
|
|
2013-08-05 16:47:39 +00:00
|
|
|
LICENSE = "GPLv2+"
|
|
|
|
LICENSE_FLAGS = "commercial"
|
|
|
|
|
2014-08-08 14:02:37 +00:00
|
|
|
LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
|
|
|
file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
|
|
|
|
file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
|
|
|
|
file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
|
|
|
|
|
2016-01-27 15:11:12 +00:00
|
|
|
SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz"
|
2014-08-08 14:02:37 +00:00
|
|
|
|
2016-02-24 13:53:37 +00:00
|
|
|
SRC_URI[md5sum] = "ef9b6634bb7c920efc940b4d55adf7b2"
|
|
|
|
SRC_URI[sha256sum] = "12f32cee41c74435f608c30793fd616bdf53467bb513278e273e135a4c58e470"
|
|
|
|
|
|
|
|
# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
|
|
|
|
ARM_INSTRUCTION_SET = "arm"
|
2013-08-05 16:47:39 +00:00
|
|
|
|
2016-01-27 15:11:12 +00:00
|
|
|
# Should be API compatible with libav (which was a fork of ffmpeg)
|
|
|
|
# libpostproc was previously packaged from a separate recipe
|
|
|
|
PROVIDES = "libav libpostproc"
|
2013-08-05 16:47:39 +00:00
|
|
|
|
2016-02-10 12:42:39 +00:00
|
|
|
DEPENDS = "alsa-lib zlib libogg yasm-native"
|
2013-08-05 16:47:39 +00:00
|
|
|
|
|
|
|
inherit autotools pkgconfig
|
|
|
|
|
2016-02-26 14:14:16 +00:00
|
|
|
PACKAGECONFIG ??= "avdevice avfilter bzlib gpl lzma theora x264 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xv', '', d)}"
|
|
|
|
PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
|
2015-12-02 10:45:11 +00:00
|
|
|
PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter"
|
2016-02-26 14:14:16 +00:00
|
|
|
PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2"
|
2014-06-30 14:23:21 +00:00
|
|
|
PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
|
2015-12-02 10:45:11 +00:00
|
|
|
PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
|
2013-08-05 16:47:39 +00:00
|
|
|
PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
|
2014-06-30 14:23:21 +00:00
|
|
|
PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
|
|
|
|
PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
|
2016-02-26 14:14:16 +00:00
|
|
|
PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz"
|
2013-08-05 16:47:39 +00:00
|
|
|
PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
|
2014-06-30 14:23:21 +00:00
|
|
|
PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
|
|
|
|
PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
|
|
|
|
PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
|
|
|
|
PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora"
|
2015-03-19 15:18:24 +00:00
|
|
|
PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
|
2014-06-30 14:23:21 +00:00
|
|
|
PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
|
2014-04-19 09:59:28 +00:00
|
|
|
PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto virtual/libsdl"
|
2014-06-30 14:23:21 +00:00
|
|
|
PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
|
2016-02-26 14:14:16 +00:00
|
|
|
PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
|
2014-06-30 14:23:21 +00:00
|
|
|
|
|
|
|
# Check codecs that require --enable-nonfree
|
|
|
|
USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}"
|
2013-08-05 16:47:39 +00:00
|
|
|
|
|
|
|
EXTRA_OECONF = " \
|
2016-01-27 15:11:12 +00:00
|
|
|
--disable-stripping \
|
|
|
|
--enable-pic \
|
2013-08-05 16:47:39 +00:00
|
|
|
--enable-shared \
|
|
|
|
--enable-pthreads \
|
2014-06-30 14:23:21 +00:00
|
|
|
${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
|
2013-08-05 16:47:39 +00:00
|
|
|
\
|
|
|
|
--cross-prefix=${TARGET_PREFIX} \
|
|
|
|
\
|
2013-11-26 19:34:55 +00:00
|
|
|
--ld="${CCLD}" \
|
2013-08-05 16:47:39 +00:00
|
|
|
--arch=${TARGET_ARCH} \
|
|
|
|
--target-os="linux" \
|
|
|
|
--enable-cross-compile \
|
|
|
|
--extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
|
|
|
|
--extra-ldflags="${TARGET_LDFLAGS}" \
|
|
|
|
--sysroot="${STAGING_DIR_TARGET}" \
|
|
|
|
--enable-hardcoded-tables \
|
|
|
|
${EXTRA_FFCONF} \
|
2013-11-26 06:26:46 +00:00
|
|
|
--libdir=${libdir} \
|
|
|
|
--shlibdir=${libdir} \
|
2016-01-27 15:11:12 +00:00
|
|
|
--datadir=${datadir}/ffmpeg \
|
2013-08-05 16:47:39 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
do_configure() {
|
|
|
|
${S}/configure ${EXTRA_OECONF}
|
|
|
|
}
|
|
|
|
|
2016-01-27 15:11:12 +00:00
|
|
|
PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|swscale).*"
|
2013-08-05 16:47:39 +00:00
|
|
|
|
|
|
|
python populate_packages_prepend() {
|
|
|
|
av_libdir = d.expand('${libdir}')
|
|
|
|
av_pkgconfig = d.expand('${libdir}/pkgconfig')
|
|
|
|
|
|
|
|
# Runtime package
|
|
|
|
do_split_packages(d, av_libdir, '^lib(.*)\.so\..*',
|
|
|
|
output_pattern='lib%s',
|
|
|
|
description='libav %s library',
|
|
|
|
extra_depends='',
|
|
|
|
prepend=True,
|
|
|
|
allow_links=True)
|
|
|
|
|
|
|
|
# Development packages (-dev, -staticdev)
|
|
|
|
do_split_packages(d, av_libdir, '^lib(.*)\.so$',
|
|
|
|
output_pattern='lib%s-dev',
|
|
|
|
description='libav %s development package',
|
|
|
|
extra_depends='${PN}-dev',
|
|
|
|
prepend=True,
|
|
|
|
allow_links=True)
|
|
|
|
do_split_packages(d, av_pkgconfig, '^lib(.*)\.pc$',
|
|
|
|
output_pattern='lib%s-dev',
|
|
|
|
description='libav %s development package',
|
|
|
|
extra_depends='${PN}-dev',
|
|
|
|
prepend=True)
|
|
|
|
do_split_packages(d, av_libdir, '^lib(.*)\.a$',
|
|
|
|
output_pattern='lib%s-staticdev',
|
|
|
|
description='libav %s development package - static library',
|
|
|
|
extra_depends='${PN}-dev',
|
|
|
|
prepend=True,
|
|
|
|
allow_links=True)
|
|
|
|
|
|
|
|
}
|