From: Sangchul Lee Date: Fri, 30 Sep 2022 03:29:45 +0000 (+0900) Subject: Update doxygen and log regarding ICE candidate message X-Git-Tag: accepted/tizen/unified/20221107.173038~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b78813bab3559eb73312f0f3c683b218c3733b54;p=platform%2Fcore%2Fapi%2Fwebrtc.git Update doxygen and log regarding ICE candidate message [Version] 0.3.255 [Issue Type] Doxygen / Log Change-Id: If8b59c0d09500f3b6e981c8a0c92c3540347f8db Signed-off-by: Sangchul Lee --- diff --git a/include/webrtc.h b/include/webrtc.h index b99c1f40..cd971a24 100644 --- a/include/webrtc.h +++ b/include/webrtc.h @@ -596,7 +596,8 @@ typedef void (*webrtc_negotiation_needed_cb)(webrtc_h webrtc, void *user_data); * @since_tizen 6.5 * @remarks The @a webrtc is the same object for which the callback was set.\n * The @a webrtc should not be released.\n - * The @a candidate can be used only in the callback. To use outside, make a copy. + * The @a candidate can be used only in the callback. To use outside, make a copy.\n + * It will be {"ice":{"candidate":"...", "sdpMLineIndex":0 or 1 or ...}}. * @param[in] webrtc WebRTC handle * @param[in] candidate The ICE candidate message * @param[in] user_data The user data passed from the callback registration function @@ -2437,7 +2438,7 @@ int webrtc_set_local_description(webrtc_h webrtc, const char *description); * @brief Sets the session description of the remote peer's current offer or answer. * @since_tizen 6.5 * @remarks @a description is a JSON string.\n - * It will be {"sdp":{"type":"offer or answer","sdp":"..."}}. + * It should be {"sdp":{"type":"offer or answer","sdp":"..."}}. * @param[in] webrtc WebRTC handle * @param[in] description The remote session description * @return @c 0 on success, @@ -2457,7 +2458,7 @@ int webrtc_set_remote_description(webrtc_h webrtc, const char *description); * @brief Adds a new ICE candidate from the remote peer over its signaling channel. * @since_tizen 6.5 * @remarks @a candidate is a JSON string.\n - * It will be {"ice":{"candidate":"..."}}. + * It should be {"ice":{"candidate":"...", "sdpMLineIndex":0 or 1 or ...}}. * @param[in] webrtc WebRTC handle * @param[in] candidate The ICE candidate * @return @c 0 on success, diff --git a/packaging/capi-media-webrtc.spec b/packaging/capi-media-webrtc.spec index 6a0115cc..8fd83972 100644 --- a/packaging/capi-media-webrtc.spec +++ b/packaging/capi-media-webrtc.spec @@ -1,6 +1,6 @@ Name: capi-media-webrtc Summary: A WebRTC library in Tizen Native API -Version: 0.3.254 +Version: 0.3.255 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/webrtc_private.c b/src/webrtc_private.c index f4d28986..75c95d1a 100644 --- a/src/webrtc_private.c +++ b/src/webrtc_private.c @@ -2134,6 +2134,10 @@ static int __get_ice_candidate_from_message(const char *ice_message, gchar **can } *candidate = g_strdup(_candidate); + + if (!json_object_has_member(child, "sdpMLineIndex")) + LOG_WARNING("It does not contain 'sdpMLineIndex' member, 0 will be set for this: %s", ice_message); + *mlineindex = json_object_get_int_member(child, "sdpMLineIndex"); LOG_DEBUG("candidate: %s", *candidate);