From patchwork Wed Aug 25 21:18:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dufresne X-Patchwork-Id: 13493 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 23550BD87D for ; Wed, 25 Aug 2021 21:19:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6F22768893; Wed, 25 Aug 2021 23:19:09 +0200 (CEST) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A2F8E60288 for ; Wed, 25 Aug 2021 23:19:08 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nicolas) with ESMTPSA id CF3E51F435D8 From: Nicolas Dufresne To: libcamera-devel@lists.libcamera.org Date: Wed, 25 Aug 2021 17:18:49 -0400 Message-Id: <20210825211852.1207168-1-nicolas@ndufresne.ca> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v1 0/3] Fix Gnome Cheese and multiple camera X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicolas Dufresne Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Nicolas Dufresne This patchset address issues seen when trying to stream from multiple cameras at the same time or when using Gnome Cheese software. The core of the issue was that multiple CameraManager instances were created. Two deadlocks were encountered during testing and are fixed. Nicolas Dufresne (3): gstreamer: Fix deadlock when last allocator ref is held by buffer gstreamer: Fix concurrent access issues to CameraManager libcamerasrc: Fix deadlock on EOS src/gstreamer/gstlibcamera-utils.cpp | 31 +++++++++++++++++++++++++ src/gstreamer/gstlibcamera-utils.h | 6 +++-- src/gstreamer/gstlibcameraallocator.cpp | 17 ++++++++------ src/gstreamer/gstlibcameraprovider.cpp | 22 ++---------------- src/gstreamer/gstlibcamerasrc.cpp | 23 +++++++++--------- 5 files changed, 58 insertions(+), 41 deletions(-) Tested-by: Kieran Bingham