diff options
| author | Khem Raj <raj.khem@gmail.com> | 2017-06-12 17:32:10 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-23 11:44:14 +0100 |
| commit | f930cbc521c431a1322f5b1cecc95686aa56a043 (patch) | |
| tree | 7dc2b6ad8a05c48050437471ec99f95adc820a81 /meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.2.bb | |
| parent | 7408dbccb2025bf8ac1df1b251778582bad9e940 (diff) | |
| download | poky-f930cbc521c431a1322f5b1cecc95686aa56a043.tar.gz | |
ffmpeg: Upgrade to 3.3.2 stable
* Fix mips/mips64 along the way, it was broken in 3.3 as well
(From OE-Core rev: ace103370746b7d8ae38701d2ef472f53a68edfb)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.2.bb')
| -rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.2.bb | 147 |
1 files changed, 147 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.2.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.2.bb new file mode 100644 index 0000000000..f4bb2ba1f5 --- /dev/null +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.3.2.bb | |||
| @@ -0,0 +1,147 @@ | |||
| 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 = "BSD & GPLv2+ & LGPLv2.1+ & MIT" | ||
| 9 | LICENSE_${PN} = "GPLv2+" | ||
| 10 | LICENSE_libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | ||
| 11 | LICENSE_libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | ||
| 12 | LICENSE_libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | ||
| 13 | LICENSE_libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | ||
| 14 | LICENSE_libavresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | ||
| 15 | LICENSE_libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | ||
| 16 | LICENSE_libpostproc = "GPLv2+" | ||
| 17 | LICENSE_libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | ||
| 18 | LICENSE_libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" | ||
| 19 | LICENSE_FLAGS = "commercial" | ||
| 20 | |||
| 21 | LIC_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 | |||
| 26 | SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \ | ||
| 27 | file://mips64_cpu_detection.patch \ | ||
| 28 | file://0001-build-fix-for-mips.patch \ | ||
| 29 | " | ||
| 30 | SRC_URI[md5sum] = "d6c09c84e3d0d9ca8a51f481da660603" | ||
| 31 | SRC_URI[sha256sum] = "1998de1ab32616cbf2ff86efc3f1f26e76805ec5dc51e24c041c79edd8262785" | ||
| 32 | |||
| 33 | # Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717 | ||
| 34 | ARM_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 | ||
| 38 | PROVIDES = "libav libpostproc" | ||
| 39 | |||
| 40 | DEPENDS = "alsa-lib zlib libogg yasm-native" | ||
| 41 | |||
| 42 | inherit autotools pkgconfig | ||
| 43 | |||
| 44 | PACKAGECONFIG ??= "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 | ||
| 49 | PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice" | ||
| 50 | PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter" | ||
| 51 | PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec" | ||
| 52 | PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat" | ||
| 53 | PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample" | ||
| 54 | PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale" | ||
| 55 | PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc" | ||
| 56 | PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample" | ||
| 57 | |||
| 58 | # features to support | ||
| 59 | PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2" | ||
| 60 | PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl" | ||
| 61 | PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm" | ||
| 62 | PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack" | ||
| 63 | PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis" | ||
| 64 | PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz" | ||
| 65 | PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame" | ||
| 66 | PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" | ||
| 67 | PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger" | ||
| 68 | PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex" | ||
| 69 | PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora" | ||
| 70 | PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" | ||
| 71 | PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" | ||
| 72 | PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx" | ||
| 73 | PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264" | ||
| 74 | PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv" | ||
| 75 | |||
| 76 | # Check codecs that require --enable-nonfree | ||
| 77 | USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}" | ||
| 78 | |||
| 79 | def cpu(d): | ||
| 80 | for arg in (d.getVar('TUNE_CCARGS') or '').split(): | ||
| 81 | if arg.startswith('-mcpu='): | ||
| 82 | return arg[6:] | ||
| 83 | return 'generic' | ||
| 84 | |||
| 85 | EXTRA_OECONF = " \ | ||
| 86 | --disable-stripping \ | ||
| 87 | --enable-pic \ | ||
| 88 | --enable-shared \ | ||
| 89 | --enable-pthreads \ | ||
| 90 | ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \ | ||
| 91 | \ | ||
| 92 | --cross-prefix=${TARGET_PREFIX} \ | ||
| 93 | \ | ||
| 94 | --ld="${CCLD}" \ | ||
| 95 | --cc="${CC}" \ | ||
| 96 | --cxx="${CXX}" \ | ||
| 97 | --arch=${TARGET_ARCH} \ | ||
| 98 | --target-os="linux" \ | ||
| 99 | --enable-cross-compile \ | ||
| 100 | --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \ | ||
| 101 | --extra-ldflags="${TARGET_LDFLAGS}" \ | ||
| 102 | --sysroot="${STAGING_DIR_TARGET}" \ | ||
| 103 | --enable-hardcoded-tables \ | ||
| 104 | ${EXTRA_FFCONF} \ | ||
| 105 | --libdir=${libdir} \ | ||
| 106 | --shlibdir=${libdir} \ | ||
| 107 | --datadir=${datadir}/ffmpeg \ | ||
| 108 | ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp --disable-mipsdspr2', d)} \ | ||
| 109 | --cpu=${@cpu(d)} \ | ||
| 110 | " | ||
| 111 | |||
| 112 | EXTRA_OECONF_append_linux-gnux32 = " --disable-asm" | ||
| 113 | |||
| 114 | do_configure() { | ||
| 115 | ${S}/configure ${EXTRA_OECONF} | ||
| 116 | } | ||
| 117 | |||
| 118 | PACKAGES =+ "libavcodec \ | ||
| 119 | libavdevice \ | ||
| 120 | libavfilter \ | ||
| 121 | libavformat \ | ||
| 122 | libavresample \ | ||
| 123 | libavutil \ | ||
| 124 | libpostproc \ | ||
| 125 | libswresample \ | ||
| 126 | libswscale" | ||
| 127 | |||
| 128 | FILES_libavcodec = "${libdir}/libavcodec${SOLIBS}" | ||
| 129 | FILES_libavdevice = "${libdir}/libavdevice${SOLIBS}" | ||
| 130 | FILES_libavfilter = "${libdir}/libavfilter${SOLIBS}" | ||
| 131 | FILES_libavformat = "${libdir}/libavformat${SOLIBS}" | ||
| 132 | FILES_libavresample = "${libdir}/libavresample${SOLIBS}" | ||
| 133 | FILES_libavutil = "${libdir}/libavutil${SOLIBS}" | ||
| 134 | FILES_libpostproc = "${libdir}/libpostproc${SOLIBS}" | ||
| 135 | FILES_libswresample = "${libdir}/libswresample${SOLIBS}" | ||
| 136 | FILES_libswscale = "${libdir}/libswscale${SOLIBS}" | ||
| 137 | |||
| 138 | # ffmpeg disables PIC on some platforms (e.g. x86-32) | ||
| 139 | INSANE_SKIP_${MLPREFIX}libavcodec = "textrel" | ||
| 140 | INSANE_SKIP_${MLPREFIX}libavdevice = "textrel" | ||
| 141 | INSANE_SKIP_${MLPREFIX}libavfilter = "textrel" | ||
| 142 | INSANE_SKIP_${MLPREFIX}libavformat = "textrel" | ||
| 143 | INSANE_SKIP_${MLPREFIX}libavutil = "textrel" | ||
| 144 | INSANE_SKIP_${MLPREFIX}libavresample = "textrel" | ||
| 145 | INSANE_SKIP_${MLPREFIX}libswscale = "textrel" | ||
| 146 | INSANE_SKIP_${MLPREFIX}libswresample = "textrel" | ||
| 147 | INSANE_SKIP_${MLPREFIX}libpostproc = "textrel" | ||
