EVS在Android 11 的时候进行了版本迭代
1、事件和帧通知机制
上个版本1.0中,IEvsCameraStream接口定义了一个回调方法,仅用于传递捕获的视频帧
无法识别一些突发事件,1.1版本中增加了一个用于传递流式传输事件的额外回调。
package [email protected];
import @1.0::IEvsCameraStream;
/**
* Implemented on client side to receive asynchronous video frame deliveries.
*/
interface IEvsCameraStream extends @1.0::IEvsCameraStream {
/**
* Receives calls from the HAL each time a video frame is ready for inspection.
* Buffer handles received by this method must be returned via calls to
* IEvsCamera::doneWithFrame_1_1(). When the video stream is stopped via a call
* to IEvsCamera::stopVideoStream(), this callback may continue to happen for
* some time as the pipeline drains. Each frame must still be returned.
* When the last frame in the stream has been delivered, STREAM_STOPPED
* event must be delivered. No further frame deliveries may happen
* thereafter.
*
* @param buffer a buffer descriptor of a delivered image frame.
*/
oneway deliverFrame_1_1(BufferDesc buffer);
/**
* Receives calls from the HAL each time an event happens.
*
* @param event EVS event with possible event information.
*/
oneway notify(EvsEvent event);
};
2、控制摄像头参数
之前1.0版本,摄像头设备被视为只读设备,不存在任何可让应用更改摄像头控制参数的方法
1.1版本中可以在app中更改摄像头控制参数,这些参数定义在enum CameraParam 中
/**
* EVS Camera Parameter
*/
enum CameraParam : uint32_t {
/**
* The brightness of image frames
*/
BRIGHTNESS,
/**
* The contrast of image frames
*/
CONTRAST,
/**
* Automatic gain/exposure control
*/
AUTOGAIN,
/**
* Gain control
*/
GAIN,
/**
* Automatic Whitebalance
*/
AUTO_WHITE_BALANCE,
/**
* Manual white balance setting as a color temperature in Kelvin.
*/
WHITE_BALANCE_TEMPERATURE,
/**
* Image sharpness adjustment
*/
SHARPNESS,
/**
* Auto Exposure Control modes; auto, manual, shutter priority, or
* aperture priority.
*/
AUTO_EXPOSURE,
/**
* Manual exposure time of the camera
*/
ABSOLUTE_EXPOSURE,
/**
* Set the focal point of the camera to the specified position. This
* parameter may not be effective when auto focus is enabled.
*/
ABSOLUTE_FOCUS,
/**
* Enables continuous automatic focus adjustments.
*/
AUTO_FOCUS,
/**
* Specify the objective lens focal length as an absolute value.
*/
ABSOLUTE_ZOOM,
};
3、调整相机和系统配置
1.0版本中未提供查询相机设备信息和系统配置方法,1.1版本针对此问题,使用相机元数据扩展相机
设备描述符。
扫描二维码关注公众号,回复:
14885676 查看本文章
参考配置文件
EVS 1.1中包含的参考配置文件是采用XML格式编写的,且供应商可以使用包含DTD文件来验证
总归就是说,1.1版本中使用的是XML文件来配置相机的,不再是json文件
4、显示这块的更改
提供了新的简单框架服务,允许供应商在HAL实现中使用Sufaceflinger/EGL,无需链接libgui,
AOSP 提供此服务的默认实现,功能完善。但是,供应商还必须实现 API,以便在其平台上提供此服务。
后续更新1.1版本的代码流程!!!