summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2017-11-27 12:06:53 +0100
committerSylwester Nawrocki <s.nawrocki@samsung.com>2017-11-27 15:50:13 +0100
commitb0433827fd73ed41f504699a1ed158d3de603fa3 (patch)
treed53b5dbd7f45db2de086628f9195364fbd9be2e3
parentdde31ebb936c733f4185cd215b6ba96c980afeec (diff)
downloadgst-plugins-camera-n4-b0433827fd73ed41f504699a1ed158d3de603fa3.tar.gz
gst-plugins-camera-n4-b0433827fd73ed41f504699a1ed158d3de603fa3.tar.bz2
gst-plugins-camera-n4-b0433827fd73ed41f504699a1ed158d3de603fa3.zip
Rename _camerasrc_set_shot_meta functions
No functional changes. Make it clear which function applies to which camera. Eventually these functions should be split/removed. Change-Id: I12b12635d9c8c60e4e54c7ca261f3bdd7f9f8c69 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
-rw-r--r--camerasrc/src/camerasrc.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/camerasrc/src/camerasrc.c b/camerasrc/src/camerasrc.c
index 9003d0e..07ab539 100644
--- a/camerasrc/src/camerasrc.c
+++ b/camerasrc/src/camerasrc.c
@@ -154,9 +154,9 @@ int _camerasrc_get_autofocusing_result(camerasrc_handle_t *handle);
int _camerasrc_get_frame_data(camerasrc_handle_t *handle, camerasrc_frame_data_t *data);
int _camerasrc_get_exif_info(camerasrc_handle_t *handle, camerasrc_buffer_t *exif_string);
-static int _camerasrc_set_shot_meta(camerasrc_handle_t *p, unsigned int grpid, int fcount,
+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_set_shot_meta2(camerasrc_handle_t *p, unsigned int grpid, int fcount,
+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_get_device_type_string(camerasrc_handle_t *p, int fd, int type, char **device_string, char **type_string);
@@ -1407,7 +1407,7 @@ static void *_camerasrc_front_isp_thread_func(void *arg)
p->request_count++;
/* Set 3AA metadata */
- _camerasrc_set_shot_meta(p, GRP_3AA, p->request_count, timestamp, shot_sensor);
+ _camerasrc_secondary_set_metadata(p, GRP_3AA, p->request_count, timestamp, shot_sensor);
/* Queue 3AA1 capture buffer (empty) */
ret = _camerasrc_ioctl_qbuf(p, p->fd_3aa1,
@@ -1484,7 +1484,7 @@ static void *_camerasrc_front_isp_thread_func(void *arg)
memcpy(&shot_isp->shot.udm, &shot_3aa->shot.udm, sizeof(struct camera2_udm));
memcpy(&shot_isp->shot.dm, &shot_3aa->shot.dm, sizeof(struct camera2_dm));
#endif
- _camerasrc_set_shot_meta(p, GRP_ISP, p->request_count, timestamp, shot_isp);
+ _camerasrc_secondary_set_metadata(p, GRP_ISP, p->request_count, timestamp, shot_isp);
/* ISP - QBUF */
ret = _camerasrc_ioctl_qbuf(p,
@@ -1504,7 +1504,7 @@ static void *_camerasrc_front_isp_thread_func(void *arg)
camsrc_debug("[ISP] QBUF index %d", buf_index_isp);
/* SENSOR set shot meta */
- _camerasrc_set_shot_meta2(p, GRP_SENSOR, 0, 0, shot_sensor);
+ _camerasrc_primary_set_metadata(p, GRP_SENSOR, 0, 0, shot_sensor);
/* SENSOR - QBUF */
ret = _camerasrc_ioctl_qbuf(p,
@@ -1666,7 +1666,7 @@ void *_camerasrc_rear_isp_thread_func(void *arg)
/* Queue buffer back to the sensor video node */
- _camerasrc_set_shot_meta2(p, GRP_SENSOR, 0, 0, shot_sensor);
+ _camerasrc_primary_set_metadata(p, GRP_SENSOR, 0, 0, shot_sensor);
/* SENSOR - QBUF */
ret = _camerasrc_ioctl_qbuf(p,
@@ -1684,7 +1684,7 @@ void *_camerasrc_rear_isp_thread_func(void *arg)
p->qbuf_count_sensor++;
shot_3aa = (struct camera2_shot_ext *)p->buffer_3aa_out[buf_index_3aa_out].planes[1].start;
- _camerasrc_set_shot_meta2(p, GRP_3AA, 0, 0, shot_3aa);
+ _camerasrc_primary_set_metadata(p, GRP_3AA, 0, 0, shot_3aa);
/* 3AA0 OUTPUT - QBUF */
ret = _camerasrc_ioctl_qbuf(p,
@@ -2801,15 +2801,15 @@ int camerasrc_start_preview_stream(camsrc_handle_t handle)
if (p->buffer_sensor) {
if (p->cur_dev_id == CAMERASRC_DEV_ID_PRIMARY) {
- err = _camerasrc_set_shot_meta2(p, GRP_SENSOR, 0, 0,
+ err = _camerasrc_primary_set_metadata(p, GRP_SENSOR, 0, 0,
(struct camera2_shot_ext *)p->buffer_sensor[0].planes[1].start);
} else {
- err = _camerasrc_set_shot_meta(p, GRP_SENSOR, 0, 0,
+ err = _camerasrc_secondary_set_metadata(p, GRP_SENSOR, 0, 0,
(struct camera2_shot_ext *)p->buffer_sensor[0].planes[1].start);
}
if (err != CAMERASRC_SUCCESS) {
- camsrc_error("[SENSOR] _camerasrc_set_shot_meta index %d, failed[%x]", i, err);
+ camsrc_error("[SENSOR] _camerasrc_secondary_set_metadata index %d, failed[%x]", i, err);
return err;
}
@@ -2836,14 +2836,14 @@ int camerasrc_start_preview_stream(camsrc_handle_t handle)
for (i = 0 ; i < p->format_scp.num_buffers; i++) {
if (p->cur_dev_id == CAMERASRC_DEV_ID_PRIMARY) {
- err = _camerasrc_set_shot_meta2(p, GRP_SCP, 0, 0,
+ err = _camerasrc_primary_set_metadata(p, GRP_SCP, 0, 0,
(struct camera2_shot_ext *)p->buffer_scp[i].planes[2].start);
} else {
- err = _camerasrc_set_shot_meta(p, GRP_SCP, 0, 0,
+ err = _camerasrc_secondary_set_metadata(p, GRP_SCP, 0, 0,
(struct camera2_shot_ext *)p->buffer_scp[i].planes[2].start);
}
if (err != CAMERASRC_SUCCESS) {
- camsrc_error("[SCP] _camerasrc_set_shot_meta index %d, failed[%x]", i, err);
+ camsrc_error("[SCP] _camerasrc_secondary_set_metadata index %d, failed[%x]", i, err);
return err;
}
@@ -2962,9 +2962,9 @@ int camerasrc_start_preview_stream(camsrc_handle_t handle)
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_set_shot_meta2(p, GRP_3AA, 0, 0, shot_3aa);
+ err = _camerasrc_primary_set_metadata(p, GRP_3AA, 0, 0, shot_3aa);
if (err != CAMERASRC_SUCCESS) {
- camsrc_error("[TA] _camerasrc_set_shot_meta index %d, failed[%x]", i, err);
+ camsrc_error("[TA] Frame metadata setting (index %d) failed[%x]", i, err);
return err;
}
@@ -3026,9 +3026,9 @@ int camerasrc_start_preview_stream(camsrc_handle_t handle)
if (p->buffer_scc) {
for (i = 0 ; i < p->format_scc.num_buffers ; i++) {
- err = _camerasrc_set_shot_meta(p, GRP_SCC, i, 0, (struct camera2_shot_ext *)p->buffer_scc[i].planes[1].start);
+ err = _camerasrc_secondary_set_metadata(p, GRP_SCC, i, 0, (struct camera2_shot_ext *)p->buffer_scc[i].planes[1].start);
if (err != CAMERASRC_SUCCESS) {
- camsrc_error("[SCC] _camerasrc_set_shot_meta index %d, failed[%x]", i, err);
+ camsrc_error("[SCC] Frame metadata setting (index %d) failed[%x]", i, err);
return err;
}
@@ -4443,8 +4443,8 @@ int camerasrc_write_extra_dev_info(camsrc_handle_t handle, camerasrc_extra_info_
}
-static int _camerasrc_set_shot_meta2(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 int width = FIMC_IS_BAYER_IMG_WIDTH;
unsigned int height = FIMC_IS_BAYER_IMG_HEIGHT;
@@ -4584,7 +4584,7 @@ static int _camerasrc_set_shot_meta2(camerasrc_handle_t *p, unsigned int grpid,
}
-static int _camerasrc_set_shot_meta(camerasrc_handle_t *p, unsigned int grpid, int fcount,
+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)
{
if (p == NULL) {