Browse Source

MT#60476 remember received media ICE candidates

Change-Id: Ia294aa503f66b401ed564dd04da276fc8a98e857
rfuchs/test
Richard Fuchs 1 year ago
parent
commit
e143fa08ca
2 changed files with 9 additions and 0 deletions
  1. +8
    -0
      daemon/call.c
  2. +1
    -0
      include/call.h

+ 8
- 0
daemon/call.c View File

@ -2605,6 +2605,13 @@ static void __update_init_subscribers(struct call_media *media, struct stream_pa
/* we are now ready to fire up ICE if so desired and requested */
ice_update(media->ice_agent, sp, opmode == OP_OFFER); /* sp == NULL: update in case rtcp-mux changed */
if (sp) {
// take over and store received ICE candidates
ice_candidates_free(&media->ice_candidates);
media->ice_candidates = sp->ice_candidates;
t_queue_init(&sp->ice_candidates);
}
recording_setup_media(media);
t38_gateway_start(media->t38_gateway, flags ? flags->codec_set : str_case_value_ht_null());
audio_player_start(media);
@ -4022,6 +4029,7 @@ void call_media_free(struct call_media **mdp) {
t_hash_table_destroy(md->media_subscriptions_ht);
t_queue_clear_full(&md->media_subscribers, media_subscription_free);
t_queue_clear_full(&md->media_subscriptions, media_subscription_free);
ice_candidates_free(&md->ice_candidates);
mutex_destroy(&md->dtmf_lock);
g_slice_free1(sizeof(*md), md);
*mdp = NULL;


+ 1
- 0
include/call.h View File

@ -493,6 +493,7 @@ struct call_media {
struct dtls_fingerprint fingerprint; /* as received */
const struct dtls_hash_func *fp_hash_func; /* outgoing */
str tls_id;
candidate_q ice_candidates; /* slice-alloc'd, as received */
unsigned int media_rec_slot;
packet_stream_q streams; /* normally RTP + RTCP */


Loading…
Cancel
Save