summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb')
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb143
1 files changed, 143 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb
new file mode 100644
index 0000000000..4fac46b117
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb
@@ -0,0 +1,143 @@
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 = "GPLv2+"
9LICENSE_FLAGS = "commercial"
10
11LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
12 file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
13 file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
14 file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
15
16SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
17 file://mips64_cpu_detection.patch \
18 "
19SRC_URI[md5sum] = "e34d1b92c5d844f2a3611c741a6dba18"
20SRC_URI[sha256sum] = "3f01bd1fe1a17a277f8c84869e5d9192b4b978cb660872aa2b54c3cc8a2fedfc"
21
22# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
23ARM_INSTRUCTION_SET = "arm"
24
25# Should be API compatible with libav (which was a fork of ffmpeg)
26# libpostproc was previously packaged from a separate recipe
27PROVIDES = "libav libpostproc"
28
29DEPENDS = "alsa-lib zlib libogg yasm-native"
30
31inherit autotools pkgconfig
32
33PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \
34 bzlib gpl lzma theora x264 \
35 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xv', '', d)}"
36
37# libraries to build in addition to avutil
38PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
39PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter"
40PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec"
41PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat"
42PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample"
43PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale"
44PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc"
45PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample"
46
47# features to support
48PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2"
49PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
50PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
51PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
52PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
53PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz"
54PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
55PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
56PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
57PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
58PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora"
59PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
60PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
61PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
62PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto virtual/libsdl"
63PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
64PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
65
66# Check codecs that require --enable-nonfree
67USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}"
68
69EXTRA_OECONF = " \
70 --disable-stripping \
71 --enable-pic \
72 --enable-shared \
73 --enable-pthreads \
74 ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
75 \
76 --cross-prefix=${TARGET_PREFIX} \
77 \
78 --ld="${CCLD}" \
79 --cc="${CC}" \
80 --cxx="${CXX}" \
81 --arch=${TARGET_ARCH} \
82 --target-os="linux" \
83 --enable-cross-compile \
84 --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
85 --extra-ldflags="${TARGET_LDFLAGS}" \
86 --sysroot="${STAGING_DIR_TARGET}" \
87 --enable-hardcoded-tables \
88 ${EXTRA_FFCONF} \
89 --libdir=${libdir} \
90 --shlibdir=${libdir} \
91 --datadir=${datadir}/ffmpeg \
92 ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp --disable-mipsdspr2', d)} \
93"
94
95do_configure() {
96 ${S}/configure ${EXTRA_OECONF}
97}
98
99PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util|resample)|swscale|swresample|postproc).*"
100
101# ffmpeg disables PIC on some platforms (e.g. x86-32)
102INSANE_SKIP_${MLPREFIX}libavcodec = "textrel"
103INSANE_SKIP_${MLPREFIX}libavdevice = "textrel"
104INSANE_SKIP_${MLPREFIX}libavfilter = "textrel"
105INSANE_SKIP_${MLPREFIX}libavformat = "textrel"
106INSANE_SKIP_${MLPREFIX}libavutil = "textrel"
107INSANE_SKIP_${MLPREFIX}libavresample = "textrel"
108INSANE_SKIP_${MLPREFIX}libswscale = "textrel"
109INSANE_SKIP_${MLPREFIX}libswresample = "textrel"
110INSANE_SKIP_${MLPREFIX}libpostproc = "textrel"
111
112python populate_packages_prepend() {
113 av_libdir = d.expand('${libdir}')
114 av_pkgconfig = d.expand('${libdir}/pkgconfig')
115
116 # Runtime package
117 do_split_packages(d, av_libdir, '^lib(.*)\.so\..*',
118 output_pattern='lib%s',
119 description='libav %s library',
120 extra_depends='',
121 prepend=True,
122 allow_links=True)
123
124 # Development packages (-dev, -staticdev)
125 do_split_packages(d, av_libdir, '^lib(.*)\.so$',
126 output_pattern='lib%s-dev',
127 description='libav %s development package',
128 extra_depends='${PN}-dev',
129 prepend=True,
130 allow_links=True)
131 do_split_packages(d, av_pkgconfig, '^lib(.*)\.pc$',
132 output_pattern='lib%s-dev',
133 description='libav %s development package',
134 extra_depends='${PN}-dev',
135 prepend=True)
136 do_split_packages(d, av_libdir, '^lib(.*)\.a$',
137 output_pattern='lib%s-staticdev',
138 description='libav %s development package - static library',
139 extra_depends='${PN}-dev',
140 prepend=True,
141 allow_links=True)
142
143}