Browse Source

TT#14008 keep track of ICE candidates based on their priorities

Change-Id: Ibb248d634d498bc68497be7d036be54956b1de61
mr10.4
Richard Fuchs 4 years ago
parent
commit
24ed84357a
2 changed files with 5 additions and 0 deletions
  1. +4
    -0
      daemon/ice.c
  2. +1
    -0
      include/ice.h

+ 4
- 0
daemon/ice.c View File

@ -232,6 +232,7 @@ static void __ice_agent_initialize(struct ice_agent *ag) {
struct call *call = ag->call;
ag->candidate_hash = g_hash_table_new(__cand_hash, __cand_equal);
ag->cand_prio_hash = g_hash_table_new(g_direct_hash, g_direct_equal);
ag->pair_hash = g_hash_table_new(__pair_hash, __pair_equal);
ag->transaction_hash = g_hash_table_new(__trans_hash, __trans_equal);
ag->foundation_hash = g_hash_table_new(__found_hash, __found_equal);
@ -420,6 +421,7 @@ void ice_update(struct ice_agent *ag, struct stream_params *sp, bool allow_reset
dup = g_slice_alloc(sizeof(*dup));
__copy_cand(call, dup, cand);
g_hash_table_insert(ag->candidate_hash, dup, dup);
g_hash_table_insert(ag->cand_prio_hash, GUINT_TO_POINTER(dup->priority), dup);
g_queue_push_tail(&ag->remote_candidates, dup);
}
@ -501,6 +503,7 @@ static void __ice_agent_free_components(struct ice_agent *ag) {
g_queue_clear(&ag->triggered);
g_hash_table_destroy(ag->candidate_hash);
g_hash_table_destroy(ag->cand_prio_hash);
g_hash_table_destroy(ag->pair_hash);
g_hash_table_destroy(ag->transaction_hash);
g_hash_table_destroy(ag->foundation_hash);
@ -874,6 +877,7 @@ static struct ice_candidate_pair *__learned_candidate(struct ice_agent *ag, stru
g_queue_push_tail(&ag->remote_candidates, cand);
g_hash_table_insert(ag->candidate_hash, cand, cand);
g_hash_table_insert(ag->cand_prio_hash, GUINT_TO_POINTER(cand->priority), cand);
g_hash_table_insert(ag->foundation_hash, cand, cand);
pair:


+ 1
- 0
include/ice.h View File

@ -120,6 +120,7 @@ struct ice_agent {
GQueue candidate_pairs; /* for storage */
GQueue triggered;
GHashTable *candidate_hash;
GHashTable *cand_prio_hash;
GHashTable *pair_hash;
GHashTable *transaction_hash;
GHashTable *foundation_hash;


Loading…
Cancel
Save