Remove dependency on output_list
and capture_list
to create a pipeline
This commit is contained in:
@ -38,6 +38,13 @@ typedef struct camera_options_s {
|
||||
} h264;
|
||||
} camera_options_t;
|
||||
|
||||
typedef struct camera_pipeline_s {
|
||||
int index;
|
||||
buffer_list_t *capture;
|
||||
unsigned width, height, format;
|
||||
float res_factor;
|
||||
} camera_pipeline_t;
|
||||
|
||||
typedef struct camera_s {
|
||||
const char *name;
|
||||
|
||||
|
@ -9,60 +9,60 @@
|
||||
#include "device/buffer_list.h"
|
||||
#include "http/http.h"
|
||||
|
||||
int camera_configure_decoder(camera_t *camera, buffer_list_t *camera_src)
|
||||
int camera_configure_decoder(camera_t *camera, buffer_list_t *camera_capture)
|
||||
{
|
||||
buffer_list_t *src = camera_src;
|
||||
buffer_list_t *src = camera_capture;
|
||||
device_video_force_key(camera->camera);
|
||||
|
||||
camera->decoder = device_v4l2_open("DECODER", "/dev/video10");
|
||||
|
||||
if (!device_open_buffer_list_output(camera->decoder, src)) {
|
||||
return -1;
|
||||
buffer_list_t *decoder_output = device_open_buffer_list_output(camera->decoder, src);
|
||||
buffer_list_t *decoder_capture = device_open_buffer_list_capture(camera->decoder, decoder_output, 1.0, 0, true);
|
||||
|
||||
link_t *links = camera->links;
|
||||
link_t *camera_link = &*links++;
|
||||
link_t *decoder_link = &*links++;
|
||||
|
||||
*camera_link = (link_t){ camera_capture, { decoder_output }, {} };
|
||||
*decoder_link = (link_t){ decoder_capture, { }, { } };
|
||||
buffer_list_t **decoder_sinks = &decoder_link->sinks[0];
|
||||
|
||||
if (camera_capture->fmt.format == V4L2_PIX_FMT_MJPEG || camera_capture->fmt.format == V4L2_PIX_FMT_JPEG) {
|
||||
camera_link->callbacks.on_buffer = http_jpeg_capture;
|
||||
camera_link->callbacks.validate_buffer = http_jpeg_needs_buffer;
|
||||
} else {
|
||||
camera->codec_jpeg = device_v4l2_open("JPEG", "/dev/video31");
|
||||
|
||||
buffer_list_t *jpeg_output = device_open_buffer_list_output(camera->codec_jpeg, decoder_capture);
|
||||
buffer_list_t *jpeg_capture = device_open_buffer_list_capture(camera->codec_jpeg, jpeg_output, 1.0, V4L2_PIX_FMT_JPEG, true);
|
||||
|
||||
if (!jpeg_capture) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
*decoder_sinks++ = jpeg_output;
|
||||
*links++ = (link_t){ jpeg_capture, { }, { http_jpeg_capture, http_jpeg_needs_buffer } };
|
||||
}
|
||||
|
||||
if (!device_open_buffer_list_capture(camera->decoder, NULL, 1.0, 0, true)) {
|
||||
return -1;
|
||||
if (camera_capture->fmt.format == V4L2_PIX_FMT_H264) {
|
||||
camera_link->callbacks.on_buffer = http_h264_capture;
|
||||
camera_link->callbacks.validate_buffer = http_h264_needs_buffer;
|
||||
} else {
|
||||
camera->codec_h264 = device_v4l2_open("H264", "/dev/video11");
|
||||
|
||||
buffer_list_t *h264_output = device_open_buffer_list_output(camera->codec_jpeg, decoder_capture);
|
||||
buffer_list_t *h264_capture = device_open_buffer_list_capture(camera->codec_jpeg, h264_output, 1.0, V4L2_PIX_FMT_H264, true);
|
||||
|
||||
if (!h264_output) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
*decoder_sinks++ = h264_output;
|
||||
*links++ = (link_t){ h264_capture, { }, { http_h264_capture, http_h264_needs_buffer } };
|
||||
}
|
||||
|
||||
if (device_set_decoder_start(camera->decoder, true) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
src = camera->decoder->capture_list;
|
||||
|
||||
if (camera_src->fmt.format != V4L2_PIX_FMT_MJPEG && camera_src->fmt.format != V4L2_PIX_FMT_JPEG) {
|
||||
camera->codec_jpeg = device_v4l2_open("JPEG", "/dev/video31");
|
||||
|
||||
if (!device_open_buffer_list_output(camera->codec_jpeg, src) ||
|
||||
!device_open_buffer_list_capture(camera->codec_jpeg, src, 1.0, V4L2_PIX_FMT_JPEG, true)) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (camera_src->fmt.format != V4L2_PIX_FMT_H264) {
|
||||
camera->codec_h264 = device_v4l2_open("H264", "/dev/video11");
|
||||
|
||||
if (!device_open_buffer_list_output(camera->codec_h264, src) ||
|
||||
!device_open_buffer_list_capture(camera->codec_h264, src, 1.0, V4L2_PIX_FMT_H264, true)) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
link_t *links = camera->links;
|
||||
|
||||
if (camera_src->fmt.format == V4L2_PIX_FMT_MJPEG || camera_src->fmt.format == V4L2_PIX_FMT_JPEG) {
|
||||
*links++ = (link_t){ camera->camera->capture_list, { camera->decoder->output_list }, { http_jpeg_capture, http_jpeg_needs_buffer } };
|
||||
*links++ = (link_t){ camera->decoder->capture_list, { camera->codec_h264->output_list } };
|
||||
*links++ = (link_t){ camera->codec_h264->capture_list, { }, { http_h264_capture, http_h264_needs_buffer } };
|
||||
} else if (camera_src->fmt.format == V4L2_PIX_FMT_H264) {
|
||||
*links++ = (link_t){ camera->camera->capture_list, { camera->decoder->output_list }, { http_h264_capture, http_h264_needs_buffer }};
|
||||
*links++ = (link_t){ camera->decoder->capture_list, { camera->codec_jpeg->output_list } };
|
||||
*links++ = (link_t){ camera->codec_jpeg->capture_list, { }, { http_jpeg_capture, http_jpeg_needs_buffer } };
|
||||
} else {
|
||||
*links++ = (link_t){ camera->camera->capture_list, { camera->decoder->output_list } };
|
||||
*links++ = (link_t){ camera->decoder->capture_list, { camera->codec_jpeg->output_list, camera->codec_h264->output_list } };
|
||||
*links++ = (link_t){ camera->codec_jpeg->capture_list, { }, { http_jpeg_capture, http_jpeg_needs_buffer } };
|
||||
*links++ = (link_t){ camera->codec_h264->capture_list, { }, { http_h264_capture, http_h264_needs_buffer } };
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -9,28 +9,24 @@
|
||||
#include "device/buffer_list.h"
|
||||
#include "http/http.h"
|
||||
|
||||
int camera_configure_direct(camera_t *camera, buffer_list_t *src)
|
||||
int camera_configure_direct(camera_t *camera, buffer_list_t *camera_capture)
|
||||
{
|
||||
camera->codec_jpeg = device_v4l2_open("JPEG", "/dev/video31");
|
||||
camera->codec_h264 = device_v4l2_open("H264", "/dev/video11");
|
||||
|
||||
buffer_list_t *jpeg_output = device_open_buffer_list_output(camera->codec_jpeg, src);
|
||||
buffer_list_t *h264_output = device_open_buffer_list_output(camera->codec_h264, src);
|
||||
if (!jpeg_output || !h264_output) {
|
||||
return -1;
|
||||
}
|
||||
buffer_list_t *jpeg_output = device_open_buffer_list_output(camera->codec_jpeg, camera_capture);
|
||||
buffer_list_t *jpeg_capture = device_open_buffer_list_capture(camera->codec_jpeg, jpeg_output, 1.0, V4L2_PIX_FMT_JPEG, true);
|
||||
|
||||
if (!device_open_buffer_list_capture(camera->codec_jpeg, src, 1.0, V4L2_PIX_FMT_JPEG, true)) {
|
||||
return -1;
|
||||
}
|
||||
buffer_list_t *h264_output = device_open_buffer_list_output(camera->codec_h264, camera_capture);
|
||||
buffer_list_t *h264_capture = device_open_buffer_list_capture(camera->codec_h264, h264_output, 1.0, V4L2_PIX_FMT_H264, true);
|
||||
|
||||
if (!device_open_buffer_list_capture(camera->codec_h264, src, 1.0, V4L2_PIX_FMT_H264, true)) {
|
||||
if (!jpeg_capture || !h264_capture) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
link_t *links = camera->links;
|
||||
*links++ = (link_t){ src, { jpeg_output, h264_output} };
|
||||
*links++ = (link_t){ camera->codec_jpeg->capture_list, { }, { http_jpeg_capture, http_jpeg_needs_buffer } };
|
||||
*links++ = (link_t){ camera->codec_h264->capture_list, { }, { http_h264_capture, http_h264_needs_buffer } };
|
||||
*links++ = (link_t){ camera_capture, { jpeg_output, h264_output} };
|
||||
*links++ = (link_t){ jpeg_capture, { }, { http_jpeg_capture, http_jpeg_needs_buffer } };
|
||||
*links++ = (link_t){ h264_capture, { }, { http_h264_capture, http_h264_needs_buffer } };
|
||||
return 0;
|
||||
}
|
||||
|
@ -11,38 +11,36 @@
|
||||
|
||||
void write_yuvu(buffer_t *buffer);
|
||||
|
||||
int camera_configure_isp(camera_t *camera, buffer_list_t *src, float high_div, float low_div)
|
||||
int camera_configure_isp(camera_t *camera, buffer_list_t *camera_capture, float high_div, float low_div)
|
||||
{
|
||||
link_t *links = camera->links;
|
||||
|
||||
camera->isp_srgb = device_v4l2_open("ISP", "/dev/video13");
|
||||
camera->isp_yuuv = device_v4l2_open("ISP-YUUV", "/dev/video14");
|
||||
if (camera->isp_yuuv) {
|
||||
camera->isp_yuuv->output_device = camera->isp_srgb;
|
||||
}
|
||||
camera->codec_jpeg = device_v4l2_open("JPEG", "/dev/video31");
|
||||
camera->codec_h264 = device_v4l2_open("H264", "/dev/video11");
|
||||
|
||||
if (!device_open_buffer_list_output(camera->isp_srgb, src) ||
|
||||
!device_open_buffer_list_capture(camera->isp_yuuv, camera->isp_srgb->output_list, high_div, V4L2_PIX_FMT_YUYV, true)) {
|
||||
buffer_list_t *isp_output = device_open_buffer_list_output(camera->isp_srgb, camera_capture);
|
||||
buffer_list_t *isp_capture = device_open_buffer_list_capture(camera->isp_yuuv, isp_output, high_div, V4L2_PIX_FMT_YUYV, true);
|
||||
|
||||
*links++ = (link_t){ camera_capture, { isp_output } };
|
||||
|
||||
buffer_list_t *jpeg_output = device_open_buffer_list_output(camera->codec_jpeg, isp_capture);
|
||||
buffer_list_t *jpeg_capture = device_open_buffer_list_capture(camera->codec_jpeg, jpeg_output, 1.0, V4L2_PIX_FMT_JPEG, true);
|
||||
|
||||
buffer_list_t *h264_output = device_open_buffer_list_output(camera->codec_h264, isp_capture);
|
||||
buffer_list_t *h264_capture = device_open_buffer_list_capture(camera->codec_h264, h264_output, 1.0, V4L2_PIX_FMT_H264, true);
|
||||
|
||||
if (!jpeg_capture || !h264_capture) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
camera->isp_yuuv->output_device = camera->isp_srgb;
|
||||
|
||||
link_t *links = camera->links;
|
||||
*links++ = (link_t){ src, { camera->isp_srgb->output_list } };
|
||||
|
||||
src = camera->isp_yuuv->capture_list;
|
||||
|
||||
if (!device_open_buffer_list_output(camera->codec_jpeg, src) ||
|
||||
!device_open_buffer_list_capture(camera->codec_jpeg, src, 1.0, V4L2_PIX_FMT_JPEG, true) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!device_open_buffer_list_output(camera->codec_h264, src) ||
|
||||
!device_open_buffer_list_capture(camera->codec_h264, src, 1.0, V4L2_PIX_FMT_H264, true)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
*links++ = (link_t){ camera->isp_yuuv->capture_list, { camera->codec_jpeg->output_list, camera->codec_h264->output_list }, { write_yuvu } };
|
||||
*links++ = (link_t){ camera->codec_jpeg->capture_list, { }, { http_jpeg_capture, http_jpeg_needs_buffer } };
|
||||
*links++ = (link_t){ camera->codec_h264->capture_list, { }, { http_h264_capture, http_h264_needs_buffer } };
|
||||
*links++ = (link_t){ isp_capture, { jpeg_output, h264_output }, { write_yuvu } };
|
||||
*links++ = (link_t){ jpeg_capture, { }, { http_jpeg_capture, http_jpeg_needs_buffer } };
|
||||
*links++ = (link_t){ h264_capture, { }, { http_h264_capture, http_h264_needs_buffer } };
|
||||
|
||||
// all done
|
||||
if (low_div < 1) {
|
||||
@ -50,28 +48,26 @@ int camera_configure_isp(camera_t *camera, buffer_list_t *src, float high_div, f
|
||||
}
|
||||
|
||||
camera->isp_yuuv_lowres = device_v4l2_open("ISP-YUUV-LOW", "/dev/video15");
|
||||
if (camera->isp_yuuv_lowres) {
|
||||
camera->isp_yuuv_lowres->output_device = camera->isp_srgb;
|
||||
}
|
||||
camera->codec_jpeg_lowres = device_v4l2_open("JPEG-LOW", "/dev/video31");
|
||||
camera->codec_h264_lowres = device_v4l2_open("H264-LOW", "/dev/video11");
|
||||
|
||||
if (!device_open_buffer_list_capture(camera->isp_yuuv_lowres, camera->camera->capture_list, low_div, V4L2_PIX_FMT_YUYV, true)) {
|
||||
buffer_list_t *isp_lowres_capture = device_open_buffer_list_capture(camera->isp_yuuv_lowres, isp_output, low_div, V4L2_PIX_FMT_YUYV, true);
|
||||
|
||||
buffer_list_t *jpeg_lowres_output = device_open_buffer_list_output(camera->codec_jpeg_lowres, isp_lowres_capture);
|
||||
buffer_list_t *jpeg_lowres_capture = device_open_buffer_list_capture(camera->codec_jpeg_lowres, jpeg_lowres_output, 1.0, V4L2_PIX_FMT_JPEG, true);
|
||||
|
||||
buffer_list_t *h264_lowres_output = device_open_buffer_list_output(camera->codec_h264_lowres, isp_lowres_capture);
|
||||
buffer_list_t *h264_lowres_capture = device_open_buffer_list_capture(camera->codec_h264_lowres, h264_lowres_output, 1.0, V4L2_PIX_FMT_H264, true);
|
||||
|
||||
if (!jpeg_lowres_capture || !h264_lowres_capture) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
camera->isp_yuuv_lowres->output_device = camera->isp_srgb;
|
||||
src = camera->isp_yuuv_lowres->capture_list;
|
||||
|
||||
if (!device_open_buffer_list_output(camera->codec_jpeg_lowres, src) ||
|
||||
!device_open_buffer_list_capture(camera->codec_jpeg_lowres, src, 1.0, V4L2_PIX_FMT_JPEG, true)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!device_open_buffer_list_output(camera->codec_h264_lowres, src) ||
|
||||
!device_open_buffer_list_capture(camera->codec_h264_lowres, src, 1.0, V4L2_PIX_FMT_H264, true)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
*links++ = (link_t){ camera->isp_yuuv_lowres->capture_list, { camera->codec_jpeg_lowres->output_list, camera->codec_h264_lowres->output_list }, { write_yuvu } };
|
||||
*links++ = (link_t){ camera->codec_jpeg_lowres->capture_list, { }, { http_jpeg_lowres_capture, http_jpeg_needs_buffer } };
|
||||
*links++ = (link_t){ camera->codec_h264_lowres->capture_list, { }, { http_h264_lowres_capture, http_h264_needs_buffer } };
|
||||
*links++ = (link_t){ isp_capture, { jpeg_lowres_output, h264_lowres_output }, { write_yuvu } };
|
||||
*links++ = (link_t){ jpeg_lowres_capture, { }, { http_jpeg_lowres_capture, http_jpeg_needs_buffer } };
|
||||
*links++ = (link_t){ h264_lowres_capture, { }, { http_h264_lowres_capture, http_h264_needs_buffer } };
|
||||
return 0;
|
||||
}
|
||||
|
@ -21,34 +21,29 @@ void write_yuvu(buffer_t *buffer)
|
||||
#endif
|
||||
}
|
||||
|
||||
int camera_configure_legacy_isp(camera_t *camera, buffer_list_t *src, float div)
|
||||
int camera_configure_legacy_isp(camera_t *camera, buffer_list_t *camera_capture, float div)
|
||||
{
|
||||
camera->legacy_isp = device_v4l2_open("ISP", "/dev/video12");
|
||||
camera->codec_jpeg = device_v4l2_open("JPEG", "/dev/video31");
|
||||
camera->codec_h264 = device_v4l2_open("H264", "/dev/video11");
|
||||
|
||||
if (!device_open_buffer_list_output(camera->legacy_isp, src) ||
|
||||
!device_open_buffer_list_capture(camera->legacy_isp, src, div, V4L2_PIX_FMT_YUYV, true)) {
|
||||
return -1;
|
||||
}
|
||||
buffer_list_t *isp_output = device_open_buffer_list_output(camera->legacy_isp, camera_capture);
|
||||
buffer_list_t *isp_capture = device_open_buffer_list_capture(camera->legacy_isp, isp_output, div, V4L2_PIX_FMT_YUYV, true);
|
||||
|
||||
src = camera->legacy_isp->capture_list;
|
||||
buffer_list_t *jpeg_output = device_open_buffer_list_output(camera->codec_jpeg, isp_capture);
|
||||
buffer_list_t *jpeg_capture = device_open_buffer_list_capture(camera->codec_jpeg, jpeg_output, 1.0, V4L2_PIX_FMT_JPEG, true);
|
||||
|
||||
if (!device_open_buffer_list_output(camera->codec_jpeg, src) ||
|
||||
!device_open_buffer_list_capture(camera->codec_jpeg, src, 1.0, V4L2_PIX_FMT_JPEG, true)) {
|
||||
return -1;
|
||||
}
|
||||
buffer_list_t *h264_output = device_open_buffer_list_output(camera->codec_h264, isp_capture);
|
||||
buffer_list_t *h264_capture = device_open_buffer_list_capture(camera->codec_h264, h264_output, 1.0, V4L2_PIX_FMT_H264, true);
|
||||
|
||||
if (!device_open_buffer_list_output(camera->codec_h264, src) ||
|
||||
!device_open_buffer_list_capture(camera->codec_h264, src, 1.0, V4L2_PIX_FMT_H264, true)) {
|
||||
if (!jpeg_capture || !h264_capture) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
link_t *links = camera->links;
|
||||
|
||||
*links++ = (link_t){ camera->camera->capture_list, { camera->legacy_isp->output_list } };
|
||||
*links++ = (link_t){ camera->legacy_isp->capture_list, { camera->codec_jpeg->output_list, camera->codec_h264->output_list }, { write_yuvu, NULL } };
|
||||
*links++ = (link_t){ camera->codec_jpeg->capture_list, { }, { http_jpeg_capture, http_jpeg_needs_buffer } };
|
||||
*links++ = (link_t){ camera->codec_h264->capture_list, { }, { http_h264_capture, http_h264_needs_buffer } };
|
||||
*links++ = (link_t){ camera_capture, { isp_output } };
|
||||
*links++ = (link_t){ isp_capture, { jpeg_output, h264_output }, { write_yuvu, NULL } };
|
||||
*links++ = (link_t){ jpeg_capture, { }, { http_jpeg_capture, http_jpeg_needs_buffer } };
|
||||
*links++ = (link_t){ h264_capture, { }, { http_h264_capture, http_h264_needs_buffer } };
|
||||
return 0;
|
||||
}
|
||||
|
@ -16,17 +16,17 @@ int camera_configure_libcamera(camera_t *camera)
|
||||
|
||||
camera->camera->opts.allow_dma = camera->options.allow_dma;
|
||||
|
||||
buffer_list_t *src = device_open_buffer_list(camera->camera, true, camera->options.width / camera->options.high_res_factor, camera->options.height / camera->options.high_res_factor, camera->options.format, 0, camera->options.nbufs, true);
|
||||
if (!src) {
|
||||
buffer_list_t *camera_capture = device_open_buffer_list(camera->camera, true, camera->options.width / camera->options.high_res_factor, camera->options.height / camera->options.high_res_factor, camera->options.format, 0, camera->options.nbufs, true);
|
||||
if (!camera_capture) {
|
||||
goto error;
|
||||
}
|
||||
src->do_timestamps = true;
|
||||
camera_capture->do_timestamps = true;
|
||||
|
||||
if (camera->options.fps > 0) {
|
||||
src->fmt.interval_us = 1000 * 1000 / camera->options.fps;
|
||||
camera_capture->fmt.interval_us = 1000 * 1000 / camera->options.fps;
|
||||
}
|
||||
|
||||
if (camera_configure_direct(camera, src) < 0) {
|
||||
if (camera_configure_direct(camera, camera_capture) < 0) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
@ -21,17 +21,17 @@ int camera_configure_v4l2(camera_t *camera)
|
||||
camera->camera->opts.allow_dma = false;
|
||||
}
|
||||
|
||||
buffer_list_t *src = device_open_buffer_list(camera->camera, true, camera->options.width, camera->options.height, camera->options.format, 0, camera->options.nbufs, true);
|
||||
if (!src) {
|
||||
buffer_list_t *camera_capture = device_open_buffer_list(camera->camera, true, camera->options.width, camera->options.height, camera->options.format, 0, camera->options.nbufs, true);
|
||||
if (!camera_capture) {
|
||||
goto error;
|
||||
}
|
||||
src->do_timestamps = true;
|
||||
camera_capture->do_timestamps = true;
|
||||
|
||||
if (camera->options.fps > 0) {
|
||||
src->fmt.interval_us = 1000 * 1000 / camera->options.fps;
|
||||
camera_capture->fmt.interval_us = 1000 * 1000 / camera->options.fps;
|
||||
}
|
||||
|
||||
switch (src->fmt.format) {
|
||||
switch (camera_capture->fmt.format) {
|
||||
case V4L2_PIX_FMT_YUYV:
|
||||
case V4L2_PIX_FMT_YVYU:
|
||||
case V4L2_PIX_FMT_VYUY:
|
||||
@ -39,25 +39,25 @@ int camera_configure_v4l2(camera_t *camera)
|
||||
case V4L2_PIX_FMT_YUV420:
|
||||
case V4L2_PIX_FMT_RGB565:
|
||||
case V4L2_PIX_FMT_RGB24:
|
||||
if (camera_configure_direct(camera, src) < 0) {
|
||||
if (camera_configure_direct(camera, camera_capture) < 0) {
|
||||
goto error;
|
||||
}
|
||||
break;
|
||||
|
||||
case V4L2_PIX_FMT_MJPEG:
|
||||
case V4L2_PIX_FMT_H264:
|
||||
if (camera_configure_decoder(camera, src) < 0) {
|
||||
if (camera_configure_decoder(camera, camera_capture) < 0) {
|
||||
goto error;
|
||||
}
|
||||
break;
|
||||
|
||||
case V4L2_PIX_FMT_SRGGB10P:
|
||||
#if 1
|
||||
if (camera_configure_isp(camera, src, camera->options.high_res_factor, camera->options.low_res_factor) < 0) {
|
||||
if (camera_configure_isp(camera, camera_capture, camera->options.high_res_factor, camera->options.low_res_factor) < 0) {
|
||||
goto error;
|
||||
}
|
||||
#else
|
||||
if (camera_configure_legacy_isp(camera, src, camera->options.high_res_factor) < 0) {
|
||||
if (camera_configure_legacy_isp(camera, camera_capture, camera->options.high_res_factor) < 0) {
|
||||
goto error;
|
||||
}
|
||||
#endif
|
||||
@ -65,7 +65,7 @@ int camera_configure_v4l2(camera_t *camera)
|
||||
|
||||
default:
|
||||
LOG_ERROR(camera, "Unsupported camera format=%s",
|
||||
fourcc_to_string(src->fmt.format).buf);
|
||||
fourcc_to_string(camera_capture->fmt.format).buf);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user