Support new APIs for ACR-1130 57/164857/1
authorJeongmo Yang <jm80.yang@samsung.com>
Thu, 21 Dec 2017 08:22:27 +0000 (17:22 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Thu, 21 Dec 2017 08:22:27 +0000 (17:22 +0900)
[Version] 0.3.10
[Profile] Common
[Issue Type] Update
[Dependency module] N/A
[Test] [M(T) - Boot=(OK), sdb=(OK), Home=(OK), Touch=(OK), Version=tizen-unified_20171219.4]

Change-Id: I1725869ddc87cf36222fc8de91e7bd97cc6d32a2
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
legacy/include/legacy_camera.h
legacy/src/legacy_camera.c
muse/include/muse_camera.h
muse/src/muse_camera_dispatcher.c
packaging/mmsvc-camera.spec

index 9bc2b19..6b0caf5 100644 (file)
@@ -88,7 +88,15 @@ typedef enum {
  */
 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;
 
 /**
@@ -720,8 +728,6 @@ typedef bool (*camera_supported_preview_format_cb)(camera_pixel_format_e format,
  * @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.
@@ -746,8 +752,6 @@ int legacy_camera_create(camera_device_e device, camera_h *camera);
  * @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.
@@ -773,8 +777,6 @@ int legacy_camera_change_device(camera_h *camera, camera_device_e device, bool i
  * @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
@@ -1047,8 +1049,6 @@ int legacy_camera_set_display(camera_h camera, camera_display_type_e type, camer
  * @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
@@ -1209,8 +1209,6 @@ int legacy_camera_foreach_supported_preview_resolution(camera_h camera,
  * @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
@@ -1247,8 +1245,6 @@ int legacy_camera_get_display_rotation(camera_h camera, camera_rotation_e *rotat
  * @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
@@ -1283,8 +1279,6 @@ int legacy_camera_get_display_flip(camera_h camera, camera_flip_e *flip);
  * @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
  *
@@ -1382,8 +1376,6 @@ int legacy_camera_get_display_reuse_hint(camera_h camera, int *hint);
 /**
  * @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
@@ -2121,8 +2113,6 @@ int legacy_camera_attr_foreach_supported_fps(camera_h camera, camera_attr_suppor
  * @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
@@ -2153,8 +2143,6 @@ int legacy_camera_attr_foreach_supported_fps_by_resolution(camera_h camera, int
  * @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
@@ -2187,8 +2175,6 @@ int legacy_camera_attr_get_image_quality(camera_h camera, int *quality);
  * @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
@@ -2237,8 +2223,6 @@ int legacy_camera_attr_get_zoom_range(camera_h camera , int *min , int *max);
 /**
  * @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
@@ -2255,8 +2239,6 @@ int legacy_camera_attr_set_af_mode(camera_h camera, camera_attr_af_mode_e mode);
 /**
  * @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
@@ -2273,8 +2255,6 @@ int legacy_camera_attr_get_af_mode(camera_h camera, camera_attr_af_mode_e *mode)
 /**
  * @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
@@ -2294,8 +2274,6 @@ int legacy_camera_attr_set_af_area(camera_h camera, int x, int y);
 /**
  * @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
@@ -2348,8 +2326,6 @@ int legacy_camera_attr_foreach_supported_af_mode(camera_h camera, camera_attr_su
 /**
  * @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
@@ -2416,8 +2392,6 @@ int legacy_camera_attr_foreach_supported_exposure_mode(camera_h camera, camera_a
 /**
  * @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
@@ -2462,8 +2436,6 @@ int legacy_camera_attr_get_exposure_range(camera_h camera, int *min, int *max);
 /**
  * @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
@@ -2530,8 +2502,6 @@ int legacy_camera_attr_foreach_supported_iso(camera_h camera, camera_attr_suppor
 /**
  * @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
@@ -2599,8 +2569,6 @@ int legacy_camera_attr_foreach_supported_theater_mode(camera_h camera, camera_at
 /**
  * @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
@@ -2648,8 +2616,6 @@ int legacy_camera_attr_get_brightness_range(camera_h camera, int *min, int *max)
 /**
  * @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
@@ -2692,13 +2658,54 @@ int legacy_camera_attr_get_contrast(camera_h camera, int *level);
  * @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
@@ -2765,8 +2772,6 @@ int legacy_camera_attr_foreach_supported_whitebalance(camera_h camera, camera_at
 /**
  * @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
@@ -2834,8 +2839,6 @@ int legacy_camera_attr_foreach_supported_effect(camera_h camera, camera_attr_sup
 /**
  * @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
@@ -3064,8 +3067,6 @@ int legacy_camera_attr_remove_geotag(camera_h camera);
 /**
  * @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
@@ -3294,8 +3295,6 @@ typedef void (*camera_attr_hdr_progress_cb)(int percent, void *user_data);
 /**
  * @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.
@@ -3387,8 +3386,6 @@ bool legacy_camera_attr_is_supported_hdr_capture(camera_h camera);
 /**
  * @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
@@ -3437,8 +3434,6 @@ bool legacy_camera_attr_is_supported_anti_shake(camera_h camera);
 /**
  * @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
@@ -3488,8 +3483,6 @@ bool legacy_camera_attr_is_supported_video_stabilization(camera_h 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
index 261cba0..d16fc79 100644 (file)
@@ -2817,6 +2817,24 @@ int legacy_camera_attr_set_contrast(camera_h camera, int level)
 }
 
 
+int legacy_camera_attr_set_hue(camera_h camera, int level)
+{
+       if (camera == NULL) {
+               LOGE("INVALID_PARAMETER(0x%08x)", CAMERA_ERROR_INVALID_PARAMETER);
+               return CAMERA_ERROR_INVALID_PARAMETER;
+       }
+
+       int ret = MM_ERROR_NONE;
+       camera_s *handle = (camera_s *)camera;
+
+       ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
+               MMCAM_FILTER_HUE, level,
+               NULL);
+
+       return __convert_camera_error_code(__func__, ret);
+}
+
+
 int legacy_camera_attr_set_whitebalance(camera_h camera, camera_attr_whitebalance_e wb)
 {
        if (camera == NULL) {
@@ -3294,6 +3312,45 @@ int legacy_camera_attr_get_contrast_range(camera_h camera, int *min, int *max)
 }
 
 
+int legacy_camera_attr_get_hue(camera_h camera, int *level)
+{
+       if (camera == NULL || level == NULL) {
+               LOGE("INVALID_PARAMETER(0x%08x)", CAMERA_ERROR_INVALID_PARAMETER);
+               return CAMERA_ERROR_INVALID_PARAMETER;
+       }
+
+       int ret = MM_ERROR_NONE;
+       camera_s *handle = (camera_s *)camera;
+
+       ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
+               MMCAM_FILTER_HUE, level,
+               NULL);
+
+       return __convert_camera_error_code(__func__, ret);
+}
+
+
+int legacy_camera_attr_get_hue_range(camera_h camera, int *min, int *max)
+{
+       if (camera == NULL || min == NULL || max == NULL) {
+               LOGE("INVALID_PARAMETER(0x%08x)", CAMERA_ERROR_INVALID_PARAMETER);
+               return CAMERA_ERROR_INVALID_PARAMETER;
+       }
+
+       int ret = MM_ERROR_NONE;
+       camera_s *handle = (camera_s *)camera;
+       MMCamAttrsInfo ainfo;
+
+       ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_FILTER_HUE, &ainfo);
+       if (ret == MM_ERROR_NONE) {
+               *min = ainfo.int_range.min;
+               *max = ainfo.int_range.max;
+       }
+
+       return __convert_camera_error_code(__func__, ret);
+}
+
+
 int legacy_camera_attr_get_whitebalance(camera_h camera, camera_attr_whitebalance_e *wb)
 {
        if (camera == NULL || wb == NULL) {
index db25f2c..2024b49 100644 (file)
@@ -188,6 +188,9 @@ typedef enum {
        MUSE_CAMERA_API_GET_DEVICE_STATE,
        MUSE_CAMERA_API_SET_INTERRUPT_STARTED_CB, /* 150 */
        MUSE_CAMERA_API_UNSET_INTERRUPT_STARTED_CB,
+       MUSE_CAMERA_API_ATTR_SET_HUE,
+       MUSE_CAMERA_API_ATTR_GET_HUE,
+       MUSE_CAMERA_API_ATTR_GET_HUE_RANGE,
 
        MUSE_CAMERA_API_MAX
 } muse_camera_api_e;
@@ -303,6 +306,7 @@ typedef enum {
        MUSE_CAMERA_GET_INT_ENABLED_VIDEO_STABILIZATION,
        MUSE_CAMERA_GET_INT_ENCODED_PREVIEW_BITRATE,
        MUSE_CAMERA_GET_INT_ENCODED_PREVIEW_GOP_INTERVAL,
+       MUSE_CAMERA_GET_INT_HUE,
        MUSE_CAMERA_GET_INT_NUM
 } muse_camera_get_int_e;
 
@@ -316,6 +320,7 @@ typedef enum {
        MUSE_CAMERA_GET_INT_PAIR_EXPOSURE_RANGE,
        MUSE_CAMERA_GET_INT_PAIR_PAN_RANGE,
        MUSE_CAMERA_GET_INT_PAIR_TILT_RANGE,
+       MUSE_CAMERA_GET_INT_PAIR_HUE_RANGE,
        MUSE_CAMERA_GET_INT_PAIR_NUM
 } muse_camera_get_int_pair_e;
 
index 5e2f602..bae4289 100644 (file)
@@ -3232,6 +3232,29 @@ int camera_dispatcher_attr_set_contrast(muse_module_h module)
        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;
@@ -3726,6 +3749,53 @@ int camera_dispatcher_attr_get_contrast_range(muse_module_h module)
        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;
@@ -5266,7 +5336,10 @@ int (*dispatcher[MUSE_CAMERA_API_MAX]) (muse_module_h module) = {
        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, */
 };
 
 
index dbe077c..d57df7d 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mmsvc-camera
 Summary:    A Camera module for muse server
-Version:    0.3.9
+Version:    0.3.10
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0