Camera options

This commit is contained in:
Kamil Trzcinski
2022-04-05 16:00:17 +02:00
parent 7dd1ec9c0c
commit 9cf4cc359a
7 changed files with 31 additions and 38 deletions

View File

@ -8,9 +8,18 @@
#define CAMERA_DEVICE_CAMERA 0
typedef struct camera_options_s {
char path[256];
unsigned width, height, format;
unsigned nbufs, fps;
bool allow_dma;
} camera_options_t;
typedef struct camera_s {
const char *name;
camera_options_t options;
union {
device_t *devices[MAX_DEVICES];
struct {
@ -25,11 +34,6 @@ typedef struct camera_s {
};
};
link_t links[MAX_DEVICES];
char path[256];
unsigned width, height, format;
unsigned nbufs, fps;
bool allow_dma;
} camera_t;
#define CAMERA(DEVICE) camera->devices[DEVICE]