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