* @see webrtc_create_answer_async()
* @see webrtc_set_signaling_state_change_cb()
* @see webrtc_get_signaling_state()
+ * @see webrtc_get_local_description()
*/
int webrtc_set_local_description(webrtc_h webrtc, const char *description);
+/**
+ * @brief Gets the local session description.
+ * @since_tizen 9.0
+ * @remarks @a description is a JSON string.\n
+ * It will be {"sdp":{"type":"offer or answer","sdp":"..."}}.\n
+ * The @a description should be released using free() if the value is not NULL.
+ * @param[in] webrtc WebRTC handle
+ * @param[out] description The local session description
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #WEBRTC_ERROR_NONE Successful
+ * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
+ * @see webrtc_set_local_description()
+ */
+int webrtc_get_local_description(webrtc_h webrtc, char **description);
+
/**
* @brief Sets the session description of the remote peer's current offer or answer.
* @since_tizen 6.5
* @see webrtc_state_changed_cb()
* @see webrtc_set_signaling_state_change_cb()
* @see webrtc_get_signaling_state()
+ * @see webrtc_get_remote_description()
*/
int webrtc_set_remote_description(webrtc_h webrtc, const char *description);
+/**
+ * @brief Gets the remote session description.
+ * @since_tizen 9.0
+ * @remarks @a description is a JSON string.\n
+ * It should be {"sdp":{"type":"offer or answer","sdp":"..."}}.\n
+ * The @a description should be released using free() if the value is not NULL.
+ * @param[in] webrtc WebRTC handle
+ * @param[out] description The remote session description
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #WEBRTC_ERROR_NONE Successful
+ * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
+ * @see webrtc_set_remote_description()
+ */
+int webrtc_get_remote_description(webrtc_h webrtc, char **description);
+
/**
* @brief Adds a new ICE candidate from the remote peer over its signaling channel.
* @since_tizen 6.5
*/
int webrtc_null_source_set_media_type(webrtc_h webrtc, unsigned int source_id, webrtc_media_type_e media_type);
-/**
- * @internal
- * @brief Gets the local session description.
- * @since_tizen 8.0
- * @remarks @a description is a JSON string.\n
- * It will be {"sdp":{"type":"offer or answer","sdp":"..."}}.\n
- * The @a description should be released using free() if the value is not NULL.
- * @param[in] webrtc WebRTC handle
- * @param[out] description The local session description
- * @return @c 0 on success,
- * otherwise a negative error value
- * @retval #WEBRTC_ERROR_NONE Successful
- * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
- * @see webrtc_set_local_description()
- */
-int webrtc_get_local_description(webrtc_h webrtc, char **description);
-
-/**
- * @internal
- * @brief Gets the remote session description.
- * @since_tizen 8.0
- * @remarks @a description is a JSON string.\n
- * It should be {"sdp":{"type":"offer or answer","sdp":"..."}}.\n
- * The @a description should be released using free() if the value is not NULL.
- * @param[in] webrtc WebRTC handle
- * @param[out] description The remote session description
- * @return @c 0 on success,
- * otherwise a negative error value
- * @retval #WEBRTC_ERROR_NONE Successful
- * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
- * @see webrtc_set_remote_description()
- */
-int webrtc_get_remote_description(webrtc_h webrtc, char **description);
-
/**
* @internal
* @brief Sets the probability of RTP packet dropping.
Name: capi-media-webrtc
Summary: A WebRTC library in Tizen Native API
-Version: 1.1.21
+Version: 1.1.22
Release: 0
Group: Multimedia/API
License: Apache-2.0
return _webrtcbin_set_session_description(webrtc, description, false);
}
+int webrtc_get_local_description(webrtc_h webrtc, char **description)
+{
+ g_autoptr(GMutexLocker) locker = NULL;
+ webrtc_s *_webrtc = (webrtc_s *)webrtc;
+
+ RET_VAL_IF(_webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
+ RET_VAL_IF(description == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "description is NULL");
+
+ locker = g_mutex_locker_new(&_webrtc->mutex);
+
+ if (_webrtc->local_desc)
+ *description = strdup(_webrtc->local_desc);
+ else
+ *description = NULL;
+
+ LOG_INFO("webrtc[%p] description: %s", _webrtc, *description);
+
+ return WEBRTC_ERROR_NONE;
+}
+
int webrtc_set_remote_description(webrtc_h webrtc, const char *description)
{
g_autoptr(GMutexLocker) locker = NULL;
return _webrtcbin_set_session_description(webrtc, description, true);
}
+int webrtc_get_remote_description(webrtc_h webrtc, char **description)
+{
+ g_autoptr(GMutexLocker) locker = NULL;
+ webrtc_s *_webrtc = (webrtc_s *)webrtc;
+
+ RET_VAL_IF(_webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
+ RET_VAL_IF(description == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "description is NULL");
+
+ locker = g_mutex_locker_new(&_webrtc->mutex);
+
+ if (_webrtc->remote_desc)
+ *description = strdup(_webrtc->remote_desc);
+ else
+ *description = NULL;
+
+ LOG_INFO("webrtc[%p] description: %s", _webrtc, *description);
+
+ return WEBRTC_ERROR_NONE;
+}
+
int webrtc_add_ice_candidate(webrtc_h webrtc, const char *candidate)
{
g_autoptr(GMutexLocker) locker = NULL;
return WEBRTC_ERROR_NONE;
}
-int webrtc_get_local_description(webrtc_h webrtc, char **description)
-{
- g_autoptr(GMutexLocker) locker = NULL;
- webrtc_s *_webrtc = (webrtc_s *)webrtc;
-
- RET_VAL_IF(_webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
- RET_VAL_IF(description == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "description is NULL");
-
- locker = g_mutex_locker_new(&_webrtc->mutex);
-
- if (_webrtc->local_desc)
- *description = strdup(_webrtc->local_desc);
- else
- *description = NULL;
-
- LOG_INFO("webrtc[%p] description: %s", _webrtc, *description);
-
- return WEBRTC_ERROR_NONE;
-}
-
-int webrtc_get_remote_description(webrtc_h webrtc, char **description)
-{
- g_autoptr(GMutexLocker) locker = NULL;
- webrtc_s *_webrtc = (webrtc_s *)webrtc;
-
- RET_VAL_IF(_webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
- RET_VAL_IF(description == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "description is NULL");
-
- locker = g_mutex_locker_new(&_webrtc->mutex);
-
- if (_webrtc->remote_desc)
- *description = strdup(_webrtc->remote_desc);
- else
- *description = NULL;
-
- LOG_INFO("webrtc[%p] description: %s", _webrtc, *description);
-
- return WEBRTC_ERROR_NONE;
-}
-
int webrtc_util_strip_description(const char *origin_description, char **description)
{
g_autoptr(JsonParser) parser = NULL;