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