Conversation

Jarkko Sakkinen

Edited 8 days ago

Two small steps forward with the video loopback driver:

  1. Internally use kref + release life-cycle. This is a prequel for anonymous inode.
  2. Delete timeout and timeout_image attributes. In the anonymous inode based the user space driver for /dev/videoX is responsible for this.
  3. Rename the device as /dev/video_loop.
  4. Subscribed to 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…

#linux #kernel #media

1
2
3

Jarkko Sakkinen

Edited 8 days ago

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:

  1. device_fd is still unfilled.
  2. capabilities accepts right now only V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT.

  3. For obvious reasons, VIDEO_LOOP_CTL_REMOVE is ought to be deleted.
1
0
0
Removed in the end all of "ATTRIBUTES" in https://github.com/v4l2loopback/v4l2loopback/blob/main/README.md.

Even in the case they would make sense, they can be left out, so not much analysis needed for scraping them.
0
0
0