From 52f4d9947bda6273278d056fe5efd92dc0f1ad9d Mon Sep 17 00:00:00 2001 From: Sangchul Lee Date: Wed, 22 Dec 2021 13:17:13 +0900 Subject: [PATCH] fixup! webrtc_private: Add structure for data recovery types and update it One more condition is added for an offerer. 1. set local offer description (changed to HAVE_LOCAL_OFFER) 2. set remote answer description (changed to STABLE) Function name is also changed. Change-Id: I2a2bdc5058c41750a2a0e46c50b7112cda6b0a72 --- src/webrtc_private.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/webrtc_private.c b/src/webrtc_private.c index 555620f7..c78ba563 100644 --- a/src/webrtc_private.c +++ b/src/webrtc_private.c @@ -268,7 +268,7 @@ static int __get_pt_and_encoding_info_from_rtpmap_attribute(const gchar *key, co return 0; } -static void __update_data_recovery_type_from_remote_offer_description(webrtc_s *webrtc) +static void __update_data_recovery_type_from_remote_description(webrtc_s *webrtc) { guint i, j; guint attr_length; @@ -1025,8 +1025,9 @@ static void __webrtcbin_signaling_state_cb(GstElement *webrtcbin, GParamSpec * p LOG_DEBUG("webrtc[%p] [SignalingState] is changed to [%s]", webrtc, __signaling_state_info[state].str); webrtc->negotiation_states.signaling_state = __signaling_state_info[state].state; - if (state == GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER) - __update_data_recovery_type_from_remote_offer_description(webrtc); + if (state == GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER || + state == GST_WEBRTC_SIGNALING_STATE_STABLE) + __update_data_recovery_type_from_remote_description(webrtc); __post_signaling_state_change_cb_in_idle(webrtc, state); } -- 2.34.1