int _scmirroring_sink_set_display_roi(MMHandleType handle, int x, int y, int width, int height);
int _scmirroring_sink_set_display_rotation(MMHandleType handle, scmirroring_display_rotation_e rotation);
int _scmirroring_sink_set_resolution(MMHandleType handle, int resolution);
+int _scmirroring_sink_set_src_device_type(MMHandleType handle, scmirroring_device_type_e device_type);
int _scmirroring_sink_get_negotiated_video_codec(MMHandleType handle, scmirroring_video_codec_e *codec);
int _scmirroring_sink_get_negotiated_video_resolution(MMHandleType handle, int *width, int *height);
int _scmirroring_sink_get_negotiated_video_frame_rate(MMHandleType handle, int *frame_rate);
*/
int scmirroring_sink_set_resolution(scmirroring_sink_h scmirroring_sink, int resolution);
+/**
+ * @brief Sets device type of screen mirroring source.
+ * @details This function sets device type of screen mirroring source(not sink) using scmirroring_device_type_e, like #SCMIRRORING_DEVICE_TYPE_TV.
+ * Use it only when you want to set the device type of the source to branch internal processing according to the device type.
+ *
+ * @since_tizen 10.0
+ *
+ * @remarks This function must be called before scmirroring_sink_prepare().
+ * @remarks This function is related to the following feature:\n
+ * %http://tizen.org/feature/network.wifi.direct.display\n
+ *
+ * @param[in] scmirroring_sink The handle to the screen mirroring sink
+ * @param[in] device_type The device type of screen mirroring source
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #SCMIRRORING_ERROR_NONE Successful
+ * @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported
+ * @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error
+ *
+ * @pre Create a screen mirroring sink handle by calling scmirroring_sink_create().
+ *
+ * @see scmirroring_sink_create()
+ * @see scmirroring_sink_prepare()
+ */
+int scmirroring_sink_set_src_device_type(scmirroring_sink_h scmirroring_sink, scmirroring_device_type_e device_type);
+
/**
* @brief Prepares the screen mirroring sink handle and allocates specific resources.
* @details This function constructs pipeline to prepare playing media
SCMIRRORING_DISPLAY_ROTATION_270, /**< Display is rotated 270 degrees */
}scmirroring_display_rotation_e;
+/**
+ * @brief Enumeration for screen mirroring device type.
+ * @since_tizen 10.0
+ */
+typedef enum {
+ SCMIRRORING_DEVICE_TYPE_GENERIC = 0, /**< Generic device type */
+ SCMIRRORING_DEVICE_TYPE_TV, /**< Device is TV */
+ SCMIRRORING_DEVICE_TYPE_MOBILE, /**< Device is Mobile(Phone, Tablet) */
+} scmirroring_device_type_e;
+
/**
* @brief Enumeration for screen mirroring audio codec.
* @since_tizen 2.4
Name: capi-media-screen-mirroring
Summary: A screen mirroring library in Tizen C API
-Version: 0.3.2
+Version: 0.3.3
Release: 0
Group: Multimedia/API
License: Apache-2.0
return _scmirroring_sink_set_resolution(handle->mm_handle, resolution);
}
+int scmirroring_sink_set_src_device_type(scmirroring_sink_h scmirroring_sink, scmirroring_device_type_e device_type)
+{
+ scmirroring_sink_s *handle = (scmirroring_sink_s *)scmirroring_sink;
+
+ CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
+
+ scmirroring_error_fenter();
+
+ scmirroring_retvm_if(!__is_valid_handle(handle), SCMIRRORING_ERROR_INVALID_PARAMETER, "scmirroring_sink is invalid");
+
+ return _scmirroring_sink_set_src_device_type(handle->mm_handle, device_type);
+}
+
int scmirroring_sink_pause(scmirroring_sink_h scmirroring_sink)
{
scmirroring_sink_s *handle = (scmirroring_sink_s *)scmirroring_sink;
return _scmirroring_error_convert(__func__, ret);
}
+int _scmirroring_sink_set_src_device_type(MMHandleType handle, scmirroring_device_type_e device_type)
+{
+ int ret = SCMIRRORING_ERROR_NONE;
+
+ scmirroring_debug_fenter();
+
+ if ((device_type < SCMIRRORING_DEVICE_TYPE_GENERIC) || (device_type > SCMIRRORING_DEVICE_TYPE_MOBILE)) {
+ scmirroring_error("Invalid device type : %d", device_type);
+ return SCMIRRORING_ERROR_INVALID_PARAMETER;
+ }
+
+ scmirroring_debug("device_type(%d)", device_type);
+
+ ret = mm_wfd_sink_set_src_device_type(handle, device_type);
+ if (ret != MM_ERROR_NONE)
+ scmirroring_error("Fail to Set source`s device type");
+
+ return _scmirroring_error_convert(__func__, ret);
+}
+
int _scmirroring_sink_get_negotiated_video_codec(MMHandleType handle, scmirroring_video_codec_e *codec)
{
int ret = SCMIRRORING_ERROR_NONE;