#define CAMERA_DEVICE_MAX ((CAMERA_DEVICE_CAMERA9 + 1) * 2)
+
+/**
+ * @internal
+ * @brief Enumeration for the auto exposure status of preview frame.
+ * @since_tizen 7.0
+ */
+typedef enum {
+ CAMERA_STATUS_AUTO_EXPOSURE_NONE, /**< None */
+ CAMERA_STATUS_AUTO_EXPOSURE_UNSTABLE, /**< Unstable */
+ CAMERA_STATUS_AUTO_EXPOSURE_STABLE /**< Stable */
+} camera_status_auto_exposure_e;
+
+/**
+ * @internal
+ * @brief Enumeration for the auto white balance status of preview frame.
+ * @since_tizen 7.0
+ */
+typedef enum {
+ CAMERA_STATUS_AUTO_WHITE_BALANCE_NONE, /**< None */
+ CAMERA_STATUS_AUTO_WHITE_BALANCE_UNSTABLE, /**< Unstable */
+ CAMERA_STATUS_AUTO_WHITE_BALANCE_STABLE /**< Stable */
+} camera_status_auto_white_balance_e;
+
/**
* @internal
* @brief The structure type of the camera device list.
/**
* @internal
- * @brief Gets the frame meta of preview buffer.
+ * @brief Gets the frame meta of preview frame.
* @since_tizen 7.0
* @remarks The function should be called in camera_preview_cb() or camera_media_packet_preview_cb(),\n
* otherwise, it will return #CAMERA_ERROR_INVALID_OPERATION.
*/
int camera_attr_get_preview_frame_meta(camera_h camera, camera_frame_meta_s *frame_meta);
+/**
+ * @internal
+ * @brief Gets the auto exposure status of preview frame.
+ * @since_tizen 7.0
+ * @remarks The function should be called in camera_preview_cb() or camera_media_packet_preview_cb(),\n
+ * otherwise, it will return #CAMERA_ERROR_INVALID_OPERATION.
+ * @param[in] camera The handle to the camera
+ * @param[out] status The auto exposure status of preview frame
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ */
+int camera_attr_get_preview_frame_status_auto_exposure(camera_h camera, camera_status_auto_exposure_e *status);
+
+/**
+ * @internal
+ * @brief Gets the auto white balance status of preview frame.
+ * @since_tizen 7.0
+ * @remarks The function should be called in camera_preview_cb() or camera_media_packet_preview_cb(),\n
+ * otherwise, it will return #CAMERA_ERROR_INVALID_OPERATION.
+ * @param[in] camera The handle to the camera
+ * @param[out] status The auto white balance status of preview frame
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ */
+int camera_attr_get_preview_frame_status_auto_white_balance(camera_h camera, camera_status_auto_white_balance_e *status);
+
/**
* @}
Name: capi-media-camera
Summary: A Camera API
-Version: 0.4.103
+Version: 0.4.104
Release: 0
Group: Multimedia/API
License: Apache-2.0
return CAMERA_ERROR_NONE;
}
+
+
+int camera_attr_get_preview_frame_status_auto_exposure(camera_h camera, camera_status_auto_exposure_e *status)
+{
+ camera_cli_s *pc = (camera_cli_s *)camera;
+ MMCamcorderVideoStreamDataType *stream = NULL;
+
+ if (!pc || !pc->cb_info || !status) {
+ CAM_LOG_ERROR("NULL pointer %p %p", pc, status);
+ return CAMERA_ERROR_INVALID_PARAMETER;
+ }
+
+ stream = pc->cb_info->stream_data;
+ if (!stream) {
+ CAM_LOG_ERROR("no stream data, maybe it's not in preview callback");
+ return CAMERA_ERROR_INVALID_OPERATION;
+ }
+
+ *status = stream->status_ae;
+
+ CAM_LOG_DEBUG("status: auto exposure[%d]", *status);
+
+ return CAMERA_ERROR_NONE;
+}
+
+
+int camera_attr_get_preview_frame_status_auto_white_balance(camera_h camera, camera_status_auto_white_balance_e *status)
+{
+ camera_cli_s *pc = (camera_cli_s *)camera;
+ MMCamcorderVideoStreamDataType *stream = NULL;
+
+ if (!pc || !pc->cb_info || !status) {
+ CAM_LOG_ERROR("NULL pointer %p %p", pc, status);
+ return CAMERA_ERROR_INVALID_PARAMETER;
+ }
+
+ stream = pc->cb_info->stream_data;
+ if (!stream) {
+ CAM_LOG_ERROR("no stream data, maybe it's not in preview callback");
+ return CAMERA_ERROR_INVALID_OPERATION;
+ }
+
+ *status = stream->status_awb;
+
+ CAM_LOG_DEBUG("status: auto white balance[%d]", *status);
+
+ return CAMERA_ERROR_NONE;
+}
//LCOV_EXCL_STOP
camera_rotation_e rotation = CAMERA_ROTATION_NONE;
unsigned long timestamp = 0;
camera_frame_meta_s frame_meta = {0, };
+ camera_status_auto_exposure_e status_ae = CAMERA_STATUS_AUTO_EXPOSURE_NONE;
+ camera_status_auto_white_balance_e status_awb = CAMERA_STATUS_AUTO_WHITE_BALANCE_NONE;
if (!cam_handle || !frame) {
g_print("\n[PREVIEW_CB] NULL param! %p %p\n", cam_handle, frame);
g_print("[PREVIEW_CB] get preview frame meta timestamp failed[0x%x]\n", ret);
}
+ ret = camera_attr_get_preview_frame_status_auto_exposure(cam_handle, &status_ae);
+ if (ret == CAMERA_ERROR_NONE)
+ g_print("[PREVIEW_CB] status: auto exposure[%d]\n", status_ae);
+ else
+ g_print("[PREVIEW_CB] get preview frame status auto exposure failed[0x%x]\n", ret);
+
+ ret = camera_attr_get_preview_frame_status_auto_white_balance(cam_handle, &status_awb);
+ if (ret == CAMERA_ERROR_NONE)
+ g_print("[PREVIEW_CB] status: auto white balance[%d]\n", status_awb);
+ else
+ g_print("[PREVIEW_CB] get preview frame status auto white balance failed[0x%x]\n", ret);
+
_camera_print_preview_info(frame);
if (g_camera_preview_cb_dump)