camera_external_camera_t

Updated: October 26, 2022

Functions that must be implemented by an external camera library

Synopsis:

#include <camera/external_camera_api.h>
typedef struct {
    open_external_camera_func_t open;
    close_external_camera_func_t close;
    init_camera_func_t init;
    deinit_camera_func_t deinit;
    start_preview_func_t start_preview;
    stop_preview_func_t stop_preview;
    get_preview_frame_func_t get_preview_frame;
    get_preview_num_buffers_func_t get_preview_num_buffers;
    get_supported_vf_frametypes_func_t get_supported_vf_frametype;
    get_supported_vf_resolutions_func_t get_supported_vf_resolution;
    get_supported_vf_framerates_func_t get_supported_vf_framerates;
    get_time_func_t get_time;
    set_framerate_func_t set_framerate;
    get_framerate_func_t get_framerate;
    parse_config_func_t parse_config;
    register_status_callback_func_t register_status_callback;
    restart_preview_func_t restart_preview;
    set_isp_config_func_t set_isp_config;
    get_supported_brightness_func_t get_supported_brightness;
    set_brightness_func_t set_brightness;
    get_supported_contrast_func_t get_supported_contrast;
    set_contrast_func_t set_contrast;
    set_standby_mode_func_t set_standby_mode;
    is_whitebalance_mode_valid_func_t is_whitebalance_mode_valid;
    set_whitebalance_mode_func_t set_whitebalance_mode;
    get_supported_whitebalance_func_t get_supported_whitebalance;
    set_whitebalance_func_t set_whitebalance;
    get_whitebalance_func_t get_whitebalance;
    is_feature_capable_func_t is_feature_capable;
    allocate_preview_buffer_func_t allocate_preview_buffer;
    free_preview_buffer_func_t free_preview_buffer;
    get_supported_sharpness_func_t get_supported_sharpness;
    set_sharpness_func_t set_sharpness;
    get_supported_hue_func_t get_supported_hue;
    set_hue_func_t set_hue;
    get_supported_saturation_func_t get_supported_saturation;
    set_saturation_func_t set_saturation;
    get_default_image_attributes_func_t get_default_image_attributes;
    get_supported_wb_rb_gain_func_t get_supported_wb_rb_gain;
    set_manual_wb_rb_gain_func_t set_manual_wb_rb_gain;
    get_manual_wb_rb_gain_func_t get_manual_wb_rb_gain;
    get_default_wb_mode_func_t get_default_wb_mode;
    set_exposure_mode_func_t set_exposure_mode;
    is_exposure_mode_valid_func_t is_exposure_mode_valid;
    get_supported_shutter_speeds_func_t get_supported_shutter_speeds;
    get_default_shutter_speed_func_t get_default_shutter_speed;
    get_supported_ISO_values_func_t get_supported_ISO_values;
    get_default_ISO_value_func_t get_default_ISO_value;
    get_manual_shutter_speed_func_t get_manual_shutter_speed;
    get_manual_ISO_value_func_t get_manual_ISO_value;
    set_manual_shutter_speed_func_t set_manual_shutter_speed;
    set_manual_ISO_value_func_t set_manual_ISO_value;
    get_supported_ev_offsets_func_t get_supported_ev_offsets;
    set_ev_offset_func_t set_ev_offset;
    get_ev_offset_func_t get_ev_offset;
    configure_preview_func_t configure_preview;
    get_preview_buffer_size_func_t get_preview_buffer_size;
} camera_external_camera_t;

Data:

open_external_camera_func_t open
close_external_camera_func_t close
init_camera_func_t init
deinit_camera_func_t deinit
start_preview_func_t start_preview
stop_preview_func_t stop_preview
get_preview_frame_func_t get_preview_frame
get_preview_num_buffers_func_t get_preview_num_buffers
get_supported_vf_frametypes_func_t get_supported_vf_frametype
get_supported_vf_resolutions_func_t get_supported_vf_resolution
get_supported_vf_framerates_func_t get_supported_vf_framerates
get_time_func_t get_time
set_framerate_func_t set_framerate
get_framerate_func_t get_framerate
parse_config_func_t parse_config
register_status_callback_func_t register_status_callback
restart_preview_func_t restart_preview
set_isp_config_func_t set_isp_config
get_supported_brightness_func_t get_supported_brightness
set_brightness_func_t set_brightness
get_supported_contrast_func_t get_supported_contrast
set_contrast_func_t set_contrast
set_standby_mode_func_t set_standby_mode
is_whitebalance_mode_valid_func_t is_whitebalance_mode_valid
set_whitebalance_mode_func_t set_whitebalance_mode
get_supported_whitebalance_func_t get_supported_whitebalance
set_whitebalance_func_t set_whitebalance
get_whitebalance_func_t get_whitebalance
is_feature_capable_func_t is_feature_capable
allocate_preview_buffer_func_t allocate_preview_buffer
free_preview_buffer_func_t free_preview_buffer
get_supported_sharpness_func_t get_supported_sharpness
set_sharpness_func_t set_sharpness
get_supported_hue_func_t get_supported_hue
set_hue_func_t set_hue
get_supported_saturation_func_t get_supported_saturation
set_saturation_func_t set_saturation
get_default_image_attributes_func_t get_default_image_attributes
get_supported_wb_rb_gain_func_t get_supported_wb_rb_gain
set_manual_wb_rb_gain_func_t set_manual_wb_rb_gain
get_manual_wb_rb_gain_func_t get_manual_wb_rb_gain
get_default_wb_mode_func_t get_default_wb_mode
set_exposure_mode_func_t set_exposure_mode
is_exposure_mode_valid_func_t is_exposure_mode_valid
get_supported_shutter_speeds_func_t get_supported_shutter_speeds
get_default_shutter_speed_func_t get_default_shutter_speed
get_supported_ISO_values_func_t get_supported_ISO_values
get_default_ISO_value_func_t get_default_ISO_value
get_manual_shutter_speed_func_t get_manual_shutter_speed
get_manual_ISO_value_func_t get_manual_ISO_value
set_manual_shutter_speed_func_t set_manual_shutter_speed
set_manual_ISO_value_func_t set_manual_ISO_value
get_supported_ev_offsets_func_t get_supported_ev_offsets
set_ev_offset_func_t set_ev_offset
get_ev_offset_func_t get_ev_offset
configure_preview_func_t configure_preview
get_preview_buffer_size_func_t get_preview_buffer_size

Library:

libcamapi

Description:

The external camera library must define an instance of this structure named external_camera_defs that the Sensor service will use to interface with the camera driver. For more information, see the introduction to external_camera_api.h.