From patchwork Tue Nov 14 16:07:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 837929 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="LBTU4WgP"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ybtBB4pwtz9sDB for ; Wed, 15 Nov 2017 03:24:18 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id D7AE385C63; Tue, 14 Nov 2017 16:24:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VraIm72gx5py; Tue, 14 Nov 2017 16:24:15 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3935E85FAD; Tue, 14 Nov 2017 16:24:15 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 87ED91C20FC for ; Tue, 14 Nov 2017 16:07:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 833A587070 for ; Tue, 14 Nov 2017 16:07:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8nT_0kj9_UiB for ; Tue, 14 Nov 2017 16:07:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-it0-f66.google.com (mail-it0-f66.google.com [209.85.214.66]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 798A486B65 for ; Tue, 14 Nov 2017 16:07:49 +0000 (UTC) Received: by mail-it0-f66.google.com with SMTP id y15so14192343ita.4 for ; Tue, 14 Nov 2017 08:07:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=j1oSX+5vazUlqW6Fr1zmW3Deul7TFdXP8//gWAUXYpA=; b=LBTU4WgPzdphi5Q6fOCIpzd8OYM1mv4VPqAw31JxqOIqPzqHJL3sWS2UZuQ1uvpVv5 Fh70d4bzlWuPKtHaJ6s5B6IxSG2GbU3wAN51lnxxB6fkZYyvp3mzqs98Vx14Oi0+dstb nmYYLDS2lEiwZjdk+BxDqYifOMRycJkGYf+s6iawregdHKVhKoHnIQKt9+1cTvJ4Lx9y nBi4uQeMxk6P68UXMkrWYblbC883lfSaQWIMsansI0DHSYYrdvBc0XJPwYkmIBT//uok ETXRTsfJUz2ISMoX4clRwUeWsBqDHPpDg531npXyAnKcYMGG4UMkkeJ9LJo7E0bipOBm PhzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=j1oSX+5vazUlqW6Fr1zmW3Deul7TFdXP8//gWAUXYpA=; b=chChqaiSurgDk5lWdl9+tXLtcuma8Kv0Oc5Fik0SpzA4HB2gdSye4G54htUeAUfiGd g34dfeDaOechCKuJoH+p86vkm6HAOceVfeihmOgGmqREVzMMM5y+9epmU0khvXLliPYn WguBxbtWAniJyHdO+AKaImMGfHY6Zv+2LoQCl9JFnttgzjdj+Z/i7qQcMUptfQ2BFwi/ DeuCoQOacTSJyEdEfDH9nRyVhJmFaWIncafH7o7buONndK+4eHHhda1S1JgwYqC41AGU gjEm61jdwJr4/MIIzwKzE2HNemfE2u1OGby0fE0deX84S8HEncpONJsB10EzBI+VFz7r WXGA== X-Gm-Message-State: AJaThX6YNuLsooI+RB+GwXQChubklSw253ENypBkbP/h9fkMAU/YvM6+ 21es/4zXrkIfEwPyn7A8l9WWr0un X-Google-Smtp-Source: AGs4zMY6yJyfBBOBhXn8LS9NcJOReN2Gkpo31mKjSydUhSaYdx39+yzQWeIcEQwtz0xm7q/KSIbVDw== X-Received: by 10.36.9.146 with SMTP id 140mr6814211itm.54.1510675668602; Tue, 14 Nov 2017 08:07:48 -0800 (PST) Received: from localhost.localdomain (mail.codeblue.com. [65.183.183.198]) by smtp.gmail.com with ESMTPSA id u187sm8633510iod.22.2017.11.14.08.07.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Nov 2017 08:07:47 -0800 (PST) From: Adam Duskett To: buildroot@buildroot.org Date: Tue, 14 Nov 2017 11:07:11 -0500 Message-Id: <20171114160712.20086-6-aduskett@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171114160712.20086-1-aduskett@gmail.com> References: <20171114160712.20086-1-aduskett@gmail.com> Subject: [Buildroot] [NEXT v2 6/7] libpjsip: add dependency-less codecs X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adam Duskett MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" libpjsip has several codecs, all of which can be disabled or enabled individually. A few reasons for adding each codec as an individual choice are: 1) Many products might not want some of the more obscure codecs such as ILBC or L16. 2) libpjsip has functions that will enumerate all the codecs that were built. If all the codecs where built, this would require a developer to have to parse out the codecs they don't want. As such, turn libpjsip into a menuconfig and add each supported codec as an individual choice. Start with the codecs that are built into libpjsip and have no external dependencies. These codecs are: - G.711 - G.722 - G.722.1 - iLBC - L16 Signed-off-by: Adam Duskett --- Changes v1 -> v2: - Combine all dependency-less codecs into a single patch. - Add a more-detailed commit message explaining the reasoning for enabling each codec as a individual option. (Arnout) package/libpjsip/Config.in | 23 ++++++++++++++++++++++- package/libpjsip/libpjsip.mk | 32 +++++++++++++++++++++++++++----- 2 files changed, 49 insertions(+), 6 deletions(-) diff --git a/package/libpjsip/Config.in b/package/libpjsip/Config.in index 727d2ec..d21a5b5 100644 --- a/package/libpjsip/Config.in +++ b/package/libpjsip/Config.in @@ -1,4 +1,4 @@ -config BR2_PACKAGE_LIBPJSIP +menuconfig BR2_PACKAGE_LIBPJSIP bool "libpjsip" depends on BR2_INSTALL_LIBSTDCPP depends on BR2_TOOLCHAIN_HAS_THREADS @@ -10,5 +10,26 @@ config BR2_PACKAGE_LIBPJSIP http://www.pjsip.org +if BR2_PACKAGE_LIBPJSIP + +comment "dependency-less codecs" + +config BR2_PACKAGE_LIBPJSIP_CODEC_G711 + bool "G.711" + +config BR2_PACKAGE_LIBPJSIP_CODEC_G722 + bool "G.722" + +config BR2_PACKAGE_LIBPJSIP_CODEC_G7221 + bool "G.722.1" + +config BR2_PACKAGE_LIBPJSIP_CODEC_ILBC + bool "iLBC" + +config BR2_PACKAGE_LIBPJSIP_CODEC_L16 + bool "L16" + +endif #BR2_PACKAGE_LIBPJSIP + comment "libpjsip needs a toolchain w/ C++, threads" depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libpjsip/libpjsip.mk b/package/libpjsip/libpjsip.mk index 8b6fd09..69d412a 100644 --- a/package/libpjsip/libpjsip.mk +++ b/package/libpjsip/libpjsip.mk @@ -30,14 +30,9 @@ LIBPJSIP_CONF_OPTS = \ --disable-speex-aec \ --disable-resample \ --disable-opencore-amr \ - --disable-g7221-codec \ - --disable-ilbc-codec \ --disable-libwebrtc \ --disable-opus \ --disable-oss \ - --disable-g711-codec \ - --disable-l16-codec \ - --disable-g722-codec \ --disable-libsamplerate \ --disable-sdl \ --disable-openh264 \ @@ -87,4 +82,31 @@ else LIBPJSIP_CONF_OPTS += --disable-v4l2 endif +# Codecs can only be disabled. If explicitly enabled, the check is +# omitted (but successful), and there is no configure trace "Checking +# if [codec] codec is disabled...no". So we only explicitly disable it +# and we do not explicitly enable it, so we get the configure log in +# both cases. +ifneq ($(BR2_PACKAGE_LIBPJSIP_CODEC_G711),y) +LIBPJSIP_CONF_OPTS += --disable-g711-codec +endif + +ifneq ($(BR2_PACKAGE_LIBPJSIP_CODEC_G722),y) +LIBPJSIP_CONF_OPTS += --disable-g722-codec +endif + +# libpjsip can only use a bundled version of libg7221 +ifneq ($(BR2_PACKAGE_LIBPJSIP_CODEC_G7221),y) +LIBPJSIP_CONF_OPTS += --disable-g7221-codec +endif + +# libpjsip can only use a bundled version of libilbc +ifneq ($(BR2_PACKAGE_LIBPJSIP_CODEC_ILBC),y) +LIBPJSIP_CONF_OPTS += --disable-ilbc-codec +endif + +ifneq ($(BR2_PACKAGE_LIBPJSIP_CODEC_L16),y) +LIBPJSIP_CONF_OPTS += --disable-l16-codec +endif + $(eval $(autotools-package))