Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 May 2020 13:53:34 +0000 (UTC)
From:      Christoph Moench-Tegeder <cmt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r534176 - in head/multimedia: gstreamer1-plugins-good/files gstreamer1-plugins-v4l2
Message-ID:  <202005061353.046DrYtN021303@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cmt
Date: Wed May  6 13:53:34 2020
New Revision: 534176
URL: https://svnweb.freebsd.org/changeset/ports/534176

Log:
  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)

Added:
  head/multimedia/gstreamer1-plugins-good/files/patch-sys_v4l2_gstv4l2object.c   (contents, props changed)
Modified:
  head/multimedia/gstreamer1-plugins-v4l2/Makefile

Added: head/multimedia/gstreamer1-plugins-good/files/patch-sys_v4l2_gstv4l2object.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/gstreamer1-plugins-good/files/patch-sys_v4l2_gstv4l2object.c	Wed May  6 13:53:34 2020	(r534176)
@@ -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;

Modified: head/multimedia/gstreamer1-plugins-v4l2/Makefile
==============================================================================
--- head/multimedia/gstreamer1-plugins-v4l2/Makefile	Wed May  6 13:47:02 2020	(r534175)
+++ head/multimedia/gstreamer1-plugins-v4l2/Makefile	Wed May  6 13:53:34 2020	(r534176)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-PORTREVISION=	0
+PORTREVISION=	1
 CATEGORIES=	multimedia
 PKGNAMESUFFIX=	1-plugins-v4l2
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005061353.046DrYtN021303>