From patchwork Mon May 9 10:10:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 15829 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 EEEEFC3256 for ; Mon, 9 May 2022 10:10:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2BB9B65648; Mon, 9 May 2022 12:10:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1652091049; bh=ICUh0RKF6isxEkNS3OodzKtjGLSsICi2e6h7onp/xS4=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=gw1GFZHg37XLglC12fDIqwU1ay++dOTKcrhoV9VwerfG9BV03K6yRy2k0+/+JT0QW 3E4Q78ZUT4HD3V5sAFJMnCAD66c0ecCYZTnJTBVFwAYLQWlw5E1rO05MuaKv32Oi5H ZYDNAOqT832fxS6TTTNNf49uto10tDWtTjp9AnWBS7J31IPypQ8oSCaeYmPG/vxzvf ZvQen0g42ptcgkmnFxS2tNvNah5u/VD6evK/Pu/v3hGZJC40USXVX2/Z/6XswS0m9O C0XhoUGr5UhQsrxpb5CfzUwMmEnXplFA+71c6re+zDDsw/HFL/jyivcoZRdAdvjnjI 6aOaVlOX8YDCA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C31FE604A2 for ; Mon, 9 May 2022 12:10:47 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="DI7CN1uY"; 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 1FB166DD; Mon, 9 May 2022 12:10:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1652091047; bh=ICUh0RKF6isxEkNS3OodzKtjGLSsICi2e6h7onp/xS4=; h=From:To:Cc:Subject:Date:From; b=DI7CN1uY1mjhiaN8c+avVSnzZ8Z4GgGtYrYWAAPj5FrYdJck40mhkmwA5P0vWyfwx 7IBu8iZuakTHn5w4weOAIZkHxKkJ3TIxXQv+wUglopXTrACIkS7NZxQuZs0QB+2JJR PrQW376cBWrj5YVHx5yQxBkubLmu9GrzZDZphsCk= To: libcamera-devel@lists.libcamera.org, David Plowman , Kieran Bingham , Laurent Pinchart , Jacopo Mondi Date: Mon, 9 May 2022 13:10:16 +0300 Message-Id: <20220509101023.35569-1-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v10 0/7] 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, Mostly cosmetic changes (comments, whitespace changes) in this version. The only functional change is that in handleRequestCompleted() we use LOG(Fatal) instead of throwing an exception if the write() fails. Tomi Tomi Valkeinen (7): meson: require meson 0.56+ meson: use new project_*_root() functions meson: add 'check: true' for run_command() calls Add Python bindings py: generate control enums from yaml py: add unittests.py py: Add cam.py Documentation/meson.build | 4 +- README.rst | 4 +- include/libcamera/ipa/meson.build | 8 +- meson.build | 17 +- meson_options.txt | 5 + src/libcamera/meson.build | 4 +- src/meson.build | 1 + src/py/cam/cam.py | 475 +++++++++++++ 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 | 383 +++++++++++ src/py/cam/gl_helpers.py | 74 ++ src/py/libcamera/__init__.py | 84 +++ src/py/libcamera/gen-py-control-enums.py | 95 +++ src/py/libcamera/meson.build | 64 ++ src/py/libcamera/pyenums.cpp | 34 + src/py/libcamera/pyenums_generated.cpp.in | 21 + src/py/libcamera/pymain.cpp | 650 ++++++++++++++++++ src/py/meson.build | 1 + subprojects/.gitignore | 3 +- subprojects/packagefiles/pybind11/meson.build | 7 + subprojects/pybind11.wrap | 9 + test/meson.build | 1 + test/py/meson.build | 17 + test/py/unittests.py | 352 ++++++++++ .../include/libcamera/ipa/meson.build | 4 +- 27 files changed, 2878 insertions(+), 23 deletions(-) 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/packagefiles/pybind11/meson.build create mode 100644 subprojects/pybind11.wrap create mode 100644 test/py/meson.build create mode 100755 test/py/unittests.py