Skip to content

Commit

Permalink
Merge branch 'feature/support_sensor_stats' into 'master'
Browse files Browse the repository at this point in the history
feat(esp_video): Support sensor statistics

Closes AEG-2027, AEG-2025, and AEG-1985

See merge request espressif/esp-video-components!215
  • Loading branch information
wujiangang committed Dec 6, 2024
2 parents 26afd05 + dfe754e commit 3204021
Show file tree
Hide file tree
Showing 16 changed files with 217 additions and 82 deletions.
2 changes: 1 addition & 1 deletion esp_cam_sensor/sensors/bf3925/bf3925.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ static esp_err_t bf3925_query_para_desc(esp_cam_sensor_device_t *dev, esp_cam_se
qdesc->default_value = BF3925_WB_AUTO;
break;
default: {
ESP_LOGE(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ESP_LOGD(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ret = ESP_ERR_INVALID_ARG;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion esp_cam_sensor/sensors/gc0308/gc0308.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ static esp_err_t gc0308_query_para_desc(esp_cam_sensor_device_t *dev, esp_cam_se
qdesc->default_value = 0;
break;
default: {
ESP_LOGE(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ESP_LOGD(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ret = ESP_ERR_INVALID_ARG;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion esp_cam_sensor/sensors/gc2145/gc2145.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ static esp_err_t gc2145_query_para_desc(esp_cam_sensor_device_t *dev, esp_cam_se
qdesc->default_value = GC2145_WB_AUTO;
break;
default: {
ESP_LOGE(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ESP_LOGD(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ret = ESP_ERR_INVALID_ARG;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion esp_cam_sensor/sensors/ov2640/ov2640.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ static esp_err_t ov2640_query_para_desc(esp_cam_sensor_device_t *dev, esp_cam_se
qdesc->default_value = 0;
break;
default: {
ESP_LOGE(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ESP_LOGD(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ret = ESP_ERR_INVALID_ARG;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion esp_cam_sensor/sensors/ov2710/ov2710.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ static esp_err_t ov2710_query_para_desc(esp_cam_sensor_device_t *dev, esp_cam_se
qdesc->u8.size = sizeof(esp_cam_sensor_stats_t);
break;
default: {
ESP_LOGE(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ESP_LOGD(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ret = ESP_ERR_INVALID_ARG;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion esp_cam_sensor/sensors/ov5645/ov5645.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ static esp_err_t ov5645_query_para_desc(esp_cam_sensor_device_t *dev, esp_cam_se
qdesc->default_value = 0;
break;
default: {
ESP_LOGE(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ESP_LOGD(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ret = ESP_ERR_INVALID_ARG;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion esp_cam_sensor/sensors/ov5647/ov5647.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ static esp_err_t ov5647_query_para_desc(esp_cam_sensor_device_t *dev, esp_cam_se
qdesc->default_value = OV5647_AE_TARGET_DEFAULT;
break;
default: {
ESP_LOGE(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ESP_LOGD(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ret = ESP_ERR_INVALID_ARG;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion esp_cam_sensor/sensors/sc030iot/sc030iot.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static esp_err_t sc030iot_query_para_desc(esp_cam_sensor_device_t *dev, esp_cam_
qdesc->default_value = 0;
break;
default: {
ESP_LOGE(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ESP_LOGD(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ret = ESP_ERR_INVALID_ARG;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion esp_cam_sensor/sensors/sc035hgs/sc035hgs.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ static esp_err_t sc035hgs_query_para_desc(esp_cam_sensor_device_t *dev, esp_cam_
qdesc->default_value = 0;
break;
default: {
ESP_LOGE(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ESP_LOGD(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ret = ESP_ERR_INVALID_ARG;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion esp_cam_sensor/sensors/sc101iot/sc101iot.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ static esp_err_t sc101iot_query_para_desc(esp_cam_sensor_device_t *dev, esp_cam_
qdesc->default_value = 0;
break;
default: {
ESP_LOGE(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ESP_LOGD(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ret = ESP_ERR_INVALID_ARG;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion esp_cam_sensor/sensors/sc202cs/sc202cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ static esp_err_t sc202cs_query_para_desc(esp_cam_sensor_device_t *dev, esp_cam_s
qdesc->default_value = 0;
break;
default: {
ESP_LOGE(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ESP_LOGD(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ret = ESP_ERR_INVALID_ARG;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion esp_cam_sensor/sensors/sc2336/sc2336.c
Original file line number Diff line number Diff line change
Expand Up @@ -1451,7 +1451,7 @@ static esp_err_t sc2336_query_para_desc(esp_cam_sensor_device_t *dev, esp_cam_se
qdesc->default_value = 0;
break;
default: {
ESP_LOGE(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ESP_LOGD(TAG, "id=%"PRIx32" is not supported", qdesc->id);
ret = ESP_ERR_INVALID_ARG;
break;
}
Expand Down
3 changes: 3 additions & 0 deletions esp_video/include/esp_video_ioctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ extern "C" {
#define VIDIOC_S_SENSOR_FMT _IOWR('V', BASE_VIDIOC_PRIVATE + 1, esp_cam_sensor_format_t)
#define VIDIOC_G_SENSOR_FMT _IOWR('V', BASE_VIDIOC_PRIVATE + 2, esp_cam_sensor_format_t)

#define V4L2_CID_CAMERA_AE_LEVEL (V4L2_CID_CAMERA_CLASS_BASE + 40)
#define V4L2_CID_CAMERA_STATS (V4L2_CID_CAMERA_CLASS_BASE + 41)

#ifdef __cplusplus
}
#endif
2 changes: 1 addition & 1 deletion esp_video/src/esp_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,7 @@ esp_err_t esp_video_query_ext_control(struct esp_video *video, struct v4l2_query
if (ret == ESP_ERR_NOT_SUPPORTED) {
return ret;
} else if (ret != ESP_OK) {
ESP_LOGE(TAG, "video->ops->query_ext_ctrl=%x", ret);
ESP_LOGD(TAG, "video->ops->query_ext_ctrl=%x", ret);
return ret;
}
} else {
Expand Down
Loading

0 comments on commit 3204021

Please sign in to comment.