summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJeongmo Yang <jm80.yang@samsung.com>2016-07-20 16:50:16 +0900
committerJeongmo Yang <jm80.yang@samsung.com>2016-07-22 08:32:01 +0900
commitb99fb331c65df7c0d20773f8e9cd8027b84753c8 (patch)
tree639902eb3e2e6a8085ab99d1855e8b00965cc80a /include
parent6b15e7b9ab39e633dada3ee8254571b9646ca754 (diff)
downloadcamera-b99fb331c65df7c0d20773f8e9cd8027b84753c8.tar.gz
camera-b99fb331c65df7c0d20773f8e9cd8027b84753c8.tar.bz2
camera-b99fb331c65df7c0d20773f8e9cd8027b84753c8.zip
[Release version 0.2.65] Add new APIs - camera_change_device, camera_set/get_display_reuse_hint
Change-Id: I8dd625d7a4159cd96f9a8037e3ecbefbfaaff21b Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
Diffstat (limited to 'include')
-rw-r--r--include/camera.h61
1 files changed, 60 insertions, 1 deletions
diff --git a/include/camera.h b/include/camera.h
index ab40935..d86074f 100644
--- a/include/camera.h
+++ b/include/camera.h
@@ -739,11 +739,37 @@ typedef bool (*camera_supported_preview_format_cb)(camera_pixel_format_e format,
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @post If it succeeds, the camera state will be #CAMERA_STATE_CREATED.
*
- * @see camera_destroy()
+ * @see camera_destroy()
*/
int camera_create(camera_device_e device, camera_h *camera);
/**
+ * @brief Changes the 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 stopping the preview,\n
+ * display handle will be reused and last frame on display can be kept even though camera device is changed.
+ * @param[in] camera The handle to the camera
+ * @param[in] device The hardware camera to access
+ * @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_OUT_OF_MEMORY Out of memory
+ * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED.
+ * @post If it succeeds, the camera attributes and settings will be reset.
+ *
+ * @see camera_set_display_reuse_hint()
+ * @see camera_get_display_reuse_hint()
+ */
+int camera_change_device(camera_h camera, camera_device_e device);
+
+/**
* @brief Destroys the camera handle and releases all its resources.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
@@ -1310,6 +1336,39 @@ int camera_set_display_mode(camera_h camera , camera_display_mode_e mode);
int camera_get_display_mode(camera_h camera, camera_display_mode_e *mode);
/**
+ * @brief Sets the hint for display reuse.
+ * @since_tizen 3.0
+ * @details If the hint is set to true, the display will be reused when the camera device is changed with camera_change_device().
+ * @remarks If the current display type is #CAMERA_DISPLAY_TYPE_NONE, this function will return #CAMERA_ERROR_INVALID_OPERATION.
+ * @param[in] camera The handle to the camera
+ * @param[in] hint The hint for display reuse; true - reuse the display, false - do not reuse
+ * @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_INVALID_OPERATION Internal error
+ * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
+ * @see camera_get_display_reuse_hint()
+ * @see camera_change_device()
+ */
+int camera_set_display_reuse_hint(camera_h camera, bool hint);
+
+/**
+ * @brief Gets the hint for display reuse.
+ * @since_tizen 3.0
+ * @remarks If the current display type is #CAMERA_DISPLAY_TYPE_NONE, this function will return #CAMERA_ERROR_INVALID_OPERATION.
+ * @param[in] camera The handle to the camera
+ * @param[out] hint The hint for display reuse; true - reuse the display, false - do not reuse
+ * @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_OPERATION Internal error
+ * @see camera_get_display_reuse_hint()
+ * @see camera_change_device()
+ */
+int camera_get_display_reuse_hint(camera_h camera, bool *hint);
+
+/**
* @brief Sets the resolution of the captured image.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @privlevel public