* The recorder privilege(%http://tizen.org/privilege/recorder) should be added if @a type is #WEBRTC_MEDIA_SOURCE_TYPE_MIC.\n
* With @a type of #WEBRTC_MEDIA_SOURCE_TYPE_NULL, you can configure a transceiver only for receiving audio or video stream. (Since 7.0)\n
* @a type of #WEBRTC_MEDIA_SOURCE_TYPE_SCREEN is not allowed to be used by third-party applications due to the security reasons. (Since 7.0)\n
- * The display feature(%http://tizen.org/feature/display) is required if @a type is #WEBRTC_MEDIA_SOURCE_TYPE_SCREEN. (Since 8.0)
+ * The display feature(%http://tizen.org/feature/display) is required if @a type is #WEBRTC_MEDIA_SOURCE_TYPE_SCREEN. (Since 8.0)\n
+ * #WEBRTC_ERROR_INVALID_STATE will no longer occur. (Since 9.0)
* @param[in] webrtc WebRTC handle
* @param[in] type The media source type to be added
* @param[out] source_id The media source id
* @retval #WEBRTC_ERROR_PERMISSION_DENIED Permission denied
* @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
- * @retval #WEBRTC_ERROR_INVALID_STATE Invalid state
- * @pre @a webrtc state must be set to #WEBRTC_STATE_IDLE.
* @see webrtc_remove_media_source()
* @see webrtc_media_source_set_transceiver_direction()
* @see webrtc_media_source_get_transceiver_direction()
/**
* @brief Removes the media source.
* @since_tizen 6.5
+ * @remarks #WEBRTC_ERROR_INVALID_STATE will no longer occur. (Since 9.0)
* @param[in] webrtc WebRTC handle
* @param[in] source_id The media source id to be removed
* @return @c 0 on success,
* @retval #WEBRTC_ERROR_NONE Successful
* @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
- * @retval #WEBRTC_ERROR_INVALID_STATE Invalid state
* @pre Add media source to @a webrtc to get @a source_id by calling webrtc_add_media_source().
- * @pre @a webrtc state must be set to #WEBRTC_STATE_IDLE.
* @see webrtc_add_media_source()
*/
int webrtc_remove_media_source(webrtc_h webrtc, unsigned int source_id);
/**
* @brief Sets the transceiver direction to the media source with specified media type.
* @since_tizen 6.5
- * @remarks If @a source_id is a media source of #WEBRTC_MEDIA_SOURCE_TYPE_NULL, it only allows #WEBRTC_TRANSCEIVER_DIRECTION_RECVONLY. (Since 7.0)
+ * @remarks If @a source_id is a media source of #WEBRTC_MEDIA_SOURCE_TYPE_NULL, it only allows #WEBRTC_TRANSCEIVER_DIRECTION_RECVONLY. (Since 7.0)\n
+ * #WEBRTC_ERROR_INVALID_STATE will no longer occur. (Since 9.0)
* @param[in] webrtc WebRTC handle
* @param[in] source_id The media source id
* @param[in] media_type The media type
* @retval #WEBRTC_ERROR_NONE Successful
* @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
- * @retval #WEBRTC_ERROR_INVALID_STATE Invalid state
* @pre Add media source to @a webrtc to get @a source_id by calling webrtc_add_media_source().
* @pre webrtc_media_packet_source_set_format() must be called if @a source_id is a media source of #WEBRTC_MEDIA_SOURCE_TYPE_MEDIA_PACKET.
- * @pre @a webrtc state must be set to #WEBRTC_STATE_IDLE.
* @see webrtc_media_source_get_transceiver_direction()
*/
int webrtc_media_source_set_transceiver_direction(webrtc_h webrtc, unsigned int source_id, webrtc_media_type_e media_type, webrtc_transceiver_direction_e direction);
* @brief Sets the transceiver codec to the media source.
* @since_tizen 7.0
* @remarks If @a source_id is a media source of #WEBRTC_MEDIA_SOURCE_TYPE_FILE or #WEBRTC_MEDIA_SOURCE_TYPE_MEDIA_PACKET,
- * this function will return #WEBRTC_ERROR_INVALID_PARAMETER.
+ * this function will return #WEBRTC_ERROR_INVALID_PARAMETER.\n
+ * #WEBRTC_ERROR_INVALID_STATE will no longer occur. (Since 9.0)
* @param[in] webrtc WebRTC handle
* @param[in] source_id The media source id
* @param[in] media_type The media type
* @retval #WEBRTC_ERROR_NONE Successful
* @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
- * @retval #WEBRTC_ERROR_INVALID_STATE Invalid state
* @pre Add media source to @a webrtc to get @a source_id by calling webrtc_add_media_source().
- * @pre @a webrtc state must be set to #WEBRTC_STATE_IDLE.
* @see webrtc_media_source_get_transceiver_codec()
* @see webrtc_media_source_foreach_supported_transceiver_codec()
*/
* #SOUND_STREAM_TYPE_VOICE_RECOGNITION\n
* #SOUND_STREAM_TYPE_VOIP\n
* #SOUND_STREAM_TYPE_MEDIA_EXTERNAL_ONLY\n
- * For more details, please refer to @ref CAPI_MEDIA_SOUND_MANAGER_MODULE.
+ * For more details, please refer to @ref CAPI_MEDIA_SOUND_MANAGER_MODULE.\n
+ * #WEBRTC_ERROR_INVALID_STATE will no longer occur. (Since 9.0)
* @param[in] webrtc WebRTC handle
* @param[in] source_id The mic source id
* @param[in] stream_info The sound stream information
* @retval #WEBRTC_ERROR_NONE Successful
* @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
- * @retval #WEBRTC_ERROR_INVALID_STATE Invalid state
- * @pre @a webrtc state must be set to #WEBRTC_STATE_IDLE.
* @see #sound_stream_info_h
* @see sound_manager_create_stream_information()
* @see sound_manager_destroy_stream_information()
/**
* @brief Sets a camera device id to the camera source.
* @since_tizen 7.0
+ * @remarks #WEBRTC_ERROR_INVALID_STATE will no longer occur. (Since 9.0)
* @param[in] webrtc WebRTC handle
* @param[in] source_id The camera source id
* @param[in] device_id The camera device id
* @retval #WEBRTC_ERROR_NONE Successful
* @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
- * @retval #WEBRTC_ERROR_INVALID_STATE Invalid state
* @pre Add camera source to @a webrtc to get @a source_id by calling webrtc_add_media_source().
- * @pre @a webrtc state must be set to #WEBRTC_STATE_IDLE.
* @see webrtc_add_media_source()
* @see webrtc_camera_source_get_device_id()
*/
* #MEDIA_FORMAT_VP9\n
* #MEDIA_FORMAT_I420\n
* #MEDIA_FORMAT_NV12\n
- * For more details, please refer to @ref CAPI_MEDIA_TOOL_MEDIA_FORMAT_MODULE.
+ * For more details, please refer to @ref CAPI_MEDIA_TOOL_MEDIA_FORMAT_MODULE.\n
+ * #WEBRTC_ERROR_INVALID_STATE will no longer occur. (Since 9.0)
* @param[in] webrtc WebRTC handle
* @param[in] source_id The media packet source id
* @param[in] format The media format
* @retval #WEBRTC_ERROR_NONE Successful
* @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
- * @retval #WEBRTC_ERROR_INVALID_STATE Invalid state
* @pre Add media packet source to @a webrtc to get @a source_id by calling webrtc_add_media_source().
- * @pre @a webrtc state must be set to #WEBRTC_STATE_IDLE.
* @see webrtc_media_packet_source_push_packet()
* @see webrtc_media_packet_source_set_buffer_state_changed_cb()
*/
* @brief Sets media path of the file source.
* @since_tizen 7.0
* @remarks %http://tizen.org/privilege/mediastorage is needed if path is relevant to internal media storage.\n
- * %http://tizen.org/privilege/externalstorage is needed if path is relevant to external media storage.
+ * %http://tizen.org/privilege/externalstorage is needed if path is relevant to external media storage.\n
+ * #WEBRTC_ERROR_INVALID_STATE will no longer occur. (Since 9.0)
* @param[in] webrtc WebRTC handle
* @param[in] source_id The file source id
* @param[in] path The media path
* @retval #WEBRTC_ERROR_NONE Successful
* @retval #WEBRTC_ERROR_PERMISSION_DENIED Permission denied
* @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #WEBRTC_ERROR_INVALID_STATE Invalid state
* @pre Add file source to @a webrtc to get @a source_id by calling webrtc_add_media_source().
- * @pre @a webrtc state must be set to #WEBRTC_STATE_IDLE.
*/
int webrtc_file_source_set_path(webrtc_h webrtc, unsigned int source_id, const char *path);
* @internal
* @brief Adds an internal media source.
* @since_tizen 6.5
+ * @remarks #WEBRTC_ERROR_INVALID_STATE will no longer occur. (Since 9.0)
* @param[in] webrtc WebRTC handle
* @param[in] type The media source type to be added
* @param[out] source_id The media source id
* @retval #WEBRTC_ERROR_NOT_SUPPORTED Not supported
* @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
- * @retval #WEBRTC_ERROR_INVALID_STATE Invalid state
- * @pre @a webrtc state must be set to #WEBRTC_STATE_IDLE.
* @see webrtc_remove_media_source()
* @see webrtc_media_source_set_transceiver_direction()
* @see webrtc_media_source_get_transceiver_direction()
* @internal
* @brief Sets the payload type to the media source.
* @since_tizen 7.0
- * @remarks This function would be useful when @a webrtc is operated as an answerer and a remote peer is using another implementation, not this API.
+ * @remarks This function would be useful when @a webrtc is operated as an answerer and a remote peer is using another implementation, not this API.\n
+ * #WEBRTC_ERROR_INVALID_STATE will no longer occur. (Since 9.0)
* @param[in] webrtc WebRTC handle
* @param[in] source_id The media source id
* @param[in] media_type The media type
* otherwise a negative error value
* @retval #WEBRTC_ERROR_NONE Successful
* @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #WEBRTC_ERROR_INVALID_STATE Invalid state
* @pre Add media source to @a webrtc to get @a source_id by calling webrtc_add_media_source().
- * @pre @a webrtc state must be set to #WEBRTC_STATE_IDLE.
* @see webrtc_media_source_get_payload_type()
*/
int webrtc_media_source_set_payload_type(webrtc_h webrtc, unsigned int source_id, webrtc_media_type_e media_type, unsigned int pt);
locker = g_mutex_locker_new(&_webrtc->mutex);
- RET_VAL_IF(_webrtc->state != WEBRTC_STATE_IDLE, WEBRTC_ERROR_INVALID_STATE, "the state should be IDLE");
-
return _add_media_source(webrtc, type, source_id);
}
locker = g_mutex_locker_new(&_webrtc->mutex);
- RET_VAL_IF(_webrtc->state != WEBRTC_STATE_IDLE, WEBRTC_ERROR_INVALID_STATE, "the state should be IDLE");
-
return _remove_media_source(webrtc, source_id);
}
locker = g_mutex_locker_new(&_webrtc->mutex);
- RET_VAL_IF(_webrtc->state != WEBRTC_STATE_IDLE, WEBRTC_ERROR_INVALID_STATE, "the state should be IDLE");
-
return _set_transceiver_direction(webrtc, source_id, media_type, direction);
}
locker = g_mutex_locker_new(&_webrtc->mutex);
- RET_VAL_IF(_webrtc->state != WEBRTC_STATE_IDLE, WEBRTC_ERROR_INVALID_STATE, "the state should be IDLE");
-
return _set_transceiver_codec(webrtc, source_id, media_type, codec);
}
locker = g_mutex_locker_new(&_webrtc->mutex);
- RET_VAL_IF(_webrtc->state != WEBRTC_STATE_IDLE, WEBRTC_ERROR_INVALID_STATE, "the state should be IDLE");
-
return _set_sound_stream_info(webrtc, source_id, stream_info);
}
locker = g_mutex_locker_new(&_webrtc->mutex);
- RET_VAL_IF(_webrtc->state != WEBRTC_STATE_IDLE, WEBRTC_ERROR_INVALID_STATE, "the state should be IDLE");
-
return _set_camera_device_id(webrtc, source_id, device_id);
}
locker = g_mutex_locker_new(&_webrtc->mutex);
- RET_VAL_IF(_webrtc->state != WEBRTC_STATE_IDLE, WEBRTC_ERROR_INVALID_STATE, "the state should be IDLE");
-
return _set_media_format(_webrtc, source_id, format);
}
locker = g_mutex_locker_new(&_webrtc->mutex);
- RET_VAL_IF(_webrtc->state != WEBRTC_STATE_IDLE, WEBRTC_ERROR_INVALID_STATE, "the state should be IDLE");
-
return _set_media_path(_webrtc, source_id, path);
}
locker = g_mutex_locker_new(&_webrtc->mutex);
- RET_VAL_IF(_webrtc->state != WEBRTC_STATE_IDLE, WEBRTC_ERROR_INVALID_STATE, "the state should be IDLE");
-
ret = _add_media_source_internal(webrtc, type, source_id);
if (ret == WEBRTC_ERROR_NONE)
LOG_INFO("source_id[%u]", *source_id);
_media_type = _get_video_media_type(source->av[AV_IDX_VIDEO].codec);
RET_VAL_IF(_media_type == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "_media_type is NULL");
- RET_VAL_IF(_webrtc->state != WEBRTC_STATE_IDLE, WEBRTC_ERROR_INVALID_STATE, "the state should be IDLE");
-
_pt = _get_fixed_payload_type(_media_type);
if (_pt != -1 && (unsigned int)_pt != pt) {
LOG_ERROR("this media_type[%s] only allows fixed payload type[%d]", _media_type, _pt);
locker = g_mutex_locker_new(&_webrtc->mutex);
- RET_VAL_IF(_webrtc->state != WEBRTC_STATE_IDLE, WEBRTC_ERROR_INVALID_STATE, "the state should be IDLE");
-
return _add_transceiver_encoding(webrtc, source_id, media_type, rid, target_bitrate, width, height);
}
locker = g_mutex_locker_new(&_webrtc->mutex);
- RET_VAL_IF(_webrtc->state != WEBRTC_STATE_IDLE, WEBRTC_ERROR_INVALID_STATE, "the state should be IDLE");
-
return _remove_transceiver_encoding(webrtc, source_id, media_type, rid);
}