支持摄像头preVIEW尺寸为流行的Andr​​oid手机 [英] Supported camera preview sizes for popular Android handsets

查看:163
本文介绍了支持摄像头preVIEW尺寸为流行的Andr​​oid手机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正与摄像头preVIEW帧,需要做一个什么最低preVIEW大小我将与决定。我需要较高的分辨率,并正尝试找出最高preVIEW分辨率跨越比较流行的Andr​​oid手机和操作系统的版本,我可以得到。 (由<一个判断href="http://stackoverflow.com/questions/2948874/nexus-one-camera-$p$pview-sizes-on-android-2-2-froyo">this关于Nexus One的问题/升级Froyo preVIEW大小,它看起来像他们有时整个操作系统版本更改相同的设备。)

I'm working with camera preview frames, and need to make a decision about what minimum preview size I will work with. I need fairly high resolution, and am trying to figure out the highest preview resolution I can get across the more popular Android handsets and OS versions. (Judging by this question about Nexus One / Froyo preview sizes, it looks like they sometimes change across OS versions for the same device.)

有没有一种资源的任何地方,基本上列出了 android.hardware.Camera.Parameters.getSupported previewSizes()输出为许多不同的设备(或设备/ OS版本对)?

Is there a resource anywhere that basically lists the output of android.hardware.Camera.Parameters.getSupportedPreviewSizes() for lots of different devices (or device/OS version pairs)?

替代地,如果不存在这样的列表,这个问题可能会成为这样的资源。我会非常开心upvote,其中包括新的各个数据点为特定的手机/ OS版本的任何答案。

Alternatively, if there is no such listing, this question could become such a resource. I will very happily upvote any answers that include new individual data points for specific handsets / OS versions.

和以预防明显的注释:是的,我知道我将需要反正来测试我的code在许多设备。不过,理想情况下,我想提出一些关于早期的分辨率相当明智的决定,而无需购买设备刚上手的一群。

And to forestall the obvious comment: Yes, I know I will need to test my code on lots of devices anyway. But ideally I would like to make some reasonably informed decisions about resolution early on, without having to purchase a bevy of devices just to get started.

推荐答案

我的经验告诉我,那640×480可几乎无处不在,即使更大的分辨率由摄像机对象做广告,不是所有的人都是实际可用。 我经历了HTC Hero的段错误,当我试图最大分辨率 - 数据缓存使用 用于使preVIEW图像被mmaped,并且这个大小似乎仅限

My experience tells me, that 640x480 is available almost everywhere, and even if bigger resolutions are advertised by camera object, not all of them are actually usable. I experienced segfaults on HTC Hero when I tried maximal resolution - data buffer used for passing preview images is mmaped, and this size seems to be limited

这篇关于支持摄像头preVIEW尺寸为流行的Andr​​oid手机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