Patch Detail
Show a patch.
GET /api/patches/10294/?format=api
{ "id": 10294, "url": "https://patchwork.libcamera.org/api/patches/10294/?format=api", "web_url": "https://patchwork.libcamera.org/patch/10294/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20201029083626.21213-1-sebastian.fricke.linux@gmail.com>", "date": "2020-10-29T08:36:26", "name": "[libcamera-devel] Documentation: Add descriptions for env. variables", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "a3e9aafe53008367d5459496cef794381727de1e", "submitter": { "id": 73, "url": "https://patchwork.libcamera.org/api/people/73/?format=api", "name": "Sebastian Fricke", "email": "sebastian.fricke.linux@gmail.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/10294/mbox/", "series": [ { "id": 1430, "url": "https://patchwork.libcamera.org/api/series/1430/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1430", "date": "2020-10-29T08:36:26", "name": "[libcamera-devel] Documentation: Add descriptions for env. variables", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1430/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/10294/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/10294/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 076F0BDB9B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 29 Oct 2020 08:36:32 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7C85462825;\n\tThu, 29 Oct 2020 09:36:31 +0100 (CET)", "from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com\n\t[IPv6:2a00:1450:4864:20::62e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 463A562053\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 29 Oct 2020 09:36:30 +0100 (CET)", "by mail-ej1-x62e.google.com with SMTP id k3so2627427ejj.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 29 Oct 2020 01:36:30 -0700 (PDT)", "from basti.fritz.box\n\t(p200300d1ff0150000177fa94b6a5f6ca.dip0.t-ipconnect.de.\n\t[2003:d1:ff01:5000:177:fa94:b6a5:f6ca])\n\tby smtp.gmail.com with ESMTPSA id\n\ti14sm1081469ejp.2.2020.10.29.01.36.28\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 29 Oct 2020 01:36:28 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"ahAUaCtb\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=N7MuaMRIAGTsnw8HW/eL74xLodUYTr71b/y3CKzBS00=;\n\tb=ahAUaCtb+QQLGVMKaBBtBUAdSFueMxmLhs8LRaNAa2mvEbzkbbk8VxhcWY+f3PtuIZ\n\t6TtuOCwaNgedNuz1VtG6KA/rEcQsgMwpCbj82y3lRyTxRmY1R0ldGXSSqFsY9DJbiO37\n\tdiUmwlVwuC+Rl0XJGXP0HEBlAE7+mtxVuDgt5vVFKNX5U/S5bQlK/I4SKyQknnH1TY/O\n\tg2TmXEH9bmsWmKk4zJYFDleBzr1vUpfzbueJCw1XQNKCeHKyc9iNeLtgooUukx7LJms5\n\toqAS41A10R6+YZJNYZItrkW1B2pheM11J0YKtfHB5LWmU0sWjJcOu5Pj/uqnlvvazsb1\n\tzidg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=N7MuaMRIAGTsnw8HW/eL74xLodUYTr71b/y3CKzBS00=;\n\tb=o6a4jsTySvv/+SI9uj2x5sKr6N+SnEZiMg1IbItIpClDn7jTPZqbpAGLgk9dIH82At\n\tovqjZJIYITdAtDhB+NX3ziZUOl7rFvOwo5uK9Oka2vM08MF4vGZxrGV51ZBGBLpVfkFm\n\tk1VWkNgOR3zWrB52Gu4nCl49fOgjt6XuHTZYqG6X8ghGz6NHKjZZFnTU9KjExoqSX39I\n\tSwndb1x5hMM+I5czzPnvhUsExhE/+huXCIWe+CBYor2OyV9g/P91j2aOqIDC0M83R+sU\n\tmVLY2PU97d6KC5KkgaDkL08Vzl1BaQ6OemR5WyHeoEgE2Aj20eLkDPtx1sc668Qk6gcy\n\t3y4Q==", "X-Gm-Message-State": "AOAM532Z376V4fn7KsQZxbbwtlXAgmIspxi2JqHethL90XbztfXpBM/5\n\tK5eP7mnawyAUdF9P3KYrLKjQ0bDAVCc=", "X-Google-Smtp-Source": "ABdhPJzU5XPJrExQPuoMA5uWPaX+YagptTRqbutleHDlQyFTbAf62A+sTzyBf7s5Mn/loqZuPKW6Zg==", "X-Received": "by 2002:a17:906:7c4b:: with SMTP id\n\tg11mr3054090ejp.469.1603960589483; \n\tThu, 29 Oct 2020 01:36:29 -0700 (PDT)", "From": "Sebastian Fricke <sebastian.fricke.linux@gmail.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 29 Oct 2020 09:36:26 +0100", "Message-Id": "<20201029083626.21213-1-sebastian.fricke.linux@gmail.com>", "X-Mailer": "git-send-email 2.20.1", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH] Documentation: Add descriptions for env.\n\tvariables", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Describe the environment variables used in libcamera, excluded\nvariables are `LIBCAMERA_IPA_FORCE_C_API` and `LIBCAMERA_IPA_PROXY_PATH`,\nthe former because it is likely to be removed and the later because\nit has no current use-case.\n\nAdd a brief explanation for the IPA configuration and IPA modules.\nList all the available Log levels and categories and add a short guide\nfor how to use them for debugging.\n\nChanges since V1:\n* abandon the usage of tables as they are too clunky and difficult to\nmaintain\n* Fix a wrong example that does not work on most distributions and setups\n* Improve structure of log categories\n\nSigned-off-by: Sebastian Fricke <sebastian.fricke.linux@gmail.com>\n---\n .../guides/environment_variables.rst | 107 ++++++++++++++++++\n Documentation/index.rst | 1 +\n Documentation/meson.build | 1 +\n 3 files changed, 109 insertions(+)\n create mode 100644 Documentation/guides/environment_variables.rst", "diff": "diff --git a/Documentation/guides/environment_variables.rst b/Documentation/guides/environment_variables.rst\nnew file mode 100644\nindex 0000000..6e627fd\n--- /dev/null\n+++ b/Documentation/guides/environment_variables.rst\n@@ -0,0 +1,107 @@\n+Environment variables\n+=====================\n+\n+List of variables\n+-----------------\n+\n+* LIBCAMERA_LOG_FILE\n+ * Brief description: Custom destination for log output\n+ * Example value: ``/home/{user}/camera_log.log``\n+\n+* LIBCAMERA_LOG_LEVELS\n+ * Brief description: Configure the verbosity of log messages for different categories\n+ * Example value: ``*:DEBUG``\n+ * Details: `Levels <#log-levels>`__ and `Categories <#log-categories>`__ \n+* LIBCAMERA_IPA_CONFIG_PATH\n+ * Brief description: Define custom search locations for IPA configurations\n+ * Example value: ``/usr/path/one:/tmp/path/two``\n+ * Details: `IPA configuration <#ipa-configuration>`__\n+* LIBCAMERA_IPA_MODULE_PATH\n+ * Brief description: Define custom search locations for IPA modules\n+ * Example value: ``/usr/path/one:/tmp/path/two``\n+ * Details: `IPA module <#ipa-module>`__\n+\n+Further details\n+---------------\n+\n+Notes about debugging\n+~~~~~~~~~~~~~~~~~~~~~\n+\n+The environment variables `LIBCAMERA_LOG_FILE` and `LIBCAMERA_LOG_LEVELS` are used to modify the destination and verbosity of messages provided by the libcamera API.\n+\n+You can define the values for these variables locally or globally. If you set it locally, note that for Bash-like shells, you need to set the value of `LIBCAMERA_LOG_LEVELS` on the same line as the command, as shown in the first example.\n+\n+Examples:\n+\n+Enable full debug output to a separate file, for every `category <#log-categories>`__ within a local environment:\n+\n+.. code:: bash\n+\n+ :~$ LIBCAMERA_LOG_FILE='/tmp/example_log.log' \\\n+ LIBCAMERA_LOG_LEVELS=0 \\\n+ cam --list\n+\n+Enable full debug output for the categories Camera & V4L2 within a\n+global environment:\n+\n+.. code:: bash\n+\n+ :~$ export LIBCAMERA_LOG_LEVELS='Camera:DEBUG,V4L2:DEBUG'\n+ :~$ cam --list\n+\n+An alternative value to for `LIBCAMERA_LOG_LEVELS` to enable\n+debugging output for all categories is 0.\n+\n+Log levels \n+~~~~~~~~~~~\n+\n+This is the list of available log levels, notice that all levels below\n+the chosen one are printed, while those above are discarded.\n+\n+- DEBUG\n+- INFO\n+- WARN\n+- ERROR\n+- FATAL\n+\n+Log categories \n+~~~~~~~~~~~~~~~\n+\n+* Major classes: \n+ + Camera, CameraMetadata, CameraSensor, Controls, DeviceEnumerator, Formats, MediaDevice, Request\n+\n+* Pipeline:\n+ + Pipeline, IPU3, RPI, RPISTREAM, RPI_S_W, RkISP1, SimplePipeline, Timeline, UVC, VIMC\n+\n+* V4L2-API:\n+ + V4L2, V4L2Compat\n+\n+* IPA (Image Processing Algorithms):\n+ + IPAManager, IPAModule, IPAProxy, IPAProxyLinuxWorker, IPARkISP1, IPARPI, IPAVimc, RPiFocus\n+\n+* Android specific:\n+ + CameraMetadata, EXIF, HAL, JPEG\n+\n+* Others:\n+ + Allocator, Buffer, Event, File, FileDescriptor, IPCUnixSocket, LogAPITest, LogProcessTest, Message, Object, Process, Serialization, Serializer, Stream, SysFs, Thread, Timeline, Timer\n+\n+IPA configuration \n+~~~~~~~~~~~~~~~~~~\n+\n+The format and contents of the configuration file are specific to the\n+IPA (Image processing algorithm). It usually contains data that optimize\n+the behaviour of the algorithms stored in JSON format. The\n+``LIBCAMERA_IPA_CONFIG_PATH`` variable can be used to specify custom\n+storeage locations to search for those configuration files.\n+\n+`Examples <https://git.libcamera.org/libcamera/libcamera.git/tree/src/ipa/raspberrypi/data>`__\n+\n+IPA module \n+~~~~~~~~~~~\n+\n+Existing IPA modules can be located in the\n+`src/ipa/ <https://git.libcamera.org/libcamera/libcamera.git/tree/src/ipa>`__\n+directory, they provide the interface to the ISP(image signal processer)\n+and the implementation of algorithms. With the\n+``LIBCAMERA_IPA_MODULE_PATH``, you can specify a non-default location to\n+search for these modules.\ndiff --git a/Documentation/index.rst b/Documentation/index.rst\nindex a30688a..924bd12 100644\n--- a/Documentation/index.rst\n+++ b/Documentation/index.rst\n@@ -16,3 +16,4 @@\n Developer Guide <guides/introduction>\n Application Writer's Guide <guides/application-developer>\n Pipeline Handler Writer's Guide <guides/pipeline-handler>\n+ Environment variables <guides/environment_variables.rst>\ndiff --git a/Documentation/meson.build b/Documentation/meson.build\nindex d3d64f7..0e7ba7d 100644\n--- a/Documentation/meson.build\n+++ b/Documentation/meson.build\n@@ -56,6 +56,7 @@ if sphinx.found()\n 'guides/introduction.rst',\n 'guides/application-developer.rst',\n 'guides/pipeline-handler.rst',\n+ 'guides/environment_variables.rst',\n ]\n \n release = 'release=v' + libcamera_git_version\n", "prefixes": [ "libcamera-devel" ] }