Changeset 1965 for pjproject/trunk
- Timestamp:
- May 27, 2008 12:24:26 AM (17 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/build.symbian/bld.inf
r1793 r1965 5 5 6 6 prj_mmpfiles 7 8 // libraries 7 9 pjlib.mmp 8 10 pjlib_util.mmp … … 16 18 pjsip_ua.mmp 17 19 pjsua_lib.mmp 20 21 // codecs 18 22 libgsmcodec.mmp 23 libspeexcodec.mmp 19 24 25 // applications 20 26 pjlib_test.mmp 21 27 symbian_ua.mmp -
pjproject/trunk/build.symbian/pjmedia.mmp
r1942 r1965 22 22 23 23 //OPTION CW -lang c++ 24 25 // 26 // GCCE optimization setting 27 // 28 OPTION GCCE -O2 -fno-unit-at-a-time 24 29 25 30 MACRO PJ_M_I386=1 -
pjproject/trunk/build.symbian/symbian_audio.mmp
r1640 r1965 26 26 OPTION CW -lang c++ 27 27 28 // 29 // GCCE optimization setting 30 // 31 OPTION GCCE -O2 -fno-unit-at-a-time 32 28 33 MACRO PJ_M_I386=1 29 34 MACRO PJ_SYMBIAN=1 -
pjproject/trunk/build.symbian/symbian_ua.mmp
r1793 r1965 39 39 STATICLIBRARY pjnath.lib pjlib_util.lib pjlib.lib 40 40 STATICLIBRARY symbian_audio.lib 41 STATICLIBRARY libgsmcodec.lib 41 STATICLIBRARY libgsmcodec.lib libspeexcodec.lib 42 42 #endif 43 43 -
pjproject/trunk/pjlib/include/pj/config_site_sample.h
r1941 r1965 57 57 # define PJMEDIA_HAS_L16_CODEC 0 58 58 # define PJMEDIA_HAS_ILBC_CODEC 0 59 # define PJMEDIA_HAS_SPEEX_CODEC 059 # define PJMEDIA_HAS_SPEEX_CODEC 1 60 60 # define PJMEDIA_HAS_G722_CODEC 0 61 61 -
pjproject/trunk/pjmedia/include/pjmedia-codec/config.h
r1870 r1965 52 52 #endif 53 53 54 /** 55 * Speex codec default complexity setting. 56 */ 57 #ifndef PJMEDIA_CODEC_SPEEX_DEFAULT_COMPLEXITY 58 # define PJMEDIA_CODEC_SPEEX_DEFAULT_COMPLEXITY 2 59 #endif 60 61 /** 62 * Speex codec default quality setting. 63 */ 64 #ifndef PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY 65 # define PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY 5 66 #endif 67 54 68 55 69 /** -
pjproject/trunk/pjmedia/include/pjmedia-codec/speex.h
r974 r1965 62 62 * @param options Bitmask of pjmedia_speex_options (default=0). 63 63 * @param quality Specify encoding quality, or use -1 for default 64 * ( default=8).64 * (@see PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY). 65 65 * @param complexity Specify encoding complexity , or use -1 for default 66 * ( default=8).66 * (@see PJMEDIA_CODEC_SPEEX_DEFAULT_COMPLEXITY). 67 67 * 68 68 * @return PJ_SUCCESS on success. … … 85 85 86 86 87 /** 88 * Change the settings of Speex codec. 89 * 90 * @param clock_rate Clock rate of Speex mode to be set. 91 * @param quality Specify encoding quality, or use -1 for default 92 * (@see PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY). 93 * @param complexity Specify encoding complexity , or use -1 for default 94 * (@see PJMEDIA_CODEC_SPEEX_DEFAULT_COMPLEXITY). 95 * 96 * @return PJ_SUCCESS on success. 97 */ 98 PJ_DECL(pj_status_t) pjmedia_codec_speex_set_param(unsigned clock_rate, 99 int quality, 100 int complexity); 101 87 102 88 103 /** -
pjproject/trunk/pjmedia/src/pjmedia-codec/speex_codec.c
r1677 r1965 37 37 38 38 #define THIS_FILE "speex_codec.c" 39 40 #define DEFAULT_QUALITY 1041 #define DEFAULT_COMPLEXITY 1042 39 43 40 /* Prototypes for Speex factory */ … … 212 209 213 210 /* Get defaults */ 214 if (quality <= 0) quality = DEFAULT_QUALITY; 215 if (complexity <= 0) complexity = DEFAULT_COMPLEXITY; 211 if (quality < 0) quality = PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY; 212 if (complexity < 0) complexity = PJMEDIA_CODEC_SPEEX_DEFAULT_COMPLEXITY; 213 214 /* Validate quality & complexity */ 215 PJ_ASSERT_RETURN(quality >= 0 && quality <= 10, PJ_EINVAL); 216 PJ_ASSERT_RETURN(complexity >= 1 && complexity <= 10, PJ_EINVAL); 216 217 217 218 /* Create Speex codec factory. */ … … 298 299 { 299 300 return pjmedia_codec_speex_init(endpt, 0, -1, -1); 301 } 302 303 /* 304 * Change the settings of Speex codec. 305 */ 306 PJ_DEF(pj_status_t) pjmedia_codec_speex_set_param(unsigned clock_rate, 307 int quality, 308 int complexity) 309 { 310 unsigned i; 311 312 /* Get defaults */ 313 if (quality < 0) quality = PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY; 314 if (complexity < 0) complexity = PJMEDIA_CODEC_SPEEX_DEFAULT_COMPLEXITY; 315 316 /* Validate quality & complexity */ 317 PJ_ASSERT_RETURN(quality >= 0 && quality <= 10, PJ_EINVAL); 318 PJ_ASSERT_RETURN(complexity >= 1 && complexity <= 10, PJ_EINVAL); 319 320 /* Apply the settings */ 321 for (i=0; i<PJ_ARRAY_SIZE(spx_factory.speex_param); ++i) { 322 if (spx_factory.speex_param[i].clock_rate == clock_rate) { 323 pj_status_t status; 324 325 spx_factory.speex_param[i].quality = quality; 326 spx_factory.speex_param[i].complexity = complexity; 327 328 /* Somehow quality<=4 is broken in linux. */ 329 if (i == PARAM_UWB && quality <= 4 && quality >= 0) { 330 PJ_LOG(5,(THIS_FILE, "Adjusting quality to 5 for uwb")); 331 spx_factory.speex_param[PARAM_UWB].quality = 5; 332 } 333 334 status = get_speex_info(&spx_factory.speex_param[i]); 335 336 return status; 337 } 338 } 339 340 return PJ_EINVAL; 300 341 } 301 342 -
pjproject/trunk/pjsip-apps/src/symbian_ua/ua.cpp
r1793 r1965 335 335 return status; 336 336 } 337 337 338 /* Adjust Speex priority and enable only the narrowband */ 339 { 340 pj_str_t codec_id = pj_str("speex/8000"); 341 pjmedia_codec_mgr_set_codec_priority( 342 pjmedia_endpt_get_codec_mgr(pjsua_var.med_endpt), 343 &codec_id, PJMEDIA_CODEC_PRIO_NORMAL+1); 344 345 codec_id = pj_str("speex/16000"); 346 pjmedia_codec_mgr_set_codec_priority( 347 pjmedia_endpt_get_codec_mgr(pjsua_var.med_endpt), 348 &codec_id, PJMEDIA_CODEC_PRIO_DISABLED); 349 350 codec_id = pj_str("speex/32000"); 351 pjmedia_codec_mgr_set_codec_priority( 352 pjmedia_endpt_get_codec_mgr(pjsua_var.med_endpt), 353 &codec_id, PJMEDIA_CODEC_PRIO_DISABLED); 354 } 355 338 356 /* Add UDP transport. */ 339 357 pjsua_transport_config tcfg; -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r1928 r1965 83 83 #if PJMEDIA_HAS_SPEEX_CODEC 84 84 /* Register speex. */ 85 status = pjmedia_codec_speex_init(pjsua_var.med_endpt, 86 0, 87 pjsua_var.media_cfg.quality, 88 pjsua_var.media_cfg.quality); 85 status = pjmedia_codec_speex_init_default(pjsua_var.med_endpt); 89 86 if (status != PJ_SUCCESS) { 90 87 pjsua_perror(THIS_FILE, "Error initializing Speex codec",
Note: See TracChangeset
for help on using the changeset viewer.