Update doxygen and log regarding ICE candidate message 08/283508/1
authorSangchul Lee <sc11.lee@samsung.com>
Fri, 30 Sep 2022 03:29:45 +0000 (12:29 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Fri, 28 Oct 2022 01:10:56 +0000 (01:10 +0000)
[Version] 0.3.255
[Issue Type] Doxygen / Log

Change-Id: If8b59c0d09500f3b6e981c8a0c92c3540347f8db
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
(cherry picked from commit b78813bab3559eb73312f0f3c683b218c3733b54)

include/webrtc.h
packaging/capi-media-webrtc.spec
src/webrtc_private.c

index b99c1f402cb9377a12fef469432a92f6b165465a..cd971a2408756af470f35c61cfff4eacd085295c 100644 (file)
@@ -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,
index 6a0115cc7752b21d1a885d59d439a998fd6e3a4b..8fd83972bdc0ee806994d169961218163eb2d38f 100644 (file)
@@ -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
index f4d289864d5aa1accdd5eb0dfed623de6c82b679..75c95d1a2e4b0dc91e0438c166272220207af4fa 100644 (file)
@@ -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);