All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [NEXT v2 1/7] libpjsip: remove disable-ext-sound option
@ 2017-11-14 16:07 Adam Duskett
  2017-11-14 16:07 ` [Buildroot] [NEXT v2 2/7] libpjsip: enable alsa support Adam Duskett
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Adam Duskett @ 2017-11-14 16:07 UTC (permalink / raw)
  To: buildroot

The configure option --disable-ext-sound currently isn't a valid option
in libpjsip. Originally it was used to prevent portaudio from building
in the third_party directory, however, portaudio no longer exists in that
directory.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
Changes v1 -> v2:
  - Added this patch to the start of the series.

 package/libpjsip/libpjsip.mk | 1 -
 1 file changed, 1 deletion(-)

diff --git a/package/libpjsip/libpjsip.mk b/package/libpjsip/libpjsip.mk
index c772d41..2eaefaf 100644
--- a/package/libpjsip/libpjsip.mk
+++ b/package/libpjsip/libpjsip.mk
@@ -37,7 +37,6 @@ LIBPJSIP_CONF_OPTS = \
 	--disable-libwebrtc \
 	--disable-opus \
 	--disable-oss \
-	--disable-ext-sound \
 	--disable-g711-codec \
 	--disable-l16-codec \
 	--disable-g722-codec \
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [NEXT v2 2/7] libpjsip: enable alsa support
  2017-11-14 16:07 [Buildroot] [NEXT v2 1/7] libpjsip: remove disable-ext-sound option Adam Duskett
@ 2017-11-14 16:07 ` Adam Duskett
  2017-11-14 17:00   ` Thomas Petazzoni
  2017-11-14 16:07 ` [Buildroot] [NEXT v2 3/7] libpjsip: enable portaudio support Adam Duskett
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 10+ messages in thread
From: Adam Duskett @ 2017-11-14 16:07 UTC (permalink / raw)
  To: buildroot

If alsa-lib is selected, libpjsip should depend on it.
Also, remove --disable-sound in the configure options or else sound would
still be disabled.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
Changes v1 -> v2:
  - Remove the option to enable or disable alsa support in favor of
    just depending on alsa-lib if it's selected by the user.
  
 package/libpjsip/libpjsip.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/package/libpjsip/libpjsip.mk b/package/libpjsip/libpjsip.mk
index 2eaefaf..14dbb8e 100644
--- a/package/libpjsip/libpjsip.mk
+++ b/package/libpjsip/libpjsip.mk
@@ -25,7 +25,6 @@ LIBPJSIP_CONF_ENV = \
 	CFLAGS="$(LIBPJSIP_CFLAGS)"
 
 LIBPJSIP_CONF_OPTS = \
-	--disable-sound \
 	--disable-gsm-codec \
 	--disable-speex-codec \
 	--disable-speex-aec \
@@ -67,4 +66,8 @@ ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
 LIBPJSIP_DEPENDENCIES += util-linux
 endif
 
+ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
+LIBPJSIP_DEPENDENCIES += alsa-lib
+endif
+
 $(eval $(autotools-package))
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [NEXT v2 3/7] libpjsip: enable portaudio support
  2017-11-14 16:07 [Buildroot] [NEXT v2 1/7] libpjsip: remove disable-ext-sound option Adam Duskett
  2017-11-14 16:07 ` [Buildroot] [NEXT v2 2/7] libpjsip: enable alsa support Adam Duskett
@ 2017-11-14 16:07 ` Adam Duskett
  2017-11-14 16:07 ` [Buildroot] [NEXT v2 4/7] libpjsip: enable ffmpeg support Adam Duskett
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Adam Duskett @ 2017-11-14 16:07 UTC (permalink / raw)
  To: buildroot

If portaudio is selected, libpjsip should depend on it.
Specifying --with-external-pa was originally used to prevent libpjsip
from building the portaudio library in the third_party directory, however,
portaudio no longer exists in the third_party directory.  This option now
is used to force libpjsip to check for external portaudio headers. 

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
Changes v1 -> v2:
  - Remove the option to enable or disable portaudio support in favor of
    just depending on portaudio if it's selected by the user.

 package/libpjsip/libpjsip.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/libpjsip/libpjsip.mk b/package/libpjsip/libpjsip.mk
index 14dbb8e..3c9d789 100644
--- a/package/libpjsip/libpjsip.mk
+++ b/package/libpjsip/libpjsip.mk
@@ -70,4 +70,9 @@ ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
 LIBPJSIP_DEPENDENCIES += alsa-lib
 endif
 
+ifeq ($(BR2_PACKAGE_PORTAUDIO),y)
+LIBPJSIP_DEPENDENCIES += portaudio
+LIBPJSIP_CONF_OPTS += --with-external-pa
+endif
+
 $(eval $(autotools-package))
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [NEXT v2 4/7] libpjsip: enable ffmpeg support
  2017-11-14 16:07 [Buildroot] [NEXT v2 1/7] libpjsip: remove disable-ext-sound option Adam Duskett
  2017-11-14 16:07 ` [Buildroot] [NEXT v2 2/7] libpjsip: enable alsa support Adam Duskett
  2017-11-14 16:07 ` [Buildroot] [NEXT v2 3/7] libpjsip: enable portaudio support Adam Duskett
@ 2017-11-14 16:07 ` Adam Duskett
  2017-11-19 13:58   ` Arnout Vandecappelle
  2017-11-14 16:07 ` [Buildroot] [NEXT v2 5/7] libpjsip: enable v4l2 support Adam Duskett
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 10+ messages in thread
From: Adam Duskett @ 2017-11-14 16:07 UTC (permalink / raw)
  To: buildroot

If FFmpeg is selected, libpjsip should depend on it.
Specifying --with-ffmpeg= is necessary because passing --enable-FFmpeg
actually disables FFmpeg when cross compiling.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
Changes v1 -> v2:
  - Remove the option to enable or disable FFmpeg support in favor of
    just depending on FFmpeg if it's selected by the user.
  - Add explination as to why with-ffmpeg is being passed to libpjsip (Arnout)

 package/libpjsip/libpjsip.mk | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/package/libpjsip/libpjsip.mk b/package/libpjsip/libpjsip.mk
index 3c9d789..982e088 100644
--- a/package/libpjsip/libpjsip.mk
+++ b/package/libpjsip/libpjsip.mk
@@ -29,7 +29,6 @@ LIBPJSIP_CONF_OPTS = \
 	--disable-speex-codec \
 	--disable-speex-aec \
 	--disable-resample \
-	--disable-video \
 	--disable-opencore-amr \
 	--disable-g7221-codec \
 	--disable-ilbc-codec \
@@ -41,7 +40,6 @@ LIBPJSIP_CONF_OPTS = \
 	--disable-g722-codec \
 	--disable-libsamplerate \
 	--disable-sdl \
-	--disable-ffmpeg \
 	--disable-v4l2 \
 	--disable-openh264 \
 	--disable-libyuv \
@@ -75,4 +73,13 @@ LIBPJSIP_DEPENDENCIES += portaudio
 LIBPJSIP_CONF_OPTS += --with-external-pa
 endif
 
+# Passing --enable-ffmpeg actually disables it. Instead, --with-ffmpeg
+# must be passed to compile ffmpeg support.
+ifeq ($(BR2_PACKAGE_FFMPEG),y)
+LIBPJSIP_DEPENDENCIES += ffmpeg
+LIBPJSIP_CONF_OPTS += --with-ffmpeg=$(STAGING_DIR)/usr
+else
+LIBPJSIP_CONF_OPTS += --disable-ffmpeg
+endif
+
 $(eval $(autotools-package))
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [NEXT v2 5/7] libpjsip: enable v4l2 support
  2017-11-14 16:07 [Buildroot] [NEXT v2 1/7] libpjsip: remove disable-ext-sound option Adam Duskett
                   ` (2 preceding siblings ...)
  2017-11-14 16:07 ` [Buildroot] [NEXT v2 4/7] libpjsip: enable ffmpeg support Adam Duskett
