From patchwork Fri Jun 19 05:41:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 4088 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 513E0609A5 for ; Fri, 19 Jun 2020 07:41:53 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="WoY3/tEV"; dkim-atps=neutral Received: from jade.flets-east.jp (unknown [IPv6:2400:4051:61:600:e972:d773:e99a:4f79]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B4566560; Fri, 19 Jun 2020 07:41:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1592545313; bh=/1L4CVU2+G6aI+2mN32EUHKd69uGE54tmIScfYS8VQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WoY3/tEVdrjrb06lbXxfHLc79r8q5wWGzGK2NdYexmRbQt6BjhF3XVr5x+/EIyiiO S1O98pp+Hq4x11JVZucjZQ8fYbQjJ0itnm5+zxugnWYOVAw7p5Z+f449wkVQBameLJ 2+y4aNpR66C/b8GBVXHUUGlrt6Q08KrVQUuMsvb8= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 19 Jun 2020 14:41:14 +0900 Message-Id: <20200619054123.19052-9-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619054123.19052-1-paul.elder@ideasonboard.com> References: <20200619054123.19052-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 08/17] v4l2: v4l2_camera: Add isRunning() 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: , X-List-Received-Date: Fri, 19 Jun 2020 05:41:53 -0000 Add a method isRunning() to V4L2Camera so that V4L2CameraProxy can use it for checks. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- Changes in v2: - replace V4L2CameraProxy::streaming_ with V4L2CameraProxy::isRunning() - moved the checks to different patches --- src/v4l2/v4l2_camera.cpp | 5 +++++ src/v4l2/v4l2_camera.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp index 2557320..177b1ea 100644 --- a/src/v4l2/v4l2_camera.cpp +++ b/src/v4l2/v4l2_camera.cpp @@ -227,3 +227,8 @@ int V4L2Camera::qbuf(unsigned int index) return 0; } + +bool V4L2Camera::isRunning() +{ + return isRunning_; +} diff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h index 30114ed..c157a80 100644 --- a/src/v4l2/v4l2_camera.h +++ b/src/v4l2/v4l2_camera.h @@ -59,6 +59,8 @@ public: Semaphore bufferSema_; + bool isRunning(); + private: void requestComplete(Request *request);