summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.bb')
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.bb146
1 files changed, 146 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.bb
new file mode 100644
index 0000000000..c2b570e85c
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.bb
@@ -0,0 +1,146 @@
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] = "368f1fff4bdadaf2823934cc0aadd71d"
30SRC_URI[sha256sum] = "599e7f7c017221c22011c4037b88bdcd1c47cd40c1e466838bc3c465f3e9569d"
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[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[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 ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
90 \
91 --cross-prefix=${TARGET_PREFIX} \
92 \
93 --ld="${CCLD}" \
94 --cc="${CC}" \
95 --cxx="${CXX}" \
96 --arch=${TARGET_ARCH} \
97 --target-os="linux" \
98 --enable-cross-compile \
99 --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
100 --extra-ldflags="${TARGET_LDFLAGS}" \
101 --sysroot="${STAGING_DIR_TARGET}" \
102 --enable-hardcoded-tables \
103 ${EXTRA_FFCONF} \
104 --libdir=${libdir} \
105 --shlibdir=${libdir} \
106 --datadir=${datadir}/ffmpeg \
107 ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp --disable-mipsdspr2', d)} \
108 --cpu=${@cpu(d)} \
109"
110
111EXTRA_OECONF_append_linux-gnux32 = " --disable-asm"
112
113do_configure() {
114 ${S}/configure ${EXTRA_OECONF}
115}
116
117PACKAGES =+ "libavcodec \
118 libavdevice \
119 libavfilter \
120 libavformat \
121 libavresample \
122 libavutil \
123 libpostproc \
124 libswresample \
125 libswscale"
126
127FILES_libavcodec = "${libdir}/libavcodec${SOLIBS}"
128FILES_libavdevice = "${libdir}/libavdevice${SOLIBS}"
129FILES_libavfilter = "${libdir}/libavfilter${SOLIBS}"
130FILES_libavformat = "${libdir}/libavformat${SOLIBS}"
131FILES_libavresample = "${libdir}/libavresample${SOLIBS}"
132FILES_libavutil = "${libdir}/libavutil${SOLIBS}"
133FILES_libpostproc = "${libdir}/libpostproc${SOLIBS}"
134FILES_libswresample = "${libdir}/libswresample${SOLIBS}"
135FILES_libswscale = "${libdir}/libswscale${SOLIBS}"
136
137# ffmpeg disables PIC on some platforms (e.g. x86-32)
138INSANE_SKIP_${MLPREFIX}libavcodec = "textrel"
139INSANE_SKIP_${MLPREFIX}libavdevice = "textrel"
140INSANE_SKIP_${MLPREFIX}libavfilter = "textrel"
141INSANE_SKIP_${MLPREFIX}libavformat = "textrel"
142INSANE_SKIP_${MLPREFIX}libavutil = "textrel"
143INSANE_SKIP_${MLPREFIX}libavresample = "textrel"
144INSANE_SKIP_${MLPREFIX}libswscale = "textrel"
145INSANE_SKIP_${MLPREFIX}libswresample = "textrel"
146INSANE_SKIP_${MLPREFIX}libpostproc = "textrel"