summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.4.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.4.bb')
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.4.bb162
1 files changed, 162 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.4.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.4.bb
new file mode 100644
index 0000000000..22895a75a2
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.4.bb
@@ -0,0 +1,162 @@
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] = "39fd71024ac76ba35f04397021af5606"
30SRC_URI[sha256sum] = "6e38ff14f080c98b58cf5967573501b8cb586e3a173b591f3807d8f0660daf7a"
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', '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[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
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[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto virtual/libsdl"
73PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
74PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
75
76# Check codecs that require --enable-nonfree
77USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}"
78
79def cpu(d):
80 for arg in (d.getVar('TUNE_CCARGS') or '').split():
81 if arg.startswith('-mcpu='):
82 return arg[6:]
83 return 'generic'
84
85EXTRA_OECONF = " \
86 --disable-stripping \
87 --enable-pic \
88 --enable-shared \
89 --enable-pthreads \
90 ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
91 \
92 --cross-prefix=${TARGET_PREFIX} \
93 \
94 --ld="${CCLD}" \
95 --cc="${CC}" \
96 --cxx="${CXX}" \
97 --arch=${TARGET_ARCH} \
98 --target-os="linux" \
99 --enable-cross-compile \
100 --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
101 --extra-ldflags="${TARGET_LDFLAGS}" \
102 --sysroot="${STAGING_DIR_TARGET}" \
103 --enable-hardcoded-tables \
104 ${EXTRA_FFCONF} \
105 --libdir=${libdir} \
106 --shlibdir=${libdir} \
107 --datadir=${datadir}/ffmpeg \
108 ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp --disable-mipsdspr2', d)} \
109 --cpu=${@cpu(d)} \
110"
111
112EXTRA_OECONF_append_linux-gnux32 = " --disable-asm"
113
114do_configure() {
115 ${S}/configure ${EXTRA_OECONF}
116}
117
118PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util|resample)|swscale|swresample|postproc).*"
119
120# ffmpeg disables PIC on some platforms (e.g. x86-32)
121INSANE_SKIP_${MLPREFIX}libavcodec = "textrel"
122INSANE_SKIP_${MLPREFIX}libavdevice = "textrel"
123INSANE_SKIP_${MLPREFIX}libavfilter = "textrel"
124INSANE_SKIP_${MLPREFIX}libavformat = "textrel"
125INSANE_SKIP_${MLPREFIX}libavutil = "textrel"
126INSANE_SKIP_${MLPREFIX}libavresample = "textrel"
127INSANE_SKIP_${MLPREFIX}libswscale = "textrel"
128INSANE_SKIP_${MLPREFIX}libswresample = "textrel"
129INSANE_SKIP_${MLPREFIX}libpostproc = "textrel"
130
131python populate_packages_prepend() {
132 av_libdir = d.expand('${libdir}')
133 av_pkgconfig = d.expand('${libdir}/pkgconfig')
134
135 # Runtime package
136 do_split_packages(d, av_libdir, '^lib(.*)\.so\..*',
137 output_pattern='lib%s',
138 description='libav %s library',
139 extra_depends='',
140 prepend=True,
141 allow_links=True)
142
143 # Development packages (-dev, -staticdev)
144 do_split_packages(d, av_libdir, '^lib(.*)\.so$',
145 output_pattern='lib%s-dev',
146 description='libav %s development package',
147 extra_depends='${PN}-dev',
148 prepend=True,
149 allow_links=True)
150 do_split_packages(d, av_pkgconfig, '^lib(.*)\.pc$',
151 output_pattern='lib%s-dev',
152 description='libav %s development package',
153 extra_depends='${PN}-dev',
154 prepend=True)
155 do_split_packages(d, av_libdir, '^lib(.*)\.a$',
156 output_pattern='lib%s-staticdev',
157 description='libav %s development package - static library',
158 extra_depends='${PN}-dev',
159 prepend=True,
160 allow_links=True)
161
162}