Ejemplo n.º 1
0
const char* tnet_ice_candidate_get_att_value(const tnet_ice_candidate_t* self, const char* att_name)
{
	if(!self || !att_name){
		TSK_DEBUG_ERROR("Invalid parameter");
		return tsk_null;
	}
	return tsk_params_get_param_value(self->extension_att_list, att_name);
}
Ejemplo n.º 2
0
static tsk_bool_t tdav_codec_g729ab_sdp_att_match(const tmedia_codec_t* codec, const char* att_name, const char* att_value)
{	
	tdav_codec_g729ab_t* g729a = (tdav_codec_g729ab_t*)codec;

	if(tsk_striequals(att_name, "fmtp")){
		tsk_params_L_t* params = tsk_null;
		const char* val_str;
		if((params = tsk_params_fromstring(att_value, ";", tsk_true))){
			if((val_str = tsk_params_get_param_value(params, "annexb"))){
                g729a->encoder.vad_enable &= tsk_strequals(val_str, "yes") ? 1 : 0;
			}
			TSK_OBJECT_SAFE_FREE(params);
		}
	}
	return tsk_true;
}
Ejemplo n.º 3
0
/**@ingroup tsk_params_group
* Gets the value of a parameter.
* @param self The source list.
* @param name The name(case-insensitive) of the parameter to retrieve.
* @retval The value of the parameter if succeed and -1 otherwise.
*/
int tsk_params_get_param_value_as_int(const tsk_params_L_t *self, const char* name)
{
	const char *value = tsk_params_get_param_value(self, name);
	return value ? atoi(value) : -1;
}