Fail on wrong resolution
This commit is contained in:
@ -73,8 +73,12 @@ static int camera_configure_jpeg_output(camera_t *camera, buffer_list_t *src_cap
|
||||
|
||||
int camera_configure_output(camera_t *camera, buffer_list_t *src_capture, int res)
|
||||
{
|
||||
return camera_configure_h264_output(camera, src_capture, res) == 0 &&
|
||||
camera_configure_jpeg_output(camera, src_capture, res) == 0;
|
||||
if (camera_configure_h264_output(camera, src_capture, res) < 0 ||
|
||||
camera_configure_jpeg_output(camera, src_capture, res) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int camera_configure_output_rescaler2(camera_t *camera, buffer_list_t *src_capture, float div, int res)
|
||||
|
@ -118,7 +118,8 @@ int v4l2_buffer_list_open(buffer_list_t *buf_list)
|
||||
|
||||
if (buf_list->fmt.width != fmt.width || buf_list->fmt.height != fmt.height) {
|
||||
if (fmt.bytesperline) {
|
||||
LOG_ERROR(buf_list, "Requested resolution=%ux%u is unavailable. Got %ux%u.",
|
||||
LOG_ERROR(buf_list, "Requested resolution=%ux%u is unavailable. Got %ux%u. "
|
||||
"Consider using the `-camera-high_res_factor=2` or `-camera-low_res_factor=3`",
|
||||
fmt.width, fmt.height, buf_list->fmt.width, buf_list->fmt.height);
|
||||
} else {
|
||||
LOG_INFO(buf_list, "Requested resolution=%ux%u is unavailable. Got %ux%u. Accepted",
|
||||
|
Reference in New Issue
Block a user