1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-24 03:01:55 +02:00
* update to version 1.8.5
* add code to allow selection of features via menuconfig
* add sound device backend for lantiq voip hardware



git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25298 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
blogic 2011-02-01 23:07:54 +00:00
parent c5bc7f7ced
commit ab17079a99
6 changed files with 1241 additions and 12 deletions

27
package/pjsip/Config.in Normal file
View File

@ -0,0 +1,27 @@
config PJSIP_SPEEX
bool "Speex support"
depends on PACKAGE_pjsip
default n
help
Enable speex codec.
config PJSIP_OSS
bool "OSS support"
depends on PACKAGE_pjsip
default n
help
Enable OSS.
config PJSIP_SOUND
bool "Sound support"
depends on PACKAGE_pjsip
default n
help
Enable sound.
config PJSIP_LTQ_TAPI
bool "Lantiq TAPI sound device support"
depends on PACKAGE_pjsip && TARGET_lantiq_xway
default n
help
Enable Lantiq Tapi.

View File

@ -1,13 +1,19 @@
#
# Copyright (C) 2010-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=pjsip
PKG_VERSION:=1.6
PKG_RELEASE:=1
PKG_VERSION:=1.8.5
PKG_RELEASE:=2
PKG_SOURCE:=pjproject-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.pjsip.org/release/1.6/
#PKG_MD5SUM:=9b7dc52656f5cbec846a7ba3299f73bd
PKG_SOURCE_URL:=http://www.pjsip.org/release/$(PKG_VERSION)/
PKG_MD5SUM:=f9aa9e58b4d697245eb4bfa7d81a54a3
PKG_INSTALL:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/pjproject-$(PKG_VERSION)
@ -20,23 +26,36 @@ define Package/pjsip
TITLE:=Voip lib
URL:=http://www.pjsip.org/
DEPENDS:=+libuuid
MAINTAINER:=John Crispin <blogic@openwrt.org>
endef
define Package/pjsip/config
source "$(SOURCE)/Config.in"
endef
CONFIGURE_ARGS += \
--disable-sound \
--disable-oss \
--disable-ext-sound \
--disable-speex-aec \
--enable-g711-codec \
--disable-l16-codec \
--disable-gsm-codec \
--disable-g722-codec \
--disable-g7221-codec \
--disable-speex-codec \
--disable-ilbc-coder \
--disable-libsamplerate \
--disable-ipp \
--disable-ssl \
$(call autoconf_bool,CONFIG_PJSIP_GSM,gsm-codec) \
$(call autoconf_bool,CONFIG_PJSIP_SPEEX,speex-aec) \
$(call autoconf_bool,CONFIG_PJSIP_OSS,oss) \
$(call autoconf_bool,CONFIG_PJSIP_SOUND,sound) \
$(call autoconf_bool,CONFIG_PJSIP_DEV_TAPI,ltq-tapi)
ifeq ($(CONFIG_PJSIP_DEV_TAPI),y)
EXTRA_CFLAGS:=-I$(STAGING_DIR)/usr/include/drv_tapi -I$(STAGING_DIR)/usr/include/drv_vmmc
endif
define Build/Configure
(cd $(PKG_BUILD_DIR); autoconf aconfigure.ac > aconfigure)
$(call Build/Configure/Default)
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/{include,lib}
@ -51,8 +70,9 @@ define Package/pjsip/install
endef
define Build/Compile
$(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)
CFLAGS="$(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
$(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)
endef
$(eval $(call BuildPackage,pjsip))

View File

@ -0,0 +1,42 @@
--- a/aconfigure.ac
+++ b/aconfigure.ac
@@ -48,7 +48,7 @@
CROSS_COMPILE=`echo ${CC} | sed 's/gcc//'`
fi
-if test "$AR" = ""; then AR="${CROSS_COMPILE}ar rv"; fi
+AR="${CROSS_COMPILE}ar rv"
AC_SUBST(AR)
if test "$LD" = ""; then LD="$CC"; fi
AC_SUBST(LD)
@@ -590,6 +590,15 @@
AC_MSG_RESULT([Checking if external sound is set... yes])
fi]
)
+
+AC_ARG_ENABLE(ltq_tapi,
+ AC_HELP_STRING([--enable-ltq-tapi],
+ [PJMEDIA will use ltq tapi backend]),
+ [if test "$enable_ltq_tapi" = "yes"; then
+ [ac_pjmedia_snd=ltqtapi]
+ AC_MSG_RESULT([Checking if external sound is set... yes])
+ fi]
+ )
dnl # Include resampling small filter
AC_SUBST(ac_no_small_filter)
--- a/pjmedia/build/os-auto.mak.in
+++ b/pjmedia/build/os-auto.mak.in
@@ -118,4 +118,11 @@
export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_PORTAUDIO=0 -DPJMEDIA_AUDIO_DEV_HAS_WMME=0
endif
-
+#
+# Lantiq tapi backend
+#
+ifeq ($(AC_PJMEDIA_SND),ltqtapi)
+export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_PORTAUDIO=0 -DPJMEDIA_AUDIO_DEV_HAS_WMME=0
+export PJMEDIA_AUDIODEV_OBJS += tapi_dev.o
+export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_TAPI_DEVICE=1
+endif

View File

