Get rid of v4l2_buffer/v4l2_plane from buffer_t

This commit is contained in:
Kamil Trzcinski
2022-04-10 10:37:52 +02:00
parent e77f0438f1
commit 4d01c86398
9 changed files with 132 additions and 90 deletions

View File

@@ -12,18 +12,22 @@ typedef struct buffer_s {
char *name;
struct buffer_list_s *buf_list;
int index;
// Mapped memory (with DMA)
void *start;
size_t offset;
size_t used;
size_t length;
struct v4l2_buffer v4l2_buffer;
struct v4l2_plane v4l2_plane;
int dma_fd;
struct {
unsigned flags;
} v4l2;
// State
int mmap_reflinks;
buffer_t *mmap_source;
buffer_t *dma_source;
bool enqueued;
uint64_t enqueue_time_us;
uint64_t enqueue_time_us, captured_time_us;
} buffer_t;
buffer_t *buffer_open(const char *name, buffer_list_t *buf_list, int buffer);