This commit is contained in:
Kamil Trzcinski
2022-04-04 13:51:29 +02:00
commit d5fe55d2e0
12 changed files with 762 additions and 0 deletions

21
buffer.h Normal file
View File

@ -0,0 +1,21 @@
#pragma once
#include "v4l2.h"
typedef struct buffer_s {
char *name;
struct buffer_list_s *buf_list;
int index;
void *start;
size_t offset;
size_t length;
struct v4l2_buffer v4l2_buffer;
struct v4l2_plane v4l2_plane;
int dma_fd;
bool enqueued;
} buffer_t;
buffer_t *buffer_open(const char *name, struct buffer_list_s *buf_list, int buffer);
void buffer_close(buffer_t *buf);
bool buffer_output_dequeue(buffer_t *buf);
bool buffer_capture_enqueue(buffer_t *buf);