Skip to contentSkip to conversation

package/libbcg729: new package

PATCH Superseded Bernd Kuhls 2 participants 5 messages Apr 30, 2017

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 package/libbcg729: new package

Quoting http://www.linphone.org/technical-corner/bcg729/downloads
regarding patent information:

"ITU G729 Annex A/B were offically released October/November 1996
(https://www.itu.int/rec/T-REC-G.729), hence all patents covering these specifications shall have expired in November 2016.

Patent pool administrator confirmed most licensed patents under the G.729 Consortium have expired (http://www.sipro.com/G729.html)."

---
 DEVELOPERS                       |  1 +
 package/Config.in                |  1 +
 package/libbcg729/Config.in      |  7 +++++++
 package/libbcg729/libbcg729.hash |  2 ++
 package/libbcg729/libbcg729.mk   | 24 ++++++++++++++++++++++++
 5 files changed, 35 insertions(+)
 create mode 100644 package/libbcg729/Config.in
 create mode 100644 package/libbcg729/libbcg729.hash
 create mode 100644 package/libbcg729/libbcg729.mk
DEVELOPERS +1 -0
index a95e5bacc..28c8bf5da 100644
@@ -178,6 +178,7 @@ F:	package/leafnode2/
 F:	package/libaacs/
 F:	package/libasplib/
 F:	package/libass/
+F:	package/libbcg729/
 F:	package/libbdplus/
 F:	package/libbluray/
 F:	package/libbroadvoice/
package/Config.in +1 -0
index 4eaa95b1d..3f88582b0 100644
@@ -881,6 +881,7 @@ menu "Audio/Sound"
 	source "package/fdk-aac/Config.in"
 	source "package/libao/Config.in"
 	source "package/libasplib/Config.in"
+	source "package/libbcg729/Config.in"
 	source "package/libbroadvoice/Config.in"
 	source "package/libcdaudio/Config.in"
 	source "package/libcddb/Config.in"
package/libbcg729/Config.in new file +7 -0
new file mode 100644
index 000000000..82847a0b7
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_LIBBCG729
+	bool "libbcg729"
+	help
+	  Bcg729 is an opensource implementation of both encoder and
+	  decoder of the ITU G729 Annex A/B speech codec.
+
+	  http://www.linphone.org/technical-corner/bcg729/overview
package/libbcg729/libbcg729.hash new file +2 -0
new file mode 100644
index 000000000..0172a40ce
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 20f04d1d45c62cb6c06df2177db0701f376940a55744386da3651104251fd5fc  libbcg729-1.0.1.tar.gz
package/libbcg729/libbcg729.mk new file +24 -0
new file mode 100644
index 000000000..90ca22bff
@@ -0,0 +1,24 @@
+################################################################################
+#
+# libbcg729
+#
+################################################################################
+
+# we use version 1.0.1 because freeswitch mod_bcg729 is incompatible
+# with newer versions
+LIBBCG729_VERSION = 1.0.1
+LIBBCG729_SITE = $(call github,BelledonneCommunications,bcg729,$(LIBBCG729_VERSION))
+LIBBCG729_LICENSE = GPL-2.0+
+LIBBCG729_LICENSE_FILES = COPYING
+LIBBCG729_INSTALL_STAGING = YES
+LIBBCG729_AUTORECONF = YES
+LIBBCG729_DEPENDENCIES = host-pkgconf
+
+define LIBBCG729_CREATE_M4_DIR
+	mkdir -p $(@D)/m4
+endef
+LIBBCG729_POST_PATCH_HOOKS += LIBBCG729_CREATE_M4_DIR
+
+LIBBCG729_CONF_OPTS = --disable-msplugin
+
+$(eval $(autotools-package))
Signature · 1 line
2.11.0
#1 lore raw

PATCH 2/4 package/freeswitch: install to staging

Needed for upcoming package freeswitch_mod_bcg729.

---
 package/freeswitch/freeswitch.mk | 2 ++
 1 file changed, 2 insertions(+)
package/freeswitch/freeswitch.mk +2 -0
index e6c1e8c93..215d0b974 100644
@@ -7,6 +7,8 @@
 FREESWITCH_VERSION = 1.6.17
 FREESWITCH_SOURCE = freeswitch-$(FREESWITCH_VERSION).tar.xz
 FREESWITCH_SITE = http://files.freeswitch.org/freeswitch-releases
+# needed for external modules
+FREESWITCH_INSTALL_STAGING = YES
 FREESWITCH_LICENSE = MPL-1.1, \
 	GPL-3.0+ with font exception (fonts), \
 	Apache-2.0 (apr, apr-util), \
Signature · 1 line
2.11.0
#2 lore raw

PATCH 3/4 package/freeswitch_mod_bcg729: new package

In reply to Bernd Kuhls

This package is based on the bcg729 library from Belledonne Communications which is wrapped into a freeswitch module to provide a native G729.A codec.

---
 DEVELOPERS                                         |  1 +
 package/Config.in                                  |  1 +
 package/freeswitch_mod_bcg729/Config.in            |  9 +++++++
 .../freeswitch_mod_bcg729.hash                     |  2 ++
 .../freeswitch_mod_bcg729/freeswitch_mod_bcg729.mk | 30 ++++++++++++++++++++++
 5 files changed, 43 insertions(+)
 create mode 100644 package/freeswitch_mod_bcg729/Config.in
 create mode 100644 package/freeswitch_mod_bcg729/freeswitch_mod_bcg729.hash
 create mode 100644 package/freeswitch_mod_bcg729/freeswitch_mod_bcg729.mk
DEVELOPERS +1 -0
index 28c8bf5da..29157b2e0 100644
@@ -167,6 +167,7 @@ F:	package/eudev/
 F:	package/exim/
 F:	package/fetchmail/
 F:	package/freeswitch/
+F:	package/freeswitch_mod_bcg729/
 F:	package/ffmpeg/
 F:	package/ghostscript/
 F:	package/giflib/
package/Config.in +1 -0
index 3f88582b0..f180b52e5 100644
@@ -1550,6 +1550,7 @@ menu "Networking applications"
 	source "package/fmc/Config.in"
 	source "package/fping/Config.in"
 	source "package/freeswitch/Config.in"
+	source "package/freeswitch_mod_bcg729/Config.in"
 	source "package/gesftpserver/Config.in"
 	source "package/gupnp-tools/Config.in"
 	source "package/gutenprint/Config.in"
package/freeswitch_mod_bcg729/Config.in new file +9 -0
new file mode 100644
index 000000000..848d4ee67
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_FREESWITCH_MOD_BCG729
+	bool "freeswitch-mod-bcg729"
+	depends on BR2_PACKAGE_FREESWITCH
+	select BR2_PACKAGE_LIBBCG729
+	help
+	  FreeSWITCH G.729A module using the opensource bcg729
+	  implementation by Belledonne Communications.
+
+	  https://github.com/xadhoom/mod_bcg729
package/freeswitch_mod_bcg729/freeswitch_mod_bcg729.hash new file +2 -0
new file mode 100644
index 000000000..9e999ff79
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 0fda28ad72a1cd6a675f2ec231fb8fd1f01fc095b3ea45a4eca6d06ecdf5ca9c  freeswitch_mod_bcg729-803858c78e6f9ab7de42fdb452061d00255150c6.tar.gz
package/freeswitch_mod_bcg729/freeswitch_mod_bcg729.mk new file +30 -0
new file mode 100644
index 000000000..42642720a
@@ -0,0 +1,30 @@
+################################################################################
+#
+# freeswitch_mod_bcg729
+#
+################################################################################
+
+FREESWITCH_MOD_BCG729_VERSION = 803858c78e6f9ab7de42fdb452061d00255150c6
+FREESWITCH_MOD_BCG729_SITE = $(call github,xadhoom,mod_bcg729,$(FREESWITCH_MOD_BCG729_VERSION))
+FREESWITCH_MOD_BCG729_LICENSE = MPL-1.1
+FREESWITCH_MOD_BCG729_LICENSE_FILES = LICENSE
+FREESWITCH_MOD_BCG729_DEPENDENCIES = freeswitch libbcg729
+
+# instead of patching the not cross-compile friendly Makefile from
+# upstream we issue the necessary build commands ourselves
+define FREESWITCH_MOD_BCG729_BUILD_CMDS
+	$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \
+		-I$(STAGING_DIR)/usr/include/freeswitch \
+		-fPIC -fomit-frame-pointer -fno-exceptions \
+		-c $(@D)/mod_bcg729.c -o $(@D)/mod_bcg729.o
+	$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \
+		-fPIC -fomit-frame-pointer -fno-exceptions \
+		-shared -Xlinker -x -lm -lbcg729 -Wl,-Bdynamic \
+		-o $(@D)/mod_bcg729.so $(@D)/mod_bcg729.o
+endef
+
+define FREESWITCH_MOD_BCG729_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 $(@D)/mod_bcg729.so $(TARGET_DIR)/usr/lib/freeswitch/mod/mod_bcg729.so
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.11.0
#3 lore raw

PATCH 3/4 package/freeswitch_mod_bcg729: new package

Hello,

Quoted 5 lines · Bernd Kuhls
 DEVELOPERS                                         |  1 +
 package/Config.in                                  |  1 +
 package/freeswitch_mod_bcg729/Config.in            |  9 +++++++
 .../freeswitch_mod_bcg729.hash                     |  2 ++
 .../freeswitch_mod_bcg729/freeswitch_mod_bcg729.mk | 30 ++++++++++++++++++++++

I think I'd prefer if the package was named freeswitch-mod-bcg729. Indeed, we use - more frequently as the separator in package names (python-*, lua-*, etc.).

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#4 lore raw

PATCH 4/4 package/freeswitch: Use mod_g729 only when freeswitch_mod_bcg729 is disabled

In reply to Bernd Kuhls

mod_g729 contained in freeswitch source provides pass-through:
https://freeswitch.org/confluence/display/FREESWITCH/mod_g729

---
 package/freeswitch/freeswitch.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
package/freeswitch/freeswitch.mk +4 -1
index 215d0b974..3465b19be 100644
@@ -116,7 +116,6 @@ FREESWITCH_ENABLED_MODULES += \
 	applications/mod_valet_parking \
 	applications/mod_voicemail \
 	codecs/mod_g723_1 \
-	codecs/mod_g729 \
 	dialplans/mod_dialplan_asterisk \
 	dialplans/mod_dialplan_xml \
 	endpoints/mod_loopback \
@@ -175,6 +174,10 @@ FREESWITCH_DEPENDENCIES += alsa-lib
 FREESWITCH_ENABLED_MODULES += endpoints/mod_alsa
 endif
 
+ifeq ($(BR2_PACKAGE_FREESWITCH_MOD_BCG729),)
+FREESWITCH_ENABLED_MODULES += codecs/mod_g729
+endif
+
 ifeq ($(BR2_PACKAGE_FREETYPE),y)
 FREESWITCH_DEPENDENCIES += freetype
 endif
Signature · 1 line
2.11.0