@ 2017-11-14 16:07 ` Adam Duskett
  2017-11-14 16:07 ` [Buildroot] [NEXT v2 6/7] libpjsip: add dependency-less codecs Adam Duskett
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Adam Duskett @ 2017-11-14 16:07 UTC (permalink / raw)
  To: buildroot

If v4l2 is selected, libpjsip should depend on it.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
Changes v1 -> v2:
  - Remove the option to enable or disable v4l2 support in favor of
    just depending on libv4l if it's selected by the user.

 package/libpjsip/libpjsip.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/package/libpjsip/libpjsip.mk b/package/libpjsip/libpjsip.mk
index 982e088..8b6fd09 100644
--- a/package/libpjsip/libpjsip.mk
+++ b/package/libpjsip/libpjsip.mk
@@ -40,7 +40,6 @@ LIBPJSIP_CONF_OPTS = \
 	--disable-g722-codec \
 	--disable-libsamplerate \
 	--disable-sdl \
-	--disable-v4l2 \
 	--disable-openh264 \
 	--disable-libyuv \
 	--disable-ipp \
@@ -82,4 +81,10 @@ else
 LIBPJSIP_CONF_OPTS += --disable-ffmpeg
 endif
 
+ifeq ($(BR2_PACKAGE_LIBV4L),y)
+LIBPJSIP_DEPENDENCIES += libv4l
+else
+LIBPJSIP_CONF_OPTS += --disable-v4l2
+endif
+
 $(eval $(autotools-package))
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [NEXT v2 6/7] libpjsip: add dependency-less codecs
  2017-11-14 16:07 [Buildroot] [NEXT v2 1/7] libpjsip: remove disable-ext-sound option Adam Duskett
                   ` (3 preceding siblings ...)
  2017-11-14 16:07 ` [Buildroot] [NEXT v2 5/7] libpjsip: enable v4l2 support Adam Duskett
