*/
typedef enum {
CAMERA_DEVICE_CAMERA0 = 0, /**< Primary camera */
- CAMERA_DEVICE_CAMERA1 /**< Secondary camera */
+ CAMERA_DEVICE_CAMERA1, /**< Secondary camera */
+ CAMERA_DEVICE_CAMERA2, /**< Third camera (Since 5.0) */
+ CAMERA_DEVICE_CAMERA3, /**< 4th camera (Since 5.0) */
+ CAMERA_DEVICE_CAMERA4, /**< 5th camera (Since 5.0) */
+ CAMERA_DEVICE_CAMERA5, /**< 6th camera (Since 5.0) */
+ CAMERA_DEVICE_CAMERA6, /**< 7th camera (Since 5.0) */
+ CAMERA_DEVICE_CAMERA7, /**< 8th camera (Since 5.0) */
+ CAMERA_DEVICE_CAMERA8, /**< 9th camera (Since 5.0) */
+ CAMERA_DEVICE_CAMERA9 /**< 10th camera (Since 5.0) */
} camera_device_e;
/**
* @brief Creates a new camera handle for controlling a camera.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @remarks Multiple handles on a context at the same time are allowed to be created. However,
* camera cannot guarantee proper operation because of limited resources, such as
* camera device, audio device, and display device.\n.
* @brief Changes camera device.
*
* @since_tizen 3.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @remarks This function can be used to change camera device simply without camera_destroy() and camera_create().\n
* If display reuse hint is set by camera_set_display_reuse_hint() before stop preview,\n
* display handle will be reused and last frame on display can be kept even though camera device is changed.
* @brief Destroys the camera handle and releases all its resources.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @brief Sets the resolution of the preview.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @remarks This function should be called before previewing (camera_start_preview()).
* @param[in] camera The handle to the camera
* @param[in] width The preview width
* @brief Sets the display rotation.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @remarks This function should be called before previewing (see legacy_camera_start_preview())
* @param[in] camera The handle to the camera
* @param[in] rotation The display rotation
* @brief Sets the display flip.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @param[in] flip The display flip
* @return @c 0 on success, otherwise a negative error value
* @brief Sets the visible property for display.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @param[in] visible The display visibility property
*
/**
* @brief Sets the resolution of the captured image.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @param[in] width The capture width
* @param[in] height The capture height
* @brief Retrieves all supported FPS modes by invoking the callback function once for each supported FPS mode.
* @since_tizen 2.4
* @param[in] camera The handle to the camera
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @param[in] width Required preview resolution's width
* @param[in] height Required preview resolution's height
* @param[in] callback The callback function to invoke
* @brief Sets quality of the image.
* @details The range for image quality is 1 to 100. If @a quality is out of range, #CAMERA_ERROR_INVALID_PARAMETER error occurred.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @param[in] quality The quality of image (1 ~ 100)
* @return @c 0 on success, otherwise a negative error value
* @brief Sets the zoom level.
* @details The range for the zoom level is received from legacy_camera_attr_get_zoom_range(). If @a zoom is out of range, the #CAMERA_ERROR_INVALID_PARAMETER error occurs.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @param[in] zoom The zoom level
* @return @c 0 on success, otherwise a negative error value
/**
* @brief Sets the auto focus mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @param[in] mode The auto focus mode
* @return @c 0 on success, otherwise a negative error value
/**
* @brief Gets the auto focus mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @param[out] mode The auto focus mode
* @return @c 0 on success, otherwise a negative error value
/**
* @brief Sets auto focus area.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @remarks This API is invalid in the #CAMERA_ATTR_AF_NONE mode.\n
* The coordinates are mapped to preview area.
* @param[in] camera The handle to the camera
/**
* @brief Clears the auto focus area.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @remarks The focusing area is set to the center.
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
/**
* @brief Sets the exposure mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @param[in] mode The exposure mode
* @return @c 0 on success, otherwise a negative error value
/**
* @brief Sets the exposure value.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @param[in] value The exposure value
* @return @c 0 on success, otherwise a negative error value
/**
* @brief Sets the ISO level.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @param[in] iso The ISO level
* @return @c 0 on success, otherwise a negative error value
/**
* @brief Sets the theater mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @remarks If you want to display the preview image on the external display with the full screen mode, use this function.
* @param[in] camera The handle to the camera
* @param[in] mode The mode to change
/**
* @brief Sets the brightness level.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @param[in] level The brightness level
* @return @c 0 on success, otherwise a negative error value
/**
* @brief Sets the contrast level.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @param[in] level The contrast level
* @return @c 0 on success, otherwise a negative error value
* @see legacy_camera_attr_set_contrast()
* @see legacy_camera_attr_get_contrast()
*/
-int legacy_camera_attr_get_contrast_range(camera_h camera, int *min , int *max);
+int legacy_camera_attr_get_contrast_range(camera_h camera, int *min, int *max);
+
+/**
+ * @brief Sets the hue level.
+ * @since_tizen 5.0
+ * @param[in] level The hue level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @see legacy_camera_attr_get_hue()
+ * @see legacy_camera_attr_get_hue_range()
+ */
+int legacy_camera_attr_set_hue(camera_h camera, int level);
+
+/**
+ * @brief Gets the hue level.
+ * @since_tizen 5.0
+ * @param[in] camera The handle to the camera
+ * @param[out] level The hue level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @see legacy_camera_attr_set_hue()
+ * @see legacy_camera_attr_get_hue_range()
+ */
+int legacy_camera_attr_get_hue(camera_h camera, int *level);
+
+/**
+ * @brief Gets the available hue level.
+ * @since_tizen 5.0
+ * @remarks If the min value is greater than the max value, it means that this feature is not supported.
+ * @param[in] camera The handle to the camera
+ * @param[out] min The minimum hue level
+ * @param[out] max The maximum hue level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @see legacy_camera_attr_set_hue()
+ * @see legacy_camera_attr_get_hue()
+ */
+int legacy_camera_attr_get_hue_range(camera_h camera, int *min, int *max);
/**
* @brief Sets the white balance mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @param[in] whitebalance The white balance mode
* @return @c 0 on success, otherwise a negative error value
/**
* @brief Sets the camera effect mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @param[in] effect The camera effect mode
* @return @c 0 on success, otherwise a negative error value
/**
* @brief Sets the scene mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @param[in] mode The scene mode
* @return @c 0 on success, otherwise a negative error value
/**
* @brief Sets the camera's flash mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @remarks Since 2.4, while setting the flash mode, if the flash was preempted by other APIs,\n
then this function returns #CAMERA_ERROR_DEVICE_BUSY error.
* @param[in] camera The handle to the camera
/**
* @brief Sets the mode of HDR(High dynamic range) capture.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @remarks Taking multiple pictures at different exposure levels and intelligently stitching them together so that we eventually arrive at a picture that is representative in both dark and bright areas.\n
* If this attribute is set to @c true. legacy_camera_attr_hdr_progress_cb() is invoked during capture.\n
* If you set #CAMERA_ATTR_HDR_MODE_KEEP_ORIGINAL, the capturing callback is invoked twice. The first callback is delivering origin image data. The second callback is delivering improved image data.
/**
* @brief Enables/Disables the anti-shake feature.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @remarks This feature is used for image capture.
* @param[in] camera The handle to the camera
* @param[in] enable If @c true the anti-shake feature is enabled, otherwise @c false
/**
* @brief Enables/Disables the video stabilization feature.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @remarks If video stabilization is enabled, zero shutter lag is disabled.\n
* This feature is used to record a video.
* @param[in] camera The handle to the camera
/**
* @brief Enables/Disables auto contrast.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @param[in] enable If @c true auto contrast is enabled, otherwise @c false
* @return @c 0 on success, otherwise a negative error value
return MUSE_CAMERA_ERROR_NONE;
}
+int camera_dispatcher_attr_set_hue(muse_module_h module)
+{
+ int ret = CAMERA_ERROR_NONE;
+ muse_camera_handle_s *muse_camera = NULL;
+ int level;
+ muse_camera_api_e api = MUSE_CAMERA_API_ATTR_SET_HUE;
+ muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+
+ muse_camera = (muse_camera_handle_s *)muse_server_ipc_get_handle(module);
+
+ muse_camera_msg_get(level, muse_server_module_get_msg(module));
+
+ LOGD("handle : %p, level : %d", muse_camera, level);
+
+ ret = legacy_camera_attr_set_hue(muse_camera->camera_handle, level);
+
+ LOGD("ret : 0x%x", ret);
+
+ muse_camera_msg_return(api, class, ret, module);
+
+ return MUSE_CAMERA_ERROR_NONE;
+}
+
int camera_dispatcher_attr_set_whitebalance(muse_module_h module)
{
int ret = CAMERA_ERROR_NONE;
return MUSE_CAMERA_ERROR_NONE;
}
+int camera_dispatcher_attr_get_hue(muse_module_h module)
+{
+ int ret = CAMERA_ERROR_NONE;
+ muse_camera_handle_s *muse_camera = NULL;
+ int get_value = 0;
+ muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_HUE;
+ muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+
+ muse_camera = (muse_camera_handle_s *)muse_server_ipc_get_handle(module);
+
+ LOGD("handle : %p", muse_camera);
+
+ ret = legacy_camera_attr_get_hue(muse_camera->camera_handle, &get_value);
+ if (ret == CAMERA_ERROR_NONE) {
+ muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+ MUSE_CAMERA_GET_INT_CONTRAST, "get_value", get_value, NULL);
+ } else {
+ muse_camera_msg_return(api, class, ret, module);
+ }
+
+ return MUSE_CAMERA_ERROR_NONE;
+}
+
+int camera_dispatcher_attr_get_hue_range(muse_module_h module)
+{
+ int ret = CAMERA_ERROR_NONE;
+ muse_camera_handle_s *muse_camera = NULL;
+ int get_value0 = 0;
+ int get_value1 = 0;
+ muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_HUE_RANGE;
+ muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+ muse_camera_get_type_e get_type = MUSE_CAMERA_GET_TYPE_INT_PAIR;
+ muse_camera_get_int_pair_e index = MUSE_CAMERA_GET_INT_PAIR_HUE_RANGE;
+
+ muse_camera = (muse_camera_handle_s *)muse_server_ipc_get_handle(module);
+
+ LOGD("handle : %p", muse_camera);
+
+ ret = legacy_camera_attr_get_hue_range(muse_camera->camera_handle, &get_value0, &get_value1);
+ if (ret == CAMERA_ERROR_NONE)
+ muse_camera_msg_return2(api, class, ret, module, get_type, index, get_value0, get_value1);
+ else
+ muse_camera_msg_return(api, class, ret, module);
+
+ return MUSE_CAMERA_ERROR_NONE;
+}
+
int camera_dispatcher_attr_get_whitebalance(muse_module_h module)
{
int ret = CAMERA_ERROR_NONE;
camera_dispatcher_change_device, /* MUSE_CAMERA_API_CHANGE_DEVICE */
camera_dispatcher_get_device_state, /* MUSE_CAMERA_API_GET_DEVICE_STATE */
camera_dispatcher_set_interrupt_started_cb, /* MUSE_CAMERA_API_SET_INTERRUPT_STARTED_CB, */
- camera_dispatcher_unset_interrupt_started_cb /* MUSE_CAMERA_API_UNSET_INTERRUPT_STARTED_CB, */
+ camera_dispatcher_unset_interrupt_started_cb, /* MUSE_CAMERA_API_UNSET_INTERRUPT_STARTED_CB, */
+ camera_dispatcher_attr_set_hue, /* MUSE_CAMERA_API_ATTR_SET_HUE, */
+ camera_dispatcher_attr_get_hue, /* MUSE_CAMERA_API_ATTR_GET_HUE, */
+ camera_dispatcher_attr_get_hue_range /* MUSE_CAMERA_API_ATTR_GET_HUE_RANGE, */
};