Commit 88b9146c authored by Ghislain MARY's avatar Ghislain MARY

Add accessor to get the type of the ICE selected valid candidate.

parent a457709d
......@@ -560,6 +560,14 @@ MS2_PUBLIC bool_t ice_check_list_selected_valid_local_candidate(const IceCheckLi
*/
MS2_PUBLIC bool_t ice_check_list_selected_valid_remote_candidate(const IceCheckList *cl, const char **rtp_addr, int *rtp_port, const char **rtcp_addr, int *rtcp_port);
/**
* Get the type of the selected valid candidate for an ICE check list.
*
* @param cl A pointer to a check list
* @return The type of the selected valid candidate
*/
MS2_PUBLIC IceCandidateType ice_check_list_selected_valid_candidate_type(const IceCheckList *cl);
/**
* Check if an ICE check list can be set in the Completed state after handling losing pairs.
*
......
......@@ -577,6 +577,16 @@ bool_t ice_check_list_selected_valid_remote_candidate(const IceCheckList *cl, co
return TRUE;
}
IceCandidateType ice_check_list_selected_valid_candidate_type(const IceCheckList *cl)
{
MSList *elem;
uint16_t componentID = 1;
elem = ms_list_find_custom(cl->valid_list, (MSCompareFunc)ice_find_selected_valid_pair_from_componentID, &componentID);
if (elem == NULL) return ICT_RelayedCandidate;
return ((IceValidCandidatePair *)elem->data)->valid->remote->type;
}
void ice_check_list_check_completed(IceCheckList *cl)
{
CheckList_Bool cb;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment