Show a patch.

GET /api/patches/10268/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 10268,
    "url": "https://patchwork.libcamera.org/api/patches/10268/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/10268/",
    "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": "<20201027151240.24065-1-sebastian.fricke.linux@gmail.com>",
    "date": "2020-10-27T15:12:40",
    "name": "[libcamera-devel] Documentation: Add descriptions for env. variables",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "15c1462910f89642f5183e6cb69145fdd6f300dd",
    "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/10268/mbox/",
    "series": [
        {
            "id": 1421,
            "url": "https://patchwork.libcamera.org/api/series/1421/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1421",
            "date": "2020-10-27T15:12:40",
            "name": "[libcamera-devel] Documentation: Add descriptions for env. variables",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1421/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/10268/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/10268/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 A4C34C3B5C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 27 Oct 2020 15:12:48 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2263E62150;\n\tTue, 27 Oct 2020 16:12:48 +0100 (CET)",
            "from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com\n\t[IPv6:2a00:1450:4864:20::32d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C520062034\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 27 Oct 2020 16:12:46 +0100 (CET)",
            "by mail-wm1-x32d.google.com with SMTP id e2so1813058wme.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 27 Oct 2020 08:12:46 -0700 (PDT)",
            "from basti.fritz.box\n\t(p200300d1ff01b200e383df520a7e258b.dip0.t-ipconnect.de.\n\t[2003:d1:ff01:b200:e383:df52:a7e:258b])\n\tby smtp.gmail.com with ESMTPSA id\n\tt19sm2187082wmj.42.2020.10.27.08.12.44\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 27 Oct 2020 08:12:45 -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=\"sn3Cd3NW\"; 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=BOBt8W8JqypWOkZ5KahlIowDXL0nlbB2xnNvII4G8n0=;\n\tb=sn3Cd3NW8TH3vYZtmZm0MfcpRmMefqiaAK8J8QjuD1+KQ+/+BFors1w2O0UH3JsFKl\n\tgEMYd1JgvITzPDyR8HsoXqum4UaWbWYXKYO2cmAj+Rrn1gSlzBi0EEPjYzHGZ1t8JF11\n\t0e592GSCRKNYG2X0eauuDwI/yu/UpdSJUWDAGHCXkwKbbO2+Ykxk15JFxCzETKaeveX1\n\tGYcG1PIxgqGjsoBJTVGAJZUJ1AV6Y5lcaKVHn2xJ8/GHvizrfqWm/sKi2yyuynYKQxZu\n\tFKnAcFFg7ZOq8cxQdzTZKS8KTkGmwXst/jNfxvS1KMUFScWhiu4wVsi+kXgr3DMH2qa2\n\tmNeA==",
        "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=BOBt8W8JqypWOkZ5KahlIowDXL0nlbB2xnNvII4G8n0=;\n\tb=bfaqh7uv6SPIR1vk6ctq4ekw/79uOMNNnT7EEt+XVXxfDygryw2mlDw41rIkLckM6h\n\tuMhpldVgjaDw2Omb+QJOqHAQ3njygKu7p31IYxX9wH1rwz6T/NxPOxdMh4m0LuFr6+qE\n\t71msB/Q5Z2C2eP23+36JBnD8bA31vnUt2wU8H4XZ8TXEj6JWzLdodvxntGyKWEKCJ+N+\n\tqfpRDkyOiQEO1U6O50KiRu9o/MMYyWR/Xqm9h5GOmNqs9qWWTOOYoTI33dA3AmWMfZvD\n\tYQ/PkskfxxzSjvpUpNBa9YVhHHt3Xi3RnT9XuwaDIPtgHp6yUHlVu0Qso71s//8euCgd\n\tD9NQ==",
        "X-Gm-Message-State": "AOAM531cgDIhsvNGwC2og+PUUXFioWnA8j06rl2cTKtcko2+IoBAOOF/\n\to3Ge+CPrFh9AGO5/lYSmiw19DuiquYc=",
        "X-Google-Smtp-Source": "ABdhPJwQPsQquzkLeSyUbpfOXBzr6NXf4gbqhlZsNLtMwbff+qSkmh5ECpqPz/64W8QTDLKkn+ewxw==",
        "X-Received": "by 2002:a7b:c15a:: with SMTP id z26mr3145732wmi.62.1603811565841;\n\tTue, 27 Oct 2020 08:12:45 -0700 (PDT)",
        "From": "Sebastian Fricke <sebastian.fricke.linux@gmail.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 27 Oct 2020 16:12:40 +0100",
        "Message-Id": "<20201027151240.24065-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": "multipart/mixed;\n\tboundary=\"===============6776925390946375680==\"",
        "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\nSigned-off-by: Sebastian Fricke <sebastian.fricke.linux@gmail.com>\n---\n .../guides/environment_variables.rst          | 141 ++++++++++++++++++\n Documentation/index.rst                       |   1 +\n Documentation/meson.build                     |   1 +\n 3 files changed, 143 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..483a816\n--- /dev/null\n+++ b/Documentation/guides/environment_variables.rst\n@@ -0,0 +1,141 @@\n+Environment variables\n+=====================\n+\n+List of variables\n+-----------------\n+\n++---------------------------+-----------------------------------------+---------------------------------+---------------------------------------------------------------+\n+| Environment variable      | Description                             | Example value                   | Further information                                           |\n++===========================+=========================================+=================================+===============================================================+\n+| LIBCAMERA_LOG_FILE        | Custom destination for log output       | ``/home/{user}/camera_log.log`` |                                                               |\n++---------------------------+-----------------------------------------+---------------------------------+---------------------------------------------------------------+\n+| LIBCAMERA_LOG_LEVELS      | Log verbosity                           | ``*:DEBUG``                     | `Levels <#log-levels>`__ and `Categories <#log-categories>`__ |\n++---------------------------+-----------------------------------------+---------------------------------+---------------------------------------------------------------+\n+| LIBCAMERA_IPA_CONFIG_PATH | Custom locations for IPA configurations | ``/use/path/one:/tmp/path/two`` | `IPA configuration <#ipa-configuration>`__                    |\n++---------------------------+-----------------------------------------+---------------------------------+---------------------------------------------------------------+\n+| LIBCAMERA_IPA_MODULE_PATH | Custom locations for IPA modules        | ``/usr/path/one:/tmp/path/two`` | `IPA module <#ipa-module>`__                                  |\n++---------------------------+-----------------------------------------+---------------------------------+---------------------------------------------------------------+\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 those variables locally or globally, but there is a restriction for ``LIBCAMERA_LOG_LEVELS`` in a local environment.\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='/home/{USER}/camera_log.log'\n+   :~$ LIBCAMERA_LOG_LEVELS='*:DEBUG'\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+**Doesn’t work ?**: We have experienced cases were a local assignment\n+to ``LIBCAMERA_LOG_LEVELS`` isn’t acknowledged by the application.\n+There are 2 solutions for that problem:\n+\n+1. Execute the command and set the value in a single prompt:\n+\n+   ``:~$ LIBCAMERA_LOG_LEVELS=0 cam --list``\n+2. Set the environment variable globally:\n+\n+   ``:~$ export LIBCAMERA_LOG_LEVELS=0 && cam --list``\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++------------------+----------------+------------+----------------+---------------------+----------------+\n+| Main classes     | Pipe-lines     | V4L2       | Android        | IPA                 | Others         |\n++==================+================+============+================+=====================+================+\n+| Allocator        | IPU3           | V4L2       | CameraMetadata | IPAManager          | IPCUnixSocket  |\n++------------------+----------------+------------+----------------+---------------------+----------------+\n+| Buffer           | RPI            | V4L2Compat | EXIF           | IPAModule           | LogAPITest     |\n++------------------+----------------+------------+----------------+---------------------+----------------+\n+| Camera           | RPISTREAM      |            | HAL            | IPAProxy            | LogProcessTest |\n++------------------+----------------+------------+----------------+---------------------+----------------+\n+| CameraSensor     | RPI_S_W        |            | JPEG           | IPAProxyLinuxWorker | SysFs          |\n++------------------+----------------+------------+----------------+---------------------+----------------+\n+| Controls         | RkISP1         |            |                | IPARkISP1           |                |\n++------------------+----------------+------------+----------------+---------------------+----------------+\n+| DeviceEnumerator | SimplePipeline |            |                | IPARPI              |                |\n++------------------+----------------+------------+----------------+---------------------+----------------+\n+| Event            | Timeline       |            |                | IPAVimc             |                |\n++------------------+----------------+------------+----------------+---------------------+----------------+\n+| File             | UVC            |            |                | RPiFocus            |                |\n++------------------+----------------+------------+----------------+---------------------+----------------+\n+| FileDescriptor   | VIMC           |            |                |                     |                |\n++------------------+----------------+------------+----------------+---------------------+----------------+\n+| Formats          |                |            |                |                     |                |\n++------------------+----------------+------------+----------------+---------------------+----------------+\n+| MediaDevice      |                |            |                |                     |                |\n++------------------+----------------+------------+----------------+---------------------+----------------+\n+| Message          |                |            |                |                     |                |\n++------------------+----------------+------------+----------------+---------------------+----------------+\n+| Object           |                |            |                |                     |                |\n++------------------+----------------+------------+----------------+---------------------+----------------+\n+| Pipeline         |                |            |                |                     |                |\n++------------------+----------------+------------+----------------+---------------------+----------------+\n+| Process          |                |            |                |                     |                |\n++------------------+----------------+------------+----------------+---------------------+----------------+\n+| Request          |                |            |                |                     |                |\n++------------------+----------------+------------+----------------+---------------------+----------------+\n+| Serialization    |                |            |                |                     |                |\n++------------------+----------------+------------+----------------+---------------------+----------------+\n+| Serializer       |                |            |                |                     |                |\n++------------------+----------------+------------+----------------+---------------------+----------------+\n+| Stream           |                |            |                |                     |                |\n++------------------+----------------+------------+----------------+---------------------+----------------+\n+| Thread           |                |            |                |                     |                |\n++------------------+----------------+------------+----------------+---------------------+----------------+\n+| Timer            |                |            |                |                     |                |\n++------------------+----------------+------------+----------------+---------------------+----------------+\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"
    ]
}