summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.4.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.4.bb')
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.4.bb165
1 files changed, 165 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.4.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.4.bb
new file mode 100644
index 0000000000..c8f521e7be
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.4.bb
@@ -0,0 +1,165 @@
1SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video."
2DESCRIPTION = "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."
5HOMEPAGE = "https://www.ffmpeg.org/"
6SECTION = "libs"
7
8LICENSE = "BSD & GPLv2+ & LGPLv2.1+ & MIT"
9LICENSE_${PN} = "GPLv2+"
10LICENSE_libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
11LICENSE_libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
12LICENSE_libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
13LICENSE_libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
14LICENSE_libavresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
15LICENSE_libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
16LICENSE_libpostproc = "GPLv2+"
17LICENSE_libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
18LICENSE_libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}"
19LICENSE_FLAGS = "commercial"
20
21LIC_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
26SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
27 file://mips64_cpu_detection.patch \
28 file://0001-build-fix-for-mips.patch \
29 file://CVE-2017-14054.patch \
30 file://CVE-2017-14055.patch \
31 file://CVE-2017-14056.patch \
32 file://CVE-2017-14057.patch \
33 file://CVE-2017-14058.patch \
34 file://CVE-2017-14059.patch \
35 file://CVE-2017-14169.patch \
36 file://CVE-2017-14170.patch \
37 file://CVE-2017-14171.patch \
38 file://CVE-2017-14222.patch \
39 file://CVE-2017-14223.patch \
40 file://CVE-2017-14225.patch \
41 "
42SRC_URI[md5sum] = "e14a0200c78ce5c918427e57cd406a0d"
43SRC_URI[sha256sum] = "98b97e1b908dfeb6aeb6d407e5a5eacdfc253a40c2d195f5867ed2d1d46ea957"
44
45# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
46ARM_INSTRUCTION_SET = "arm"
47
48# Should be API compatible with libav (which was a fork of ffmpeg)
49# libpostproc was previously packaged from a separate recipe
50PROVIDES = "libav libpostproc"
51
52DEPENDS = "alsa-lib zlib libogg yasm-native"
53
54inherit autotools pkgconfig
55
56PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \
57 bzlib gpl lzma theora x264 \
58 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv', '', d)}"
59
60# libraries to build in addition to avutil
61PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
62PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter"
63PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec"
64PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat"
65PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample"
66PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale"
67PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc"
68PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample"
69
70# features to support
71PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2"
72PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
73PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
74PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
75PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
76PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz"
77PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
78PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
79PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
80PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2"
81PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
82PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora"
83PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
84PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
85PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
86PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
87PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
88
89# Check codecs that require --enable-nonfree
90USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}"
91
92def cpu(d):
93 for arg in (d.getVar('TUNE_CCARGS') or '').split():
94 if arg.startswith('-mcpu='):
95 return arg[6:]
96 return 'generic'
97
98EXTRA_OECONF = " \
99 --disable-stripping \
100 --enable-pic \
101 --enable-shared \
102 --enable-pthreads \
103 --disable-libxcb \
104 --disable-libxcb-shm \
105 --disable-libxcb-xfixes \
106 --disable-libxcb-shape \
107 ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
108 \
109 --cross-prefix=${TARGET_PREFIX} \
110 \
111 --ld="${CCLD}" \
112 --cc="${CC}" \
113 --cxx="${CXX}" \
114 --arch=${TARGET_ARCH} \
115 --target-os="linux" \
116 --enable-cross-compile \
117 --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
118 --extra-ldflags="${TARGET_LDFLAGS}" \
119 --sysroot="${STAGING_DIR_TARGET}" \
120 --enable-hardcoded-tables \
121 ${EXTRA_FFCONF} \
122 --libdir=${libdir} \
123 --shlibdir=${libdir} \
124 --datadir=${datadir}/ffmpeg \
125 ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp --disable-mipsdspr2', d)} \
126 --cpu=${@cpu(d)} \
127 --pkg-config=pkg-config \
128"
129
130EXTRA_OECONF_append_linux-gnux32 = " --disable-asm"
131
132do_configure() {
133 ${S}/configure ${EXTRA_OECONF}
134}
135
136PACKAGES =+ "libavcodec \
137 libavdevice \
138 libavfilter \
139 libavformat \
140 libavresample \
141 libavutil \
142 libpostproc \
143 libswresample \
144 libswscale"
145
146FILES_libavcodec = "${libdir}/libavcodec${SOLIBS}"
147FILES_libavdevice = "${libdir}/libavdevice${SOLIBS}"
148FILES_libavfilter = "${libdir}/libavfilter${SOLIBS}"
149FILES_libavformat = "${libdir}/libavformat${SOLIBS}"
150FILES_libavresample = "${libdir}/libavresample${SOLIBS}"
151FILES_libavutil = "${libdir}/libavutil${SOLIBS}"
152FILES_libpostproc = "${libdir}/libpostproc${SOLIBS}"
153FILES_libswresample = "${libdir}/libswresample${SOLIBS}"
154FILES_libswscale = "${libdir}/libswscale${SOLIBS}"
155
156# ffmpeg disables PIC on some platforms (e.g. x86-32)
157INSANE_SKIP_${MLPREFIX}libavcodec = "textrel"
158INSANE_SKIP_${MLPREFIX}libavdevice = "textrel"
159INSANE_SKIP_${MLPREFIX}libavfilter = "textrel"
160INSANE_SKIP_${MLPREFIX}libavformat = "textrel"
161INSANE_SKIP_${MLPREFIX}libavutil = "textrel"
162INSANE_SKIP_${MLPREFIX}libavresample = "textrel"
163INSANE_SKIP_${MLPREFIX}libswscale = "textrel"
164INSANE_SKIP_${MLPREFIX}libswresample = "textrel"
165INSANE_SKIP_${MLPREFIX}libpostproc = "textrel"