From: Jeongmo Yang Date: Thu, 18 Jan 2024 05:13:02 +0000 (+0900) Subject: camera_internal: Fix invalid type for timestamp X-Git-Tag: accepted/tizen/unified/20240123.165901^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e873a33d26218637211235f01b9fd1bac2469d44;p=platform%2Fcore%2Fapi%2Fcamera.git camera_internal: Fix invalid type for timestamp [Version] 0.4.120 [Issue Type] Bug fix Change-Id: I36f61cbf9fc3898291c27fef0c8db79add9c630a Signed-off-by: Jeongmo Yang --- diff --git a/include/camera_internal.h b/include/camera_internal.h index c8b4367..06533ef 100644 --- a/include/camera_internal.h +++ b/include/camera_internal.h @@ -248,7 +248,7 @@ int camera_request_codec_config(camera_h camera); * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter */ -int camera_attr_get_preview_frame_timestamp(camera_h camera, unsigned long *timestamp); +int camera_attr_get_preview_frame_timestamp(camera_h camera, unsigned long long *timestamp); /** * @internal diff --git a/packaging/capi-media-camera.spec b/packaging/capi-media-camera.spec index 147ca36..59b59ee 100644 --- a/packaging/capi-media-camera.spec +++ b/packaging/capi-media-camera.spec @@ -1,6 +1,6 @@ Name: capi-media-camera Summary: A Camera API -Version: 0.4.119 +Version: 0.4.120 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/camera_internal.c b/src/camera_internal.c index 06c117b..a52db67 100644 --- a/src/camera_internal.c +++ b/src/camera_internal.c @@ -292,7 +292,7 @@ int camera_request_codec_config(camera_h camera) } -int camera_attr_get_preview_frame_timestamp(camera_h camera, unsigned long *timestamp) +int camera_attr_get_preview_frame_timestamp(camera_h camera, unsigned long long *timestamp) { camera_cli_s *pc = (camera_cli_s *)camera; @@ -308,7 +308,7 @@ int camera_attr_get_preview_frame_timestamp(camera_h camera, unsigned long *time *timestamp = pc->cb_info->stream_data->timestamp_nsec; - CAM_LOG_DEBUG("frame timestamp[%lu]", *timestamp); + CAM_LOG_DEBUG("frame timestamp[%llu]", *timestamp); return CAMERA_ERROR_NONE; } diff --git a/test/camera_test.c b/test/camera_test.c index 43146df..0108f26 100644 --- a/test/camera_test.c +++ b/test/camera_test.c @@ -472,7 +472,7 @@ static void _camera_preview_cb(camera_preview_data_s *frame, void *user_data) int ret = CAMERA_ERROR_NONE; camera_h cam_handle = (camera_h)user_data; camera_rotation_e rotation = CAMERA_ROTATION_NONE; - unsigned long timestamp = 0; + unsigned long 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; @@ -487,11 +487,11 @@ static void _camera_preview_cb(camera_preview_data_s *frame, void *user_data) LOGW("get preview frame rotation failed[0x%x]", ret); ret = camera_attr_get_preview_frame_timestamp(cam_handle, ×tamp); - if (ret != CAMERA_ERROR_NONE) + if (ret == CAMERA_ERROR_NONE) + LOGI("rotation[%d], timestamp[%llu]", rotation, timestamp); + else LOGW("get preview frame timestamp failed[0x%x]", ret); - LOGI("rotation[%d], timestamp[%lu]", rotation, timestamp); - ret = camera_attr_get_preview_frame_meta(cam_handle, &frame_meta); if (ret == CAMERA_ERROR_NONE) { LOGD("meta %llu,%llu,%llu,%llu,%llu,%llu,%llu,%llu,%llu,%llu%llu,%llu", @@ -499,7 +499,7 @@ static void _camera_preview_cb(camera_preview_data_s *frame, void *user_data) frame_meta.ts_hal, frame_meta.ts_qmf, frame_meta.ts_gst, frame_meta.td_exp, frame_meta.ts_aux, frame_meta.td_aux, frame_meta.seqnum, frame_meta.flags); } else { - LOGW("get preview frame meta timestamp failed[0x%x]", ret); + LOGW("get preview frame meta failed[0x%x]", ret); } ret = camera_attr_get_preview_frame_status_auto_exposure(cam_handle, &status_ae);