언어 설정

Menu
Sites
Language
Native Self Camera Sample App

Hi, I just created the native Self Camera sample project in tizen ide on windows 7 pc. But seems that the screen is not captured on Samsung Z1. I have taken log that tells that the camera state transition from CAMERA_STATE_CAPTURING to CAMERA_STATE_CAPTURED does not happen automatically. And the camera state halts in CAMERA_STATE_CAPTURING though camera_start_capture function returns CAMERA_ERROR_NONE

Edited by: Atanu Barai on 02 7월, 2015

Responses

11 댓글
Jean Yang

Hi, 

Do you mean you can't captured the photo in self camare mode ? Just tested on my Z1, it's worked as normal, Z1 captured the photo. Maybe somewhere is not configure correctly. Or you can share your log, we can find the details.

daniel kim

Hi,

Which SDK version you use ? it seem that the same problem is not observed in tizen 2.3 rev2.

Regards

Jeongmo Yang

In my case, there is no problem in self camera sample application with tizen-sdk-image-TizenSDK_2.3.0_Rev2-ubuntu32 and Z1.

Please share the log for it with TIZEN_N_CAMERA and MM_CAMCORDER log tag, then we can check it more detail.

Atanu Barai

Using log tag TIZEN_N_CAMERA + MM_CAMCORDER

07-06 09:23:24.490 : WARN / TIZEN_N_CAMERA ( 6333 : 6333 ) : camera.c: camera_create(764) > [camera_create]device name = [1]
07-06 09:23:24.580 : WARN / TIZEN_N_CAMERA ( 6333 : 6333 ) : camera.c: camera_create(824) > camera handle 0xb780fbf0
07-06 09:23:24.580 : WARN / TIZEN_N_CAMERA ( 6333 : 6333 ) : camera.c: camera_start_preview(869) > camera_start_preview - start
07-06 09:23:26.050 : WARN / TIZEN_N_CAMERA ( 6333 : 6333 ) : camera.c: __idle_cb(738) > user_cb[type 10] is NULL
07-06 09:23:39.580 : WARN / TIZEN_N_CAMERA ( 6333 : 6333 ) : camera.c: __mm_camera_message_callback(672) > _CAMERA_EVENT_TYPE_SHUTTER_SOUND callback (nil)

Atanu Barai

Thanks all for answering. I have tried with both tizen-sdk-image-TizenSDK_2.3.0_Rev2-windows64, and tizen-sdk-image-TizenSDK_2.3.0_Rev2-windows32. These required installation of sdk-extention from samsung website. I have tested on two Z1 devices but result was same. I can not share the log before monday. After that I will surely do.

Atanu Barai

Hi,

In windows 7 32bit machine, I used tizen-sdk-image-TizenSDK_2.3.0_Rev2-windows32, Build id : 20150121-1659,

 

Using log tag TIZEN_N_CAMERA + MM_CAMCORDER

07-06 09:23:24.490 : WARN / TIZEN_N_CAMERA ( 6333 : 6333 ) : camera.c: camera_create(764) > [camera_create]device name = [1]
07-06 09:23:24.580 : WARN / TIZEN_N_CAMERA ( 6333 : 6333 ) : camera.c: camera_create(824) > camera handle 0xb780fbf0
07-06 09:23:24.580 : WARN / TIZEN_N_CAMERA ( 6333 : 6333 ) : camera.c: camera_start_preview(869) > camera_start_preview - start
07-06 09:23:26.050 : WARN / TIZEN_N_CAMERA ( 6333 : 6333 ) : camera.c: __idle_cb(738) > user_cb[type 10] is NULL
07-06 09:23:39.580 : WARN / TIZEN_N_CAMERA ( 6333 : 6333 ) : camera.c: __mm_camera_message_callback(672) > _CAMERA_EVENT_TYPE_SHUTTER_SOUND callback (nil)
 

Same log was found using log tag TIZEN_N_CAMERA. For log tag MM_CAMCORDER no log was found.

Jean Yang

Hi, 

From the log can't see the useful info.Do you just use the sample code or you modified somewhere, for more, share some code is helpful.

Atanu Barai

I used the sample app with no modification.  I mentioned IDE version earlier. The handset I am using has Tizen Version 2.3.0.1(Z130HDDU0BOD7). There are also some other strange problems in other APIs also. For example


                    result = system_info_get_platform_int("http://tizen.org/feature/screen.width", &width);
                    if(result != SYSTEM_INFO_ERROR_NONE)
                    {
                     INF("Screen width get failed");
                    }
                    result = system_info_get_platform_int("http://tizen.org/feature/screen.height", &height);
                    if(result != SYSTEM_INFO_ERROR_NONE)
                    {
                     INF("Screen height get failed");
                    }
                    INF("Screen resolution %d x %d", width, height);
                    /*
                     * Set Camera Preview Resolution
                     * Surprisingly while setting and resolution width and height
                     * parameters are swapped.
                     */


                    result = camera_set_preview_resolution(main_view_data->camera, height , width);
                   if(result != CAMERA_ERROR_NONE)
                   {
                              INF("camera_set_preview_resolution result FAIL");
                              if(result == CAMERA_ERROR_INVALID_PARAMETER)
                              INF("camera_set_preview_resolution result CAMERA_ERROR_INVALID_PARAMETER");
                   }

 

                    result = system_info_get_platform_int("http://tizen.org/feature/screen.width", &width);
                    if(result != SYSTEM_INFO_ERROR_NONE)
                    {
                     INF("Screen width get failed");
                    }
                    result = system_info_get_platform_int("http://tizen.org/feature/screen.height", &height);
                    if(result != SYSTEM_INFO_ERROR_NONE)
                    {
                     INF("Screen height get failed");
                    }
                    INF("Screen resolution %d x %d", width, height);
                    /*
                     * Set Camera Preview Resolution
                     * Surprisingly while setting and resolution width and height
                     * parameters are swapped.
                     */

                    result = camera_set_preview_resolution(main_view_data->camera, height , width);
                   if(result != CAMERA_ERROR_NONE)
                   {
                              INF("camera_set_preview_resolution result FAIL");
                              if(result == CAMERA_ERROR_INVALID_PARAMETER)
                              INF("camera_set_preview_resolution result CAMERA_ERROR_INVALID_PARAMETER");
                   }

This code works for the device but camera_set_preview_resolution function returns CAMERA_ERROR_INVALID_PARAMETER for emulator. Also to make the api working with the device I have to swap the height and width parameters.

Please feel free to ask any further info or details log.

Jeongmo Yang

In fact, matching between screen resolution and preview resolution is not mandatory.

but, in target, screen resolution is supported as preview resolution generally.

 

You can get supported preview resolution list and get recommended resolution with below APIs.

 

int camera_foreach_supported_preview_resolution(camera_h camera, camera_supported_preview_resolution_cb callback, void *user_data);

int camera_get_recommended_preview_resolution(camera_h camera, int *width, int *height);

 

so, I think above issue you said is normal operation.

Atanu Barai
I need the camera preview and capture resolution equals to the screen resolution of device for my app. But the main problem is the sample app. I tried to implement the camera functionality in my app and could not get it working. Then I tried the sample app which did not work. Camera state is not changing from capturing to captured which should have been changed automatically.
Jean Yang

Hi, 

If this error CAMERA_ERROR_INVALID_PARAMETER just detected in the emulator, not in the Z1, I don't think this is the problem, since the emulator is not the really camera, and the camera is use the laptop camera(if have), the HW design is not the same, so detected the issue on emulator is not strange.