From patchwork Fri Nov 13 06:38:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 10416 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 3347DBE087 for ; Fri, 13 Nov 2020 06:38:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D777163149; Fri, 13 Nov 2020 07:38:25 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="UK8S4QuH"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 56A3D63149 for ; Fri, 13 Nov 2020 07:38:24 +0100 (CET) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E9D0631A for ; Fri, 13 Nov 2020 07:38:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1605249504; bh=HT3CDBwjNQs1AYkzp9kXeF/Yrwx/R8PDIGaQPmyePpE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UK8S4QuHFBwnO4Hb3ltekY2AK/0sufD6Rv5MWIpGt3b/XHNaCwBL0zm+KU2C8M/9I sl+1KT1OgvXSYqD5zpcV4CYkfrOM8+SxomVGSb5jC7QIVz4G06vYpKx+JCypt4LA5D IcOY5nNXbXJ+S4tVi1wcM1pL1GUMcC//h4PwQnm0= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Fri, 13 Nov 2020 08:38:11 +0200 Message-Id: <20201113063815.10288-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201113063815.10288-1-laurent.pinchart@ideasonboard.com> References: <20201113063815.10288-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v1 1/5] test: Get event dispatcher from current thread 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Get the event dispatcher from the current thread instead of the camera manager. This prepares for the removal of CameraManager::eventDispatcher(). Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Niklas Söderlund --- test/camera/buffer_import.cpp | 3 ++- test/camera/capture.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp index 4b626dffa575..ccf532d7b7fc 100644 --- a/test/camera/buffer_import.cpp +++ b/test/camera/buffer_import.cpp @@ -17,6 +17,7 @@ #include "libcamera/internal/device_enumerator.h" #include "libcamera/internal/media_device.h" +#include "libcamera/internal/thread.h" #include "libcamera/internal/v4l2_videodevice.h" #include "buffer_source.h" @@ -131,7 +132,7 @@ protected: } } - EventDispatcher *dispatcher = cm_->eventDispatcher(); + EventDispatcher *dispatcher = Thread::current()->eventDispatcher(); Timer timer; timer.start(1000); diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp index f13ca53b8cdf..fd5292b7c8c9 100644 --- a/test/camera/capture.cpp +++ b/test/camera/capture.cpp @@ -11,6 +11,8 @@ #include #include +#include "libcamera/internal/thread.h" + #include "camera_test.h" #include "test.h" @@ -131,7 +133,7 @@ protected: } } - EventDispatcher *dispatcher = cm_->eventDispatcher(); + EventDispatcher *dispatcher = Thread::current()->eventDispatcher(); Timer timer; timer.start(1000);