From owner-svn-ports-all@freebsd.org Wed May 6 13:53:34 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E82FC2C585C; Wed, 6 May 2020 13:53:34 +0000 (UTC) (envelope-from cmt@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49HJ325rYYz4gBy; Wed, 6 May 2020 13:53:34 +0000 (UTC) (envelope-from cmt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C3D3A593; Wed, 6 May 2020 13:53:34 +0000 (UTC) (envelope-from cmt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 046DrYfq021304; Wed, 6 May 2020 13:53:34 GMT (envelope-from cmt@FreeBSD.org) Received: (from cmt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 046DrYtN021303; Wed, 6 May 2020 13:53:34 GMT (envelope-from cmt@FreeBSD.org) Message-Id: <202005061353.046DrYtN021303@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cmt set sender to cmt@FreeBSD.org using -f From: Christoph Moench-Tegeder Date: Wed, 6 May 2020 13:53:34 +0000 (UTC) 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 X-SVN-Group: ports-head X-SVN-Commit-Author: cmt X-SVN-Commit-Paths: in head/multimedia: gstreamer1-plugins-good/files gstreamer1-plugins-v4l2 X-SVN-Commit-Revision: 534176 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 May 2020 13:53:35 -0000 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