construct_default_request_settings:
标准相机用例创建拍照设置。
设备必须返回被配置为满足请求用例的设置缓冲区,且必须是CAMERA3_TEMPLATE_*枚举类型之一。必须包括所有请求控制域。
HAL保留该结构体的所有权,但在关闭设备之前,指向该结构体的指针必须有效。一旦缓冲区被此调用返回,Framework和HAL可能不会修改缓冲区。对于相同template或其他template的后续调用,可能返回相同的缓冲区。
性能要求:
应该是一个非阻塞调用。HAL应该再1ms内且必须在5ms内返回此调用。
const camera_metadata_t* (*construct_default_request_settings)(
const struct camera3_device *,
int type);
/// @brief Request template types for camera3_device_ops.construct_default_request_settings(). This enum redefines the
/// camera3_request_template enum declared in hardware/camera3.h. Additional information can be found there.
enum Camera3RequestTemplate
{
RequestTemplatePreview = 0x00000001, ///< Standard camera preview operation with
/// 3A on auto
RequestTemplateStillCapture = 0x00000002, ///< Standard camera high-quality still
/// capture with 3A and flash on auto
RequestTemplateVideoRecord = 0x00000003, ///< Standard video recording plus preview
/// with 3A on auto, torch off
RequestTemplateVideoSnapshot = 0x00000004, ///< High-quality still capture while
/// recording video
RequestTemplateZeroShutterLag = 0x00000005, ///< Zero-shutter-lag mode with 3A on auto
RequestTemplateManual = 0x00000006, ///< A basic template for direct application
/// control of capture parameters
RequestTemplateCount = 0x00000006, ///< The number of request templates supported
RequestTemplateVendorStart = 0x40000000 ///< First value for vendor-defined request
/// templates
};