aboutsummaryrefslogtreecommitdiff
path: root/multimedia/gstreamer1-plugins-good
diff options
context:
space:
mode:
authorChristoph Moench-Tegeder <cmt@FreeBSD.org>2020-05-06 13:53:34 +0000
committerChristoph Moench-Tegeder <cmt@FreeBSD.org>2020-05-06 13:53:34 +0000
commitfd80676dbd8f40387650618860f0ec79bbb98000 (patch)
treef89fdc608ce46594c2f14751b40ae36d493f78f5 /multimedia/gstreamer1-plugins-good
parentbe76faf78522f08dab11f0ce4b15d614136b7681 (diff)
downloadports-fd80676dbd8f40387650618860f0ec79bbb98000.tar.gz
ports-fd80676dbd8f40387650618860f0ec79bbb98000.zip
gstreamer1-plugins-v4l2: fix for (some) webcams
The gstreamer v4l2 plugin probes the DMA capabilities of the webcam device via ioctl VIDIOC_EXPBUF, expecting ENOTTY in case that's not implemented (and will act accordingly). On our cuse, we get EINVAL for that case (which, from my reading of ioctl(2) woulndn't be correct here), which gstreamer neither expects nor handles and thus cannot use this device as a video source. As we cannot fix the kernel on short notice (cuse is part of the base system), the workaround is to handle EINVAL like ENOTTY in this specific place. (Tested with an old Logitech camera). PR: 236673 Approved by: maintainer-timeout (multimedia)
Notes
Notes: svn path=/head/; revision=534176
Diffstat (limited to 'multimedia/gstreamer1-plugins-good')
-rw-r--r--multimedia/gstreamer1-plugins-good/files/patch-sys_v4l2_gstv4l2object.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/multimedia/gstreamer1-plugins-good/files/patch-sys_v4l2_gstv4l2object.c b/multimedia/gstreamer1-plugins-good/files/patch-sys_v4l2_gstv4l2object.c
new file mode 100644
index 000000000000..736cd618765c
--- /dev/null
+++ b/multimedia/gstreamer1-plugins-good/files/patch-sys_v4l2_gstv4l2object.c
@@ -0,0 +1,13 @@
+--- sys/v4l2/gstv4l2object.c.orig 2020-04-06 14:45:19 UTC
++++ sys/v4l2/gstv4l2object.c
+@@ -2891,8 +2891,9 @@ gst_v4l2_object_is_dmabuf_supported (GstV4l2Object * v
+ }
+
+ /* Expected to fail, but ENOTTY tells us that it is not implemented. */
++ /* FreeBSD cuse sends EINVAL? */
+ v4l2object->ioctl (v4l2object->video_fd, VIDIOC_EXPBUF, &expbuf);
+- if (errno == ENOTTY)
++ if (errno == ENOTTY || errno == EINVAL)
+ ret = FALSE;
+
+ return ret;