最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to get the supported resolutions from a USB camera in Android? - Stack Overflow

programmeradmin1浏览0评论

I'm currently using the following code to retrieve a list of supported resolutions from a USB camera.

StreamConfigurationMap map = characteristics.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
//...
return map.getOutputSizes(mode);

However, based on the logs below, it seems that some of the resolutions returned by this code are not actually supported.

[email protected]: trimSupportedFormats: size (320,240) is removed due to unable to crop vertically from (2592, 1944)
[email protected]: trimSupportedFormats: size (640,480) is removed due to unable to crop vertically from (2592, 1944)
//...
[email protected]: configureStreams: request stream 640x480, format: 0x22
[email protected]: V4L configuration format:YUYV, w 2592, h 1944

Is there a way to retrieve only the resolutions that are genuinely supported by the USB camera in an Android app?

发布评论

评论列表(0)

  1. 暂无评论