cts android.hardware.camera2.cts.RecordingTest --testBasicRecording fail

本文介绍了如何解决Android硬件摄像头CTS测试中关于帧率范围配置缺失的问题,通过修改camerafeaturetable配置文件,增加特定帧率范围[20,20]来通过测试。

android.hardware.camera2.cts.RecordingTest
– testBasicRecording
fail
junit.framework.AssertionFailedError: Frame rate range [20, 20] (for profile ID 2) must be one of the camera device available FPS range! at junit.framework.Assert.fail(Assert.java:50)
– testRecordingFromPersistentSurface
fail
junit.framework.AssertionFailedError: Frame rate range [20, 20] (for profile ID 2) must be one of the camera device available FPS range! at junit.framework.Assert.fail(Assert.java:50)

出现此fail,主要是因为Camera Feature table中配置少了一项[20,20]把这个配置在camera feature table中即可,找到camera对应的config.ftbl.*.h文件(eg:vendor/mediatek/proprietary/custom/mt6735/hal/D2/sendepfeature/gc2355_raw/config.ftbl.gc2355_raw.h,我们用的前置摄像头是gc2355_raw,就着到对应的文件config.ftbl.gc2355_raw.h) ,做如下配置:

#if 1
    //  Preview Frame Rate Range
    FTABLE_CONFIG_AS_TYPE_OF_USER(
       KEY_AS_(MtkCameraParameters::KEY_PREVIEW_FPS_RANGE),
       SCENE_AS_DEFAULT_SCENE(
            ITEM_AS_DEFAULT_("30000,30000"),
           ITEM_AS_USER_LIST_(
             "(15000,15000)",
  +             "(20000,20000)",
                "(24000,24000)",
              "(30000,30000)",
               "(60000,60000)",
                "(120000,120000)",
            )
        ),
    )
#endif

增加”(20000,20000)”就ok了,注意后置摄像头也需要用同样的方法修改。

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值