Changeset 648 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
- Timestamp:
- Aug 4, 2006 6:27:19 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r643 r648 969 969 pj_assert(conf_port != NULL); 970 970 971 /* Create AEC if it's not created */ 972 if (pjsua_var.aec_port == NULL && pjsua_var.media_cfg.ec_tail_len) { 973 status = pjmedia_aec_port_create(pjsua_var.pool, conf_port, 974 conf_port->info.clock_rate * 975 pjsua_var.media_cfg.ec_tail_len / 976 1000, 977 &pjsua_var.aec_port); 978 if (status != PJ_SUCCESS) { 979 pjsua_perror(THIS_FILE, "Unable to create AEC port", status); 980 pjmedia_snd_port_destroy(pjsua_var.snd_port); 981 pjsua_var.snd_port = NULL; 982 return status; 983 } 984 } 985 986 /* Connect to the AEC port */ 987 status = pjmedia_snd_port_connect(pjsua_var.snd_port, 988 pjsua_var.media_cfg.ec_tail_len ? 989 pjsua_var.aec_port : conf_port ); 990 if (status != PJ_SUCCESS) { 991 pjsua_perror(THIS_FILE, "Unable to connect conference port to " 992 "sound device", status); 993 pjmedia_snd_port_destroy(pjsua_var.snd_port); 994 pjsua_var.snd_port = NULL; 995 return status; 996 } 971 /* Set AEC */ 972 pjmedia_snd_port_set_aec(pjsua_var.snd_port, pjsua_var.pool, 973 pjsua_var.media_cfg.ec_tail_len); 997 974 998 975 /* Save the device IDs */ … … 1054 1031 1055 1032 1033 /* 1034 * Configure the AEC settings of the sound port. 1035 */ 1036 PJ_DEF(pj_status_t) pjsua_set_aec(unsigned tail_ms) 1037 { 1038 pjsua_var.media_cfg.ec_tail_len = tail_ms; 1039 1040 if (pjsua_var.snd_port) 1041 return pjmedia_snd_port_set_aec(pjsua_var.snd_port, pjsua_var.pool, 1042 tail_ms); 1043 1044 return PJ_SUCCESS; 1045 } 1046 1047 1048 /* 1049 * Get current AEC tail length. 1050 */ 1051 PJ_DEF(pj_status_t) pjsua_get_aec(unsigned *p_tail_ms) 1052 { 1053 *p_tail_ms = pjsua_var.media_cfg.ec_tail_len; 1054 return PJ_SUCCESS; 1055 } 1056 1056 1057 1057 1058 /*****************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.