Using the ndk interface to operate the camera, how to set the camera capture image fps, height and width

818 views
Skip to first unread message

周青

unread,
Jun 14, 2018, 12:16:56 PM6/14/18
to android-ndk

I use the ndk interface to successfully open the camera, but fps and other parameters can not be set

camera_status = ACameraManager_getCameraCharacteristics(cameraManager, selectedCameraId,
                                                        &cameraMetadata);

camera_status = ACameraManager_openCamera(cameraManager, selectedCameraId,
                                          &deviceStateCallbacks, &cameraDevice);
ACameraCaptureSession_setRepeatingRequest(captureSession,&captureSession_captureCal
lbacks, 1, &captureRequest, NULL);

Florian Limberger

unread,
Jun 19, 2018, 11:23:42 AM6/19/18
to android-ndk
Hi,

parameters like the FPS are set on the capture request:


e.g.:

> int32_t fpsRange[2] = {fps, fps};
> ACaptureRequest_setEntry_i32(captureRequest, ACAMERA_CONTROL_AE_TARGET_FPS_RANGE, 2, &fpsRange[0]);

Regards


flo

周青

unread,
Jul 9, 2018, 11:08:28 AM7/9/18
to android-ndk
 
I try to set fps 30 or 15. 
the count of image every second from camera is same.this is not 30 or 15 to output.
please 
int32_t mFramerateRange[2] = {30,30};
or
int32_t mFramerateRange[2] = {15,15};
ret = ACaptureRequest_setEntry_i32(mCapture_request, ACAMERA_CONTROL_AE_TARGET_FPS_RANGE,2,mFramerateRange);

在 2018年6月19日星期二 UTC+8下午11:23:42,Florian Limberger写道:

周青

unread,
Jul 9, 2018, 11:38:21 PM7/9/18
to android-ndk
I have fixed this issue.thank you.


在 2018年6月19日星期二 UTC+8下午11:23:42,Florian Limberger写道:
Hi,

mpen...@gmail.com

unread,
Aug 9, 2018, 12:16:29 AM8/9/18
to android-ndk

Hi 周青,

would you please post your fix?

Thanks,
Thomas
Reply all
Reply to author
Forward
0 new messages