- Timestamp:
- Apr 24, 2012 1:09:14 PM (13 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk
- Property svn:mergeinfo changed
/pjproject/branches/1.x merged: 4063-4067,4074,4079
- Property svn:mergeinfo changed
-
pjproject/trunk/pjmedia/include/pjmedia/echo.h
r3841 r4082 96 96 * without using WSOLA to expand and shrink audio samples. 97 97 */ 98 PJMEDIA_ECHO_USE_SIMPLE_FIFO = 32 99 98 PJMEDIA_ECHO_USE_SIMPLE_FIFO = 32, 99 100 /** 101 * If PJMEDIA_ECHO_USE_SW_ECHO flag is specified, software echo canceller 102 * will be used instead of device EC. 103 */ 104 PJMEDIA_ECHO_USE_SW_ECHO = 64 100 105 101 106 } pjmedia_echo_flag; -
pjproject/trunk/pjmedia/include/pjmedia/sound_port.h
r3664 r4082 77 77 /** 78 78 * This structure specifies the parameters to create the sound port. 79 * Use pjmedia_snd_port_param_default() to initialize this structure with 80 * default values (mostly zeroes) 79 81 */ 80 82 typedef struct pjmedia_snd_port_param … … 89 91 */ 90 92 unsigned options; 93 94 /** 95 * Echo cancellation options/flags. 96 */ 97 unsigned ec_options; 98 91 99 } pjmedia_snd_port_param; 100 101 /** 102 * Initialize pjmedia_snd_port_param with default values. 103 * 104 * @param prm The parameter. 105 */ 106 PJ_DECL(void) pjmedia_snd_port_param_default(pjmedia_snd_port_param *prm); 92 107 93 108 /** -
pjproject/trunk/pjmedia/src/pjmedia-audiodev/coreaudio_dev.c
r3841 r4082 1965 1965 strm->param.ec_enabled = *(pj_bool_t*)pval; 1966 1966 1967 PJ_LOG(4, (THIS_FILE, "Using %s audio unit", 1968 (desc.componentSubType == 1969 kAudioUnitSubType_RemoteIO? "RemoteIO": 1970 "VoiceProcessingIO"))); 1971 1967 1972 return PJ_SUCCESS; 1968 1973 } -
pjproject/trunk/pjmedia/src/pjmedia-codec/passthrough.c
r3911 r4082 262 262 263 263 if (len == 0) { 264 info->frame_type = (pj_uint8_t)(enc_setting->amr_nb? 14 : 15); 264 /* DTX */ 265 info->frame_type = 15; 265 266 } else { 266 267 info->frame_type = pjmedia_codec_amr_get_mode2(enc_setting->amr_nb, -
pjproject/trunk/pjmedia/src/pjmedia/sound_port.c
r3999 r4082 53 53 unsigned bits_per_sample; 54 54 unsigned options; 55 unsigned prm_ec_options; 55 56 56 57 /* software ec */ … … 188 189 } 189 190 191 /* Initialize with default values (zero) */ 192 PJ_DEF(void) pjmedia_snd_port_param_default(pjmedia_snd_port_param *prm) 193 { 194 pj_bzero(prm, sizeof(*prm)); 195 } 196 190 197 /* 191 198 * Start the sound stream. … … 227 234 if (param_copy.flags & PJMEDIA_AUD_DEV_CAP_EC) { 228 235 /* EC is wanted */ 229 if (snd_port->aud_caps & PJMEDIA_AUD_DEV_CAP_EC) { 236 if ((snd_port->prm_ec_options & PJMEDIA_ECHO_USE_SW_ECHO) == 0 && 237 snd_port->aud_caps & PJMEDIA_AUD_DEV_CAP_EC) 238 { 230 239 /* Device supports EC */ 231 240 /* Nothing to do */ 232 241 } else { 233 /* Device doesn't support EC, remove EC settings from 242 /* Application wants to use software EC or device 243 * doesn't support EC, remove EC settings from 234 244 * device parameters 235 245 */ … … 263 273 snd_port->samples_per_frame); 264 274 265 /* Create software EC if parameter specifies EC but device 266 * doesn't support EC. Only do this if the format is PCM! 275 /* Create software EC if parameter specifies EC and 276 * (app specifically requests software EC or device 277 * doesn't support EC). Only do this if the format is PCM! 267 278 */ 268 279 if ((snd_port->aud_param.flags & PJMEDIA_AUD_DEV_CAP_EC) && 269 (snd_port->aud_caps & PJMEDIA_AUD_DEV_CAP_EC)==0 && 280 ((snd_port->aud_caps & PJMEDIA_AUD_DEV_CAP_EC)==0 || 281 (snd_port->prm_ec_options & PJMEDIA_ECHO_USE_SW_ECHO) != 0) && 270 282 param_copy.ext_fmt.id == PJMEDIA_FORMAT_PCM) 271 283 { … … 278 290 279 291 status = pjmedia_snd_port_set_ec(snd_port, pool, 280 snd_port->aud_param.ec_tail_ms, 0); 292 snd_port->aud_param.ec_tail_ms, 293 snd_port->prm_ec_options); 281 294 if (status != PJ_SUCCESS) { 282 295 pjmedia_aud_stream_destroy(snd_port->aud_stream); … … 339 352 pj_status_t status; 340 353 341 PJ_UNUSED_ARG(options);354 pjmedia_snd_port_param_default(¶m); 342 355 343 356 status = pjmedia_aud_dev_default_param(rec_id, ¶m.base); … … 353 366 param.base.bits_per_sample = bits_per_sample; 354 367 param.options = options; 368 param.ec_options = 0; 355 369 356 370 return pjmedia_snd_port_create2(pool, ¶m, p_port); … … 372 386 pj_status_t status; 373 387 374 PJ_UNUSED_ARG(options);388 pjmedia_snd_port_param_default(¶m); 375 389 376 390 status = pjmedia_aud_dev_default_param(dev_id, ¶m.base); … … 385 399 param.base.bits_per_sample = bits_per_sample; 386 400 param.options = options; 401 param.ec_options = 0; 387 402 388 403 return pjmedia_snd_port_create2(pool, ¶m, p_port); … … 405 420 pj_status_t status; 406 421 407 PJ_UNUSED_ARG(options);422 pjmedia_snd_port_param_default(¶m); 408 423 409 424 status = pjmedia_aud_dev_default_param(dev_id, ¶m.base); … … 418 433 param.base.bits_per_sample = bits_per_sample; 419 434 param.options = options; 435 param.ec_options = 0; 420 436 421 437 return pjmedia_snd_port_create2(pool, ¶m, p_port); … … 446 462 snd_port->samples_per_frame = prm->base.samples_per_frame; 447 463 snd_port->bits_per_sample = prm->base.bits_per_sample; 448 pj_memcpy(&snd_port->aud_param, prm, sizeof(snd_port->aud_param));464 pj_memcpy(&snd_port->aud_param, &prm->base, sizeof(snd_port->aud_param)); 449 465 snd_port->options = prm->options; 466 snd_port->prm_ec_options = prm->ec_options; 450 467 451 468 ptime_usec = prm->base.samples_per_frame * 1000 / prm->base.channel_count / … … 510 527 511 528 /* Determine whether we use device or software EC */ 512 if (snd_port->aud_caps & PJMEDIA_AUD_DEV_CAP_EC) { 529 if ((snd_port->prm_ec_options & PJMEDIA_ECHO_USE_SW_ECHO) == 0 && 530 snd_port->aud_caps & PJMEDIA_AUD_DEV_CAP_EC) 531 { 513 532 /* We use device EC */ 514 533 pj_bool_t ec_enabled; -
pjproject/trunk/pjsip-apps/src/pjsystest/systest.c
r3664 r4082 968 968 } 969 969 970 status = pjsua_recorder_create(pj_cstr(&tmp, AEC_REC_PATH), 0, 0, -1, 971 0, &writer_id); 970 status = pjsua_recorder_create( 971 pj_cstr(&tmp, add_path(doc_path, AEC_REC_PATH)), 0, 0, -1, 972 0, &writer_id); 972 973 if (status != PJ_SUCCESS) { 973 974 PJ_PERROR(1,(THIS_FILE, status, "Error writing WAV file %s", … … 1000 1001 * Play the result. 1001 1002 */ 1002 status = pjsua_player_create(pj_cstr(&tmp, AEC_REC_PATH), 0, &player_id); 1003 status = pjsua_player_create( 1004 pj_cstr(&tmp, add_path(doc_path, AEC_REC_PATH)), 1005 0, &player_id); 1003 1006 if (status != PJ_SUCCESS) { 1004 1007 PJ_PERROR(1,(THIS_FILE, status, "Error opening WAV file %s", AEC_REC_PATH)); -
pjproject/trunk/pjsip/build/pjsip_core.vcproj
r3264 r4082 3489 3489 </File> 3490 3490 <File 3491 RelativePath="..\src\pjsip\sip_transport_tls_ossl.c"3492 >3493 <FileConfiguration3494 Name="Release|Win32"3495 ExcludedFromBuild="true"3496 >3497 <Tool3498 Name="VCCLCompilerTool"3499 AdditionalIncludeDirectories=""3500 PreprocessorDefinitions=""3501 />3502 </FileConfiguration>3503 <FileConfiguration3504 Name="Release|Pocket PC 2003 (ARMV4)"3505 ExcludedFromBuild="true"3506 >3507 <Tool3508 Name="VCCLCompilerTool"3509 />3510 </FileConfiguration>3511 <FileConfiguration3512 Name="Release|Smartphone 2003 (ARMV4)"3513 ExcludedFromBuild="true"3514 >3515 <Tool3516 Name="VCCLCompilerTool"3517 />3518 </FileConfiguration>3519 <FileConfiguration3520 Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"3521 ExcludedFromBuild="true"3522 >3523 <Tool3524 Name="VCCLCompilerTool"3525 />3526 </FileConfiguration>3527 <FileConfiguration3528 Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"3529 ExcludedFromBuild="true"3530 >3531 <Tool3532 Name="VCCLCompilerTool"3533 />3534 </FileConfiguration>3535 <FileConfiguration3536 Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"3537 ExcludedFromBuild="true"3538 >3539 <Tool3540 Name="VCCLCompilerTool"3541 />3542 </FileConfiguration>3543 <FileConfiguration3544 Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"3545 ExcludedFromBuild="true"3546 >3547 <Tool3548 Name="VCCLCompilerTool"3549 />3550 </FileConfiguration>3551 <FileConfiguration3552 Name="Debug|Win32"3553 ExcludedFromBuild="true"3554 >3555 <Tool3556 Name="VCCLCompilerTool"3557 AdditionalIncludeDirectories=""3558 PreprocessorDefinitions=""3559 />3560 </FileConfiguration>3561 <FileConfiguration3562 Name="Debug|Pocket PC 2003 (ARMV4)"3563 ExcludedFromBuild="true"3564 >3565 <Tool3566 Name="VCCLCompilerTool"3567 />3568 </FileConfiguration>3569 <FileConfiguration3570 Name="Debug|Smartphone 2003 (ARMV4)"3571 ExcludedFromBuild="true"3572 >3573 <Tool3574 Name="VCCLCompilerTool"3575 />3576 </FileConfiguration>3577 <FileConfiguration3578 Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"3579 ExcludedFromBuild="true"3580 >3581 <Tool3582 Name="VCCLCompilerTool"3583 />3584 </FileConfiguration>3585 <FileConfiguration3586 Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"3587 ExcludedFromBuild="true"3588 >3589 <Tool3590 Name="VCCLCompilerTool"3591 />3592 </FileConfiguration>3593 <FileConfiguration3594 Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"3595 ExcludedFromBuild="true"3596 >3597 <Tool3598 Name="VCCLCompilerTool"3599 />3600 </FileConfiguration>3601 <FileConfiguration3602 Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"3603 ExcludedFromBuild="true"3604 >3605 <Tool3606 Name="VCCLCompilerTool"3607 />3608 </FileConfiguration>3609 <FileConfiguration3610 Name="Debug-Static|Win32"3611 ExcludedFromBuild="true"3612 >3613 <Tool3614 Name="VCCLCompilerTool"3615 AdditionalIncludeDirectories=""3616 PreprocessorDefinitions=""3617 />3618 </FileConfiguration>3619 <FileConfiguration3620 Name="Debug-Static|Pocket PC 2003 (ARMV4)"3621 ExcludedFromBuild="true"3622 >3623 <Tool3624 Name="VCCLCompilerTool"3625 />3626 </FileConfiguration>3627 <FileConfiguration3628 Name="Debug-Static|Smartphone 2003 (ARMV4)"3629 ExcludedFromBuild="true"3630 >3631 <Tool3632 Name="VCCLCompilerTool"3633 />3634 </FileConfiguration>3635 <FileConfiguration3636 Name="Debug-Static|Windows Mobile 6 Standard SDK (ARMV4I)"3637 ExcludedFromBuild="true"3638 >3639 <Tool3640 Name="VCCLCompilerTool"3641 />3642 </FileConfiguration>3643 <FileConfiguration3644 Name="Debug-Static|Windows Mobile 6 Professional SDK (ARMV4I)"3645 ExcludedFromBuild="true"3646 >3647 <Tool3648 Name="VCCLCompilerTool"3649 />3650 </FileConfiguration>3651 <FileConfiguration3652 Name="Debug-Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"3653 ExcludedFromBuild="true"3654 >3655 <Tool3656 Name="VCCLCompilerTool"3657 />3658 </FileConfiguration>3659 <FileConfiguration3660 Name="Debug-Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"3661 ExcludedFromBuild="true"3662 >3663 <Tool3664 Name="VCCLCompilerTool"3665 />3666 </FileConfiguration>3667 <FileConfiguration3668 Name="Release-Dynamic|Win32"3669 ExcludedFromBuild="true"3670 >3671 <Tool3672 Name="VCCLCompilerTool"3673 AdditionalIncludeDirectories=""3674 PreprocessorDefinitions=""3675 />3676 </FileConfiguration>3677 <FileConfiguration3678 Name="Release-Dynamic|Pocket PC 2003 (ARMV4)"3679 ExcludedFromBuild="true"3680 >3681 <Tool3682 Name="VCCLCompilerTool"3683 />3684 </FileConfiguration>3685 <FileConfiguration3686 Name="Release-Dynamic|Smartphone 2003 (ARMV4)"3687 ExcludedFromBuild="true"3688 >3689 <Tool3690 Name="VCCLCompilerTool"3691 />3692 </FileConfiguration>3693 <FileConfiguration3694 Name="Release-Dynamic|Windows Mobile 6 Standard SDK (ARMV4I)"3695 ExcludedFromBuild="true"3696 >3697 <Tool3698 Name="VCCLCompilerTool"3699 />3700 </FileConfiguration>3701 <FileConfiguration3702 Name="Release-Dynamic|Windows Mobile 6 Professional SDK (ARMV4I)"3703 ExcludedFromBuild="true"3704 >3705 <Tool3706 Name="VCCLCompilerTool"3707 />3708 </FileConfiguration>3709 <FileConfiguration3710 Name="Release-Dynamic|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"3711 ExcludedFromBuild="true"3712 >3713 <Tool3714 Name="VCCLCompilerTool"3715 />3716 </FileConfiguration>3717 <FileConfiguration3718 Name="Release-Dynamic|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"3719 ExcludedFromBuild="true"3720 >3721 <Tool3722 Name="VCCLCompilerTool"3723 />3724 </FileConfiguration>3725 <FileConfiguration3726 Name="Debug-Dynamic|Win32"3727 ExcludedFromBuild="true"3728 >3729 <Tool3730 Name="VCCLCompilerTool"3731 AdditionalIncludeDirectories=""3732 PreprocessorDefinitions=""3733 />3734 </FileConfiguration>3735 <FileConfiguration3736 Name="Debug-Dynamic|Pocket PC 2003 (ARMV4)"3737 ExcludedFromBuild="true"3738 >3739 <Tool3740 Name="VCCLCompilerTool"3741 />3742 </FileConfiguration>3743 <FileConfiguration3744 Name="Debug-Dynamic|Smartphone 2003 (ARMV4)"3745 ExcludedFromBuild="true"3746 >3747 <Tool3748 Name="VCCLCompilerTool"3749 />3750 </FileConfiguration>3751 <FileConfiguration3752 Name="Debug-Dynamic|Windows Mobile 6 Standard SDK (ARMV4I)"3753 ExcludedFromBuild="true"3754 >3755 <Tool3756 Name="VCCLCompilerTool"3757 />3758 </FileConfiguration>3759 <FileConfiguration3760 Name="Debug-Dynamic|Windows Mobile 6 Professional SDK (ARMV4I)"3761 ExcludedFromBuild="true"3762 >3763 <Tool3764 Name="VCCLCompilerTool"3765 />3766 </FileConfiguration>3767 <FileConfiguration3768 Name="Debug-Dynamic|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"3769 ExcludedFromBuild="true"3770 >3771 <Tool3772 Name="VCCLCompilerTool"3773 />3774 </FileConfiguration>3775 <FileConfiguration3776 Name="Debug-Dynamic|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"3777 ExcludedFromBuild="true"3778 >3779 <Tool3780 Name="VCCLCompilerTool"3781 />3782 </FileConfiguration>3783 <FileConfiguration3784 Name="Release-Static|Win32"3785 ExcludedFromBuild="true"3786 >3787 <Tool3788 Name="VCCLCompilerTool"3789 AdditionalIncludeDirectories=""3790 PreprocessorDefinitions=""3791 />3792 </FileConfiguration>3793 <FileConfiguration3794 Name="Release-Static|Pocket PC 2003 (ARMV4)"3795 ExcludedFromBuild="true"3796 >3797 <Tool3798 Name="VCCLCompilerTool"3799 />3800 </FileConfiguration>3801 <FileConfiguration3802 Name="Release-Static|Smartphone 2003 (ARMV4)"3803 ExcludedFromBuild="true"3804 >3805 <Tool3806 Name="VCCLCompilerTool"3807 />3808 </FileConfiguration>3809 <FileConfiguration3810 Name="Release-Static|Windows Mobile 6 Standard SDK (ARMV4I)"3811 ExcludedFromBuild="true"3812 >3813 <Tool3814 Name="VCCLCompilerTool"3815 />3816 </FileConfiguration>3817 <FileConfiguration3818 Name="Release-Static|Windows Mobile 6 Professional SDK (ARMV4I)"3819 ExcludedFromBuild="true"3820 >3821 <Tool3822 Name="VCCLCompilerTool"3823 />3824 </FileConfiguration>3825 <FileConfiguration3826 Name="Release-Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"3827 ExcludedFromBuild="true"3828 >3829 <Tool3830 Name="VCCLCompilerTool"3831 />3832 </FileConfiguration>3833 <FileConfiguration3834 Name="Release-Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"3835 ExcludedFromBuild="true"3836 >3837 <Tool3838 Name="VCCLCompilerTool"3839 />3840 </FileConfiguration>3841 </File>3842 <File3843 3491 RelativePath="..\src\pjsip\sip_transport_udp.c" 3844 3492 > -
pjproject/trunk/pjsip/src/pjsip-simple/evsub.c
r3753 r4082 1819 1819 pjsip_tx_data *tdata; 1820 1820 pj_status_t status; 1821 int next_refresh;1822 1821 1823 1822 /* Only want to handle initial NOTIFY receive event. */ … … 1899 1898 pj_stricmp(&sub_state->sub_state, &STR_PENDING)==0)) 1900 1899 { 1901 next_refresh = sub_state->expires_param; 1902 1903 } else { 1904 next_refresh = sub->expires->ivalue; 1905 } 1906 1907 /* Update time */ 1908 update_expires(sub, next_refresh); 1909 1910 /* Start UAC refresh timer, only when we're not unsubscribing */ 1911 if (sub->expires->ivalue != 0) { 1912 unsigned timeout = (next_refresh > TIME_UAC_REFRESH) ? 1913 next_refresh - TIME_UAC_REFRESH : next_refresh; 1900 int next_refresh = sub_state->expires_param; 1901 unsigned timeout; 1902 1903 update_expires(sub, next_refresh); 1904 1905 /* Start UAC refresh timer, only when we're not unsubscribing */ 1906 timeout = (next_refresh > TIME_UAC_REFRESH) ? 1907 next_refresh - TIME_UAC_REFRESH : next_refresh; 1914 1908 1915 1909 PJ_LOG(5,(sub->obj_name, "Will refresh in %d seconds", timeout)); -
pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
r4054 r4082 2243 2243 2244 2244 default: 2245 pj_assert( "!Invalid operation!");2245 pj_assert(!"Invalid operation!"); 2246 2246 pj_log_pop_indent(); 2247 2247 return PJ_EINVALIDOP; -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r4071 r4082 1270 1270 if (status != PJ_SUCCESS) { 1271 1271 pjsua_perror(THIS_FILE, "Session Timer init failed", status); 1272 status = pjsip_inv_end_session(inv, PJSIP_SC_INTERNAL_SERVER_ERROR, 1273 NULL, &response); 1274 if (status == PJ_SUCCESS && response) 1275 status = pjsip_inv_send_msg(inv, response); 1272 pjsip_dlg_respond(dlg, rdata, PJSIP_SC_INTERNAL_SERVER_ERROR, NULL, NULL, NULL); 1273 pjsip_inv_terminate(inv, PJSIP_SC_INTERNAL_SERVER_ERROR, PJ_FALSE); 1276 1274 1277 1275 pjsua_media_channel_deinit(call->index);
Note: See TracChangeset
for help on using the changeset viewer.