move webrtc_file_source_set_path() to internal 50/263550/2 accepted/tizen/unified/20210907.121842 submit/tizen/20210907.040339
authorbackto.kim <backto.kim@samsung.com>
Mon, 6 Sep 2021 07:43:01 +0000 (16:43 +0900)
committerbackto.kim <backto.kim@samsung.com>
Mon, 6 Sep 2021 08:27:58 +0000 (17:27 +0900)
[Version] 0.2.94
[Issue Type] API

Change-Id: I8913184b8ab51d85f70fdcfda0aec0dc585645d8

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

index f07aae62a90969fb8f2507d3b129bb108425dfcb..22398ed2baf6853eb8a2bac2a7942b2d27745b47 100644 (file)
@@ -1046,25 +1046,6 @@ int webrtc_media_packet_source_set_format(webrtc_h webrtc, unsigned int source_i
  */
 int webrtc_media_packet_source_push_packet(webrtc_h webrtc, unsigned int source_id, media_packet_h packet);
 
-/**
- * @brief Sets media path to the file source.
- * @since_tizen 6.5
- * @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.
- * @param[in] webrtc       WebRTC handle
- * @param[in] source_id    The file source id
- * @param[in] path         The media path
- * @return @c 0 on success,
- *         otherwise a negative error value
- * @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);
-
 /**
  * @}
  */
index 0eddfbf6c90ba12a27ada352f8eb71c805954604..60e78262fca05a9136f67f7b007f44300686326b 100644 (file)
@@ -152,6 +152,26 @@ int webrtc_media_source_set_video_loopback_to_ecore_wl(webrtc_h webrtc, unsigned
  */
 int webrtc_add_media_source_internal(webrtc_h webrtc, webrtc_media_source_type_internal_e type, unsigned int *source_id);
 
+/**
+ * @internal
+ * @brief Sets media path to the file source.
+ * @since_tizen 6.5
+ * @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.
+ * @param[in] webrtc       WebRTC handle
+ * @param[in] source_id    The file source id
+ * @param[in] path         The media path
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @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 Creates a signaling server for private network.
index a99c55c9822daef268f0af21317c9743bb4b5e91..bf25b1c6fe660ae90c903f8e6e0b85a80fe17176 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-webrtc
 Summary:    A WebRTC library in Tizen Native API
-Version:    0.2.93
+Version:    0.2.94
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index c0123e6434c03a7f5da85da5d7c3883fde158269..17858efd2efa77c7479ea3909d04b7d75b0e096d 100644 (file)
@@ -587,25 +587,6 @@ int webrtc_media_packet_source_push_packet(webrtc_h webrtc, unsigned int source_
        return ret;
 }
 
-int webrtc_file_source_set_path(webrtc_h webrtc, unsigned int source_id, const char *path)
-{
-       int ret = WEBRTC_ERROR_NONE;
-       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(source_id == 0, WEBRTC_ERROR_INVALID_PARAMETER, "source_id is 0");
-       RET_VAL_IF(path == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "path is NULL");
-
-       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 = _set_media_path(_webrtc, source_id, path);
-
-       return ret;
-}
-
 int webrtc_set_sound_stream_info(webrtc_h webrtc, unsigned int track_id, sound_stream_info_h stream_info)
 {
        int ret = WEBRTC_ERROR_NONE;
index 95fc1e677acfc348e91e9956cff87a30d60dc129..8ec2477938df2d9535f0673d899292014c805a63 100644 (file)
@@ -76,4 +76,20 @@ int webrtc_add_media_source_internal(webrtc_h webrtc, webrtc_media_source_type_i
                LOG_INFO("source_id[%u]", *source_id);
 
        return ret;
+}
+
+int webrtc_file_source_set_path(webrtc_h webrtc, unsigned int source_id, const char *path)
+{
+       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(source_id == 0, WEBRTC_ERROR_INVALID_PARAMETER, "source_id is 0");
+       RET_VAL_IF(path == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "path is NULL");
+
+       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);
 }
\ No newline at end of file