From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9D0891385C2 for ; Mon, 21 Jan 2013 10:48:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5929D21C09B; Mon, 21 Jan 2013 10:48:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 58C3A21C03D for ; Mon, 21 Jan 2013 10:48:31 +0000 (UTC) Received: from localhost (pc-234-79-101-190.cm.vtr.net [190.101.79.234]) (using SSLv3 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aballier) by smtp.gentoo.org (Postfix) with ESMTPSA id A410133D77F; Mon, 21 Jan 2013 10:48:29 +0000 (UTC) Date: Mon, 21 Jan 2013 07:48:23 -0300 From: Alexis Ballier To: gentoo-dev@lists.gentoo.org Cc: phajdan.jr@gentoo.org Subject: Re: [gentoo-dev] Chromium system ffmpeg Message-ID: <20130121074823.37d9fa49@gentoo.org> In-Reply-To: <50FC329B.9090102@gentoo.org> References: <50F4DC62.1010500@gentoo.org> <20130115095506.6e033640@gentoo.org> <50FAEF9E.2070205@gentoo.org> <50FBBD00.2030002@gentoo.org> <50FC329B.9090102@gentoo.org> Organization: Gentoo X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.14; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 3bc76232-b3ce-45fb-af84-e87ae62022bc X-Archives-Hash: 05f2969ca20844c3c8a43f93067e0e8f On Sun, 20 Jan 2013 10:08:27 -0800 ""Pawe=C5=82 Hajdan, Jr."" wrote: > On 1/20/13 1:46 AM, Luca Barbato wrote: > > On 19/01/13 20:10, "Pawe=C5=82 Hajdan, Jr." wrote: > >> have a way to more simply exclude code that requires CODEC_ID_OPUS. > >=20 > > Exclude in chrome or in libavcodec? > >=20 > > The latter is a matter of adding --disable-decoder=3Dopus and/or not > > --enable-libopus in the configure. >=20 > Exclude in chrome, in case old ffmpeg/libav does not support it. yes in this case you need some #if VERSION < foo conditions (git blame & cie are your friends to obtain the version in which it appeared). it becomes messy when you realize minor/micro versions within ffmpeg and libav are not at all the same. vlc has some macro for this: http://git.videolan.org/?p=3Dvlc.git;a=3Dblob;f=3Dmodules/codec/avcodec/avc= odec.h;h=3D8c8dd20ed3400527cab84265f4442bf06eb06f8d;hb=3DHEAD /* LIBAVCODEC_VERSION_CHECK checks for the right version of libav and FFmpeg 282 * a is the major version * b and c the minor and micro versions of libav * d and e the minor and micro versions of FFmpeg */ #define LIBAVCODEC_VERSION_CHECK( a, b, c, d, e ) \ (LIBAVCODEC_VERSION_MICRO < 100 && LIBAVCODEC_VERSION_INT >=3D AV_VERSION_INT( a, b, c ) ) || \=20 (LIBAVCODEC_VERSION_MICRO >=3D 100 && LIBAVCODEC_VERSION_INT >=3D AV_VERSION_INT( a, d, e ) ) _MICRO is >=3D 100 in ffmpeg so that you can distinguish between the two. Another option could be to check for the enum member at configure time. Alexis.