diff options
Diffstat (limited to 'meta/recipes-multimedia/ffmpeg/ffmpeg_3.0.bb')
-rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg_3.0.bb | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_3.0.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.0.bb new file mode 100644 index 0000000000..3f0cbf84f0 --- /dev/null +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.0.bb | |||
@@ -0,0 +1,114 @@ | |||
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] = "ef9b6634bb7c920efc940b4d55adf7b2" | ||
19 | SRC_URI[sha256sum] = "12f32cee41c74435f608c30793fd616bdf53467bb513278e273e135a4c58e470" | ||
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 gpl theora x264 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" | ||
33 | PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice, libxv" | ||
34 | PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter" | ||
35 | PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac" | ||
36 | PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl" | ||
37 | PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm" | ||
38 | PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack" | ||
39 | PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis" | ||
40 | PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame" | ||
41 | PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" | ||
42 | PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger" | ||
43 | PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex" | ||
44 | PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora" | ||
45 | PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" | ||
46 | PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx" | ||
47 | PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto virtual/libsdl" | ||
48 | PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264" | ||
49 | |||
50 | # Check codecs that require --enable-nonfree | ||
51 | USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}" | ||
52 | |||
53 | EXTRA_OECONF = " \ | ||
54 | --disable-stripping \ | ||
55 | --enable-pic \ | ||
56 | --enable-shared \ | ||
57 | --enable-pthreads \ | ||
58 | ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \ | ||
59 | \ | ||
60 | --cross-prefix=${TARGET_PREFIX} \ | ||
61 | \ | ||
62 | --ld="${CCLD}" \ | ||
63 | --arch=${TARGET_ARCH} \ | ||
64 | --target-os="linux" \ | ||
65 | --enable-cross-compile \ | ||
66 | --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \ | ||
67 | --extra-ldflags="${TARGET_LDFLAGS}" \ | ||
68 | --sysroot="${STAGING_DIR_TARGET}" \ | ||
69 | --enable-hardcoded-tables \ | ||
70 | ${EXTRA_FFCONF} \ | ||
71 | --libdir=${libdir} \ | ||
72 | --shlibdir=${libdir} \ | ||
73 | --datadir=${datadir}/ffmpeg \ | ||
74 | " | ||
75 | |||
76 | do_configure() { | ||
77 | ${S}/configure ${EXTRA_OECONF} | ||
78 | } | ||
79 | |||
80 | RSUGGESTS_${PN} = "mplayer" | ||
81 | PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|swscale).*" | ||
82 | |||
83 | python populate_packages_prepend() { | ||
84 | av_libdir = d.expand('${libdir}') | ||
85 | av_pkgconfig = d.expand('${libdir}/pkgconfig') | ||
86 | |||
87 | # Runtime package | ||
88 | do_split_packages(d, av_libdir, '^lib(.*)\.so\..*', | ||
89 | output_pattern='lib%s', | ||
90 | description='libav %s library', | ||
91 | extra_depends='', | ||
92 | prepend=True, | ||
93 | allow_links=True) | ||
94 | |||
95 | # Development packages (-dev, -staticdev) | ||
96 | do_split_packages(d, av_libdir, '^lib(.*)\.so$', | ||
97 | output_pattern='lib%s-dev', | ||
98 | description='libav %s development package', | ||
99 | extra_depends='${PN}-dev', | ||
100 | prepend=True, | ||
101 | allow_links=True) | ||
102 | do_split_packages(d, av_pkgconfig, '^lib(.*)\.pc$', | ||
103 | output_pattern='lib%s-dev', | ||
104 | description='libav %s development package', | ||
105 | extra_depends='${PN}-dev', | ||
106 | prepend=True) | ||
107 | do_split_packages(d, av_libdir, '^lib(.*)\.a$', | ||
108 | output_pattern='lib%s-staticdev', | ||
109 | description='libav %s development package - static library', | ||
110 | extra_depends='${PN}-dev', | ||
111 | prepend=True, | ||
112 | allow_links=True) | ||
113 | |||
114 | } | ||