libav: add PACKAGECONFIG for theora, libvorbis, speex and openssl
PATCH 1/4 libav: add PACKAGECONFIG for theora, libvorbis, speex and openssl
Dropped libvorvis dependency because there is already a (better) builtin vorbis codec. Don't confuse codec names: "vorbis" (builtin) and "libvorbis" (using external library).
Changes:
- add --enable-nonfree when faac or openssl are used
- add DESCRIPTION
- sort PACKAGECONFIG entries
Tested with libav-0.8.11 & libav-9.13.
--- meta/recipes-multimedia/libav/libav.inc | 39 ++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 8 deletions(-)
meta/recipes-multimedia/libav/libav.inc +31 -8
@@ -1,6 +1,12 @@ -SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video" +SUMMARY = "Open source audio and video processing tools and librairies" +DESCRIPTION = "Libav is a friendly and community-driven effort to provide its users \ + with a set of portable, functional and high-performance libraries for \ + dealing with multimedia formats of all sorts. It originates from the \ + FFmpeg codebase, but goes its own way these days, providing its users \ + with reliable releases and a clear vision how to go forward." HOMEPAGE = "http://libav.org/" SECTION = "libs" + LICENSE = "GPLv2+" LICENSE_FLAGS = "commercial"
@@ -9,7 +15,7 @@ PROVIDES = "ffmpeg" ARM_INSTRUCTION_SET = "arm" -DEPENDS = "zlib libogg libvorbis libtheora yasm-native" +DEPENDS = "zlib libogg yasm-native" INC_PR = "r8"
@@ -23,21 +29,29 @@ BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}" EXTRA_FFCONF_armv7a = "--cpu=cortex-a8" EXTRA_FFCONF ?= "" -PACKAGECONFIG ??= "bzip2 x264 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" -PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack" +PACKAGECONFIG ??= "bzip2 x264 theora ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" PACKAGECONFIG[bzip2] = "--enable-bzlib,--disable-bzlib,bzip2" -PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger" +PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac" PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm" -PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264" -PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx" +PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack" +PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis" PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame" -PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac" +PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" +PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger" +PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex" +PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora" +PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx" PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto virtual/libsdl" +PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264" + +# Check codecs that require --enable-nonfree +USE_NONFREE = "${@contains_one('PACKAGECONFIG', [ 'faac', 'openssl' ], d)}" EXTRA_OECONF = " \ --enable-shared \ --enable-pthreads \ --enable-gpl \ + ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \ --enable-avfilter \ \ --cross-prefix=${TARGET_PREFIX} \
@@ -91,6 +105,15 @@ LEAD_SONAME = "libavcodec.so" FILES_${PN}-dev = "${includedir}" +def contains_one(variable, checkvalues, d): + val = d.getVar(variable, True) + if not val: + return '' + val = set(val.split()) + if val.intersection(checkvalues): + return 'yes' + return '' + python populate_packages_prepend() { av_libdir = d.expand('${libdir}') av_pkgconfig = d.expand('${libdir}/pkgconfig')
Signature · 1 line
1.8.1.2
PATCH 2/4 libav: add version 10.1
Using common libav.inc
Notice that DEFAULT_PREFERENCE = "-1" is not included.
--- meta/recipes-multimedia/libav/libav_10.1.bb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 meta/recipes-multimedia/libav/libav_10.1.bb
meta/recipes-multimedia/libav/libav_10.1.bb new file +14 -0
@@ -0,0 +1,14 @@ +require libav.inc + +LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ + file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" + +SRC_URI = "http://libav.org/releases/${BP}.tar.xz" + +SRC_URI[md5sum] = "0f751b439b6a5525d4c8a214f0db6aac" +SRC_URI[sha256sum] = "d5e04dc9adf43a467aa628f622425697d587a29cb0b997b45459f59cb00f9e15" + +# Options for Libav version 10+ +PACKAGECONFIG[webp] = "--enable-libwebp,--disable-libwebp,libwebp"
Signature · 1 line
1.8.1.2
Re: [PATCH 2/4] libav: add version 10.1
Hi Matthieu,
Quoted 1 line · On Wednesday 21 May 2014 13:37:55 Matthieu Crapet wrote:
Using common libav.inc
I'm not exactly thrilled with the prospect of carrying not just two but now three versions of libav - do you know what the compatibility story is for libav 10 with the recipes we would want to build against it (i.e. those currently building against 9.x)?
Quoted 1 line
Notice that
DEFAULT_PREFERENCE= "-1" is not included.
Given that we need 0.8.x to be built for gstreamer 0.10 which (as we've discussed recently) is still needed, unless we can add some extra dependency relationship which forces the correct version of libav to be built as Richard suggested I don't think we can remove DEFAULT_PREFERENCE here.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
PATCH v2 1/1 libav: add version 10.1
Using common libav.inc
Keep DEFAULT_PREFERENCE because gstreamer 0.10 requires 0.8.x.
--- meta/recipes-multimedia/libav/libav_10.1.bb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 meta/recipes-multimedia/libav/libav_10.1.bb
meta/recipes-multimedia/libav/libav_10.1.bb new file +16 -0
@@ -0,0 +1,16 @@ +require libav.inc + +LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ + file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" + +SRC_URI = "http://libav.org/releases/${BP}.tar.xz" + +SRC_URI[md5sum] = "0f751b439b6a5525d4c8a214f0db6aac" +SRC_URI[sha256sum] = "d5e04dc9adf43a467aa628f622425697d587a29cb0b997b45459f59cb00f9e15" + +# Options for Libav version 10+ +PACKAGECONFIG[webp] = "--enable-libwebp,--disable-libwebp,libwebp" + +DEFAULT_PREFERENCE = "-1"
Signature · 1 line
1.8.1.2
A message that is not in the archive (sent off-list or not yet received): 8672BB614B4CCA40A6B3BDD6FD82050BA1C915E0@COSNADEXC23.usr.ingenico.loc
Re: [OE-core] [PATCH 2/4] libav: add version 10.1
Quoted 6 lines · On Wednesday 21 May 2014 12:14:26 Matthieu CRAPET wrote:
I can understand the "maintenance" point of view. I've watched closely to the build system of the 3 versions, it's quite the same. 9.x adds more switches than 0.8.x and 10.x adds more switches than 9.x. As libav.inc is common, it deserves it. I've compiled the 3 versions with multiple (package)configs, and as far as tested, nothing is broken. Why not dropping 9.x a and keep 10.x (plus 0.8.x of course)?
The major version bumps are not just about additional switches though. If you look at upstream-tracker.org [1] you can see that there were API/ABI-breaking changes between 9 and 10 (and the libav project's version 10 announcement [2] confirms this). The question is, for what we build in OE that depends upon libav are these changes significant or not? If they are, are corresponding upgrades available that are compatible with libav 10?
Cheers,
Paul
[1] http://upstream-tracker.org/versions/libav.html
[2] https://libav.org/news.html#10final
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
PATCH 3/4 libav (0.8.11): cosmetics, move LIC_FILES_CHKSUM before SRC_URI
In reply to Matthieu Crapet--- meta/recipes-multimedia/libav/libav_0.8.11.bb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
meta/recipes-multimedia/libav/libav_0.8.11.bb +5 -5
@@ -1,16 +1,16 @@ require libav.inc +LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.LGPLv2.1;md5=e344c8fa836c3a41c4cbd79d7bd3a379 \ + file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" + SRC_URI = "http://libav.org/releases/${BP}.tar.xz \ file://0001-configure-enable-pic-for-AArch64.patch" SRC_URI[md5sum] = "cdc9b53c56a375baf73ea38cf7ade4f9" SRC_URI[sha256sum] = "5934e4f0dbf6e0fc4987de86cdd079f1d11a1410ae275e9f46472af17f05155a" -LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ - file://COPYING.LGPLv2.1;md5=e344c8fa836c3a41c4cbd79d7bd3a379 \ - file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" - PROVIDES += "libpostproc" EXTRA_OECONF += " \
Signature · 1 line
1.8.1.2
PATCH 4/4 libav (9.13): remove DEFAULT_PREFERENCE
In reply to Matthieu CrapetUse PREFERRED_VERSION_libav in your distro definition instead.
--- meta/recipes-multimedia/libav/libav_9.13.bb | 2 -- 1 file changed, 2 deletions(-)
meta/recipes-multimedia/libav/libav_9.13.bb +0 -2
@@ -9,5 +9,3 @@ SRC_URI = "http://libav.org/releases/${BP}.tar.xz" SRC_URI[md5sum] = "23b9e34bffdaee366710fdf20157a570" SRC_URI[sha256sum] = "2ff05df6cd2259b3bb277eb16c234214f8e0530700d0c774d033eba23edde6ca" - -DEFAULT_PREFERENCE = "-1"
Signature · 1 line
1.8.1.2
Re: [PATCH 4/4] libav (9.13): remove DEFAULT_PREFERENCE
Quoted 1 line · On Wednesday 21 May 2014 13:37:57 Matthieu Crapet wrote:
Use
PREFERRED_VERSION_libavin your distro definition instead.
Why? PREFERRED_VERSION_libav will override this in any case...
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Re: [PATCH 4/4] libav (9.13): remove DEFAULT_PREFERENCE
Quoted 3 lines · Paul Eggleton
Quoted 1 line
Use
PREFERRED_VERSION_libavin your distro definition instead.Why?
PREFERRED_VERSION_libavwill override this in any case...
I would rather ask why not ? we are pinning to older version is there a reason for that ?
Re: [PATCH 4/4] libav (9.13): remove DEFAULT_PREFERENCE
Quoted 8 lines · Khem Raj
Quoted 3 lines · Paul Eggleton
Quoted 1 line
Use
PREFERRED_VERSION_libavin your distro definition instead.Why?
PREFERRED_VERSION_libavwill override this in any case...I would rather ask why not ? we are pinning to older version is there a reason for that ?
Current openal-soft, gst-ffmpeg and xbmc fail with libav-9, mplayer2 fails with old libav-8, we need someone to work on making them compatible with the same version of libav (preferably newer one - 9 or
10) and then we should switch.
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Re: [PATCH 4/4] libav (9.13): remove DEFAULT_PREFERENCE
Quoted 10 lines · Martin Jansa
Quoted 8 lines · Khem Raj
Quoted 3 lines · Paul Eggleton
Quoted 1 line
Use
PREFERRED_VERSION_libavin your distro definition instead.Why?
PREFERRED_VERSION_libavwill override this in any case...I would rather ask why not ? we are pinning to older version is there a reason for that ?
Quoted 6 lines
Current openal-soft, gst-ffmpeg and xbmc fail with libav-9, mplayer2 fails with old libav-8, we need someone to work on making them compatible with the same version of libav (preferably newer one - 9 or
10) and then we should switch.The problem--at least for gst-ffmpeg and xbmc--is that libav-9 drops
libpostproc.
http://git.libav.org/?p=libav.git;a=commit;h=b315042c8ce984bec431c5965120853a843cbfa5
I'll see if I can get http://git.videolan.org/?p=libpostproc.git to play nice.
Otherwise we could build the internal versions of ffmpeg in gst-ffmpeg and xbmc, but that seems dumb and wasteful.
--Tim
Re: [PATCH 4/4] libav (9.13): remove DEFAULT_PREFERENCE
Hi Tim,
Quoted 17 lines · On Sunday 25 May 2014 22:29:14 Tim Orling wrote:
Quoted 16 lines · Martin Jansa
Quoted 9 lines · Khem Raj
On Wed, May 21, 2014 at 4:57 AM, Paul Eggleton
Quoted 3 lines · <[email protected]> wrote:
Quoted 1 line
Use
PREFERRED_VERSION_libavin your distro definition instead.Why?
PREFERRED_VERSION_libavwill override this in any case...I would rather ask why not ? we are pinning to older version is there a reason for that ?
Current openal-soft, gst-ffmpeg and xbmc fail with libav-9, mplayer2 fails with old libav-8, we need someone to work on making them compatible with the same version of libav (preferably newer one - 9 or
10) and then we should switch.
Quoted 8 lines
Quoted 1 line
The problem--at least for gst-ffmpeg and xbmc--is that libav-9 drops
libpostproc.
http://git.libav.org/?p=libav.git;a=commit;h=b315042c8ce984bec431c5965120853a843cbfa5I'll see if I can get http://git.videolan.org/?p=libpostproc.git to play nice.
Maybe you already saw it, but we do have a libpostproc recipe in meta-oe...
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Re: [PATCH 4/4] libav (9.13): remove DEFAULT_PREFERENCE
Quoted 26 lines · Paul Eggleton
Hi Tim,
Quoted 13 lines · On Sunday 25 May 2014 22:29:14 Tim Orling wrote:
Quoted 11 lines · On Sat, May 24, 2014 at 1:42 AM, Martin Jansa <[email protected] wrote:
Quoted 9 lines · Khem Raj
On Wed, May 21, 2014 at 4:57 AM, Paul Eggleton
Quoted 3 lines · <[email protected]> wrote:
Quoted 1 line
Use
PREFERRED_VERSION_libavin your distro definition instead.Why?
PREFERRED_VERSION_libavwill override this in any case...I would rather ask why not ? we are pinning to older version is there a reason for that ?
Quoted 9 lines
Quoted 6 lines
Current openal-soft, gst-ffmpeg and xbmc fail with libav-9, mplayer2 fails with old libav-8, we need someone to work on making them compatible with the same version of libav (preferably newer one - 9 or
10) and then we should switch.The problem--at least for gst-ffmpeg and xbmc--is that libav-9 drops
libpostproc.
http://git.libav.org/?p=libav.git;a=commit;h=b315042c8ce984bec431c5965120853
Quoted 8 lines
Quoted 4 lines
a843cbfa5I'll see if I can get http://git.videolan.org/?p=libpostproc.git to play nice.
Maybe you already saw it, but we do have a libpostproc recipe in meta-oe...
:) I found that recipe shortly after I sent the above email. I am working
with that recipe now to see if I can get several multimedia packages to build with libav-9+. IMHO, gst-ffmpeg-0.10 needs to go away and this will help.
--Tim
Hi,
Should I rebase/repost this? Aside libav versions/pinning preferences, this single patch deserves to be commited.
Regards,
Matthieu
-----Message d'origine-----
De : [email protected] [mailto:[email protected]] De la part de Matthieu Crapet Envoyé : mercredi 21 mai 2014 13:38
À : [email protected]
Objet : [OE-core] [PATCH 1/4] libav: add PACKAGECONFIG for theora, libvorbis, speex and openssl
Dropped libvorvis dependency because there is already a (better) builtin vorbis codec. Don't confuse codec names: "vorbis" (builtin) and "libvorbis" (using external library).
Changes:
- add --enable-nonfree when faac or openssl are used
- add DESCRIPTION
- sort PACKAGECONFIG entries
Tested with libav-0.8.11 & libav-9.13.
--- meta/recipes-multimedia/libav/libav.inc | 39 ++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 8 deletions(-)
[...]
Quoted 4 lines · Matthieu CRAPET
Hi,
Should I rebase/repost this? Aside libav versions/pinning preferences, this single patch deserves to be commited.
Yes please, but I think you want to consider using bb.utils.contains_any() instead of your contains_one implementation.
Sau!
Quoted 27 lines
Regards,
Matthieu-----Message d'origine-----
De : [email protected] [mailto:[email protected]] De la part de Matthieu Crapet Envoyé : mercredi 21 mai 2014 13:38
À : [email protected]
Objet : [OE-core] [PATCH 1/4] libav: add PACKAGECONFIG for theora, libvorbis, speex and opensslDropped libvorvis dependency because there is already a (better) builtin vorbis codec. Don't confuse codec names: "vorbis" (builtin) and "libvorbis" (using external library).
Changes:
- add --enable-nonfree when faac or openssl are used
- add DESCRIPTION
- sort PACKAGECONFIG entriesTested with libav-0.8.11 & libav-9.13.
Signed-off-by Matthieu Crapet <[email protected]>--- meta/recipes-multimedia/libav/libav.inc | 39 ++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 8 deletions(-)[...]
Saul,
Quoted 1 line
bb.utils.contains_any()instead of yourcontains_oneimplementation.
It is different, that's why I have added it.
+# Check codecs that require --enable-nonfree
+USE_NONFREE = "${@contains_one('PACKAGECONFIG', [ 'faac', 'openssl' ], d)}"
contains_any will not work if PACKAGECONFIG have only one item (faac for example).
Should it be a possible addition to bitbake ?
Matthieu
-----Message d'origine-----
De : Saul Wold [mailto:[email protected]]
Envoyé : lundi 2 juin 2014 17:31
À : Matthieu CRAPET; [email protected]
Objet : Re: [OE-core] [PATCH 1/4] libav: add PACKAGECONFIG for theora, libvorbis, speex and openssl
Quoted 4 lines · Matthieu CRAPET
Hi,
Should I rebase/repost this? Aside libav versions/pinning preferences, this single patch deserves to be commited.
Yes please, but I think you want to consider using bb.utils.contains_any() instead of your contains_one implementation.
Sau!
Quoted 29 lines
Regards,
Matthieu-----Message d'origine-----
De : [email protected] [mailto:[email protected]] De la part de Matthieu Crapet Envoyé : mercredi 21 mai 2014 13:38 À :
[email protected]
Objet : [OE-core] [PATCH 1/4] libav: add PACKAGECONFIG for theora, libvorbis, speex and opensslDropped libvorvis dependency because there is already a (better) builtin vorbis codec. Don't confuse codec names: "vorbis" (builtin) and "libvorbis" (using external library).
Changes:
- add --enable-nonfree when faac or openssl are used
- add DESCRIPTION
- sort PACKAGECONFIG entriesTested with libav-0.8.11 & libav-9.13.
Signed-off-by Matthieu Crapet <[email protected]>--- meta/recipes-multimedia/libav/libav.inc | 39 ++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 8 deletions(-)[...]