From: Marko Ollonen Date: Mon, 7 Jan 2013 11:20:12 +0000 (+0200) Subject: flash usage info to exif data. X-Git-Tag: 2.1b_release~6^2~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ebdbc554cd9a8d0fc7d6f8372cfa99ddda48283;p=adaptation%2Fintel_mfld%2Fgst-plugins-atomisp.git flash usage info to exif data. Change-Id: Ib33766b67d712b3d98827a2f751594a11cf26082 --- diff --git a/gst-libs/atomisphal/mfld_cam.c b/gst-libs/atomisphal/mfld_cam.c index 95b5af5..33be409 100644 --- a/gst-libs/atomisphal/mfld_cam.c +++ b/gst-libs/atomisphal/mfld_cam.c @@ -106,6 +106,7 @@ struct mfld_driver_t struct timeval timestamp; int focus_done; gboolean enable_torch; + gboolean flash_used; }; struct buffer @@ -1181,7 +1182,7 @@ libmfld_cam_init (GstV4l2MFLDAdvCI * advci) mfld_driver.dvs_vector.x = 0; mfld_driver.dvs_vector.y = 0; mfld_driver.focus_done = 0; - + mfld_driver.flash_used = FALSE; mfld_driver.enable_torch = FALSE; mfldadvci = advci; @@ -1522,8 +1523,8 @@ run_flash_sequence (int fd, struct v4l2_buffer *buffer) cam_driver_dbg ("%s: Error dqbuf %d\n", __func__, 2); return CAM_ERR_SYS; } - - return CAM_ERR_NONE; + mfld_driver.flash_used = TRUE; + return CAM_ERR_NONE; } /* Discard the first two frames because of the first frame @@ -1709,7 +1710,7 @@ run_normal_sequence(int fd, struct v4l2_buffer *buffer) } else mfld_driver.still_af_count++; } - + mfld_driver.flash_used = FALSE; return CAM_ERR_NONE; } @@ -1991,3 +1992,8 @@ void get_grid_info(int fd, unsigned * width, unsigned * height) *height = grid.s3a_height; } +gboolean cam_is_flash_used() +{ + return mfld_driver.flash_used; +} + diff --git a/gst-libs/atomisphal/mfld_cam.h b/gst-libs/atomisphal/mfld_cam.h index b324143..c555cbf 100644 --- a/gst-libs/atomisphal/mfld_cam.h +++ b/gst-libs/atomisphal/mfld_cam.h @@ -304,6 +304,6 @@ cam_err_t get_awb_manual_color_temperature(int fd, int *ctemp); cam_err_t get_wb_mode (int *wb_mode); void get_awb_matrix(int fd, int msqWbGain[3], int msqCcMtrx[9], unsigned short *shift); - +gboolean cam_is_flash_used(void); #endif diff --git a/gst/mfldv4l2cam/v4l2camsrc_calls.c b/gst/mfldv4l2cam/v4l2camsrc_calls.c index eebb770..35a3d14 100644 --- a/gst/mfldv4l2cam/v4l2camsrc_calls.c +++ b/gst/mfldv4l2cam/v4l2camsrc_calls.c @@ -3191,11 +3191,12 @@ gst_v4l2camsrc_read_exif (GstCameraSrc * camsrc, exif_info->shutter_speed_denominator = 0; exif_info->brigtness_numerator = 0; exif_info->brightness_denominator = 0; + exif_info->flash = cam_is_flash_used(); GST_DEBUG ("Focal lenght numerator : %d", exif_info->focal_len_numerator); GST_DEBUG ("Focal lenght denominator : %d", exif_info->focal_len_denominator); GST_DEBUG ("F num numerator : %d", exif_info->aperture_f_num_numerator); GST_DEBUG ("F num denominator : %d", exif_info->aperture_f_num_denominator); - + GST_DEBUG ("flash used : %d", exif_info->flash); return TRUE; diff --git a/packaging/mfldv4l2camsrc.changes b/packaging/mfldv4l2camsrc.changes index 8354d2e..978d16c 100644 --- a/packaging/mfldv4l2camsrc.changes +++ b/packaging/mfldv4l2camsrc.changes @@ -1,3 +1,6 @@ +* Mon Jan 07 2013 Marko Ollonen accepted/trunk/20130104.202509@644e368 +- flash usage info to exif data, TZSP-4681. + * Fri Jan 04 2013 Marko Ollonen submit/tizen_2.0/20130104.074040@c3143c2 - preliminary support for burst mode which will be done later, TZSP-4552.