int _camerasrc_get_exif_info(camerasrc_handle_t *handle, camerasrc_buffer_t *exif_string);
static int _camerasrc_secondary_set_metadata(camerasrc_handle_t *p, unsigned int grpid, int fcount,
- unsigned long long timestamp, struct camera2_shot_ext *shot_ext);
-static int _camerasrc_primary_set_metadata(camerasrc_handle_t *p, unsigned int grpid, int fcount,
- unsigned long long timestamp, struct camera2_shot_ext *shot_ext);
+ unsigned long long timestamp, struct camera2_shot_ext *shot_ext);
+static int _camerasrc_primary_set_metadata(camerasrc_handle_t *p, unsigned int grpid,
+ struct camera2_shot_ext *shot_ext);
-static int _camerasrc_get_device_type_string(camerasrc_handle_t *p, int fd, int type, char **device_string, char **type_string);
+static int _camerasrc_get_device_type_string(camerasrc_handle_t *p, int fd, int type,
+ char **device_string, char **type_string);
/* media definitions */
/* Queue buffer back to the sensor video node */
- _camerasrc_primary_set_metadata(p, GRP_SENSOR, 0, 0, shot_sensor);
+ _camerasrc_primary_set_metadata(p, GRP_SENSOR, shot_sensor);
/* SENSOR - QBUF */
ret = _camerasrc_ioctl_qbuf(p,
p->qbuf_count_sensor++;
shot_3aa = (struct camera2_shot_ext *)p->buffer_3aa_out[buf_index_3aa_out].planes[1].start;
- _camerasrc_primary_set_metadata(p, GRP_3AA, 0, 0, shot_3aa);
+ _camerasrc_primary_set_metadata(p, GRP_3AA, shot_3aa);
/* 3AA0 OUTPUT - QBUF */
ret = _camerasrc_ioctl_qbuf(p,
if (p->buffer_sensor) {
if (p->cur_dev_id == CAMERASRC_DEV_ID_PRIMARY) {
- err = _camerasrc_primary_set_metadata(p, GRP_SENSOR, 0, 0,
+ err = _camerasrc_primary_set_metadata(p, GRP_SENSOR,
(struct camera2_shot_ext *)p->buffer_sensor[0].planes[1].start);
} else {
err = _camerasrc_secondary_set_metadata(p, GRP_SENSOR, 0, 0,
for (i = 0 ; i < p->format_scp.num_buffers; i++) {
if (p->cur_dev_id == CAMERASRC_DEV_ID_PRIMARY) {
- err = _camerasrc_primary_set_metadata(p, GRP_SCP, 0, 0,
+ err = _camerasrc_primary_set_metadata(p, GRP_SCP,
(struct camera2_shot_ext *)p->buffer_scp[i].planes[2].start);
} else {
err = _camerasrc_secondary_set_metadata(p, GRP_SCP, 0, 0,
for (i = 0 ; i < p->format_isp.num_buffers; i++) {
struct camera2_shot_ext *shot_3aa = (struct camera2_shot_ext *)p->buffer_3aa_out[i].planes[1].start;
- err = _camerasrc_primary_set_metadata(p, GRP_3AA, 0, 0, shot_3aa);
+ err = _camerasrc_primary_set_metadata(p, GRP_3AA, shot_3aa);
if (err != CAMERASRC_SUCCESS) {
camsrc_error("[TA] Frame metadata setting (index %d) failed[%x]", i, err);
return err;
}
-static int _camerasrc_primary_set_metadata(camerasrc_handle_t *p, unsigned int grpid, int fcount,
- unsigned long long timestamp, struct camera2_shot_ext *shot_ext)
+static int _camerasrc_primary_set_metadata(camerasrc_handle_t *p, unsigned int grpid,
+ struct camera2_shot_ext *shot_ext)
{
unsigned int width = FIMC_IS_BAYER_IMG_WIDTH;
unsigned int height = FIMC_IS_BAYER_IMG_HEIGHT;
return CAMERASRC_ERR_NULL_POINTER;
}
- if (grpid == GRP_ISP)
- return CAMERASRC_SUCCESS;
-
memset(shot_ext, 0, sizeof(struct camera2_shot_ext));
shot_ext->drc_bypass = 1;
- shot_ext->dis_bypass = 1;
- shot_ext->dnr_bypass = 1;
+ shot_ext->dis_bypass = 1;
+ shot_ext->dnr_bypass = 1;
shot_ext->fd_bypass = 1;
shot_ext->setfile = 0;
- /* shot_ext->free_cnt = 5; */
shot_ext->shot.ctl.request.metadataMode = METADATA_MODE_FULL;
shot_ext->shot.ctl.lens.aperture = 2.26999998;
if (grpid == GRP_3AA) {
shot_ext->setfile = 0;
-#if 1
+
shot_ext->node_group.leader.vid = FIMC_IS_VIDEO_3A0_NUM;
shot_ext->node_group.leader.request = 1;
shot_ext->node_group.leader.input.cropRegion[0] = 0;
shot_ext->node_group.leader.output.cropRegion[1] = 0;
shot_ext->node_group.leader.output.cropRegion[2] = width + 88; /* 2648 */
shot_ext->node_group.leader.output.cropRegion[3] = height + 50; /* 1490 */;
-#endif
-#if 1
+
shot_ext->node_group.capture[1].vid = FIMC_IS_VIDEO_3A0P_NUM;
shot_ext->node_group.capture[1].request = 1;
shot_ext->node_group.capture[1].input.cropRegion[0] = 0;
shot_ext->node_group.capture[1].output.cropRegion[1] = 0;
shot_ext->node_group.capture[1].output.cropRegion[2] = width;
shot_ext->node_group.capture[1].output.cropRegion[3] = height;
-#endif
-#if 0
- /* FIXME: is this needed? */
- shot_ext->shot.ctl.scaler.cropRegion[0] = 0x3f800000;
- shot_ext->shot.ctl.scaler.cropRegion[1] = 0;
- shot_ext->shot.ctl.scaler.cropRegion[2] = width;
- shot_ext->shot.ctl.scaler.cropRegion[3] = height;
-#endif
-// shot_ext->shot.ctl.aa.aeTargetFpsRange[0] = 10;
-// shot_ext->shot.ctl.aa.aeTargetFpsRange[1] = 30;
}
if (grpid != GRP_SENSOR) {
shot_ext->shot.dm.request.metadataMode = METADATA_MODE_NONE;
- shot_ext->shot.dm.request.frameCount = fcount;
- shot_ext->shot.dm.sensor.timeStamp = timestamp;
-
-// shot_ext->shot.dm.entry.lowIndexParam = 0;
-// shot_ext->shot.dm.entry.highIndexParam = 0;
-
-// shot_ext->shot.ctl.entry.lowIndexParam = 0;
-// shot_ext->shot.ctl.entry.highIndexParam = 0;
-
+ shot_ext->shot.dm.request.frameCount = 0;
+ shot_ext->shot.dm.sensor.timeStamp = 0;
}
- camsrc_debug("grpid: %d fcount: %d", grpid, fcount);
-
shot_ext->shot.magicNumber = METADATA_MAGIC_NUMBER;
return CAMERASRC_SUCCESS;
static int _camerasrc_secondary_set_metadata(camerasrc_handle_t *p, unsigned int grpid, int fcount,
- unsigned long long timestamp, struct camera2_shot_ext *shot_ext)
+ unsigned long long timestamp, struct camera2_shot_ext *shot_ext)
{
if (p == NULL) {
camsrc_error("NULL handle");