Fix direct method
This commit is contained in:
parent
b57ca77132
commit
a816336de5
@ -82,7 +82,7 @@ camera_t *camera_open(camera_options_t *options)
|
||||
goto error;
|
||||
}
|
||||
#else
|
||||
if (camera_configure_legacy_isp(&camera, camera->options.high_res_factor) < 0) {
|
||||
if (camera_configure_legacy_isp(camera, camera->options.high_res_factor) < 0) {
|
||||
goto error;
|
||||
}
|
||||
#endif
|
||||
|
@ -10,7 +10,8 @@
|
||||
|
||||
int camera_configure_decoder(camera_t *camera)
|
||||
{
|
||||
buffer_list_t *src = camera->camera->capture_list;
|
||||
buffer_list_t *camera_src = camera->camera->capture_list;
|
||||
buffer_list_t *src = camera_src;
|
||||
device_video_force_key(camera->camera);
|
||||
|
||||
camera->decoder = device_open("DECODER", "/dev/video10");
|
||||
@ -29,7 +30,7 @@ int camera_configure_decoder(camera_t *camera)
|
||||
|
||||
src = camera->decoder->capture_list;
|
||||
|
||||
if (camera->options.format != V4L2_PIX_FMT_MJPEG && camera->options.format != V4L2_PIX_FMT_JPEG) {
|
||||
if (camera_src->fmt_format != V4L2_PIX_FMT_MJPEG && camera_src->fmt_format != V4L2_PIX_FMT_JPEG) {
|
||||
camera->codec_jpeg = device_open("JPEG", "/dev/video31");
|
||||
|
||||
if (device_open_buffer_list_output(camera->codec_jpeg, src) < 0 ||
|
||||
@ -38,7 +39,7 @@ int camera_configure_decoder(camera_t *camera)
|
||||
}
|
||||
}
|
||||
|
||||
if (camera->options.format != V4L2_PIX_FMT_H264) {
|
||||
if (camera_src->fmt_format != V4L2_PIX_FMT_H264) {
|
||||
camera->codec_h264 = device_open("H264", "/dev/video11");
|
||||
|
||||
if (device_open_buffer_list_output(camera->codec_h264, src) < 0 ||
|
||||
@ -49,11 +50,11 @@ int camera_configure_decoder(camera_t *camera)
|
||||
|
||||
link_t *links = camera->links;
|
||||
|
||||
if (camera->options.format == V4L2_PIX_FMT_MJPEG || camera->options.format == V4L2_PIX_FMT_JPEG) {
|
||||
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->options.format == V4L2_PIX_FMT_H264) {
|
||||
} 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 } };
|
||||
|
Loading…
x
Reference in New Issue
Block a user