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