Fix some headers
This commit is contained in:
parent
67d29468d1
commit
bd9094cbbc
@ -1,6 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "v4l2.h"
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <linux/videodev2.h>
|
||||
|
||||
typedef struct buffer_s buffer_t;
|
||||
typedef struct buffer_list_s buffer_list_t;
|
||||
|
||||
typedef struct buffer_s {
|
||||
char *name;
|
||||
@ -15,12 +21,12 @@ typedef struct buffer_s {
|
||||
int dma_fd;
|
||||
|
||||
int mmap_reflinks;
|
||||
struct buffer_s *mmap_source;
|
||||
buffer_list_t *mmap_source;
|
||||
bool enqueued;
|
||||
uint64_t enqueue_time_us;
|
||||
} buffer_t;
|
||||
|
||||
buffer_t *buffer_open(const char *name, struct buffer_list_s *buf_list, int buffer);
|
||||
buffer_t *buffer_open(const char *name, buffer_list_t *buf_list, int buffer);
|
||||
void buffer_close(buffer_t *buf);
|
||||
|
||||
bool buffer_use(buffer_t *buf);
|
||||
|
@ -1,9 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "buffer.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <pthread.h>
|
||||
|
||||
typedef struct buffer_s buffer_t;
|
||||
|
||||
typedef struct buffer_lock_s {
|
||||
const char *name;
|
||||
pthread_mutex_t lock;
|
||||
|
@ -1,6 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "v4l2.h"
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <linux/videodev2.h>
|
||||
|
||||
typedef struct buffer_list_s buffer_list_t;
|
||||
typedef struct device_s device_t;
|
||||
|
||||
typedef struct device_s {
|
||||
char *name;
|
||||
@ -10,10 +15,10 @@ typedef struct device_s {
|
||||
struct v4l2_capability v4l2_cap;
|
||||
bool allow_dma;
|
||||
|
||||
struct buffer_list_s *capture_list;
|
||||
struct buffer_list_s *output_list;
|
||||
buffer_list_t *capture_list;
|
||||
buffer_list_t *output_list;
|
||||
|
||||
struct device_s *output_device;
|
||||
device_t *output_device;
|
||||
bool paused;
|
||||
bool decoder_started;
|
||||
} device_t;
|
||||
@ -24,8 +29,8 @@ int device_open_v4l2_subdev(device_t *dev, int subdev);
|
||||
void device_close(device_t *device);
|
||||
|
||||
int device_open_buffer_list(device_t *dev, bool do_capture, unsigned width, unsigned height, unsigned format, unsigned bytesperline, int nbufs, bool do_mmap);
|
||||
int device_open_buffer_list_output(device_t *dev, struct buffer_list_s *capture_list);
|
||||
int device_open_buffer_list_capture(device_t *dev, struct buffer_list_s *output_list, float div, unsigned format, bool do_mmap);
|
||||
int device_open_buffer_list_output(device_t *dev, buffer_list_t *capture_list);
|
||||
int device_open_buffer_list_capture(device_t *dev, buffer_list_t *output_list, float div, unsigned format, bool do_mmap);
|
||||
int device_consume_event(device_t *device);
|
||||
|
||||
int device_set_stream(device_t *dev, bool do_on);
|
||||
|
Loading…
x
Reference in New Issue
Block a user