Move int nbufs
into buffer_list_open
This commit is contained in:
@ -1,7 +1,12 @@
|
||||
#include "libcamera.hh"
|
||||
|
||||
int libcamera_buffer_list_open(buffer_list_t *buf_list, unsigned width, unsigned height, unsigned format, unsigned bytesperline)
|
||||
int libcamera_buffer_list_open(buffer_list_t *buf_list, unsigned width, unsigned height, unsigned format, unsigned bytesperline, int nbufs)
|
||||
{
|
||||
if (!buf_list->do_capture) {
|
||||
E_LOG_INFO(buf_list, "Only capture mode is supported.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
buf_list->libcamera = new buffer_list_libcamera_t{};
|
||||
return 0;
|
||||
}
|
||||
@ -14,11 +19,6 @@ void libcamera_buffer_list_close(buffer_list_t *buf_list)
|
||||
}
|
||||
}
|
||||
|
||||
int libcamera_buffer_list_set_buffers(buffer_list_t *buf_list, int nbufs)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int libcamera_buffer_list_set_stream(buffer_list_t *buf_list, bool do_on)
|
||||
{
|
||||
return -1;
|
||||
|
@ -16,7 +16,6 @@ device_hw_t libcamera_device_hw = {
|
||||
.buffer_list_pollfd = libcamera_buffer_list_pollfd,
|
||||
.buffer_list_open = libcamera_buffer_list_open,
|
||||
.buffer_list_close = libcamera_buffer_list_close,
|
||||
.buffer_list_set_buffers = libcamera_buffer_list_set_buffers,
|
||||
.buffer_list_set_stream = libcamera_buffer_list_set_stream
|
||||
};
|
||||
|
||||
|
@ -10,6 +10,7 @@ extern "C" {
|
||||
#include "device/device.h"
|
||||
#include "device/buffer_list.h"
|
||||
#include "device/buffer.h"
|
||||
#include "opts/log.h"
|
||||
};
|
||||
|
||||
#include <optional>
|
||||
@ -54,7 +55,6 @@ int libcamera_buffer_enqueue(buffer_t *buf, const char *who);
|
||||
int libcamera_buffer_list_dequeue(buffer_list_t *buf_list, buffer_t **bufp);
|
||||
int libcamera_buffer_list_pollfd(buffer_list_t *buf_list, struct pollfd *pollfd, bool can_dequeue);
|
||||
|
||||
int libcamera_buffer_list_open(buffer_list_t *buf_list, unsigned width, unsigned height, unsigned format, unsigned bytesperline);
|
||||
int libcamera_buffer_list_open(buffer_list_t *buf_list, unsigned width, unsigned height, unsigned format, unsigned bytesperline, int nbufs);
|
||||
void libcamera_buffer_list_close(buffer_list_t *buf_list);
|
||||
int libcamera_buffer_list_set_buffers(buffer_list_t *buf_list, int nbufs);
|
||||
int libcamera_buffer_list_set_stream(buffer_list_t *buf_list, bool do_on);
|
||||
|
Reference in New Issue
Block a user