本文介绍了集previewFpsRange没有工作,尽管值是GET previewFpsRange的范围内的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个简单的code:

Camera.Parameters params = currentCamera.getParameters();
params.setPreviewFpsRange( 10000, 15000 );
currentCamera.setParameters( params );

在我的Nexus 4(或我的摩托罗拉Atrix),尽管允许值的5000所允许的范围之间,以120000不起作用。

does not work on my Nexus 4 (or my Motorola Atrix), despite the allowed values being between in the allowed range of 5000 to 120000.

当我尝试使用任何最小或最大值不同于5000和120000,分别,我得到:

When I try to use any min or max values different than 5000 and 120000, respectively, I get:

setPreviewFpsRange(const android::QCameraParameters&): error: FPS range
value not supported

这是愚蠢的。另外,我想在我的旧的摩托罗拉Atrix(其中显示了一个有效的FPS范围是10000和30000之间),也不起作用此code。凡是可以做什么?

which is silly. Also, I tried this code on my older Motorola Atrix (which shows a valid fps range to be between 10000 and 30000) and it also doesn't work. Anything that can be done?

从我的搜索的主题我已经发现一个)上有主题非常少的材料的任何位置,和b),可能的情况下,这个功能是简单地通过一些平台不受支持。这是一个有点怪,谷歌目前的旗舰手机,Nexus的4,不支持它,但...

From my searching on the topic I have found that a) there is very little material on the topic anywhere, and b) it may be the case that this functionality is simply unsupported by some platforms. It's a bit strange that Google's current flagship phone, the Nexus 4, doesn't support it, though...

推荐答案

AHAH!所以当我寻找答案的一部分,我检查了我的Nexus 10的工作与我的应用程序。事实证明,该getSupportedFpsRange函数返回的范围内的值重新presenting确切的双对象,可能被输入到设置previewFpsRange和任何其他双对象不支持(据我所知道的,反正。)

Ahah! So as part of my search for answers I checked the operation of my Nexus 10 with my app. It turns out that the values that the getSupportedFpsRange function returns are ranges representing exact duples that may be input into setPreviewFpsRange and any other duples are unsupported (as far as I can tell, anyway.)

我发现了这一点,因为Nexus的10返回从getSupportedFpsRange多个双对象。我在这里重复这三个设备的getSupportedFpsRange返回值。

I discovered this because the Nexus 10 returns multiple duples from getSupportedFpsRange. I've duplicated the three devices' getSupportedFpsRange return values here.

LG的Nexus 4:

LG Nexus 4:

preVIEW fps的范围值=(5000,120000);

摩托罗拉Atrix:

preVIEW fps的范围值=(10000,30000);

三星Nexus 10:

Samsung Nexus 10:

$p$pview-fps-range-values=(15000,15000),(24000,24000),(25000,25000),(15000,30000),(30000,30000);

我们不能

params.setPreviewFpsRange( 29000, 29000 );

要强制preVIEW将在29FPS,除非该设备已经明确支持的二倍。

to force the preview to be at 29fps unless the device already specifically supports that duple.

当然,原来的原因,我正在调查这个功能是复制了Nexus 4的如丝般光滑相机preVIEW在我自己的应用程序的希望。这似乎证明得出结论说,在Nexus的4,至少设置previewFpsRange将不利于这一点。

Of course, the original reason I was investigating this functionality was in the hopes of replicating the Nexus 4's silky smooth camera preview in my own app. This would seem to prove conclusively that, on the Nexus 4 at least, setPreviewFpsRange won't help with that.

时间继续搜索。 (:

这篇关于集previewFpsRange没有工作,尽管值是GET previewFpsRange的范围内的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-30 07:16