Some parameter types are corrected.
[Version] 0.2.64
[Issue Type] Internal API
Change-Id: I6eb146ee7914150cfdcb4cdf1c32660b1a1e1123
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
* @pre Add media source to @a webrtc to get @a source_id by calling webrtc_add_media_source().
* @see webrtc_media_source_set_video_loopback()
*/
-int webrtc_media_source_set_audio_loopback(webrtc_h webrtc, unsigned source_id, sound_stream_info_h stream_info, unsigned int *track_id);
+int webrtc_media_source_set_audio_loopback(webrtc_h webrtc, unsigned int source_id, sound_stream_info_h stream_info, unsigned int *track_id);
/**
* @brief Sets a video loopback to render the video frames of the media source.
* @pre Add media source to @a webrtc to get @a source_id by calling webrtc_add_media_source().
* @see webrtc_media_source_set_audio_loopback()
*/
-int webrtc_media_source_set_video_loopback(webrtc_h webrtc, unsigned source_id, webrtc_display_type_e type, webrtc_display_h display, unsigned int *track_id);
+int webrtc_media_source_set_video_loopback(webrtc_h webrtc, unsigned int source_id, webrtc_display_type_e type, webrtc_display_h display, unsigned int *track_id);
/**
* @}
*/
int webrtc_set_ecore_wl_display(webrtc_h webrtc, unsigned int track_id, void *ecore_wl_window);
+/**
+ * @internal
+ * @brief Sets a video loopback to render the video frames of the media source to an ecore wayland display.
+ * @details The following media source types are available for this function:\n
+ * #WEBRTC_MEDIA_SOURCE_TYPE_VIDEOTEST\n
+ * #WEBRTC_MEDIA_SOURCE_TYPE_CAMERA\n
+ * #WEBRTC_MEDIA_SOURCE_TYPE_SCREEN\n
+ * #WEBRTC_MEDIA_SOURCE_TYPE_FILE
+ * @since_tizen 6.5
+ * @param[in] webrtc WebRTC handle
+ * @param[in] source_id The video source id
+ * @param[in] ecore_wl_window The ecore wayland window handle
+ * @param[out] track_id The track id (optional, this can be NULL)
+ * @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
+ * @pre Add media source to @a webrtc to get @a source_id by calling webrtc_add_media_source().
+ */
+int webrtc_media_source_set_video_loopback_to_ecore_wl(webrtc_h webrtc, unsigned int source_id, void *ecore_wl_window, unsigned int *track_id);
+
/**
* @internal
* @brief Adds an internal media source.
Name: capi-media-webrtc
Summary: A WebRTC library in Tizen Native API
-Version: 0.2.63
+Version: 0.2.64
Release: 0
Group: Multimedia/API
License: Apache-2.0
return WEBRTC_ERROR_NONE;
}
-int webrtc_media_source_set_audio_loopback(webrtc_h webrtc, unsigned source_id, sound_stream_info_h stream_info, unsigned int *track_id)
+int webrtc_media_source_set_audio_loopback(webrtc_h webrtc, unsigned int source_id, sound_stream_info_h stream_info, unsigned int *track_id)
{
int ret = WEBRTC_ERROR_NONE;
webrtc_s *_webrtc = (webrtc_s*)webrtc;
return ret;
}
-int webrtc_media_source_set_video_loopback(webrtc_h webrtc, unsigned source_id, webrtc_display_type_e type, webrtc_display_h display, unsigned int *track_id)
+int webrtc_media_source_set_video_loopback(webrtc_h webrtc, unsigned int source_id, webrtc_display_type_e type, webrtc_display_h display, unsigned int *track_id)
{
int ret = WEBRTC_ERROR_NONE;
webrtc_s *_webrtc = (webrtc_s*)webrtc;
return ret;
}
+int webrtc_media_source_set_video_loopback_to_ecore_wl(webrtc_h webrtc, unsigned int source_id, void *ecore_wl_window, unsigned int *track_id)
+{
+ int ret = WEBRTC_ERROR_NONE;
+ 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(ecore_wl_window == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "ecore_wl_window is NULL");
+
+ g_mutex_lock(&_webrtc->mutex);
+
+ ret = _set_video_loopback(webrtc, source_id, WEBRTC_DISPLAY_TYPE_ECORE_WL, ecore_wl_window, track_id);
+
+ g_mutex_unlock(&_webrtc->mutex);
+
+ return ret;
+}
+
int webrtc_add_media_source_internal(webrtc_h webrtc, webrtc_media_source_type_internal_e type, unsigned int *source_id)
{
int ret = WEBRTC_ERROR_NONE;