Changeset 3074 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
- Timestamp:
- Jan 26, 2010 3:29:23 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r3041 r3074 3055 3055 * Set codec parameters. 3056 3056 */ 3057 PJ_DEF(pj_status_t) pjsua_codec_set_param( const pj_str_t * id,3057 PJ_DEF(pj_status_t) pjsua_codec_set_param( const pj_str_t *codec_id, 3058 3058 const pjmedia_codec_param *param) 3059 3059 { 3060 PJ_UNUSED_ARG(id); 3061 PJ_UNUSED_ARG(param); 3062 PJ_TODO(set_codec_param); 3063 return PJ_SUCCESS; 3064 } 3060 const pjmedia_codec_info *info[2]; 3061 pjmedia_codec_mgr *codec_mgr; 3062 unsigned count = 2; 3063 pj_status_t status; 3064 3065 codec_mgr = pjmedia_endpt_get_codec_mgr(pjsua_var.med_endpt); 3066 3067 status = pjmedia_codec_mgr_find_codecs_by_id(codec_mgr, codec_id, 3068 &count, info, NULL); 3069 if (status != PJ_SUCCESS) 3070 return status; 3071 3072 /* Codec ID should be specific, except for G.722.1 */ 3073 if (count > 1 && 3074 pj_strnicmp2(codec_id, "G7221/16", 8) != 0 && 3075 pj_strnicmp2(codec_id, "G7221/32", 8) != 0) 3076 { 3077 pj_assert(!"Codec ID is not specific"); 3078 return PJ_ETOOMANY; 3079 } 3080 3081 status = pjmedia_codec_mgr_set_default_param(codec_mgr, info[0], param); 3082 return status; 3083 }
Note: See TracChangeset
for help on using the changeset viewer.