@ 2017-11-14 16:07 ` Adam Duskett
  2017-11-14 16:07 ` [Buildroot] [NEXT v2 7/7] libpjsip: add codecs with dependencies Adam Duskett
  2017-11-18 17:08 ` [Buildroot] [NEXT v2 1/7] libpjsip: remove disable-ext-sound option Arnout Vandecappelle
  6 siblings, 0 replies; 10+ messages in thread
From: Adam Duskett @ 2017-11-14 16:07 UTC (permalink / raw)
  To: 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 <aduskett@gmail.com>
---
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))
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [NEXT v2 7/7] libpjsip: add codecs with dependencies
  2017-11-14 16:07 [Buildroot] [NEXT v2 1/7] libpjsip: remove disable-ext-sound option Adam Duskett
                   ` (4 preceding siblings ...)
  2017-11-14 16:07 ` [Buildroot] [NEXT v2 6/7] libpjsip: add dependency-less codecs Adam Duskett
@ 2017-11-14 16:07 ` Adam Duskett
  2017-11-18 17:08 ` [Buildroot] [NEXT v2 1/7] libpjsip: remove disable-ext-sound option Arnout Vandecappelle
  6 siblings, 0 replies; 10+ messages in thread
From: Adam Duskett @ 2017-11-14 16:07 UTC (permalink / raw)
  To: buildroot

Add all supported codecs that rely on external dependencies. These codecs are:
- bcg729
- gsm
- opus
- speex

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
Changes v1 -> v2:
  - Combine all codecs with external dependencies into a single patch.

 package/libpjsip/Config.in   | 22 ++++++++++++++++++++++
 package/libpjsip/libpjsip.mk | 32 ++++++++++++++++++++++++++++----
 2 files changed, 50 insertions(+), 4 deletions(-)

diff --git a/package/libpjsip/Config.in b/package/libpjsip/Config.in
index d21a5b5..ef05dea 100644
--- a/package/libpjsip/Config.in
+++ b/package/libpjsip/Config.in
@@ -29,6 +29,28 @@ config BR2_PACKAGE_LIBPJSIP_CODEC_ILBC
 config BR2_PACKAGE_LIBPJSIP_CODEC_L16
 	bool "L16"
 
+comment "Codecs with external dependencies"
+
+config BR2_PACKAGE_LIBPJSIP_CODEC_BCG729
+	bool "BCG729"
+	select BR2_PACKAGE_BCG729
+
+config BR2_PACKAGE_LIBPJSIP_CODEC_GSM
+	bool "GSM"
+	depends on !BR2_STATIC_LIBS # libgsm
+	select BR2_PACKAGE_LIBGSM
+
+comment "GSM codec needs a toolchain w/ shared libraries"
+	depends on BR2_STATIC_LIBS
+
+config BR2_PACKAGE_LIBPJSIP_CODEC_OPUS
+	bool "Opus"
+	select BR2_PACKAGE_OPUS
+
+config BR2_PACKAGE_LIBPJSIP_CODEC_SPEEX
+	bool "Speex"
+	select BR2_PACKAGE_SPEEX
+
 endif #BR2_PACKAGE_LIBPJSIP
 
 comment "libpjsip needs a toolchain w/ C++, threads"
diff --git a/package/libpjsip/libpjsip.mk b/package/libpjsip/libpjsip.mk
index 69d412a..cfdb3af 100644
--- a/package/libpjsip/libpjsip.mk
+++ b/package/libpjsip/libpjsip.mk
@@ -25,13 +25,9 @@ LIBPJSIP_CONF_ENV = \
 	CFLAGS="$(LIBPJSIP_CFLAGS)"
 
 LIBPJSIP_CONF_OPTS = \
-	--disable-gsm-codec \
-	--disable-speex-codec \
-	--disable-speex-aec \
 	--disable-resample \
 	--disable-opencore-amr \
 	--disable-libwebrtc \
-	--disable-opus \
 	--disable-oss \
 	--disable-libsamplerate \
 	--disable-sdl \
@@ -109,4 +105,32 @@ ifneq ($(BR2_PACKAGE_LIBPJSIP_CODEC_L16),y)
 LIBPJSIP_CONF_OPTS += --disable-l16-codec
 endif
 
+# Codecs with external dependencies
+ifeq ($(BR2_PACKAGE_LIBPJSIP_CODEC_BCG729),y)
+LIBPJSIP_DEPENDENCIES += bcg729
+LIBPJSIP_CONF_OPTS += --with-bcg729=$(STAGING_DIR)/usr
+else
+LIBPJSIP_CONF_OPTS += --disable-bcg729
+endif
+
+ifeq ($(BR2_PACKAGE_LIBPJSIP_CODEC_GSM),y)
+LIBPJSIP_DEPENDENCIES += libgsm
+LIBPJSIP_CONF_OPTS += --with-external-gsm
+else
+LIBPJSIP_CONF_OPTS += --disable-gsm-codec
+endif
+
+ifeq ($(BR2_PACKAGE_LIBPJSIP_CODEC_OPUS),y)
+LIBPJSIP_DEPENDENCIES += opus
+else
+LIBPJSIP_CONF_OPTS += --disable-opus
+endif
+
+ifeq ($(BR2_PACKAGE_LIBPJSIP_CODEC_SPEEX),y)
+LIBPJSIP_DEPENDENCIES += speex
+LIBPJSIP_CONF_OPTS += --with-external-speex
+else
+LIBPJSIP_CONF_OPTS += --disable-speex-codec --disable-speex-aec
+endif
+
 $(eval $(autotools-package))
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [NEXT v2 2/7] libpjsip: enable alsa support
  2017-11-14 16:07 ` [Buildroot] [NEXT v2 2/7] libpjsip: enable alsa support Adam Duskett
