本讲是Android Camera Native Framework专题的第5讲,我们介绍cameraserver manifest详解(上),包括如下内容:
Android Vintf Manifest语法简介
Cameraserver manifest详解
manifest.type
manifest.hal.format
manifest.hal.name
manifest.hal.transport
manifest.hal.version
manifest.hal.interface
manifest.hal.fqname
HAL Interface Descriptor
更多资源:
资源 | 描述 |
在线课程 | |
知识星球 | 星球名称:深入浅出Android Camera 星球ID: 17296815 |
极客笔记圈 |
Android Vintf Manifest语法简介
Android Vintf Manifest是用于描述Vendor(HAL) Interface对象的清单文件
Vintf Manifest文件语法详解
manifest.type
manifest.type
Manifest类型,分为device和framework两种类型
定义manifest类型,在做兼容性矩阵验证时会用到
兼容性矩阵
![](https://img-blog.csdnimg.cn/img_convert/20c9936a47c3d2564abfb400e68dd8b8.png)
FCM(Framework Compatibility Matrix)包含system, system_ext, product三个分区对device manifest的要求
比如:hardware/interfaces/compatibility_matrices/
/system/etc/vintf/compatibility_matrix.device.xml
DCM(Device Compatibility Matrix)包含vendor分区对framework manifest的要求
比如: device/generic/goldfish/compatibility_matrix.xml
/vendor/etc/vintf/compatibility_matrix.xml
manifest.hal.format
manifest.hal.format 用于指定是什么类型的HAL,跟实现的接口有关,可设置的值有:
hidl:HIDL HAL,这是默认值。
aidl:AIDL HAL。
native: Native HALs,目前没看到有使用。
示例:
AIDL HAL:hardware/google/camera/common/hal/aidl_service/android.hardware.camera.provider@2.7-service-google.xml
HIDL HAL: frameworks/av/camera/cameraserver/manifest_android.frameworks.cameraservice.service@2.2.xml
manifest.hal.name
manifest.hal.name 用于设置HAL的包名,多个 HAL 可以使用相同的名称。
示例:
Cameraserver的HIDL接口
<name>android.frameworks.cameraservice.service</name>
Camera HAL的HIDL和AIDL接口使用相同的Name
HIDL:/device/generic/goldfish/manifest.camera.xml
<name>android.hardware.camera.provider</name>
AIDL:/hardware/google/camera/common/hal/aidl_service/android.hardware.camera.provider@2.7-service-google.xml
<name>android.hardware.camera.provider</name>
manifest.hal.transport
manifest.hal.transport 用于设置vintf接口的通信方式
只有HIDL HAL才需要,可设置为如下三种值(目前几乎全是hwbinder ):
hwbinder:绑定模式(跑独立进程)
passthrough:透传模式(跑调用者进程)
inet:Inet 套接字
![](https://img-blog.csdnimg.cn/img_convert/adb0eb79d23ad4f27a294e8f86125170.png)