* @remarks The camera privilege(%http://tizen.org/privilege/camera) should be added if @a type is #WEBRTC_MEDIA_SOURCE_TYPE_CAMERA.\n
* 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)
+ * @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)
* @param[in] webrtc WebRTC handle
* @param[in] type The media source type to be added
* @param[out] source_id The media source id
* @brief Sets a display to the video track to be rendered.
* @since_tizen 6.5
* @remarks Call this function within webrtc_track_added_cb(), otherwise #WEBRTC_ERROR_INVALID_OPERATION will be returned.\n
- * If webrtc_set_encoded_video_frame_cb() has been called, it will return #WEBRTC_ERROR_INVALID_OPERATION.
+ * If webrtc_set_encoded_video_frame_cb() has been called, it will return #WEBRTC_ERROR_INVALID_OPERATION.\n
+ * The display feature(%http://tizen.org/feature/display) is required. (Since 8.0)
* @param[in] webrtc WebRTC handle
* @param[in] track_id The track id
* @param[in] type The display type
* @return @c 0 on success,
* otherwise a negative error value
* @retval #WEBRTC_ERROR_NONE Successful
+ * @retval #WEBRTC_ERROR_NOT_SUPPORTED Not supported
* @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
* @pre webrtc_track_added_cb() must be set by calling webrtc_set_track_added_cb().
/**
* @brief Sets the display mode of the video track.
* @since_tizen 6.5
+ * @remarks The display feature(%http://tizen.org/feature/display) is required. (Since 8.0)
* @param[in] webrtc WebRTC handle
* @param[in] track_id The track id
* @param[in] mode The display mode
* @return @c 0 on success,
* otherwise a negative error value
* @retval #WEBRTC_ERROR_NONE Successful
+ * @retval #WEBRTC_ERROR_NOT_SUPPORTED Not supported
* @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
* @pre For remote video track, webrtc_set_display() must be called with @a track_id from webrtc_track_added_cb().\n
/**
* @brief Gets the display mode of the video track.
* @since_tizen 6.5
- * @remarks The default value is #WEBRTC_DISPLAY_MODE_LETTER_BOX.
+ * @remarks The default value is #WEBRTC_DISPLAY_MODE_LETTER_BOX.\n
+ * The display feature(%http://tizen.org/feature/display) is required. (Since 8.0)
* @param[in] webrtc WebRTC handle
* @param[in] track_id The track id
* @param[out] mode The display mode
* @return @c 0 on success,
* otherwise a negative error value
* @retval #WEBRTC_ERROR_NONE Successful
+ * @retval #WEBRTC_ERROR_NOT_SUPPORTED Not supported
* @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
* @pre For remote video track, webrtc_set_display() must be called with @a track_id from webrtc_track_added_cb().\n
/**
* @brief Sets the display visibleness of the video track.
* @since_tizen 6.5
+ * @remarks The display feature(%http://tizen.org/feature/display) is required. (Since 8.0)
* @param[in] webrtc WebRTC handle
* @param[in] track_id The track id
* @param[in] visible The display visibleness
* @return @c 0 on success,
* otherwise a negative error value
* @retval #WEBRTC_ERROR_NONE Successful
+ * @retval #WEBRTC_ERROR_NOT_SUPPORTED Not supported
* @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
* @pre For remote video track, webrtc_set_display() must be called with @a track_id from webrtc_track_added_cb().\n
/**
* @brief Gets the display visibleness of the video track.
* @since_tizen 6.5
- * @remarks The default value is @c true.
+ * @remarks The default value is @c true.\n
+ * The display feature(%http://tizen.org/feature/display) is required. (Since 8.0)
* @param[in] webrtc WebRTC handle
* @param[in] track_id The track id
* @param[out] visible The display visibleness
* @return @c 0 on success,
* otherwise a negative error value
* @retval #WEBRTC_ERROR_NONE Successful
+ * @retval #WEBRTC_ERROR_NOT_SUPPORTED Not supported
* @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
* @pre For remote video track, webrtc_set_display() must be called with @a track_id from webrtc_track_added_cb().\n
* #WEBRTC_MEDIA_SOURCE_TYPE_SCREEN\n
* #WEBRTC_MEDIA_SOURCE_TYPE_FILE
* @since_tizen 6.5
+ * @remarks The display feature(%http://tizen.org/feature/display) is required. (Since 8.0)
* @param[in] webrtc WebRTC handle
* @param[in] source_id The video source id
* @param[in] type The display type
* @return @c 0 on success,
* otherwise a negative error value
* @retval #WEBRTC_ERROR_NONE Successful
+ * @retval #WEBRTC_ERROR_NOT_SUPPORTED Not supported
* @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().
/**
* @brief Unsets the video loopback.
* @since_tizen 7.0
+ * @remarks The display feature(%http://tizen.org/feature/display) is required. (Since 8.0)
* @param[in] webrtc WebRTC handle
* @param[in] source_id The video source id
* @return @c 0 on success,
* otherwise a negative error value
* @retval #WEBRTC_ERROR_NONE Successful
+ * @retval #WEBRTC_ERROR_NOT_SUPPORTED Not supported
* @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().
#define _WEBRTC_FEATURE_CAMERA "http://tizen.org/feature/camera"
#define _WEBRTC_FEATURE_MICROPHONE "http://tizen.org/feature/microphone"
+#define _WEBRTC_FEATURE_DISPLAY "http://tizen.org/feature/display"
#define _WEBRTC_PRIVILEGE_INTERNET "http://tizen.org/privilege/internet"
#define _WEBRTC_PRIVILEGE_CAMERA "http://tizen.org/privilege/camera"
#define _WEBRTC_PRIVILEGE_RECORDER "http://tizen.org/privilege/recorder"
RET_ERR_IF_FEATURE_IS_NOT_SUPPORTED(_WEBRTC_FEATURE_MICROPHONE);
RET_ERR_IF_PRIVILEGE_IS_NOT_ALLOWED(_WEBRTC_PRIVILEGE_RECORDER);
} else if (type == WEBRTC_MEDIA_SOURCE_TYPE_SCREEN) {
+ RET_ERR_IF_FEATURE_IS_NOT_SUPPORTED(_WEBRTC_FEATURE_DISPLAY);
RET_ERR_IF_PRIVILEGE_IS_NOT_ALLOWED(_WEBRTC_PRIVILEGE_PLATFORM);
}
g_autoptr(GMutexLocker) locker = NULL;
webrtc_s *_webrtc = (webrtc_s *)webrtc;
+ RET_ERR_IF_FEATURE_IS_NOT_SUPPORTED(_WEBRTC_FEATURE_DISPLAY);
+
RET_VAL_IF(_webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(track_id == 0, WEBRTC_ERROR_INVALID_PARAMETER, "track id is 0");
RET_VAL_IF(type > WEBRTC_DISPLAY_TYPE_EVAS, WEBRTC_ERROR_INVALID_PARAMETER, "invalid display type(%d)", type);
g_autoptr(GMutexLocker) locker = NULL;
webrtc_s *_webrtc = (webrtc_s *)webrtc;
+ RET_ERR_IF_FEATURE_IS_NOT_SUPPORTED(_WEBRTC_FEATURE_DISPLAY);
+
RET_VAL_IF(_webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(track_id == 0, WEBRTC_ERROR_INVALID_PARAMETER, "track id is 0");
RET_VAL_IF(mode > WEBRTC_DISPLAY_MODE_FULL, WEBRTC_ERROR_INVALID_PARAMETER, "invalid display mode(%d)", mode);
g_autoptr(GMutexLocker) locker = NULL;
webrtc_s *_webrtc = (webrtc_s *)webrtc;
+ RET_ERR_IF_FEATURE_IS_NOT_SUPPORTED(_WEBRTC_FEATURE_DISPLAY);
+
RET_VAL_IF(_webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(track_id == 0, WEBRTC_ERROR_INVALID_PARAMETER, "track id is 0");
RET_VAL_IF(mode == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "mode is NULL");
g_autoptr(GMutexLocker) locker = NULL;
webrtc_s *_webrtc = (webrtc_s *)webrtc;
+ RET_ERR_IF_FEATURE_IS_NOT_SUPPORTED(_WEBRTC_FEATURE_DISPLAY);
+
RET_VAL_IF(_webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(track_id == 0, WEBRTC_ERROR_INVALID_PARAMETER, "track id is 0");
g_autoptr(GMutexLocker) locker = NULL;
webrtc_s *_webrtc = (webrtc_s *)webrtc;
+ RET_ERR_IF_FEATURE_IS_NOT_SUPPORTED(_WEBRTC_FEATURE_DISPLAY);
+
RET_VAL_IF(_webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(track_id == 0, WEBRTC_ERROR_INVALID_PARAMETER, "track id is 0");
RET_VAL_IF(visible == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "visible is NULL");
g_autoptr(GMutexLocker) locker = NULL;
webrtc_s *_webrtc = (webrtc_s *)webrtc;
+ RET_ERR_IF_FEATURE_IS_NOT_SUPPORTED(_WEBRTC_FEATURE_DISPLAY);
+
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(type > WEBRTC_DISPLAY_TYPE_EVAS, WEBRTC_ERROR_INVALID_PARAMETER, "invalid display type(%d)", type);
g_autoptr(GMutexLocker) locker = NULL;
webrtc_s *_webrtc = (webrtc_s *)webrtc;
+ RET_ERR_IF_FEATURE_IS_NOT_SUPPORTED(_WEBRTC_FEATURE_DISPLAY);
+
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");