From patchwork Thu Jan 17 21:27:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 262 Return-Path: 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 C182460B2D for ; Thu, 17 Jan 2019 22:27:12 +0100 (CET) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3267253E; Thu, 17 Jan 2019 22:27:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1547760432; bh=S/GlXkvsk4oA6UzhmysOY3clhyo3V6qneCrP7BO7l9Y=; h=From:To:Cc:Subject:Date:From; b=fD3BJNLI8n621lrxYoXTUTXNpQp5T/mQWnuwEQ8RCqcOBivAArYvofxCw3ZBTHS0R frGysKVF4bkAJ0Kzx1AH0PbctKBQ7eDLIbHFM3H6H9teYbrdG5HnLkduzJCLFpiKn8 W6J+ykzcysfaOwPbFM3z2h8iK7LcrNT/y4nCj1O0= From: Kieran Bingham To: LibCamera Devel Date: Thu, 17 Jan 2019 21:27:01 +0000 Message-Id: <20190117212703.24047-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 0/2] V4L2Device: Add basic V4L2 support class X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 21:27:12 -0000 Define the beginnings of a V4L2 device management object. This basic class supports opening the device and parsing the device capabilities including obtaining the driver, device, and bus information. The device will reject ->open() calls on devices which are not either CAPTURE or OUTPUT devices and those which do not support the streaming I/O interface. Kieran Bingham (2): libcamera: Add V4L2 Device object test: v4l2_device: Add test suite and initial test src/libcamera/include/v4l2_device.h | 60 +++++++++ src/libcamera/meson.build | 2 + src/libcamera/v4l2_device.cpp | 186 ++++++++++++++++++++++++++ test/meson.build | 1 + test/v4l2_device/double_open.cpp | 38 ++++++ test/v4l2_device/meson.build | 12 ++ test/v4l2_device/v4l2_device_test.cpp | 43 ++++++ test/v4l2_device/v4l2_device_test.h | 27 ++++ 8 files changed, 369 insertions(+) create mode 100644 src/libcamera/include/v4l2_device.h create mode 100644 src/libcamera/v4l2_device.cpp create mode 100644 test/v4l2_device/double_open.cpp create mode 100644 test/v4l2_device/meson.build create mode 100644 test/v4l2_device/v4l2_device_test.cpp create mode 100644 test/v4l2_device/v4l2_device_test.h Reviewed-by: Laurent Pinchart