Skip to content

Commit

Permalink
Camera: Add feature extensions
Browse files Browse the repository at this point in the history
This change includes below commits:

    Camera bringup changes system-core
    Change-Id: I1cf98641eca9096bd27645e07ea802646ea1fb96

    system/core: Fix for HAL compilation issues while integrating HAL 1.0
    Change-Id: Iead9c1ade279b64c5cbdf4d2de1a8b695939c52a

    Camera: Add enum to specify the frame type
    Added enum to specify the frame type of either fd/data buffer
    CRs-fixed: 654901
    Change-Id: I1c0b1a2c6a1425cdb6650cdfc20ca65835a1b81f

Change-Id: I654a40661e6e101da2a06986abeceb20639cccd9
  • Loading branch information
Sauhard Pande authored and Khalvat-M committed Mar 21, 2024
1 parent 0103602 commit 41e4b2c
Showing 1 changed file with 52 additions and 1 deletion.
53 changes: 52 additions & 1 deletion libsystem/include/system/camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,20 @@ enum {
// Notify on autofocus start and stop. This is useful in continuous
// autofocus - FOCUS_MODE_CONTINUOUS_VIDEO and FOCUS_MODE_CONTINUOUS_PICTURE.
CAMERA_MSG_FOCUS_MOVE = 0x0800, // notifyCallback
CAMERA_MSG_VENDOR_START = 0x1000,
CAMERA_MSG_STATS_DATA = CAMERA_MSG_VENDOR_START,
CAMERA_MSG_META_DATA = 0x2000,
CAMERA_MSG_VENDOR_END = 0x8000,
CAMERA_MSG_ALL_MSGS = 0xFFFF
};

/** meta data type in CameraMetaDataCallback */
enum {
CAMERA_META_DATA_ASD = 0x001, //ASD data
CAMERA_META_DATA_FD = 0x002, //FD/FP data
CAMERA_META_DATA_HDR = 0x003, //Auto HDR data
};

/** cmdType in sendCommand functions */
enum {
CAMERA_CMD_START_SMOOTH_ZOOM = 1,
Expand Down Expand Up @@ -189,7 +200,25 @@ enum {
* IMPLEMENTATION_DEFINED, then HALv3 devices will use gralloc usage flags
* of SW_READ_OFTEN.
*/
CAMERA_CMD_SET_VIDEO_FORMAT = 11
CAMERA_CMD_SET_VIDEO_FORMAT = 11,

CAMERA_CMD_VENDOR_START = 20,
/**
* Commands to enable/disable preview histogram
*
* Based on user's input to enable/disable histogram from the camera
* UI, send the appropriate command to the HAL to turn on/off the histogram
* stats and start sending the data to the application.
*/
CAMERA_CMD_HISTOGRAM_ON = CAMERA_CMD_VENDOR_START,
CAMERA_CMD_HISTOGRAM_OFF = CAMERA_CMD_VENDOR_START + 1,
CAMERA_CMD_HISTOGRAM_SEND_DATA = CAMERA_CMD_VENDOR_START + 2,
CAMERA_CMD_LONGSHOT_ON = CAMERA_CMD_VENDOR_START + 3,
CAMERA_CMD_LONGSHOT_OFF = CAMERA_CMD_VENDOR_START + 4,
CAMERA_CMD_STOP_LONGSHOT = CAMERA_CMD_VENDOR_START + 5,
CAMERA_CMD_METADATA_ON = CAMERA_CMD_VENDOR_START + 6,
CAMERA_CMD_METADATA_OFF = CAMERA_CMD_VENDOR_START + 7,
CAMERA_CMD_VENDOR_END = 200,
};

/** camera fatal errors */
Expand Down Expand Up @@ -284,9 +313,31 @@ typedef struct camera_face {
* -2000, -2000 if this is not supported.
*/
int32_t mouth[2];
int32_t smile_degree;
int32_t smile_score;
int32_t blink_detected;
int32_t face_recognised;
int32_t gaze_angle;
int32_t updown_dir;
int32_t leftright_dir;
int32_t roll_dir;
int32_t left_right_gaze;
int32_t top_bottom_gaze;
int32_t leye_blink;
int32_t reye_blink;

} camera_face_t;

/**
* The information of a data type received in a camera frame.
*/
typedef enum {
/** Data buffer */
CAMERA_FRAME_DATA_BUF = 0x000,
/** File descriptor */
CAMERA_FRAME_DATA_FD = 0x100
} camera_frame_data_type_t;

/**
* The metadata of the frame data.
*/
Expand Down

0 comments on commit 41e4b2c

Please sign in to comment.