Camera 2 api not working
Posted: Thu Aug 08, 2019 2:39 pm
We are trying to access one or two cameras via the Android Camera2 and NDK.
We are using the FriendlyElec OV13850 modules.
After unsuccessful tries (no camera image showing) with the "delivered" Android 8 logCat shows a message saying that the connected camera is not a camera2 device, we changed
./hardware/rockchip/camera/Config/rk32xx_camera.mk from Camera2.portability.force_api=1 -> 2
./device/rockchip/common/system.prop from Camera2.portability.force_api=1 -> 2
and
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/CameraAgentFactory.java from
private static final String API_LEVEL_OVERRIDE_VALUE =
SystemProperties.get(API_LEVEL_OVERRIDE_KEY, API_LEVEL_OVERRIDE_API1); to
private static final String API_LEVEL_OVERRIDE_VALUE =
SystemProperties.get(API_LEVEL_OVERRIDE_KEY, API_LEVEL_OVERRIDE_API2);
and rebuilt Android. This results in the standard camera app, delivered with android to stop working. (no issue so far, as it might be using standard camera api and not camera2)
But the android basic camera NDK sample app, and also our own app still fail.
It looks like the board does not support camera2 via NDK......
This is pretty bad. Anyone an idea ?
We are using the FriendlyElec OV13850 modules.
After unsuccessful tries (no camera image showing) with the "delivered" Android 8 logCat shows a message saying that the connected camera is not a camera2 device, we changed
./hardware/rockchip/camera/Config/rk32xx_camera.mk from Camera2.portability.force_api=1 -> 2
./device/rockchip/common/system.prop from Camera2.portability.force_api=1 -> 2
and
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/CameraAgentFactory.java from
private static final String API_LEVEL_OVERRIDE_VALUE =
SystemProperties.get(API_LEVEL_OVERRIDE_KEY, API_LEVEL_OVERRIDE_API1); to
private static final String API_LEVEL_OVERRIDE_VALUE =
SystemProperties.get(API_LEVEL_OVERRIDE_KEY, API_LEVEL_OVERRIDE_API2);
and rebuilt Android. This results in the standard camera app, delivered with android to stop working. (no issue so far, as it might be using standard camera api and not camera2)
But the android basic camera NDK sample app, and also our own app still fail.
It looks like the board does not support camera2 via NDK......
This is pretty bad. Anyone an idea ?
