Two small steps forward with the video loopback driver:
kref
+ release life-cycle. This is a prequel for anonymous inode./dev/videoX
is responsible for this./dev/video_loop
.linux-media@vger.kernel.org
, as it is always good to start follow the discussion on other patch sets some time before your sending a feature patch set. For instance, some useful gray information might stick to you by accident…The kref change was internal prequel, and this first API break is the external prequel:
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
#ifndef _UAPI_LINUX_VIDEO_LOOP_H
#define _UAPI_LINUX_VIDEO_LOOP_H
#include <linux/types.h>
#include <linux/ioctl.h>
struct video_loop_config {
__u32 device_nr;
__u32 device_fd;
__u32 capabilities;
__u32 min_width;
__u32 max_width;
__u32 min_height;
__u32 max_height;
char card_label[32];
};
#define VIDEO_LOOP_CTL_ADD _IOW('v', 0x00, struct video_loop_config)
#define VIDEO_LOOP_CTL_REMOVE _IOW('v', 0x01, __u32)
#endif /* _UAPI_LINUX_VIDEO_LOOP_H */
If you have any comments on the fields, please spare me dude ;-) I don’t expect this to be final as in FINAL. It is good enough for RFC.
Glitches that will be fixed by anonymous inode:
device_fd
is still unfilled.capabilities
accepts right now only V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT
.
VIDEO_LOOP_CTL_REMOVE
is ought to be deleted.