From patchwork Tue Apr 26 11:02:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 15723 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 829D4C0F1B for ; Tue, 26 Apr 2022 11:02:57 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8362565646; Tue, 26 Apr 2022 13:02:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1650970976; bh=TDpUvyrN8DKIwZ4eQuTPLd8gvcQy4zCxusBM8Aeq8NI=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=26jU1/VbN+JqzVgQ0PXRH959x6ZEpH8iBs+wECrEOMQSBlFInR0C4/EmXMejOecbj OomJLu0gqszC8uXtse/1OuKAff/uu/qoak+p19sAw2ytZTMCWHd7ciBcQXaozEpnYf ve2fj6JiagVbNP02lbDmbGXek6qlHyzS8sysJS6TRxpxw3+hhORB7dMrcTCdSRyKIR xCacoAHqgQJ8jarXdxz2sGEgLBPGsp40z6RHXxI+u0XjaoQ/zzVSTh1E/yODPShyov DyZ4UCpKnGoy466uazmki08r41ISUJaBoFomO4L1I5TLubpHYsKrfFKo5g3+WMxZA5 gF/ig69ZBURTA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id DC51560431 for ; Tue, 26 Apr 2022 13:02:54 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="db4pE5kS"; dkim-atps=neutral Received: from deskari.lan (91-156-85-209.elisa-laajakaista.fi [91.156.85.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C6431487; Tue, 26 Apr 2022 13:02:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1650970974; bh=TDpUvyrN8DKIwZ4eQuTPLd8gvcQy4zCxusBM8Aeq8NI=; h=From:To:Cc:Subject:Date:From; b=db4pE5kSJqnUiK+jIPqZe8o+9c6nRuuLHKopJ3mQULGRy2Evl6pSSn/pnPYArbwoE gWrg2pXjldq0N6u9BwjAXnKTSdIaPpaAFczqU2lsdBrZLIffOMWNYB44REdoPovDt9 WvSaQ/f2MtyxTm2f8gQSxY4HSJQYdQqTgXIXa7hM= To: libcamera-devel@lists.libcamera.org, David Plowman , Kieran Bingham , Laurent Pinchart , Jacopo Mondi Date: Tue, 26 Apr 2022 14:02:32 +0300 Message-Id: <20220426110236.104511-1-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v6 0/4] Python bindings 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-Patchwork-Original-From: Tomi Valkeinen via libcamera-devel From: Tomi Valkeinen Reply-To: Tomi Valkeinen Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi, This is v6 of the python bindings. Main changes to v5: - Sorted out most of the checkstyle.py warnings - Generate enums for controls from control_ids.yaml (as a new patch for clarity) - Python unit test as a meson test Tomi Tomi Valkeinen (4): Add Python bindings py: generate control enums from yaml py: add unittests.py py: Add cam.py meson.build | 1 + meson_options.txt | 5 + src/meson.build | 1 + src/py/cam/cam.py | 483 ++++++++++++++++++++++ src/py/cam/cam_kms.py | 183 ++++++++ src/py/cam/cam_null.py | 47 +++ src/py/cam/cam_qt.py | 354 ++++++++++++++++ src/py/cam/cam_qtgl.py | 385 +++++++++++++++++ src/py/cam/gl_helpers.py | 74 ++++ src/py/libcamera/__init__.py | 12 + src/py/libcamera/gen-py-control-enums.py | 95 +++++ src/py/libcamera/meson.build | 52 +++ src/py/libcamera/pyenums.cpp | 53 +++ src/py/libcamera/pyenums_generated.cpp.in | 21 + src/py/libcamera/pymain.cpp | 454 ++++++++++++++++++++ src/py/meson.build | 1 + subprojects/.gitignore | 3 +- subprojects/pybind11.wrap | 6 + test/meson.build | 1 + test/py/meson.build | 17 + test/py/unittests.py | 368 +++++++++++++++++ 21 files changed, 2615 insertions(+), 1 deletion(-) create mode 100755 src/py/cam/cam.py create mode 100644 src/py/cam/cam_kms.py create mode 100644 src/py/cam/cam_null.py create mode 100644 src/py/cam/cam_qt.py create mode 100644 src/py/cam/cam_qtgl.py create mode 100644 src/py/cam/gl_helpers.py create mode 100644 src/py/libcamera/__init__.py create mode 100755 src/py/libcamera/gen-py-control-enums.py create mode 100644 src/py/libcamera/meson.build create mode 100644 src/py/libcamera/pyenums.cpp create mode 100644 src/py/libcamera/pyenums_generated.cpp.in create mode 100644 src/py/libcamera/pymain.cpp create mode 100644 src/py/meson.build create mode 100644 subprojects/pybind11.wrap create mode 100644 test/py/meson.build create mode 100755 test/py/unittests.py