如何检查android设备是否支持用于camera2或camerax视频稳定的ois或eis

jjhzyzn0  于 2021-08-20  发布在  Java
关注(0)|答案(0)|浏览(331)

我正在使用java for android,但我找不到任何关于如何检查android设备是否支持针对camerax/camera2的ois/eis视频稳定的示例。

Camera2CameraControl camera2CameraControl =
            Camera2CameraControl.from(camera.getCameraControl());
    CaptureRequestOptions captureRequestOptions =
            new CaptureRequestOptions.Builder()
                    .setCaptureRequestOption(CaptureRequest.CONTROL_VIDEO_STABILIZATION_MODE, CameraMetadata.CONTROL_VIDEO_STABILIZATION_MODE_ON)
                    .build();
    camera2CameraControl.setCaptureRequestOptions(captureRequestOptions);

Camera2CameraControl camera2CameraControl =
            Camera2CameraControl.from(camera.getCameraControl());
    CaptureRequestOptions captureRequestOptions =
            new CaptureRequestOptions.Builder()
                    .setCaptureRequestOption(CaptureRequest.LENS_OPTICAL_STABILIZATION_MODE, CameraMetadata.LENS_OPTICAL_STABILIZATION_MODE_ON)
                    .build();
    camera2CameraControl.setCaptureRequestOptions(captureRequestOptions);

我分别使用了上面的两个代码,但我没有看到区别。因此,我怀疑我正在使用的设备不支持eis和ois,但我必须进行检查。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题