fixup! webrtc_private: Add structure for data recovery types and update it 78/268378/1
authorSangchul Lee <sc11.lee@samsung.com>
Wed, 22 Dec 2021 04:17:13 +0000 (13:17 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Wed, 22 Dec 2021 04:29:58 +0000 (13:29 +0900)
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

index 555620f7e9a882b102acefecb6bc6d9e3bcca657..c78ba563415e24e06d7031ae5e396112e9423fe8 100644 (file)
@@ -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);
 }