From b3a61c227b9cb5092beeb8b2e1a10b1a9fc87933 Mon Sep 17 00:00:00 2001 From: Hyuntae Kim Date: Wed, 22 Apr 2015 13:40:49 +0900 Subject: [PATCH] [camera_tutorial] camera focus api description added requested by SE team - not ACR Change-Id: Ie395c964a0eafdc9f8bca21f0d9fdc1fa074195b Signed-off-by: hyuntae kim --- org.tizen.tutorials/html/native/multimedia/camera_tutorial_n.htm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/org.tizen.tutorials/html/native/multimedia/camera_tutorial_n.htm b/org.tizen.tutorials/html/native/multimedia/camera_tutorial_n.htm index 31f8f68..aad7a3f 100644 --- a/org.tizen.tutorials/html/native/multimedia/camera_tutorial_n.htm +++ b/org.tizen.tutorials/html/native/multimedia/camera_tutorial_n.htm @@ -304,7 +304,7 @@ error_code = camera_set_capture_format(cam_data.g_camera, CAMERA_PIXEL_FORMAT_JP error_code = camera_set_preview_cb(cam_data.g_camera, _camera_preview_cb, NULL); -

The following example code implements the _camera_preview_cb() callback function. The callback function starts auto-focusing using the camera_start_focusing() function, whose parameters are the camera_h camera handle and a Boolean flag defining whether the camera must continuously try to focus. The g_enable_focus flag is set to false to prevent the capturing process from restarting.

+

The following example code implements the _camera_preview_cb() callback function. The callback function starts auto-focusing using the camera_start_focusing() function, whose parameters are the camera_h camera handle and a Boolean flag defining whether the camera must continuously try to focus. The g_enable_focus flag is set to false to prevent the capturing process from restarting. If the result value of camera_start_focusing() with continuous mode true is CAMERA_ERROR_NOT_SUPPORTED, please set second parameter value as false

 static void _camera_preview_cb(camera_preview_data_s *frame, void *user_data)
@@ -314,7 +314,10 @@ static void _camera_preview_cb(camera_preview_data_s *frame, void *user_data)
    if (g_enable_focus == true)
    {
       error_code = camera_start_focusing(cam_data.g_camera, true);
-
+      if (error_code == CAMERA_ERROR_NOT_SUPPORTED)
+      {
+         error_code = camera_start_focusing(cam_data.g_camera, false);
+      }
       g_enable_focus = false;
    }
 }
-- 2.7.4