From 5b11a53fd76ef35ac96bf86ed973f53dc342f52c Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Wed, 9 Aug 2006 11:59:26 +0000 Subject: Changed WinCE demo app to automatically answer incoming calls. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@667 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/include/pj/config_site_sample.h | 56 ++++++++++++++++++++++++++++-- pjsip-apps/src/pjsua_wince/pjsua_wince.cpp | 6 ++-- 2 files changed, 58 insertions(+), 4 deletions(-) diff --git a/pjlib/include/pj/config_site_sample.h b/pjlib/include/pj/config_site_sample.h index fe267c93..72ff5499 100644 --- a/pjlib/include/pj/config_site_sample.h +++ b/pjlib/include/pj/config_site_sample.h @@ -1,5 +1,8 @@ +//#define PJ_CONFIG_MINIMAL_SIZE +//#define PJ_CONFIG_MAXIMUM_SPEED + /* * This file (config_site_sample.h) contains various configuration @@ -19,12 +22,61 @@ # define PJ_HAS_FLOATING_POINT 0 # define PJMEDIA_HAS_G711_PLC 0 -# define PJMEDIA_HAS_SMALL_FILTER 0 +# define PJMEDIA_HAS_SMALL_FILTER 1 # define PJMEDIA_HAS_LARGE_FILTER 0 # define PJMEDIA_HAS_L16_CODEC 0 /*# define PJMEDIA_HAS_GSM_CODEC 0*/ -# define PJMEDIA_HAS_ILBC_CODEC 0 +/*# define PJMEDIA_HAS_ILBC_CODEC 0*/ /*# define PJMEDIA_HAS_SPEEX_CODEC 0*/ # define PJMEDIA_HAS_SPEEX_AEC 0 #endif + + +/* + * Minimum size + */ +#ifdef PJ_CONFIG_MINIMAL_SIZE + +# undef PJ_OS_HAS_CHECK_STACK +# define PJ_OS_HAS_CHECK_STACK 0 +# define PJ_LOG_MAX_LEVEL 0 +# define PJ_ENABLE_EXTRA_CHECK 0 +# define PJ_HAS_ERROR_STRING 0 +# undef PJ_IOQUEUE_MAX_HANDLES +# define PJ_IOQUEUE_MAX_HANDLES 4 +# define PJSIP_MAX_TSX_COUNT 16 +# define PJSIP_MAX_DIALOG_COUNT 16 +# define PJSIP_UDP_SO_SNDBUF_SIZE 4000 +# define PJSIP_UDP_SO_RCVBUF_SIZE 4000 +# define PJSIP_AUTH_HEADER_CACHING 0 +# define PJSIP_AUTH_AUTO_SEND_NEXT 0 +# define PJSIP_AUTH_QOP_SUPPORT 0 +# define PJMEDIA_HAS_LARGE_FILTER 0 +# define PJMEDIA_HAS_SMALL_FILTER 1 + + +#elif defined(PJ_CONFIG_MAXIMUM_SPEED) +# define PJ_SCANNER_USE_BITWISE 0 +# undef PJ_OS_HAS_CHECK_STACK +# define PJ_OS_HAS_CHECK_STACK 0 +# define PJ_LOG_MAX_LEVEL 3 +# define PJ_ENABLE_EXTRA_CHECK 0 +# define PJ_IOQUEUE_MAX_HANDLES 5000 +# define PJSIP_MAX_TSX_COUNT ((640*1024)-1) +# define PJSIP_MAX_DIALOG_COUNT ((640*1024)-1) +# define PJSIP_UDP_SO_SNDBUF_SIZE (24*1024*1024) +# define PJSIP_UDP_SO_RCVBUF_SIZE (24*1024*1024) +# define PJ_DEBUG 0 +# define PJSIP_SAFE_MODULE 0 +# define PJ_HAS_STRICMP_ALNUM 1 +# define PJ_HASH_USE_OWN_TOLOWER 1 +# define PJSIP_UNESCAPE_IN_PLACE 1 + +# ifdef PJ_WIN32 +# define PJSIP_MAX_NET_EVENTS 10 +# endif + +# define PJSUA_MAX_CALLS 512 +#endif + diff --git a/pjsip-apps/src/pjsua_wince/pjsua_wince.cpp b/pjsip-apps/src/pjsua_wince/pjsua_wince.cpp index 6ed02e3e..a587bed3 100644 --- a/pjsip-apps/src/pjsua_wince/pjsua_wince.cpp +++ b/pjsip-apps/src/pjsua_wince/pjsua_wince.cpp @@ -207,7 +207,7 @@ static void on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id, SetAction(ID_MENU_ANSWER); SetURI(call_info.remote_info.ptr, call_info.remote_info.slen, false); - pjsua_call_answer(call_id, 180, NULL, NULL); + pjsua_call_answer(call_id, 200, NULL, NULL); } @@ -285,6 +285,7 @@ static BOOL OnInitStack(void) /* Setup media */ media_cfg.clock_rate = 8000; media_cfg.ec_options = PJMEDIA_ECHO_SIMPLE; + media_cfg.ec_tail_len = 256; media_cfg.quality = 1; media_cfg.ptime = 20; @@ -305,12 +306,13 @@ static BOOL OnInitStack(void) } /* Set codec priority */ - pjsua_codec_set_priority(pj_cstr(&tmp, "gsm"), 10); pjsua_codec_set_priority(pj_cstr(&tmp, "pcmu"), 240); pjsua_codec_set_priority(pj_cstr(&tmp, "pcma"), 230); pjsua_codec_set_priority(pj_cstr(&tmp, "speex/8000"), 190); + pjsua_codec_set_priority(pj_cstr(&tmp, "ilbc"), 189); pjsua_codec_set_priority(pj_cstr(&tmp, "speex/16000"), 180); pjsua_codec_set_priority(pj_cstr(&tmp, "speex/32000"), 0); + pjsua_codec_set_priority(pj_cstr(&tmp, "gsm"), 100); /* Add UDP transport and the corresponding PJSUA account */ -- cgit v1.2.3