diff options
3 files changed, 283 insertions, 0 deletions
diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc index 89aa822e6..d9c168118 100644 --- a/conf/machine/include/imx-base.inc +++ b/conf/machine/include/imx-base.inc | |||
| @@ -397,6 +397,7 @@ PREFERRED_VERSION_gstreamer1.0-plugins-bad:mx8-nxp-bsp ?= "1.18.5.imx" | |||
| 397 | PREFERRED_VERSION_gstreamer1.0-plugins-ugly:mx8-nxp-bsp ?= "1.18.5" | 397 | PREFERRED_VERSION_gstreamer1.0-plugins-ugly:mx8-nxp-bsp ?= "1.18.5" |
| 398 | PREFERRED_VERSION_gstreamer1.0-libav:mx8-nxp-bsp ?= "1.18.5" | 398 | PREFERRED_VERSION_gstreamer1.0-libav:mx8-nxp-bsp ?= "1.18.5" |
| 399 | PREFERRED_VERSION_gstreamer1.0-rtsp-server:mx8-nxp-bsp ?= "1.18.5" | 399 | PREFERRED_VERSION_gstreamer1.0-rtsp-server:mx8-nxp-bsp ?= "1.18.5" |
| 400 | PREFERRED_VERSION_ffmpeg:mx8-nxp-bsp ?= "4.4.1" | ||
| 400 | 401 | ||
| 401 | # Determines if the SoC has support for Vivante kernel driver | 402 | # Determines if the SoC has support for Vivante kernel driver |
| 402 | SOC_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT = "0" | 403 | SOC_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT = "0" |
diff --git a/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch b/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch new file mode 100644 index 000000000..2b4ca0e9b --- /dev/null +++ b/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch | |||
| @@ -0,0 +1,97 @@ | |||
| 1 | From 24a58d70cbb3997e471366bd5afe54be9007bfb1 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
| 3 | Date: Tue, 10 Nov 2020 15:32:14 +0000 | ||
| 4 | Subject: [PATCH] libavutil: include assembly with full path from source root | ||
| 5 | |||
| 6 | Otherwise nasm writes the full host-specific paths into .o | ||
| 7 | output, which breaks binary reproducibility. | ||
| 8 | |||
| 9 | Upstream-Status: Submitted [by email to jamrial@gmail.com,ffmpeg-devel@ffmpeg.org] | ||
| 10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
| 11 | --- | ||
| 12 | libavutil/x86/cpuid.asm | 2 +- | ||
| 13 | libavutil/x86/emms.asm | 2 +- | ||
| 14 | libavutil/x86/fixed_dsp.asm | 2 +- | ||
| 15 | libavutil/x86/float_dsp.asm | 2 +- | ||
| 16 | libavutil/x86/lls.asm | 2 +- | ||
| 17 | libavutil/x86/pixelutils.asm | 2 +- | ||
| 18 | 6 files changed, 6 insertions(+), 6 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/libavutil/x86/cpuid.asm b/libavutil/x86/cpuid.asm | ||
| 21 | index c3f7866..766f77f 100644 | ||
| 22 | --- a/libavutil/x86/cpuid.asm | ||
| 23 | +++ b/libavutil/x86/cpuid.asm | ||
| 24 | @@ -21,7 +21,7 @@ | ||
| 25 | ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 26 | ;****************************************************************************** | ||
| 27 | |||
| 28 | -%include "x86util.asm" | ||
| 29 | +%include "libavutil/x86/x86util.asm" | ||
| 30 | |||
| 31 | SECTION .text | ||
| 32 | |||
| 33 | diff --git a/libavutil/x86/emms.asm b/libavutil/x86/emms.asm | ||
| 34 | index 8611762..df84f22 100644 | ||
| 35 | --- a/libavutil/x86/emms.asm | ||
| 36 | +++ b/libavutil/x86/emms.asm | ||
| 37 | @@ -18,7 +18,7 @@ | ||
| 38 | ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 39 | ;****************************************************************************** | ||
| 40 | |||
| 41 | -%include "x86util.asm" | ||
| 42 | +%include "libavutil/x86/x86util.asm" | ||
| 43 | |||
| 44 | SECTION .text | ||
| 45 | |||
| 46 | diff --git a/libavutil/x86/fixed_dsp.asm b/libavutil/x86/fixed_dsp.asm | ||
| 47 | index 979dd5c..2f41185 100644 | ||
| 48 | --- a/libavutil/x86/fixed_dsp.asm | ||
| 49 | +++ b/libavutil/x86/fixed_dsp.asm | ||
| 50 | @@ -20,7 +20,7 @@ | ||
| 51 | ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 52 | ;****************************************************************************** | ||
| 53 | |||
| 54 | -%include "x86util.asm" | ||
| 55 | +%include "libavutil/x86/x86util.asm" | ||
| 56 | |||
| 57 | SECTION .text | ||
| 58 | |||
| 59 | diff --git a/libavutil/x86/float_dsp.asm b/libavutil/x86/float_dsp.asm | ||
| 60 | index 517fd63..b773e61 100644 | ||
| 61 | --- a/libavutil/x86/float_dsp.asm | ||
| 62 | +++ b/libavutil/x86/float_dsp.asm | ||
| 63 | @@ -20,7 +20,7 @@ | ||
| 64 | ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 65 | ;****************************************************************************** | ||
| 66 | |||
| 67 | -%include "x86util.asm" | ||
| 68 | +%include "libavutil/x86/x86util.asm" | ||
| 69 | |||
| 70 | SECTION_RODATA 32 | ||
| 71 | pd_reverse: dd 7, 6, 5, 4, 3, 2, 1, 0 | ||
| 72 | diff --git a/libavutil/x86/lls.asm b/libavutil/x86/lls.asm | ||
| 73 | index 317fba6..d2526d1 100644 | ||
| 74 | --- a/libavutil/x86/lls.asm | ||
| 75 | +++ b/libavutil/x86/lls.asm | ||
| 76 | @@ -20,7 +20,7 @@ | ||
| 77 | ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 78 | ;****************************************************************************** | ||
| 79 | |||
| 80 | -%include "x86util.asm" | ||
| 81 | +%include "libavutil/x86/x86util.asm" | ||
| 82 | |||
| 83 | SECTION .text | ||
| 84 | |||
| 85 | diff --git a/libavutil/x86/pixelutils.asm b/libavutil/x86/pixelutils.asm | ||
| 86 | index 36c57c5..8b45ead 100644 | ||
| 87 | --- a/libavutil/x86/pixelutils.asm | ||
| 88 | +++ b/libavutil/x86/pixelutils.asm | ||
| 89 | @@ -21,7 +21,7 @@ | ||
| 90 | ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 91 | ;****************************************************************************** | ||
| 92 | |||
| 93 | -%include "x86util.asm" | ||
| 94 | +%include "libavutil/x86/x86util.asm" | ||
| 95 | |||
| 96 | SECTION .text | ||
| 97 | |||
diff --git a/recipes-multimedia/ffmpeg/ffmpeg_4.4.1.bb b/recipes-multimedia/ffmpeg/ffmpeg_4.4.1.bb new file mode 100644 index 000000000..5b1dedcda --- /dev/null +++ b/recipes-multimedia/ffmpeg/ffmpeg_4.4.1.bb | |||
| @@ -0,0 +1,185 @@ | |||
| 1 | SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video." | ||
| 2 | DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, \ | ||
| 3 | mux, demux, stream, filter and play pretty much anything that humans and machines \ | ||
| 4 | have created. It supports the most obscure ancient formats up to the cutting edge." | ||
| 5 | HOMEPAGE = "https://www.ffmpeg.org/" | ||
| 6 | SECTION = "libs" | ||
| 7 | |||
| 8 | LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & ISC & MIT & BSD-2-Clause & BSD-3-Clause & IJG" | ||
| 9 | LICENSE:${PN} = "GPL-2.0-or-later" | ||
| 10 | LICENSE:libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" | ||
| 11 | LICENSE:libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" | ||
| 12 | LICENSE:libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" | ||
| 13 | LICENSE:libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" | ||
| 14 | LICENSE:libavresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" | ||
| 15 | LICENSE:libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" | ||
| 16 | LICENSE:libpostproc = "GPL-2.0-or-later" | ||
| 17 | LICENSE:libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" | ||
| 18 | LICENSE:libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" | ||
| 19 | LICENSE_FLAGS = "commercial" | ||
| 20 | |||
| 21 | LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
| 22 | file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ | ||
| 23 | file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ | ||
| 24 | file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" | ||
| 25 | |||
| 26 | SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \ | ||
| 27 | file://0001-libavutil-include-assembly-with-full-path-from-sourc.patch \ | ||
| 28 | " | ||
| 29 | SRC_URI[sha256sum] = "eadbad9e9ab30b25f5520fbfde99fae4a92a1ae3c0257a8d68569a4651e30e02" | ||
| 30 | |||
| 31 | # Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717 | ||
| 32 | ARM_INSTRUCTION_SET:armv4 = "arm" | ||
| 33 | ARM_INSTRUCTION_SET:armv5 = "arm" | ||
| 34 | ARM_INSTRUCTION_SET:armv6 = "arm" | ||
| 35 | |||
| 36 | # Should be API compatible with libav (which was a fork of ffmpeg) | ||
| 37 | # libpostproc was previously packaged from a separate recipe | ||
| 38 | PROVIDES = "libav libpostproc" | ||
| 39 | |||
| 40 | DEPENDS = "nasm-native" | ||
| 41 | |||
| 42 | inherit autotools pkgconfig | ||
| 43 | |||
| 44 | PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc avresample \ | ||
| 45 | alsa bzlib lzma pic pthreads shared theora zlib \ | ||
| 46 | ${@bb.utils.contains('AVAILTUNES', 'mips32r2', 'mips32r2', '', d)} \ | ||
| 47 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)}" | ||
| 48 | |||
| 49 | # libraries to build in addition to avutil | ||
| 50 | PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice" | ||
| 51 | PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter" | ||
| 52 | PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec" | ||
| 53 | PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat" | ||
| 54 | PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample" | ||
| 55 | PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale" | ||
| 56 | PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc" | ||
| 57 | PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample" | ||
| 58 | |||
| 59 | # features to support | ||
| 60 | PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" | ||
| 61 | PACKAGECONFIG[altivec] = "--enable-altivec,--disable-altivec," | ||
| 62 | PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2" | ||
| 63 | PACKAGECONFIG[fdk-aac] = "--enable-libfdk-aac --enable-nonfree,--disable-libfdk-aac,fdk-aac" | ||
| 64 | PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl" | ||
| 65 | PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm" | ||
| 66 | PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack" | ||
| 67 | PACKAGECONFIG[libopus] = "--enable-libopus,--disable-libopus,libopus" | ||
| 68 | PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis" | ||
| 69 | PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz" | ||
| 70 | PACKAGECONFIG[mfx] = "--enable-libmfx,--disable-libmfx,intel-mediasdk" | ||
| 71 | PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame" | ||
| 72 | PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" | ||
| 73 | PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2" | ||
| 74 | PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex" | ||
| 75 | PACKAGECONFIG[srt] = "--enable-libsrt,--disable-libsrt,srt" | ||
| 76 | PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg" | ||
| 77 | PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" | ||
| 78 | PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" | ||
| 79 | PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx" | ||
| 80 | PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264" | ||
| 81 | PACKAGECONFIG[x265] = "--enable-libx265,--disable-libx265,x265" | ||
| 82 | PACKAGECONFIG[xcb] = "--enable-libxcb,--disable-libxcb,libxcb" | ||
| 83 | PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv" | ||
| 84 | PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" | ||
| 85 | |||
| 86 | # other configuration options | ||
| 87 | PACKAGECONFIG[mips32r2] = ",--disable-mipsdsp --disable-mipsdspr2" | ||
| 88 | PACKAGECONFIG[pic] = "--enable-pic" | ||
| 89 | PACKAGECONFIG[pthreads] = "--enable-pthreads,--disable-pthreads" | ||
| 90 | PACKAGECONFIG[shared] = "--enable-shared" | ||
| 91 | PACKAGECONFIG[strip] = ",--disable-stripping" | ||
| 92 | |||
| 93 | # Check codecs that require --enable-nonfree | ||
| 94 | USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}" | ||
| 95 | |||
| 96 | def cpu(d): | ||
| 97 | for arg in (d.getVar('TUNE_CCARGS') or '').split(): | ||
| 98 | if arg.startswith('-mcpu='): | ||
| 99 | return arg[6:] | ||
| 100 | return 'generic' | ||
| 101 | |||
| 102 | EXTRA_OECONF = " \ | ||
| 103 | ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \ | ||
| 104 | \ | ||
| 105 | --cross-prefix=${TARGET_PREFIX} \ | ||
| 106 | \ | ||
| 107 | --ld='${CCLD}' \ | ||
| 108 | --cc='${CC}' \ | ||
| 109 | --cxx='${CXX}' \ | ||
| 110 | --arch=${TARGET_ARCH} \ | ||
| 111 | --target-os='linux' \ | ||
| 112 | --enable-cross-compile \ | ||
| 113 | --extra-cflags='${CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}' \ | ||
| 114 | --extra-ldflags='${LDFLAGS}' \ | ||
| 115 | --sysroot='${STAGING_DIR_TARGET}' \ | ||
| 116 | ${EXTRA_FFCONF} \ | ||
| 117 | --libdir=${libdir} \ | ||
| 118 | --shlibdir=${libdir} \ | ||
| 119 | --datadir=${datadir}/ffmpeg \ | ||
| 120 | --cpu=${@cpu(d)} \ | ||
| 121 | --pkg-config=pkg-config \ | ||
| 122 | " | ||
| 123 | |||
| 124 | EXTRA_OECONF:append:linux-gnux32 = " --disable-asm" | ||
| 125 | |||
| 126 | EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', '--disable-mips64r2 --disable-mips32r2', '', d)}" | ||
| 127 | EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r2', '--disable-mips64r6 --disable-mips32r6', '', d)}" | ||
| 128 | EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r2', '--disable-mips64r6 --disable-mips32r6', '', d)}" | ||
| 129 | EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r6', '--disable-mips64r2 --disable-mips32r2', '', d)}" | ||
| 130 | EXTRA_OECONF:append:mips = " --extra-libs=-latomic --disable-mips32r5 --disable-mipsdsp --disable-mipsdspr2 \ | ||
| 131 | --disable-loongson2 --disable-loongson3 --disable-mmi --disable-msa --disable-msa2" | ||
| 132 | EXTRA_OECONF:append:riscv32 = " --extra-libs=-latomic" | ||
| 133 | EXTRA_OECONF:append:armv5 = " --extra-libs=-latomic" | ||
| 134 | EXTRA_OECONF:append:powerpc = " --extra-libs=-latomic" | ||
| 135 | |||
| 136 | # gold crashes on x86, another solution is to --disable-asm but thats more hacky | ||
| 137 | # ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684 | ||
| 138 | |||
| 139 | LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" | ||
| 140 | |||
| 141 | EXTRA_OEMAKE = "V=1" | ||
| 142 | |||
| 143 | do_configure() { | ||
| 144 | ${S}/configure ${EXTRA_OECONF} | ||
| 145 | } | ||
| 146 | |||
| 147 | # patch out build host paths for reproducibility | ||
| 148 | do_compile:prepend:class-target() { | ||
| 149 | sed -i -e "s,${WORKDIR},,g" ${B}/config.h | ||
| 150 | } | ||
| 151 | |||
| 152 | PACKAGES =+ "libavcodec \ | ||
| 153 | libavdevice \ | ||
| 154 | libavfilter \ | ||
| 155 | libavformat \ | ||
| 156 | libavresample \ | ||
| 157 | libavutil \ | ||
| 158 | libpostproc \ | ||
| 159 | libswresample \ | ||
| 160 | libswscale" | ||
| 161 | |||
| 162 | FILES:libavcodec = "${libdir}/libavcodec${SOLIBS}" | ||
| 163 | FILES:libavdevice = "${libdir}/libavdevice${SOLIBS}" | ||
| 164 | FILES:libavfilter = "${libdir}/libavfilter${SOLIBS}" | ||
| 165 | FILES:libavformat = "${libdir}/libavformat${SOLIBS}" | ||
| 166 | FILES:libavresample = "${libdir}/libavresample${SOLIBS}" | ||
| 167 | FILES:libavutil = "${libdir}/libavutil${SOLIBS}" | ||
| 168 | FILES:libpostproc = "${libdir}/libpostproc${SOLIBS}" | ||
| 169 | FILES:libswresample = "${libdir}/libswresample${SOLIBS}" | ||
| 170 | FILES:libswscale = "${libdir}/libswscale${SOLIBS}" | ||
| 171 | |||
| 172 | # ffmpeg disables PIC on some platforms (e.g. x86-32) | ||
| 173 | INSANE_SKIP:${MLPREFIX}libavcodec = "textrel" | ||
| 174 | INSANE_SKIP:${MLPREFIX}libavdevice = "textrel" | ||
| 175 | INSANE_SKIP:${MLPREFIX}libavfilter = "textrel" | ||
| 176 | INSANE_SKIP:${MLPREFIX}libavformat = "textrel" | ||
| 177 | INSANE_SKIP:${MLPREFIX}libavutil = "textrel" | ||
| 178 | INSANE_SKIP:${MLPREFIX}libavresample = "textrel" | ||
| 179 | INSANE_SKIP:${MLPREFIX}libswscale = "textrel" | ||
| 180 | INSANE_SKIP:${MLPREFIX}libswresample = "textrel" | ||
| 181 | INSANE_SKIP:${MLPREFIX}libpostproc = "textrel" | ||
| 182 | |||
| 183 | # Downgrade for NXP BSP | ||
| 184 | DEFAULT_PREFERENCE = "-1" | ||
| 185 | COMPATIBLE_MACHINE = "(imx-nxp-bsp)" | ||
