diff options
author | salt.jeong <salt.jeong@samsung.com> | 2020-08-11 21:02:04 +0900 |
---|---|---|
committer | salt.jeong <salt.jeong@samsung.com> | 2020-08-11 21:02:04 +0900 |
commit | 24368f2cffc32bbf4487a3c13160f2de1cb6ed6f (patch) | |
tree | 427173a2f10aaf594658803be783cdb14bfbf4bd | |
parent | 7dfb4f3f9d71c0089ec28f31bc0d7d8fe2666c7b (diff) | |
download | smart-surveillance-camera-24368f2cffc32bbf4487a3c13160f2de1cb6ed6f.tar.gz smart-surveillance-camera-24368f2cffc32bbf4487a3c13160f2de1cb6ed6f.tar.bz2 smart-surveillance-camera-24368f2cffc32bbf4487a3c13160f2de1cb6ed6f.zip |
Add exif test codetelevision_2020_exif
Change-Id: I017b236c9c904c9ab80c45c58824a042fad11077
-rw-r--r-- | camera/src/controller.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/camera/src/controller.c b/camera/src/controller.c index 21a87ff..6071d86 100644 --- a/camera/src/controller.c +++ b/camera/src/controller.c @@ -147,18 +147,23 @@ static void __thread_write_image_file(void *data, Ecore_Thread *th) height = ad->latest_image_height; buffer = ad->latest_image_buffer; ad->latest_image_buffer = NULL; - image_info = strdup("Specific Data"); pthread_mutex_unlock(&ad->mutex); - ret = controller_image_save_image_file(ad->temp_image_filename, width, height, buffer, + char newFileName[PATH_MAX] = {0, }; + char timeInfo[PATH_MAX] = {0, }; + snprintf(timeInfo, PATH_MAX, "Time: %lld", __get_monotonic_ms()); + snprintf(newFileName, PATH_MAX, "%s_%lld.jpg", ad->temp_image_filename, __get_monotonic_ms()); + image_info = strdup(timeInfo); + + ret = controller_image_save_image_file(newFileName, width, height, buffer, &encoded_buffer, &encoded_size, image_info, strlen(image_info)); - if (ret) { - _E("failed to save image file"); - } else { - ret = rename(ad->temp_image_filename, ad->latest_image_filename); - if (ret != 0 ) - _E("Rename fail"); - } +// if (ret) { +// _E("failed to save image file"); +// } else { +// ret = rename(ad->temp_image_filename, ad->latest_image_filename); +// if (ret != 0 ) +// _E("Rename fail"); +// } pthread_mutex_lock(&ad->mutex); unsigned char *temp = ad->latest_encoded_image_buffer; |