From patchwork Fri Jan 3 05:41:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 2485 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0821C60462 for ; Fri, 3 Jan 2020 06:41:28 +0100 (CET) Received: from neptunite.amanokami.net (unknown [96.44.9.94]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4008430F; Fri, 3 Jan 2020 06:41:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1578030087; bh=o46u+7gjgGb1CB3HQiSgrzH4yq5NdJ5qmK8KAIDIAQY=; h=From:To:Cc:Subject:Date:From; b=qYadWVyaTd1Z9w2ZSfRYLAfBRQ/qA0sv5E6Be91JVi28ZFKPm5SUn1KvNJOLznTVs wfNDGx86mer75jHUR1GwBh+cQNh1cBiwgW1NI4Wivg94SW2j7uFOujPT5C7GbNo0bs y77S1DVUzfGYyDvLkb7/Abz009i4nIDuErFRjv1o= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 3 Jan 2020 00:41:16 -0500 Message-Id: <20200103054120.30979-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 0/4] V4L2 compatibility layer 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, 03 Jan 2020 05:41:28 -0000 Implement the initial version of the V4L2 compatibility layer. Patch 2/4 implements the infrastructure for the pipeline handler to optionally assign a device number to each camera that it adds to the camera manager, to allow the V4L2 comptibility layer to map device nodes to libcamera cameras. Patch 3/4 implements the mapping assignment for the uvcvideo pipeline handler. Patch 4/4 is the complete implementation of the V4L2 compatibility layer. In v5, we now depend on the following two patches: 3/4 - libcamera: pipeline: uvcvideo: Fix crash when default entity is not found 4/4 - libcamera: object: Support reference arguments in invokeMethod() Paul Elder (4): libcamera: v4l2_device, v4l2_videodevice: call open system call directly libcamera: camera_manager, pipeline_handler: allow retrieving cameras by device numbers libcamera: pipeline_handler: uvcvideo: register all Cameras along with a devnum v4l2: v4l2_compat: Add V4L2 compatibility layer include/libcamera/camera_manager.h | 6 +- meson_options.txt | 5 + src/libcamera/camera_manager.cpp | 61 ++- src/libcamera/include/pipeline_handler.h | 3 +- src/libcamera/pipeline/uvcvideo.cpp | 6 +- src/libcamera/pipeline_handler.cpp | 13 +- src/libcamera/v4l2_device.cpp | 3 +- src/libcamera/v4l2_videodevice.cpp | 4 +- src/meson.build | 4 + src/v4l2/meson.build | 31 ++ src/v4l2/v4l2_camera.cpp | 228 ++++++++ src/v4l2/v4l2_camera.h | 85 +++ src/v4l2/v4l2_camera_proxy.cpp | 654 +++++++++++++++++++++++ src/v4l2/v4l2_camera_proxy.h | 82 +++ src/v4l2/v4l2_compat.cpp | 80 +++ src/v4l2/v4l2_compat_manager.cpp | 257 +++++++++ src/v4l2/v4l2_compat_manager.h | 77 +++ 17 files changed, 1582 insertions(+), 17 deletions(-) create mode 100644 src/v4l2/meson.build create mode 100644 src/v4l2/v4l2_camera.cpp create mode 100644 src/v4l2/v4l2_camera.h create mode 100644 src/v4l2/v4l2_camera_proxy.cpp create mode 100644 src/v4l2/v4l2_camera_proxy.h create mode 100644 src/v4l2/v4l2_compat.cpp create mode 100644 src/v4l2/v4l2_compat_manager.cpp create mode 100644 src/v4l2/v4l2_compat_manager.h