Android camera: hardware/interfaces/camera

Camera Device HAL

The camera.device HAL interface is used by the Android camera service to operate
individual camera devices. Instances of camera.device HAL interface can be obtained
via one of the ICameraProvider::getCameraDeviceInterface_V<N>_x() methods, where N
is the major version of the camera device interface.

Obtaining the device interface does not turn on the respective camera device;
each camera device interface has an actual open() method to begin an active
camera session. Without invoking open(), the interface can be used for querying
camera static information.

通用数据类型:


 
 

[email protected]:

HIDL version of the baseline camera device HAL, required for LIMITED or FULLoperation through the android.hardware.camera2 API.The main HAL contains methods for static queries about the device, similar tothe HALv3-specific sections of the legacy camera module HAL. Simply obtaining aninstance of the camera device interface does not turn on the camera device.The open() method actually opens the camera device for use, returning a Sessioninterface for operating the active camera. It takes a Callback interface as anargument.

通过open接口把camera service层实现的ICameraDeviceCallback传递到HAL层

ICameraDeviceCallback.hal

 
Callback methods for the HAL to call into the framework.【这里说的framework层是 camera service吗?还是直接到java层】

These methods are used to return metadata and image buffers for a completed
or failed captures, and to notify the framework of asynchronous events such
as errors.

ICameraDeviceSession.hal

Camera device active session interface.
Obtained via ICameraDevice::open(), this interface contains the methods to
configure and request captures from an active camera device.

Camera Provider HAL

The camera.provider HAL is used by the Android camera service to discover,
query, and open individual camera devices.

It also allows for direct control of the flash unit of camera devices that have
one, for turning on/off torch mode.
 
 
ICameraProvider.hal

Camera provider HAL, which enumerates the available individual camera devices
known to the provider, and provides updates about changes to device status,
such as connection, disconnection, or torch mode enable/disable.

The provider is responsible for generating a list of camera device service
names that can then be opened via the hardware service manager.

通过ICameraProvider的setCallback设置camera service实现的callback
ICameraProviderCallback.hal
Callback functions for a camera provider HAL to use to inform the camera service of changes to the camera subsystem.


猜你喜欢

转载自blog.csdn.net/u011279649/article/details/80352500