diff options
author | Jeongmo Yang <jm80.yang@samsung.com> | 2017-02-02 15:32:13 +0900 |
---|---|---|
committer | Jeongmo Yang <jm80.yang@samsung.com> | 2017-02-03 14:37:17 +0900 |
commit | ef75597c0cb73bcb3f5e19215f9eac73f068974c (patch) | |
tree | 3c3a10feabc53e5ef7f707a820d8f09a2583655e /test | |
parent | ed863493a1188aa46c85ce8a6adb3c84022c85ed (diff) | |
download | camera-ef75597c0cb73bcb3f5e19215f9eac73f068974c.tar.gz camera-ef75597c0cb73bcb3f5e19215f9eac73f068974c.tar.bz2 camera-ef75597c0cb73bcb3f5e19215f9eac73f068974c.zip |
Update code for count 0 of face detection
[Version] 0.2.93
[Profile] Common
[Issue Type] Update
[Dependency module] N/A
[Test] [M(T) - Boot=(OK), sdb=(OK), Home=(OK), Touch=(OK), Version=tizen-3.0-mobile_20170131.2]
Change-Id: I464820eaef8b9ebc5c2a9f257d7b365f05a922ce
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/camera_test.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/test/camera_test.c b/test/camera_test.c index 7cb2630..8e4616f 100644 --- a/test/camera_test.c +++ b/test/camera_test.c @@ -566,7 +566,7 @@ static bool strobe_mode_cb(camera_attr_flash_mode_e mode, void *user_data) static void _face_detected(camera_detected_face_s *faces, int count, void *user_data) { - g_print("face detected!!\n"); + g_print("face detected!! - count %d\n", count); int i; for (i = 0 ; i < count ; i++) @@ -1147,16 +1147,21 @@ static void setting_menu(gchar buf) } break; case 'l': /* Setting > Face detection setting */ - g_print("* Face detect mode !\n"); - flush_stdin(); - for (i = 0 ; i < 2 ; i++) - g_print("\t %d. %s \n", i+1, detection_mode[i]); - err = scanf("%d", &idx); if (camera_is_supported_face_detection(hcamcorder->camera)) { - if (idx >= 0 && idx < 2) + g_print("* Face detect mode !\n"); + flush_stdin(); + for (i = 0 ; i < 2 ; i++) + g_print("\t %d. %s \n", i, detection_mode[i]); + err = scanf("%d", &idx); + if (idx == 0) + bret = camera_stop_face_detection(hcamcorder->camera); + else if (idx == 1) bret = camera_start_face_detection(hcamcorder->camera, _face_detected, NULL); - } else + else + g_print("\n invalid input [%d]\n\n", idx); + } else { g_print("face detection_not supported"); + } break; case 'k': /* Setting > Anti-handshake */ g_print("*Anti-handshake !\n"); |