1
0
Fork 0
pipewire/spa/plugins/v4l2/v4l2.h
Daniel Baumann 6b016a712f
Adding upstream version 1.4.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-22 21:40:42 +02:00

31 lines
754 B
C

/* Spa V4l2 support */
/* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
/* SPDX-License-Identifier: MIT */
#include <errno.h>
#include <linux/videodev2.h>
#include <spa/support/log.h>
#undef SPA_LOG_TOPIC_DEFAULT
#define SPA_LOG_TOPIC_DEFAULT &v4l2_log_topic
extern struct spa_log_topic v4l2_log_topic;
static inline void v4l2_log_topic_init(struct spa_log *log)
{
spa_log_topic_init(log, &v4l2_log_topic);
}
struct spa_v4l2_device {
struct spa_log *log;
int fd;
struct v4l2_capability cap;
unsigned int active:1;
unsigned int have_format:1;
char path[64];
};
int spa_v4l2_open(struct spa_v4l2_device *dev, const char *path);
int spa_v4l2_close(struct spa_v4l2_device *dev);
int spa_v4l2_is_capture(struct spa_v4l2_device *dev);