Show a patch.

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

{
    "id": 353,
    "url": "https://patchwork.libcamera.org/api/patches/353/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/353/",
    "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": "<20190123150351.8307-2-niklas.soderlund@ragnatech.se>",
    "date": "2019-01-23T15:03:50",
    "name": "[libcamera-devel,1/2] libcamera: MediaEntity: expose the entity flags",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "a7ca88945e807f7d02667ef2497afd0963191b26",
    "submitter": {
        "id": 5,
        "url": "https://patchwork.libcamera.org/api/people/5/?format=api",
        "name": "Niklas Söderlund",
        "email": "niklas.soderlund@ragnatech.se"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/353/mbox/",
    "series": [
        {
            "id": 124,
            "url": "https://patchwork.libcamera.org/api/series/124/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=124",
            "date": "2019-01-23T15:03:49",
            "name": "libcamera: pipeline: uvcvideo: attach to a V4L2Device",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/124/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/353/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/353/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<niklas.soderlund@ragnatech.se>",
        "Received": [
            "from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net\n\t[195.74.38.229])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1C26460C7F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 23 Jan 2019 16:04:00 +0100 (CET)",
            "from bismarck.berto.se (unknown [89.233.230.99])\n\tby bin-vsp-out-03.atm.binero.net (Halon) with ESMTPA\n\tid 100da7ca-1f20-11e9-911a-0050569116f7;\n\tWed, 23 Jan 2019 16:03:38 +0100 (CET)"
        ],
        "X-Halon-ID": "100da7ca-1f20-11e9-911a-0050569116f7",
        "Authorized-sender": "niklas@soderlund.pp.se",
        "From": "=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed, 23 Jan 2019 16:03:50 +0100",
        "Message-Id": "<20190123150351.8307-2-niklas.soderlund@ragnatech.se>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20190123150351.8307-1-niklas.soderlund@ragnatech.se>",
        "References": "<20190123150351.8307-1-niklas.soderlund@ragnatech.se>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 1/2] libcamera: MediaEntity: expose the\n\tentity flags",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "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>",
        "X-List-Received-Date": "Wed, 23 Jan 2019 15:04:00 -0000"
    },
    "content": "The media entity flags can be useful for pipeline handlers to find the\ndefault device in a media graph which is marked with the\nMEDIA_ENT_FL_DEFAULT flag. This will be especially useful for the UVC\npipeline handler where the entity names differ per device.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n src/libcamera/include/media_object.h |  2 ++\n src/libcamera/media_object.cpp       | 13 ++++++++++++-\n 2 files changed, 14 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/libcamera/include/media_object.h b/src/libcamera/include/media_object.h\nindex 64095bec8606bd32..2a3ffc06c876d792 100644\n--- a/src/libcamera/include/media_object.h\n+++ b/src/libcamera/include/media_object.h\n@@ -85,6 +85,7 @@ class MediaEntity : public MediaObject\n public:\n \tconst std::string &name() const { return name_; }\n \tunsigned int function() const { return function_; }\n+\tunsigned int flags() const { return flags_; }\n \tconst std::string &deviceNode() const { return deviceNode_; }\n \tunsigned int deviceMajor() const { return major_; }\n \tunsigned int deviceMinor() const { return minor_; }\n@@ -106,6 +107,7 @@ private:\n \n \tstd::string name_;\n \tunsigned int function_;\n+\tunsigned int flags_;\n \tstd::string deviceNode_;\n \tunsigned int major_;\n \tunsigned int minor_;\ndiff --git a/src/libcamera/media_object.cpp b/src/libcamera/media_object.cpp\nindex baf9aeaa8fffe1a6..f6abcd8676a3866d 100644\n--- a/src/libcamera/media_object.cpp\n+++ b/src/libcamera/media_object.cpp\n@@ -265,6 +265,16 @@ void MediaPad::addLink(MediaLink *link)\n  * \\return The entity's function\n  */\n \n+/**\n+ * \\fn MediaEntity::flags()\n+ * \\brief Retrieve the entity's flags\n+ *\n+ * Media entity flags are expressed using the MEDIA_ENT_FL_* macros\n+ * defined by the Media Controller API.\n+ *\n+ * \\return The entity's flags\n+ */\n+\n /**\n  * \\fn MediaEntity::deviceNode()\n  * \\brief Retrieve the entity's device node path, if any\n@@ -358,7 +368,8 @@ MediaEntity::MediaEntity(MediaDevice *dev,\n \t\t\t const struct media_v2_entity *entity,\n \t\t\t unsigned int major, unsigned int minor)\n \t: MediaObject(dev, entity->id), name_(entity->name),\n-\t  function_(entity->function), major_(major), minor_(minor)\n+\t  function_(entity->function), flags_(entity->flags),\n+\t  major_(major), minor_(minor)\n {\n }\n \n",
    "prefixes": [
        "libcamera-devel",
        "1/2"
    ]
}