@ -0,0 +1,90 @@
--- a/pjsip/src/pjsua-lib/pjsua_acc.c
+++ b/pjsip/src/pjsua-lib/pjsua_acc.c
@@ -430,7 +430,7 @@
"<sip:%s%.*s%s:%d%s>",
beginquote,
(int)t->local_name.host.slen,
- t->local_name.host.ptr,
+ t->local_name.host.slen ? t->local_name.host.ptr : "",
endquote,
t->local_name.port,
transport_param);
@@ -1158,18 +1158,18 @@
len = pj_ansi_snprintf(tmp, PJSIP_MAX_URL_SIZE,
"<sip:%.*s%s%s%.*s%s:%d;transport=%s%.*s>%.*s",
(int)acc->user_part.slen,
- acc->user_part.ptr,
+ acc->user_part.slen ? acc->user_part.ptr : "",
(acc->user_part.slen? "@" : ""),
beginquote,
(int)via_addr->slen,
- via_addr->ptr,
+ via_addr->slen ? via_addr->ptr : "",
endquote,
rport,
tp->type_name,
(int)acc->cfg.contact_uri_params.slen,
- acc->cfg.contact_uri_params.ptr,
+ acc->cfg.contact_uri_params.slen ? acc->cfg.contact_uri_params.ptr : "",
(int)acc->cfg.contact_params.slen,
- acc->cfg.contact_params.ptr);
+ acc->cfg.contact_params.slen ? acc->cfg.contact_params.ptr : "");
if (len < 1) {
PJ_LOG(1,(THIS_FILE, "URI too long"));
pj_pool_release(pool);
@@ -2233,22 +2233,22 @@
contact->slen = pj_ansi_snprintf(contact->ptr, PJSIP_MAX_URL_SIZE,
"%.*s%s<%s:%.*s%s%s%.*s%s:%d%s%.*s>%.*s",
(int)acc->display.slen,
- acc->display.ptr,
+ acc->display.slen ? acc->display.ptr : "",
(acc->display.slen?" " : ""),
(secure ? PJSUA_SECURE_SCHEME : "sip"),
(int)acc->user_part.slen,
- acc->user_part.ptr,
+ acc->user_part.slen ? acc->user_part.ptr : "",
(acc->user_part.slen?"@":""),
beginquote,
(int)local_addr.slen,
- local_addr.ptr,
+ local_addr.slen ? local_addr.ptr : "",
endquote,
local_port,
transport_param,
(int)acc->cfg.contact_uri_params.slen,
- acc->cfg.contact_uri_params.ptr,
+ acc->cfg.contact_uri_params.slen ? acc->cfg.contact_uri_params.ptr : "",
(int)acc->cfg.contact_params.slen,
- acc->cfg.contact_params.ptr);
+ acc->cfg.contact_params.slen ? acc->cfg.contact_params.ptr : "");
return PJ_SUCCESS;
}
@@ -2390,22 +2390,22 @@
contact->slen = pj_ansi_snprintf(contact->ptr, PJSIP_MAX_URL_SIZE,
"%.*s%s<%s:%.*s%s%s%.*s%s:%d%s%.*s>%.*s",
(int)acc->display.slen,
- acc->display.ptr,
+ acc->display.slen ? acc->display.ptr : "",
(acc->display.slen?" " : ""),
(secure ? PJSUA_SECURE_SCHEME : "sip"),
(int)acc->user_part.slen,
- acc->user_part.ptr,
+ acc->user_part.slen ? acc->user_part.ptr : "",
(acc->user_part.slen?"@":""),
beginquote,
(int)local_addr.slen,
- local_addr.ptr,
+ local_addr.slen ? local_addr.ptr : "",
endquote,
local_port,
transport_param,
(int)acc->cfg.contact_uri_params.slen,
- acc->cfg.contact_uri_params.ptr,
+ acc->cfg.contact_uri_params.slen ? acc->cfg.contact_uri_params.ptr : "",
(int)acc->cfg.contact_params.slen,
- acc->cfg.contact_params.ptr);
+ acc->cfg.contact_params.slen ? acc->cfg.contact_params.ptr : "");
return PJ_SUCCESS;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,23 @@
--- a/pjmedia/src/pjmedia-audiodev/audiodev.c
+++ b/pjmedia/src/pjmedia-audiodev/audiodev.c
@@ -98,6 +98,10 @@
pjmedia_aud_dev_factory* pjmedia_null_audio_factory(pj_pool_factory *pf);
#endif
+#if PJMEDIA_AUDIO_DEV_HAS_TAPI_DEVICE
+pjmedia_aud_dev_factory* pjmedia_tapi_factory(pj_pool_factory *pf);
+#endif
+
#define MAX_DRIVERS 16
#define MAX_DEVS 64
@@ -404,6 +408,9 @@
#if PJMEDIA_AUDIO_DEV_HAS_NULL_AUDIO
aud_subsys.drv[aud_subsys.drv_cnt++].create = &pjmedia_null_audio_factory;
#endif
+#if PJMEDIA_AUDIO_DEV_HAS_TAPI_DEVICE
+ aud_subsys.drv[aud_subsys.drv_cnt++].create = &pjmedia_tapi_factory;
+#endif
/* Initialize each factory and build the device ID list */
for (i=0; i<aud_subsys.drv_cnt; ++i) {