@ 2017-11-14 17:00   ` Thomas Petazzoni
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2017-11-14 17:00 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 14 Nov 2017 11:07:07 -0500, Adam Duskett wrote:
> If alsa-lib is selected, libpjsip should depend on it.
> Also, remove --disable-sound in the configure options or else sound would
> still be disabled.
> 
> Signed-off-by: Adam Duskett <aduskett@gmail.com>
> ---
> Changes v1 -> v2:
>   - Remove the option to enable or disable alsa support in favor of
>     just depending on alsa-lib if it's selected by the user.

Why? This seems completely backward with the typical Buildroot
practices.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [NEXT v2 1/7] libpjsip: remove disable-ext-sound option
  2017-11-14 16:07 [Buildroot] [NEXT v2 1/7] libpjsip: remove disable-ext-sound option Adam Duskett
                   ` (5 preceding siblings ...)
  2017-11-14 16:07 ` [Buildroot] [NEXT v2 7/7] libpjsip: add codecs with dependencies Adam Duskett
@ 2017-11-18 17:08 ` Arnout Vandecappelle
  6 siblings, 0 replies; 10+ messages in thread
From: Arnout Vandecappelle @ 2017-11-18 17:08 UTC (permalink / raw)
  To: buildroot

 Hi Adam,

On 14-11-17 17:07, Adam Duskett wrote:
> The configure option --disable-ext-sound currently isn't a valid option
> in libpjsip. Originally it was used to prevent portaudio from building
> in the third_party directory, however, portaudio no longer exists in that
> directory.
> 
> Signed-off-by: Adam Duskett <aduskett@gmail.com>
> ---
> Changes v1 -> v2:
>   - Added this patch to the start of the series.
> 
>  package/libpjsip/libpjsip.mk | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/package/libpjsip/libpjsip.mk b/package/libpjsip/libpjsip.mk
> index c772d41..2eaefaf 100644
> --- a/package/libpjsip/libpjsip.mk
> +++ b/package/libpjsip/libpjsip.mk
> @@ -37,7 +37,6 @@ LIBPJSIP_CONF_OPTS = \
>  	--disable-libwebrtc \
>  	--disable-opus \
>  	--disable-oss \
> -	--disable-ext-sound \

 I tried all combinations of the different sound options, and these are my
conclusions:

1. --enable-sound and --disable-sound both work as expected and have the effect
of enabling alsa support. It has no other effect. So, I think patch 2/7 should
pass --enable-sound if alsa is enabled, and --disable-sound if not.

