Make buffer handling to be made via device/v4l2

This commit is contained in:
Kamil Trzcinski
2022-04-10 11:09:42 +02:00
parent ca07c62f25
commit 20c48607c5
7 changed files with 229 additions and 151 deletions

View File

@ -1,5 +1,15 @@
#pragma once
typedef struct buffer_list_s buffer_list_t;
// TODO: temporary
#include "device/hw/v4l2.h"
int buffer_list_v4l2_refresh_states(buffer_list_t *buf_list);
typedef struct buffer_s buffer_t;
typedef struct buffer_list_s buffer_list_t;
struct pollfd;
int v4l2_buffer_open(buffer_t *buf);
void v4l2_buffer_close(buffer_t *buf);
int v4l2_buffer_enqueue(buffer_t *buf, const char *who);
int v4l2_buffer_list_dequeue(buffer_list_t *buf_list, buffer_t **bufp);
int v4l2_buffer_list_refresh_states(buffer_list_t *buf_list);
int v4l2_buffer_list_pollfd(buffer_list_t *buf_list, struct pollfd *pollfd, bool can_dequeue);