diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2020-06-08 09:46:39 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-09 13:14:00 +0100 |
commit | 5f39ac454f787548b8f416a74b3f2a0df851c608 (patch) | |
tree | 8f5b6cea0ffe2a908094fa0a6a02c5dfd1a78cfa /meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.3.bb | |
parent | 91f03e8b3406fb1aa886ab9945c1bd29ca6a380f (diff) | |
download | poky-5f39ac454f787548b8f416a74b3f2a0df851c608.tar.gz |
ffmpeg: upgrade 4.2.2 -> 4.2.3
(From OE-Core rev: 857d9e8c7ddf5daf54adef3cac5753c5fc490990)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.3.bb')
-rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.3.bb | 159 |
1 files changed, 159 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.3.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.3.bb new file mode 100644 index 0000000000..e837a05d47 --- /dev/null +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.3.bb | |||
@@ -0,0 +1,159 @@ | |||
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 = "BSD & GPLv2+ & LGPLv2.1+ & MIT" | ||
9 | LICENSE_${PN} = "GPLv2+" | ||
10 | LICENSE_libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | ||
11 | LICENSE_libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | ||
12 | LICENSE_libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | ||
13 | LICENSE_libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | ||
14 | LICENSE_libavresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | ||
15 | LICENSE_libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | ||
16 | LICENSE_libpostproc = "GPLv2+" | ||
17 | LICENSE_libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | ||
18 | LICENSE_libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', 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://mips64_cpu_detection.patch \ | ||
28 | " | ||
29 | SRC_URI[sha256sum] = "9df6c90aed1337634c1fb026fb01c154c29c82a64ea71291ff2da9aacb9aad31" | ||
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 gpl lzma theora x264 zlib \ | ||
46 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)}" | ||
47 | |||
48 | # libraries to build in addition to avutil | ||
49 | PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice" | ||
50 | PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter" | ||
51 | PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec" | ||
52 | PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat" | ||
53 | PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample" | ||
54 | PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale" | ||
55 | PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc" | ||
56 | PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample" | ||
57 | |||
58 | # features to support | ||
59 | PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" | ||
60 | PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2" | ||
61 | PACKAGECONFIG[fdk-aac] = "--enable-libfdk-aac --enable-nonfree,--disable-libfdk-aac,fdk-aac" | ||
62 | PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl" | ||
63 | PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm" | ||
64 | PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack" | ||
65 | PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis" | ||
66 | PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz" | ||
67 | PACKAGECONFIG[mfx] = "--enable-libmfx,--disable-libmfx,intel-mediasdk" | ||
68 | PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame" | ||
69 | PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" | ||
70 | PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2" | ||
71 | PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex" | ||
72 | PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg" | ||
73 | PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" | ||
74 | PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" | ||
75 | PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx" | ||
76 | PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264" | ||
77 | PACKAGECONFIG[x265] = "--enable-libx265,--disable-libx265,x265" | ||
78 | PACKAGECONFIG[xcb] = "--enable-libxcb,--disable-libxcb,libxcb" | ||
79 | PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv" | ||
80 | PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" | ||
81 | |||
82 | # Check codecs that require --enable-nonfree | ||
83 | USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}" | ||
84 | |||
85 | def cpu(d): | ||
86 | for arg in (d.getVar('TUNE_CCARGS') or '').split(): | ||
87 | if arg.startswith('-mcpu='): | ||
88 | return arg[6:] | ||
89 | return 'generic' | ||
90 | |||
91 | EXTRA_OECONF = " \ | ||
92 | --disable-stripping \ | ||
93 | --enable-pic \ | ||
94 | --enable-shared \ | ||
95 | --enable-pthreads \ | ||
96 | ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \ | ||
97 | \ | ||
98 | --cross-prefix=${TARGET_PREFIX} \ | ||
99 | \ | ||
100 | --ld="${CCLD}" \ | ||
101 | --cc="${CC}" \ | ||
102 | --cxx="${CXX}" \ | ||
103 | --arch=${TARGET_ARCH} \ | ||
104 | --target-os="linux" \ | ||
105 | --enable-cross-compile \ | ||
106 | --extra-cflags="${CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \ | ||
107 | --extra-ldflags="${LDFLAGS}" \ | ||
108 | --sysroot="${STAGING_DIR_TARGET}" \ | ||
109 | ${EXTRA_FFCONF} \ | ||
110 | --libdir=${libdir} \ | ||
111 | --shlibdir=${libdir} \ | ||
112 | --datadir=${datadir}/ffmpeg \ | ||
113 | ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp --disable-mipsdspr2', d)} \ | ||
114 | --cpu=${@cpu(d)} \ | ||
115 | --pkg-config=pkg-config \ | ||
116 | " | ||
117 | |||
118 | EXTRA_OECONF_append_linux-gnux32 = " --disable-asm" | ||
119 | # gold crashes on x86, another solution is to --disable-asm but thats more hacky | ||
120 | # ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684 | ||
121 | |||
122 | LDFLAGS_append_x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" | ||
123 | |||
124 | EXTRA_OEMAKE = "V=1" | ||
125 | |||
126 | do_configure() { | ||
127 | ${S}/configure ${EXTRA_OECONF} | ||
128 | } | ||
129 | |||
130 | PACKAGES =+ "libavcodec \ | ||
131 | libavdevice \ | ||
132 | libavfilter \ | ||
133 | libavformat \ | ||
134 | libavresample \ | ||
135 | libavutil \ | ||
136 | libpostproc \ | ||
137 | libswresample \ | ||
138 | libswscale" | ||
139 | |||
140 | FILES_libavcodec = "${libdir}/libavcodec${SOLIBS}" | ||
141 | FILES_libavdevice = "${libdir}/libavdevice${SOLIBS}" | ||
142 | FILES_libavfilter = "${libdir}/libavfilter${SOLIBS}" | ||
143 | FILES_libavformat = "${libdir}/libavformat${SOLIBS}" | ||
144 | FILES_libavresample = "${libdir}/libavresample${SOLIBS}" | ||
145 | FILES_libavutil = "${libdir}/libavutil${SOLIBS}" | ||
146 | FILES_libpostproc = "${libdir}/libpostproc${SOLIBS}" | ||
147 | FILES_libswresample = "${libdir}/libswresample${SOLIBS}" | ||
148 | FILES_libswscale = "${libdir}/libswscale${SOLIBS}" | ||
149 | |||
150 | # ffmpeg disables PIC on some platforms (e.g. x86-32) | ||
151 | INSANE_SKIP_${MLPREFIX}libavcodec = "textrel" | ||
152 | INSANE_SKIP_${MLPREFIX}libavdevice = "textrel" | ||
153 | INSANE_SKIP_${MLPREFIX}libavfilter = "textrel" | ||
154 | INSANE_SKIP_${MLPREFIX}libavformat = "textrel" | ||
155 | INSANE_SKIP_${MLPREFIX}libavutil = "textrel" | ||
156 | INSANE_SKIP_${MLPREFIX}libavresample = "textrel" | ||
157 | INSANE_SKIP_${MLPREFIX}libswscale = "textrel" | ||
158 | INSANE_SKIP_${MLPREFIX}libswresample = "textrel" | ||
159 | INSANE_SKIP_${MLPREFIX}libpostproc = "textrel" | ||