Camera options
This commit is contained in:
@ -10,10 +10,6 @@
|
||||
|
||||
int camera_configure_decoder(camera_t *camera)
|
||||
{
|
||||
if (device_open_buffer_list(camera->camera, true, camera->width, camera->height, camera->format, 0, camera->nbufs, true) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
buffer_list_t *src = camera->camera->capture_list;
|
||||
|
||||
camera->decoder = device_open("DECODER", "/dev/video10");
|
||||
@ -26,7 +22,7 @@ int camera_configure_decoder(camera_t *camera)
|
||||
|
||||
src = camera->decoder->capture_list;
|
||||
|
||||
if (camera->format != V4L2_PIX_FMT_MJPEG && camera->format != V4L2_PIX_FMT_JPEG) {
|
||||
if (camera->options.format != V4L2_PIX_FMT_MJPEG && camera->options.format != V4L2_PIX_FMT_JPEG) {
|
||||
camera->codec_jpeg = device_open("JPEG", "/dev/video31");
|
||||
|
||||
if (device_open_buffer_list_output(camera->codec_jpeg, src) < 0 ||
|
||||
@ -42,7 +38,7 @@ int camera_configure_decoder(camera_t *camera)
|
||||
|
||||
link_t *links = camera->links;
|
||||
|
||||
if (camera->format == V4L2_PIX_FMT_MJPEG || camera->format == V4L2_PIX_FMT_JPEG) {
|
||||
if (camera->options.format == V4L2_PIX_FMT_MJPEG || camera->options.format == V4L2_PIX_FMT_JPEG) {
|
||||
*links++ = (link_t){ camera->camera, { camera->decoder }, { http_jpeg_capture, http_jpeg_needs_buffer } };
|
||||
*links++ = (link_t){ camera->decoder, { camera->codec_h264 } };
|
||||
*links++ = (link_t){ camera->codec_h264, { }, { http_h264_capture, http_h264_needs_buffer } };
|
||||
|
Reference in New Issue
Block a user