From patchwork Thu Aug 26 13:23:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dufresne X-Patchwork-Id: 13510 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 103CFBD87C for ; Thu, 26 Aug 2021 13:24:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C402C6891B; Thu, 26 Aug 2021 15:23:59 +0200 (CEST) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3A56C6888F for ; Thu, 26 Aug 2021 15:23:58 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nicolas) with ESMTPSA id 791A21F44332 From: Nicolas Dufresne To: libcamera-devel@lists.libcamera.org Date: Thu, 26 Aug 2021 09:23:43 -0400 Message-Id: <20210826132346.1238420-1-nicolas@ndufresne.ca> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 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): [1] gstreamer: Fix deadlock when last allocator ref is held by buffer [2] gstreamer: Fix concurrent access issues to CameraManager [3] libcamerasrc: Fix deadlock on EOS Changed in v2: - [2] Drop the deleter from the singleton shared ptr (no need to call stop()) - [2] Use the pointer instead of expiration src/gstreamer/gstlibcamera-utils.cpp | 24 ++++++++++++++++++++++++ src/gstreamer/gstlibcamera-utils.h | 6 ++++-- src/gstreamer/gstlibcameraallocator.cpp | 17 ++++++++++------- src/gstreamer/gstlibcameraprovider.cpp | 22 ++-------------------- src/gstreamer/gstlibcamerasrc.cpp | 23 +++++++++++------------ 5 files changed, 51 insertions(+), 41 deletions(-)