[Release version 0.2.71] Add return value to some APIs 41/86041/2
authorJeongmo Yang <jm80.yang@samsung.com>
Tue, 30 Aug 2016 08:23:56 +0000 (17:23 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Thu, 1 Sep 2016 02:31:13 +0000 (11:31 +0900)
Change-Id: I9444de2651233ea22e4c7d364df22bac24cfd5ef
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
include/camera.h
packaging/capi-media-camera.spec
test/camera_test.c

index ecff8a7..e394ca1 100644 (file)
@@ -2098,6 +2098,7 @@ typedef bool (*camera_attr_supported_ptz_type_cb)(camera_attr_ptz_type_e type, v
  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED.
  * @see camera_start_preview()
  * @see        camera_attr_get_preview_fps()
  * @see        camera_attr_foreach_supported_fps()
@@ -2250,7 +2251,7 @@ int camera_attr_set_encoded_preview_bitrate(camera_h camera, int bitrate);
  * @brief Gets the GOP(Group Of Pictures) interval of encoded preview.
  * @since_tizen 3.0
  * @param[in] camera The handle to the camera
- * @param[out] interval the GOP interval of encoded preview (milsecond)
+ * @param[out] interval the GOP interval of encoded preview (millisecond)
  * @return @c 0 on success, otherwise a negative error value
  * @retval #CAMERA_ERROR_NONE Successful
  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
@@ -2265,7 +2266,7 @@ int camera_attr_get_encoded_preview_gop_interval(camera_h camera, int *interval)
  * @brief Sets the GOP(Group Of Pictures) interval of encoded preview.
  * @since_tizen 3.0
  * @param[in] camera The handle to the camera
- * @param[in] interval the GOP interval of encoded preview (milsecond)
+ * @param[in] interval the GOP interval of encoded preview (millisecond)
  * @return @c 0 on success, otherwise a negative error value
  * @retval #CAMERA_ERROR_NONE Successful
  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
@@ -2287,9 +2288,11 @@ int camera_attr_set_encoded_preview_gop_interval(camera_h camera, int interval);
  * @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_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
  * @see camera_attr_get_zoom()
  * @see camera_attr_get_zoom_range()
  */
@@ -2340,9 +2343,11 @@ int camera_attr_get_zoom_range(camera_h camera, int *min, int *max);
  * @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_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
  * @see        camera_attr_get_af_mode()
  * @see        camera_attr_foreach_supported_af_mode()
  * @see        #camera_attr_af_mode_e
@@ -2382,9 +2387,11 @@ int camera_attr_get_af_mode(camera_h camera, camera_attr_af_mode_e *mode);
  * @retval #CAMERA_ERROR_NONE Successful
  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
  * @see camera_attr_set_af_mode()
  * @see camera_attr_clear_af_area()
  */
@@ -2456,9 +2463,11 @@ int camera_attr_foreach_supported_af_mode(camera_h camera, camera_attr_supported
  * @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_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
  * @see camera_attr_get_exposure_mode()
  * @see camera_attr_foreach_supported_exposure_mode()
  */
@@ -2576,9 +2585,11 @@ int camera_attr_get_exposure_range(camera_h camera, int *min, int *max);
  * @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_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
  * @see        camera_attr_get_iso()
  * @see camera_attr_foreach_supported_iso()
  */
@@ -2721,9 +2732,11 @@ int camera_attr_foreach_supported_theater_mode(camera_h camera, camera_attr_supp
  * @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_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
  * @see camera_attr_get_brightness()
  * @see camera_attr_get_brightness_range()
  */
@@ -2773,9 +2786,11 @@ int camera_attr_get_brightness_range(camera_h camera, int *min, int *max);
  * @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_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
  * @see camera_attr_get_contrast()
  * @see camera_attr_get_contrast_range()
  */
@@ -2825,9 +2840,11 @@ int camera_attr_get_contrast_range(camera_h camera, int *min, int *max);
  * @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_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
  * @see camera_attr_foreach_supported_whitebalance()
  * @see camera_attr_get_whitebalance()
  */
@@ -2896,9 +2913,11 @@ int camera_attr_foreach_supported_whitebalance(camera_h camera, camera_attr_supp
  * @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_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
  * @see camera_attr_foreach_supported_effect()
  * @see camera_attr_get_effect()
  */
@@ -2968,9 +2987,11 @@ int camera_attr_foreach_supported_effect(camera_h camera, camera_attr_supported_
  * @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_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
  * @see camera_attr_foreach_supported_scene_mode()
  * @see camera_attr_get_scene_mode()
  */
@@ -3161,9 +3182,11 @@ int camera_attr_get_tag_software(camera_h camera, char **software);
  * @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_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
  * @see camera_attr_get_geotag()
  * @see camera_attr_remove_geotag()
  */
@@ -3194,9 +3217,11 @@ int camera_attr_get_geotag(camera_h camera, double *latitude, double *longitude,
  * @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_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
  * @see camera_attr_set_geotag()
  * @see camera_attr_get_geotag()
  */
@@ -3214,10 +3239,12 @@ int camera_attr_remove_geotag(camera_h camera);
  * @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_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
  * @retval #CAMERA_ERROR_DEVICE_BUSY The flash was preempted by other API
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
  * @see        camera_attr_foreach_supported_flash_mode()
  * @see camera_attr_get_flash_mode()
  */
@@ -3368,6 +3395,7 @@ int camera_attr_foreach_supported_stream_rotation(camera_h camera, camera_attr_s
  * @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_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
@@ -3455,9 +3483,11 @@ typedef void (*camera_attr_hdr_progress_cb)(int percent, void *user_data);
  * @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_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
  * @see camera_attr_get_hdr_mode()
  * @see camera_attr_set_hdr_capture_progress_cb()
  * @see camera_attr_unset_hdr_capture_progress_cb()
@@ -3654,9 +3684,11 @@ bool camera_attr_is_supported_video_stabilization(camera_h camera);
  * @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_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
  * @see camera_attr_is_enabled_auto_contrast()
  */
 int camera_attr_enable_auto_contrast(camera_h camera, bool enable);
@@ -3736,8 +3768,10 @@ int camera_attr_disable_shutter_sound(camera_h camera, bool disable);
  * @retval #CAMERA_ERROR_NONE Successful
  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
  * @see camera_attr_get_pan()
  * @see camera_attr_get_pan_range()
  */
@@ -3787,8 +3821,10 @@ int camera_attr_get_pan_range(camera_h camera, int *min, int *max);
  * @retval #CAMERA_ERROR_NONE Successful
  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
  * @see camera_attr_get_tilt()
  * @see camera_attr_get_tilt_range()
  */
@@ -3837,8 +3873,10 @@ int camera_attr_get_tilt_range(camera_h camera, int *min, int *max);
  * @retval #CAMERA_ERROR_NONE Successful
  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
  * @see camera_attr_get_pan()
  * @see camera_attr_set_pan()
  * @see camera_attr_get_pan_range()
index 7e29e5b..84971c5 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-camera
 Summary:    A Camera API
-Version:    0.2.70
+Version:    0.2.71
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index fd35c00..962db77 100644 (file)
@@ -106,7 +106,7 @@ GTimeVal res;
 #define IMAGE_ENC_QUALITY               85    /* quality of jpeg */
 #define IMAGE_CAPTURE_COUNT_STILL       1     /* the number of still-shot */
 #define IMAGE_CAPTURE_COUNT_MULTI       3     /* default the number of multi-shot */
-#define IMAGE_CAPTURE_COUNT_INTERVAL    100   /* mili seconds */
+#define IMAGE_CAPTURE_COUNT_INTERVAL    100   /* millisecond */
 
 #define MAX_FILE_SIZE_FOR_MMS           (250 * 1024)