summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/ffmpeg/ffmpeg_3.4.2.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia/ffmpeg/ffmpeg_3.4.2.bb')
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg_3.4.2.bb151
1 files changed, 151 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_3.4.2.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.4.2.bb
new file mode 100644
index 0000000000..879cf7ffb9
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.4.2.bb
@@ -0,0 +1,151 @@
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 "
29SRC_URI[md5sum] = "cbf4ead227fcedddf54c86013705a988"
30SRC_URI[sha256sum] = "2b92e9578ef8b3e49eeab229e69305f5f4cbc1fdaa22e927fc7fca18acccd740"
31
32# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
33ARM_INSTRUCTION_SET = "arm"
34
35# Should be API compatible with libav (which was a fork of ffmpeg)
36# libpostproc was previously packaged from a separate recipe
37PROVIDES = "libav libpostproc"
38
39DEPENDS = "alsa-lib zlib libogg yasm-native"
40
41inherit autotools pkgconfig
42
43PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \
44 bzlib gpl lzma theora x264 \
45 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv', '', d)}"
46
47# libraries to build in addition to avutil
48PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
49PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter"
50PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec"
51PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat"
52PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample"
53PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale"
54PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc"
55PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample"
56
57# features to support
58PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2"
59PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
60PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
61PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
62PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
63PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz"
64PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
65PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
66PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2"
67PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
68PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora"
69PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
70PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
71PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
72PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
73PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
74
75# Check codecs that require --enable-nonfree
76USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}"
77
78def cpu(d):
79 for arg in (d.getVar('TUNE_CCARGS') or '').split():
80 if arg.startswith('-mcpu='):
81 return arg[6:]
82 return 'generic'
83
84EXTRA_OECONF = " \
85 --disable-stripping \
86 --enable-pic \
87 --enable-shared \
88 --enable-pthreads \
89 --disable-libxcb \
90 --disable-libxcb-shm \
91 --disable-libxcb-xfixes \
92 --disable-libxcb-shape \
93 ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
94 \
95 --cross-prefix=${TARGET_PREFIX} \
96 \
97 --ld="${CCLD}" \
98 --cc="${CC}" \
99 --cxx="${CXX}" \
100 --arch=${TARGET_ARCH} \
101 --target-os="linux" \
102 --enable-cross-compile \
103 --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
104 --extra-ldflags="${TARGET_LDFLAGS}" \
105 --sysroot="${STAGING_DIR_TARGET}" \
106 --enable-hardcoded-tables \
107 ${EXTRA_FFCONF} \
108 --libdir=${libdir} \
109 --shlibdir=${libdir} \
110 --datadir=${datadir}/ffmpeg \
111 ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp --disable-mipsdspr2', d)} \
112 --cpu=${@cpu(d)} \
113 --pkg-config=pkg-config \
114"
115
116EXTRA_OECONF_append_linux-gnux32 = " --disable-asm"
117
118do_configure() {
119 ${S}/configure ${EXTRA_OECONF}
120}
121
122PACKAGES =+ "libavcodec \
123 libavdevice \
124 libavfilter \
125 libavformat \
126 libavresample \
127 libavutil \
128 libpostproc \
129 libswresample \
130 libswscale"
131
132FILES_libavcodec = "${libdir}/libavcodec${SOLIBS}"
133FILES_libavdevice = "${libdir}/libavdevice${SOLIBS}"
134FILES_libavfilter = "${libdir}/libavfilter${SOLIBS}"
135FILES_libavformat = "${libdir}/libavformat${SOLIBS}"
136FILES_libavresample = "${libdir}/libavresample${SOLIBS}"
137FILES_libavutil = "${libdir}/libavutil${SOLIBS}"
138FILES_libpostproc = "${libdir}/libpostproc${SOLIBS}"
139FILES_libswresample = "${libdir}/libswresample${SOLIBS}"
140FILES_libswscale = "${libdir}/libswscale${SOLIBS}"
141
142# ffmpeg disables PIC on some platforms (e.g. x86-32)
143INSANE_SKIP_${MLPREFIX}libavcodec = "textrel"
144INSANE_SKIP_${MLPREFIX}libavdevice = "textrel"
145INSANE_SKIP_${MLPREFIX}libavfilter = "textrel"
146INSANE_SKIP_${MLPREFIX}libavformat = "textrel"
147INSANE_SKIP_${MLPREFIX}libavutil = "textrel"
148INSANE_SKIP_${MLPREFIX}libavresample = "textrel"
149INSANE_SKIP_${MLPREFIX}libswscale = "textrel"
150INSANE_SKIP_${MLPREFIX}libswresample = "textrel"
151INSANE_SKIP_${MLPREFIX}libpostproc = "textrel"