diff options
Diffstat (limited to 'meta/recipes-multimedia/ffmpeg/ffmpeg_3.1.3.bb')
-rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg_3.1.3.bb | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_3.1.3.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.1.3.bb new file mode 100644 index 0000000000..050f1eefa7 --- /dev/null +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.1.3.bb | |||
@@ -0,0 +1,142 @@ | |||
1 | SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video." | ||
2 | DESCRIPTION = "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." | ||
5 | HOMEPAGE = "https://www.ffmpeg.org/" | ||
6 | SECTION = "libs" | ||
7 | |||
8 | LICENSE = "GPLv2+" | ||
9 | LICENSE_FLAGS = "commercial" | ||
10 | |||
11 | LIC_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 | |||
16 | SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \ | ||
17 | file://mips64_cpu_detection.patch \ | ||
18 | " | ||
19 | SRC_URI[md5sum] = "72769316a4b2b8809c7f6d5a8b6766f4" | ||
20 | SRC_URI[sha256sum] = "f8575c071e2a64437aeb70c8c030b385cddbe0b5cde20c9b18a6def840128822" | ||
21 | |||
22 | # Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717 | ||
23 | ARM_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 | ||
27 | PROVIDES = "libav libpostproc" | ||
28 | |||
29 | DEPENDS = "alsa-lib zlib libogg yasm-native" | ||
30 | |||
31 | inherit autotools pkgconfig | ||
32 | |||
33 | PACKAGECONFIG ??= "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 | ||
38 | PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice" | ||
39 | PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter" | ||
40 | PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec" | ||
41 | PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat" | ||
42 | PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample" | ||
43 | PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale" | ||
44 | PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc" | ||
45 | PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample" | ||
46 | |||
47 | # features to support | ||
48 | PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2" | ||
49 | PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac" | ||
50 | PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl" | ||
51 | PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm" | ||
52 | PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack" | ||
53 | PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis" | ||
54 | PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz" | ||
55 | PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame" | ||
56 | PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" | ||
57 | PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger" | ||
58 | PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex" | ||
59 | PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora" | ||
60 | PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" | ||
61 | PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx" | ||
62 | PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto virtual/libsdl" | ||
63 | PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264" | ||
64 | PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv" | ||
65 | |||
66 | # Check codecs that require --enable-nonfree | ||
67 | USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}" | ||
68 | |||
69 | EXTRA_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 | " | ||
93 | |||
94 | do_configure() { | ||
95 | ${S}/configure ${EXTRA_OECONF} | ||
96 | } | ||
97 | |||
98 | PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util|resample)|swscale|swresample|postproc).*" | ||
99 | |||
100 | # ffmpeg disables PIC on some platforms (e.g. x86-32) | ||
101 | INSANE_SKIP_${MLPREFIX}libavcodec = "textrel" | ||
102 | INSANE_SKIP_${MLPREFIX}libavdevice = "textrel" | ||
103 | INSANE_SKIP_${MLPREFIX}libavfilter = "textrel" | ||
104 | INSANE_SKIP_${MLPREFIX}libavformat = "textrel" | ||
105 | INSANE_SKIP_${MLPREFIX}libavutil = "textrel" | ||
106 | INSANE_SKIP_${MLPREFIX}libavresample = "textrel" | ||
107 | INSANE_SKIP_${MLPREFIX}libswscale = "textrel" | ||
108 | INSANE_SKIP_${MLPREFIX}libswresample = "textrel" | ||
109 | INSANE_SKIP_${MLPREFIX}libpostproc = "textrel" | ||
110 | |||
111 | python populate_packages_prepend() { | ||
112 | av_libdir = d.expand('${libdir}') | ||
113 | av_pkgconfig = d.expand('${libdir}/pkgconfig') | ||
114 | |||
115 | # Runtime package | ||
116 | do_split_packages(d, av_libdir, '^lib(.*)\.so\..*', | ||
117 | output_pattern='lib%s', | ||
118 | description='libav %s library', | ||
119 | extra_depends='', | ||
120 | prepend=True, | ||
121 | allow_links=True) | ||
122 | |||
123 | # Development packages (-dev, -staticdev) | ||
124 | do_split_packages(d, av_libdir, '^lib(.*)\.so$', | ||
125 | output_pattern='lib%s-dev', | ||
126 | description='libav %s development package', | ||
127 | extra_depends='${PN}-dev', | ||
128 | prepend=True, | ||
129 | allow_links=True) | ||
130 | do_split_packages(d, av_pkgconfig, '^lib(.*)\.pc$', | ||
131 | output_pattern='lib%s-dev', | ||
132 | description='libav %s development package', | ||
133 | extra_depends='${PN}-dev', | ||
134 | prepend=True) | ||
135 | do_split_packages(d, av_libdir, '^lib(.*)\.a$', | ||
136 | output_pattern='lib%s-staticdev', | ||
137 | description='libav %s development package - static library', | ||
138 | extra_depends='${PN}-dev', | ||
139 | prepend=True, | ||
140 | allow_links=True) | ||
141 | |||
142 | } | ||