From 232283e9549b907b5da50358d382aa0098f92645 Mon Sep 17 00:00:00 2001 From: Sangchul Lee Date: Thu, 17 Sep 2020 20:25:50 +0900 Subject: [PATCH] Revise description Add omitted description of webrtc_media_source_type_e. Add @details regarding possbile error codes to webrtc_error_cb() Remove unneeded space. [Version] 0.1.27 [Issue Type] Doxygen Change-Id: Id52bca581a6a8c007c15117d9519c3a28b40130d Signed-off-by: Sangchul Lee --- include/webrtc.h | 116 ++++++++++++++++--------------- packaging/capi-media-webrtc.spec | 2 +- 2 files changed, 61 insertions(+), 57 deletions(-) diff --git a/include/webrtc.h b/include/webrtc.h index 000e4e31..0c3cdae1 100644 --- a/include/webrtc.h +++ b/include/webrtc.h @@ -77,20 +77,24 @@ typedef enum * @since_tizen 6.5 */ typedef enum { - WEBRTC_MEDIA_SOURCE_TYPE_CAMERA, - WEBRTC_MEDIA_SOURCE_TYPE_MIC, - WEBRTC_MEDIA_SOURCE_TYPE_AUDIOTEST, - WEBRTC_MEDIA_SOURCE_TYPE_VIDEOTEST + WEBRTC_MEDIA_SOURCE_TYPE_CAMERA, /**< Camera preview */ + WEBRTC_MEDIA_SOURCE_TYPE_MIC, /**< Audio from microphone */ + WEBRTC_MEDIA_SOURCE_TYPE_AUDIOTEST, /**< Audio test */ + WEBRTC_MEDIA_SOURCE_TYPE_VIDEOTEST, /**< Video test */ } webrtc_media_source_type_e; /** * @brief Called when an error occurs. + * @details The following error codes can be received:\n + * #WEBRTC_ERROR_INVALID_OPERATION\n + * #WEBRTC_ERROR_STREAM_FAILED\n + * #WEBRTC_ERROR_RESOURCE_FAILED\n * @since_tizen 6.5 * @remarks The @a webrtc is the same object for which the callback was set.\nThe @a webrtc should not be released. - * @param [in] webrtc WebRTC handle - * @param [in] error The error code - * @param [in] state The current state of the WebRTC handle - * @param [in] user_data The user data passed from the callback registration function + * @param[in] webrtc WebRTC handle + * @param[in] error The error code + * @param[in] state The current state of the WebRTC handle + * @param[in] user_data The user data passed from the callback registration function * @see webrtc_set_error_cb() * @see webrtc_unset_error_cb() */ @@ -100,10 +104,10 @@ typedef void (*webrtc_error_cb)(webrtc_h webrtc, webrtc_error_e error, webrtc_st * @brief Called when the WebRTC state is changed. * @since_tizen 6.5 * @remarks The @a webrtc is the same object for which the callback was set.\nThe @a webrtc should not be released. - * @param [in] webrtc WebRTC handle - * @param [in] previous The previous state of the WebRTC handle - * @param [in] current The current state of the WebRTC handle - * @param [in] user_data The user data passed from the callback registration function + * @param[in] webrtc WebRTC handle + * @param[in] previous The previous state of the WebRTC handle + * @param[in] current The current state of the WebRTC handle + * @param[in] user_data The user data passed from the callback registration function * @see webrtc_set_state_changed_cb() * @see webrtc_unset_state_changed_cb() */ @@ -113,8 +117,8 @@ typedef void (*webrtc_state_changed_cb)(webrtc_h webrtc, webrtc_state_e previous * @brief Called when the WebRTC needs session negotiation. * @since_tizen 6.5 * @remarks The @a webrtc is the same object for which the callback was set.\nThe @a webrtc should not be released. - * @param [in] webrtc WebRTC handle - * @param [in] user_data The user data passed from the callback registration function + * @param[in] webrtc WebRTC handle + * @param[in] user_data The user data passed from the callback registration function * @see webrtc_set_negotiation_needed_cb() * @see webrtc_unset_negotiation_needed_cb() */ @@ -124,9 +128,9 @@ typedef void (*webrtc_negotiation_needed_cb)(webrtc_h webrtc, void *user_data); * @brief Called when the WebRTC needs to send the ICE candidate message to the remote peer through the signaling channel. * @since_tizen 6.5 * @remarks The @a webrtc is the same object for which the callback was set.\nThe @a webrtc should not be released. - * @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 + * @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 * @see webrtc_set_ice_candidate_cb() * @see webrtc_unset_ice_candidate_cb() */ @@ -135,9 +139,9 @@ typedef void (*webrtc_ice_candidate_cb)(webrtc_h webrtc, const char *candidate, /** * @brief Sets a callback function to be invoked when an asynchronous operation error occurs. * @since_tizen 6.5 - * @param [in] webrtc WebRTC handle - * @param [in] callback Callback function pointer - * @param [in] user_data The user data to be passed to the callback function + * @param[in] webrtc WebRTC handle + * @param[in] callback Callback function pointer + * @param[in] user_data The user data to be passed to the callback function * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful @@ -151,7 +155,7 @@ int webrtc_set_error_cb(webrtc_h webrtc, webrtc_error_cb callback, void *user_da /** * @brief Unsets the error callback function. * @since_tizen 6.5 - * @param [in] webrtc WebRTC handle + * @param[in] webrtc WebRTC handle * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful @@ -164,9 +168,9 @@ int webrtc_unset_error_cb(webrtc_h webrtc); /** * @brief Sets a callback function to be invoked when the WebRTC state is changed. * @since_tizen 6.5 - * @param [in] webrtc WebRTC handle - * @param [in] callback Callback function pointer - * @param [in] user_data The user data to be passed to the callback function + * @param[in] webrtc WebRTC handle + * @param[in] callback Callback function pointer + * @param[in] user_data The user data to be passed to the callback function * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful @@ -180,7 +184,7 @@ int webrtc_set_state_changed_cb(webrtc_h webrtc, webrtc_state_changed_cb callbac /** * @brief Unsets the state changed callback function. * @since_tizen 6.5 - * @param [in] webrtc WebRTC handle + * @param[in] webrtc WebRTC handle * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful @@ -194,7 +198,7 @@ int webrtc_unset_state_changed_cb(webrtc_h webrtc); * @brief Creates an instance of WebRTC. * @since_tizen 6.5 * @remarks You must release @a webrtc using webrtc_destroy(). - * @param [out] webrtc WebRTC handle + * @param[out] webrtc WebRTC handle * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful @@ -208,7 +212,7 @@ int webrtc_create(webrtc_h *webrtc); /** * @brief Starts the WebRTC. * @since_tizen 6.5 - * @param [in] webrtc WebRTC handle + * @param[in] webrtc WebRTC handle * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful @@ -225,7 +229,7 @@ int webrtc_start(webrtc_h webrtc); /** * @brief Stops the WebRTC. * @since_tizen 6.5 - * @param [in] webrtc WebRTC handle + * @param[in] webrtc WebRTC handle * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful @@ -242,7 +246,7 @@ int webrtc_stop(webrtc_h webrtc); /** * @brief Destroys the WebRTC. * @since_tizen 6.5 - * @param [in] webrtc WebRTC handle + * @param[in] webrtc WebRTC handle * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful @@ -256,8 +260,8 @@ int webrtc_destroy(webrtc_h webrtc); /** * @brief Gets the WebRTC state. * @since_tizen 6.5 - * @param [in] webrtc WebRTC handle - * @param [out] state WebRTC state + * @param[in] webrtc WebRTC handle + * @param[out] state WebRTC state * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful @@ -270,9 +274,9 @@ int webrtc_get_state(webrtc_h webrtc, webrtc_state_e *state); /** * @brief Adds a media source. * @since_tizen 6.5 - * @param [in] webrtc WebRTC handle - * @param [in] type The media source type to be added - * @param [out] source_id The media source id + * @param[in] webrtc WebRTC handle + * @param[in] type The media source type to be added + * @param[out] source_id The media source id * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful @@ -287,8 +291,8 @@ int webrtc_add_media_source(webrtc_h webrtc, webrtc_media_source_type_e type, un /** * @brief Removes the media source. * @since_tizen 6.5 - * @param [in] webrtc WebRTC handle - * @param [in] source_id The media source id to be removed + * @param[in] webrtc WebRTC handle + * @param[in] source_id The media source id to be removed * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful @@ -304,8 +308,8 @@ int webrtc_remove_media_source(webrtc_h webrtc, unsigned int source_id); /** * @brief Sets a STUN server URL. * @since_tizen 6.5 - * @param [in] webrtc WebRTC handle - * @param [in] stun_server The STUN server URL + * @param[in] webrtc WebRTC handle + * @param[in] stun_server The STUN server URL * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful @@ -318,9 +322,9 @@ int webrtc_set_stun_server(webrtc_h webrtc, const char *stun_server); /** * @brief Sets a negotiation needed callback function to be invoked when a change has occurred which requires session negotiation. * @since_tizen 6.5 - * @param [in] webrtc WebRTC handle - * @param [in] callback Callback function pointer - * @param [in] user_data The user data to be passed to the callback function + * @param[in] webrtc WebRTC handle + * @param[in] callback Callback function pointer + * @param[in] user_data The user data to be passed to the callback function * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful @@ -337,7 +341,7 @@ int webrtc_set_negotiation_needed_cb(webrtc_h webrtc, webrtc_negotiation_needed_ /** * @brief Unsets the negotiation needed callback function. * @since_tizen 6.5 - * @param [in] webrtc WebRTC handle + * @param[in] webrtc WebRTC handle * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful @@ -350,9 +354,9 @@ int webrtc_unset_negotiation_needed_cb(webrtc_h webrtc); /** * @brief Sets an ICE candidate callback function to be invoked when the WebRTC needs to send the ICE candidate message to the remote peer. * @since_tizen 6.5 - * @param [in] webrtc WebRTC handle - * @param [in] callback Callback function pointer - * @param [in] user_data The user data to be passed to the callback function + * @param[in] webrtc WebRTC handle + * @param[in] callback Callback function pointer + * @param[in] user_data The user data to be passed to the callback function * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful @@ -369,7 +373,7 @@ int webrtc_set_ice_candidate_cb(webrtc_h webrtc, webrtc_ice_candidate_cb callbac /** * @brief Unsets the ice candidate callback function. * @since_tizen 6.5 - * @param [in] webrtc WebRTC handle + * @param[in] webrtc WebRTC handle * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful @@ -383,8 +387,8 @@ int webrtc_unset_ice_candidate_cb(webrtc_h webrtc); * @brief Creates SDP offer to start a new WebRTC connection to a remote peer. * @since_tizen 6.5 * @remarks The @a offer should be released using free(). - * @param [in] webrtc WebRTC handle - * @param [out] offer SDP offer + * @param[in] webrtc WebRTC handle + * @param[out] offer SDP offer * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful @@ -401,8 +405,8 @@ int webrtc_create_offer(webrtc_h webrtc, char **offer); * @brief Creates SDP answer to an offer received from a remote peer during the negotiation of a WebRTC connection. * @since_tizen 6.5 * @remarks The @a answer should be released using free(). - * @param [in] webrtc WebRTC handle - * @param [out] answer SDP answer + * @param[in] webrtc WebRTC handle + * @param[out] answer SDP answer * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful @@ -419,8 +423,8 @@ int webrtc_create_answer(webrtc_h webrtc, char **answer); * @since_tizen 6.5 * @remarks @a description is a JSON string.\n * It will be {"sdp":{"type":"offer or answer","sdp":"..."}}. - * @param [in] webrtc WebRTC handle - * @param [in] description The local session description + * @param[in] webrtc WebRTC handle + * @param[in] description The local session description * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful @@ -438,8 +442,8 @@ int webrtc_set_local_description(webrtc_h webrtc, const char *description); * @since_tizen 6.5 * @remarks @a description is a JSON string.\n * It will be {"sdp":{"type":"offer or answer","sdp":"..."}}. - * @param [in] webrtc WebRTC handle - * @param [in] description The remote session description + * @param[in] webrtc WebRTC handle + * @param[in] description The remote session description * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful @@ -455,8 +459,8 @@ int webrtc_set_remote_description(webrtc_h webrtc, const char *description); * @since_tizen 6.5 * @remarks @a candidate is a JSON string.\n * It will be {"ice":{"candidate":"..."}}. - * @param [in] webrtc WebRTC handle - * @param [in] candidate The ICE candidate + * @param[in] webrtc WebRTC handle + * @param[in] candidate The ICE candidate * @return @c 0 on success, * otherwise a negative error value * @retval #WEBRTC_ERROR_NONE Successful diff --git a/packaging/capi-media-webrtc.spec b/packaging/capi-media-webrtc.spec index b7384180..76050b03 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.1.26 +Version: 0.1.27 Release: 0 Group: Multimedia/API License: Apache-2.0 -- 2.34.1