2. --disable-ext-sound has no effect at all. However, since the option still
exists, and to be future-safe in case that it may make a difference, I would not
remove the option (just like you don't remove --disable-oss).

3. --with-external-pa also has no effect on the build result, other than giving
the warning
<command-line>:0:0: warning: "PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO" redefined

 Indeed, os-auto.mk will set this define twice: it is set to 1 due to
--with-external-pa, and then set to 0 due to --enable-sound
(AC_PJMEDIA_SND=alsa) or --disable-sound (AC_PJMEDIA_SND=null). The 0 "wins" so
portaudio is not used at all.

 Therefore, I'd remove patch 3/7 entirely and instead add an explicit
--without-external-pa.


 Regards,
 Arnout


>  	--disable-g711-codec \
>  	--disable-l16-codec \
>  	--disable-g722-codec \
> 

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [NEXT v2 4/7] libpjsip: enable ffmpeg support
  2017-11-14 16:07 ` [Buildroot] [NEXT v2 4/7] libpjsip: enable ffmpeg support Adam Duskett
@ 2017-11-19 13:58   ` Arnout Vandecappelle
  0 siblings, 0 replies; 10+ messages in thread
From: Arnout Vandecappelle @ 2017-11-19 13:58 UTC (permalink / raw)
  To: buildroot



On 14-11-17 17:07, Adam Duskett wrote:
> If FFmpeg is selected, libpjsip should depend on it.
> Specifying --with-ffmpeg= is necessary because passing --enable-FFmpeg
> actually disables FFmpeg when cross compiling.
> 
> Signed-off-by: Adam Duskett <aduskett@gmail.com>
> ---
> Changes v1 -> v2:
>   - Remove the option to enable or disable FFmpeg support in favor of
>     just depending on FFmpeg if it's selected by the user.
>   - Add explination as to why with-ffmpeg is being passed to libpjsip (Arnout)
> 
>  package/libpjsip/libpjsip.mk | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/package/libpjsip/libpjsip.mk b/package/libpjsip/libpjsip.mk
> index 3c9d789..982e088 100644
> --- a/package/libpjsip/libpjsip.mk
> +++ b/package/libpjsip/libpjsip.mk
> @@ -29,7 +29,6 @@ LIBPJSIP_CONF_OPTS = \
>  	--disable-speex-codec \
>  	--disable-speex-aec \
>  	--disable-resample \
> -	--disable-video \

 This bit should have a bit more explanation in the commit message. Like:

--enable-video has no effect at all on Linux (only on Android and darwin).
--disable-video has the effect of disabling SDL, ffmpeg, v4l2, openh264 and
libyuv. Since all of these are enabled/disabled explicitly already, there is no
need to specify --disable-video. To do so correctly is non-trivial when we want
to support e.g. ffmpeg OR v4l2.

>  	--disable-opencore-amr \
>  	--disable-g7221-codec \
>  	--disable-ilbc-codec \
> @@ -41,7 +40,6 @@ LIBPJSIP_CONF_OPTS = \
>  	--disable-g722-codec \
>  	--disable-libsamplerate \
>  	--disable-sdl \
> -	--disable-ffmpeg \
>  	--disable-v4l2 \
>  	--disable-openh264 \
>  	--disable-libyuv \
> @@ -75,4 +73,13 @@ LIBPJSIP_DEPENDENCIES += portaudio
>  LIBPJSIP_CONF_OPTS += --with-external-pa
>  endif
>  
> +# Passing --enable-ffmpeg actually disables it. Instead, --with-ffmpeg
> +# must be passed to compile ffmpeg support.

 Here, I would also give the full explanation in the commit message:

When --enable-ffmpeg is given, the code to enable ffmpeg is not executed. Also,
when cross-compiling and no --with-ffmpeg option is given, ffmpeg is disbled.
Therefore, a --with-ffmpeg option needs to be given. Normally it is used to pass
the path to the directory where ffmpeg is installed, but since we install it
directly under sysroot we can pass it empty.

> +ifeq ($(BR2_PACKAGE_FFMPEG),y)
> +LIBPJSIP_DEPENDENCIES += ffmpeg
> +LIBPJSIP_CONF_OPTS += --with-ffmpeg=$(STAGING_DIR)/usr

 --with-ffmpeg without anything works as well, i.e.:

LIBPJSIP_CONF_OPTS += --with-ffmpeg

 Regards,
 Arnout

> +else
> +LIBPJSIP_CONF_OPTS += --disable-ffmpeg
> +endif
> +
>  $(eval $(autotools-package))
> 

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-11-19 13:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-14 16:07 [Buildroot] [NEXT v2 1/7] libpjsip: remove disable-ext-sound option Adam Duskett
2017-11-14 16:07 ` [Buildroot] [NEXT v2 2/7] libpjsip: enable alsa support Adam Duskett
2017-11-14 17:00   ` Thomas Petazzoni
2017-11-14 16:07 ` [Buildroot] [NEXT v2 3/7] libpjsip: enable portaudio support Adam Duskett
2017-11-14 16:07 ` [Buildroot] [NEXT v2 4/7] libpjsip: enable ffmpeg support Adam Duskett
2017-11-19 13:58   ` Arnout Vandecappelle
2017-11-14 16:07 ` [Buildroot] [NEXT v2 5/7] libpjsip: enable v4l2 support Adam Duskett
2017-11-14 16:07 ` [Buildroot] [NEXT v2 6/7] libpjsip: add dependency-less codecs Adam Duskett
2017-11-14 16:07 ` [Buildroot] [NEXT v2 7/7] libpjsip: add codecs with dependencies Adam Duskett
2017-11-18 17:08 ` [Buildroot] [NEXT v2 1/7] libpjsip: remove disable-ext-sound option Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.