diff mbox series

[1/1] package/mediastreamer: speexdsp and portaudio needs speex

Message ID 20200310195838.2988-1-fontaine.fabrice@gmail.com
State Superseded
Headers show
Series [1/1] package/mediastreamer: speexdsp and portaudio needs speex | expand

Commit Message

Fabrice Fontaine March 10, 2020, 7:58 p.m. UTC
Commit 8f5562ed7c227f29dbfa6897f54dccda0dfbf656 wrongly removed speex
dependency from speexdsp and portaudio

Fixes:
 - http://autobuild.buildroot.org/results/e6adf151141ae56f5194165fd5b74b52164bfb17
 - http://autobuild.buildroot.org/results/32d06517a5470f71d9b7dc99139f6c3071e7d77d

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/mediastreamer/mediastreamer.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Thomas Petazzoni March 22, 2020, 9:09 p.m. UTC | #1
Hello,

On Tue, 10 Mar 2020 20:58:38 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> -ifeq ($(BR2_PACKAGE_PORTAUDIO),y)
> +# portaudio backend needs speex as well
> +ifeq ($(BR2_PACKAGE_PORTAUDIO)$(BR2_PACKAGE_SPEEX)$(BR2_PACKAGE_SPEEXDSP),yyy)

Does it needs speexdsp, or just speex ?

>  MEDIASTREAMER_CONF_OPTS += \
>  	-DENABLE_PORTAUDIO=ON \
>  	-DENABLE_SOUND=ON
> @@ -105,7 +106,7 @@ else
>  MEDIASTREAMER_CONF_OPTS += -DENABLE_SPEEX_CODEC=OFF
>  endif
>  
> -ifeq ($(BR2_PACKAGE_SPEEXDSP),y)
> +ifeq ($(BR2_PACKAGE_SPEEX)$(BR2_PACKAGE_SPEEXDSP),yy)
>  MEDIASTREAMER_CONF_OPTS += -DENABLE_SPEEX_DSP=ON

Are you sure about this one ? If you look at the build failure at
http://autobuild.buildroot.org/results/32d06517a5470f71d9b7dc99139f6c3071e7d77d,
it fails when building src/audiofilters/msresample.c. This file is
built when ENABLE_RESAMPLE=ON.

So strictly speaking, it's not the SPEEX_DSP support that needs SPEEX,
but it's the RESAMPLE support that needs both SPEEX and SPEEX_DSP. So
the following change:

diff --git a/package/mediastreamer/mediastreamer.mk b/package/mediastreamer/mediastreamer.mk
index dcec66dfcd..53024d2f07 100644
--- a/package/mediastreamer/mediastreamer.mk
+++ b/package/mediastreamer/mediastreamer.mk
@@ -112,6 +112,12 @@ else
 MEDIASTREAMER_CONF_OPTS += -DENABLE_SPEEX_DSP=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_SPEEX)$(BR2_PACKAGE_SPEEXDSP),yy)
+MEDIASTREAMER_CONF_OPTS += -DENABLE_RESAMPLE=ON
+else
+MEDIASTREAMER_CONF_OPTS += -DENABLE_RESAMPLE=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),y)
 MEDIASTREAMER_CONF_OPTS += -DENABLE_FFMPEG=ON
 MEDIASTREAMER_DEPENDENCIES += ffmpeg

Fixes the second build failure in a way that is more correct IMO.

Also, did you report these build issues upstream? They indicate that
the CMakeLists.txt doesn't have the appropriate logic.

Best regards,

Thomas
diff mbox series

Patch

diff --git a/package/mediastreamer/mediastreamer.mk b/package/mediastreamer/mediastreamer.mk
index dcec66dfcd..5db0effbb4 100644
--- a/package/mediastreamer/mediastreamer.mk
+++ b/package/mediastreamer/mediastreamer.mk
@@ -80,7 +80,8 @@  else
 MEDIASTREAMER_CONF_OPTS += -DENABLE_OPUS=OFF
 endif
 
-ifeq ($(BR2_PACKAGE_PORTAUDIO),y)
+# portaudio backend needs speex as well
+ifeq ($(BR2_PACKAGE_PORTAUDIO)$(BR2_PACKAGE_SPEEX)$(BR2_PACKAGE_SPEEXDSP),yyy)
 MEDIASTREAMER_CONF_OPTS += \
 	-DENABLE_PORTAUDIO=ON \
 	-DENABLE_SOUND=ON
@@ -105,7 +106,7 @@  else
 MEDIASTREAMER_CONF_OPTS += -DENABLE_SPEEX_CODEC=OFF
 endif
 
-ifeq ($(BR2_PACKAGE_SPEEXDSP),y)
+ifeq ($(BR2_PACKAGE_SPEEX)$(BR2_PACKAGE_SPEEXDSP),yy)
 MEDIASTREAMER_CONF_OPTS += -DENABLE_SPEEX_DSP=ON
 MEDIASTREAMER_DEPENDENCIES += speexdsp
 else