Fix camera-vflip/hflip
support on arm32v7
This adds `buffer_list_alloc_buffers` and `buffer_list_free_buffers` to delay buffers allocation for `libcamera`. Doing this allows to setup RAW stream afterwards.
This commit is contained in:
@ -58,18 +58,6 @@ static int camera_configure_input_libcamera(camera_t *camera)
|
||||
|
||||
camera->camera->opts.allow_dma = camera->options.allow_dma;
|
||||
|
||||
buffer_format_t raw_fmt = {
|
||||
.width = camera->options.width,
|
||||
.height = camera->options.height,
|
||||
.nbufs = camera->options.nbufs,
|
||||
.type = BUFFER_TYPE_RAW
|
||||
};
|
||||
|
||||
buffer_list_t *raw_capture = device_open_buffer_list(camera->camera, true, raw_fmt, true);
|
||||
if (!raw_capture) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
buffer_format_t capture_fmt = {
|
||||
.width = camera->options.width,
|
||||
.height = camera->options.height,
|
||||
@ -91,6 +79,25 @@ static int camera_configure_input_libcamera(camera_t *camera)
|
||||
return -1;
|
||||
}
|
||||
|
||||
buffer_format_t raw_fmt = {
|
||||
.width = camera->options.width,
|
||||
.height = camera->options.height,
|
||||
.nbufs = camera->options.nbufs,
|
||||
.type = BUFFER_TYPE_RAW
|
||||
};
|
||||
|
||||
buffer_list_t *raw_capture = device_open_buffer_list(camera->camera, true, raw_fmt, true);
|
||||
if (!raw_capture) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (buffer_list_alloc_buffers(camera_capture) < 0) {
|
||||
return -1;
|
||||
}
|
||||
if (buffer_list_alloc_buffers(raw_capture) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return camera_configure_pipeline(camera, camera_capture);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user