Closed pinefan closed 1 year ago
Hello umlaeute
Thank you for your excellent work.
Would you please consider setting the input status in vidioc_enum_input() to correctly report the absence of an input signal? Below is a suggested implementation:
*** 1426,1431 **** --- 1426,1433 ---- static int vidioc_enum_input(struct file *file, void *fh, struct v4l2_input *inp) { + struct v4l2_loopback_device *dev = v4l2loopback_getdevice(file); + __u32 index = inp->index; MARK(); *************** *** 1441,1446 **** --- 1443,1451 ---- inp->audioset = 0; inp->tuner = 0; inp->status = 0; + if (!dev->ready_for_capture) { + inp->status |= V4L2_IN_ST_NO_SIGNAL; + } #ifdef V4L2LOOPBACK_WITH_STD inp->std = V4L2_STD_ALL;
Environment:
v4l2loopback
Steps to reproduce:
Observed Results: ioctl: VIDIOC_ENUMINPUT Input : 0 Name : loopback Type : 0x00000002 (Camera) Audioset : 0x00000000 Tuner : 0x00000000 Standard : 0x0000000000000000 () Status : 0x00000000 (ok) Capabilities: 0x00000000 (not defined)
Expected Results: ioctl: VIDIOC_ENUMINPUT Input : 0 Name : loopback Type : 0x00000002 (Camera) Audioset : 0x00000000 Tuner : 0x00000000 Standard : 0x0000000000000000 () Status : 0x00000002 (no signal) Capabilities: 0x00000000 (not defined)
Thanks!
Hello umlaeute
Thank you for your excellent work.
Would you please consider setting the input status in vidioc_enum_input() to correctly report the absence of an input signal? Below is a suggested implementation:
Environment:
v4l2loopback
version: 0.12.7 (main)Steps to reproduce:
Observed Results: ioctl: VIDIOC_ENUMINPUT Input : 0 Name : loopback Type : 0x00000002 (Camera) Audioset : 0x00000000 Tuner : 0x00000000 Standard : 0x0000000000000000 () Status : 0x00000000 (ok) Capabilities: 0x00000000 (not defined)
Expected Results: ioctl: VIDIOC_ENUMINPUT Input : 0 Name : loopback Type : 0x00000002 (Camera) Audioset : 0x00000000 Tuner : 0x00000000 Standard : 0x0000000000000000 () Status : 0x00000002 (no signal) Capabilities: 0x00000000 (not defined)
Thanks!