From: Andre Heider Date: Fri, 21 May 2021 07:17:35 +0000 (+0200) Subject: asterisk-opus: enable format_ogg_opus_open_source X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=refs%2Fpull%2F693%2Fhead;p=feed%2Ftelephony.git asterisk-opus: enable format_ogg_opus_open_source This enables reading and rewriting ogg/opus files. Signed-off-by: Andre Heider --- diff --git a/net/asterisk-opus/Makefile b/net/asterisk-opus/Makefile index 90de6e1..541bc0f 100644 --- a/net/asterisk-opus/Makefile +++ b/net/asterisk-opus/Makefile @@ -25,15 +25,19 @@ include $(INCLUDE_DIR)/package.mk TARGET_CFLAGS += \ $(FPIC) -define Package/asterisk-codec-opus +define Package/asterisk-opus/Default SUBMENU:=Telephony SECTION:=net CATEGORY:=Network - TITLE:=Opus codec support URL:=https://github.com/traud/asterisk-opus DEPENDS:=asterisk +libopus endef +define Package/asterisk-codec-opus +$(call Package/asterisk-opus/Default) + TITLE:=Opus codec support +endef + define Package/asterisk-codec-opus/description Opus is the default audio codec in WebRTC. WebRTC is available in Asterisk via SIP over WebSockets (WSS). Nevertheless, Opus can be used @@ -54,7 +58,24 @@ define Package/asterisk-codec-opus/install $(1)/usr/lib/asterisk/modules endef +define Package/asterisk-format-ogg-opus +$(call Package/asterisk-opus/Default) + TITLE:=OGG/Opus audio support + DEPENDS+=+libopusfile +libopusenc +endef + +define Package/asterisk-format-ogg-opus/description + Reading and writing audio files in the OGG/Opus format. +endef + +define Package/asterisk-format-ogg-opus/install + $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules + $(INSTALL_BIN) $(PKG_BUILD_DIR)/formats/format_ogg_opus_open_source.so \ + $(1)/usr/lib/asterisk/modules +endef + define Build/Configure endef $(eval $(call BuildPackage,asterisk-codec-opus)) +$(eval $(call BuildPackage,asterisk-format-ogg-opus)) diff --git a/net/asterisk-opus/patches/01-Makefile.patch b/net/asterisk-opus/patches/01-Makefile.patch index e7f34c4..e74f0a9 100644 --- a/net/asterisk-opus/patches/01-Makefile.patch +++ b/net/asterisk-opus/patches/01-Makefile.patch @@ -20,7 +20,16 @@ ASTMODDIR=$(libdir)/asterisk/modules -MODULES=codec_opus_open_source format_ogg_opus_open_source format_vp8 res_format_attr_opus -+MODULES=codec_opus_open_source ++MODULES=codec_opus_open_source format_ogg_opus_open_source .SUFFIXES: .c .so +@@ -38,7 +38,7 @@ codec_opus_open_source: DEFS+=-DAST_MODU + -DAST_MODULE_SELF_SYM=__internal_codec_opus_open_source_self + codec_opus_open_source: codecs/codec_opus_open_source.so + +-format_ogg_opus_open_source: CPATH+=-I/usr/include/opus ++format_ogg_opus_open_source: CPATH+=-I$(STAGING_DIR)/usr/include/opus + format_ogg_opus_open_source: LIBS+=-lopus -lopusfile + format_ogg_opus_open_source: DEFS+=-DAST_MODULE=\"format_ogg_opus_open_source\" \ + -DAST_MODULE_SELF_SYM=__internal_format_ogg_opus_open_source_self