[{"id":560,"web_url":"https://patchwork.libcamera.org/comment/560/","msgid":"<20190124184621.GB4127@bigcity.dyn.berto.se>","date":"2019-01-24T18:46:22","subject":"Re: [libcamera-devel] [PATCH v2 1/2] libcamera: v4l2_device:\n\tIdentify multiplanar formats","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Jacopo,\n\nThanks for your work.\n\nOn 2019-01-24 12:29:59 +0100, Jacopo Mondi wrote:\n> Add functions to V4L2Capability to identify if a V4L2 device supports\n> multiplanar V4L2 APIs.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n>  src/libcamera/include/v4l2_device.h | 23 +++++++++++++++++++----\n>  src/libcamera/v4l2_device.cpp       |  6 ++++++\n>  2 files changed, 25 insertions(+), 4 deletions(-)\n> \n> diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h\n> index cb3601c..413bb7f 100644\n> --- a/src/libcamera/include/v4l2_device.h\n> +++ b/src/libcamera/include/v4l2_device.h\n> @@ -32,10 +32,25 @@ struct V4L2Capability final : v4l2_capability {\n>  \t\t\t\t    ? v4l2_capability::device_caps\n>  \t\t\t\t    : v4l2_capability::capabilities;\n>  \t}\n> -\n> -\tbool isCapture() const { return device_caps() & V4L2_CAP_VIDEO_CAPTURE; }\n> -\tbool isOutput() const { return device_caps() & V4L2_CAP_VIDEO_OUTPUT; }\n> -\tbool hasStreaming() const { return device_caps() & V4L2_CAP_STREAMING; }\n> +\tbool isMultiplanar() const\n> +\t{\n> +\t\treturn device_caps() & (V4L2_CAP_VIDEO_CAPTURE_MPLANE |\n> +\t\t\t\t\tV4L2_CAP_VIDEO_OUTPUT_MPLANE);\n> +\t}\n> +\tbool isCapture() const\n> +\t{\n> +\t\treturn device_caps() & (V4L2_CAP_VIDEO_CAPTURE |\n> +\t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE_MPLANE);\n> +\t}\n> +\tbool isOutput() const\n> +\t{\n> +\t\treturn device_caps() & (V4L2_CAP_VIDEO_OUTPUT |\n> +\t\t\t\t\tV4L2_CAP_VIDEO_OUTPUT_MPLANE);\n> +\t}\n> +\tbool hasStreaming() const\n> +\t{\n> +\t\treturn device_caps() & V4L2_CAP_STREAMING;\n> +\t}\n>  };\n>  \n>  class MediaEntity;\n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index 0ce2b18..9cb504d 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -56,6 +56,12 @@ LOG_DEFINE_CATEGORY(V4L2)\n>   * \t   driver capabilities otherwise\n>   */\n>  \n> +/**\n> + * \\fn bool V4L2Capability::isMultiplanar()\n> + * \\brief Identify if the device implement V4L2 multiplanar APIs\n> + * \\return True if the device supports multiplanar APIs\n> + */\n> +\n>  /**\n>   * \\fn bool V4L2Capability::isCapture()\n>   * \\brief Identify if the device is capable of capturing video\n> -- \n> 2.20.1\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lj1-x243.google.com (mail-lj1-x243.google.com\n\t[IPv6:2a00:1450:4864:20::243])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AB9E160C82\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Jan 2019 19:46:25 +0100 (CET)","by mail-lj1-x243.google.com with SMTP id v15-v6so6152854ljh.13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Jan 2019 10:46:25 -0800 (PST)","from localhost (89-233-230-99.cust.bredband2.com. [89.233.230.99])\n\tby smtp.gmail.com with ESMTPSA id\n\ts9-v6sm754855lja.12.2019.01.24.10.46.22\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 24 Jan 2019 10:46:23 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=DhzA9UUBnhgSktfHz6levXXctxssbIRYn0jtfOWoGdo=;\n\tb=A59XiD5/KZ7FV4zEe2q1ZmGJgvGOSGjR9DTvfDM5BzCJJoHwWO5yP6ypwiLQRLkl4/\n\tXMnzi4bIhBxjqsJbZNZ85cSp94D7oWQnIzC7AtLmqLXjDkpjV9JW8s31ynpaz/I0wpLR\n\t5oSJq+R8HcKaxmQj7fVz5vgAtLSG8nm9V9FaW4nJK1EiGH27sNWI6850hJO4SacfOksU\n\tKZaf7OmK3KTgaXS6GaQ5GVvDc2L6zQ+6E41x6cTiaDqbGIgcKtmMwB8JuYqmJEphLvei\n\texJeE0j39w16e+zCUppu8AW2Dvug3M/n8bqa/GRG3OMpLMBZ1h2VTxTIMhytxXlx65hc\n\tg47Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=DhzA9UUBnhgSktfHz6levXXctxssbIRYn0jtfOWoGdo=;\n\tb=di2qHtRvnGpGZG0mVvj08dxdDwNHqicxkbl3+yKeZbigQMBoLaUQEq9pazf5ZltbNN\n\t1DcJFOHyVobPZA9N0/vn5RkvWq+vG+jF1grhBFA4GiRHDMVtP3pqAwtz/3V9MvYyAC6s\n\thJvVI35d6KZDZyMWdaGWyu6PUzNcPHFYi99n3j6h0wJhNKxvJ6VOlwu/+Zix5WddePBj\n\t7nozIuhl0SW4F2k3lbkqkTZNa74GcDzE2Gg1x+fK6BKIJ2Bt2gP0Ytp26GwHW7zXEgz1\n\tqBNMdXHh1wzSfTM1Ou2qFGTeRwGKg8RGXLsmx0qeNQti1HWRbQmepHZ7Ij32JaI1mCZD\n\t3Nig==","X-Gm-Message-State":"AJcUukej2TzdgHZcTSNurO/fWLErp5miZJlqqFWHE8zNxJViAbtHJt9a\n\tJuhdDCkt7h2qyYvlcGivoPiy+Q==","X-Google-Smtp-Source":"ALg8bN5EDx3AD2iF7JPtBov1luEzq7pr8EYb5XvvjgmEJ/O/VtjPEsdoJyio1EwRqvIWeL0HEz2UBA==","X-Received":"by 2002:a2e:551:: with SMTP id\n\t78-v6mr6485308ljf.82.1548355584894; \n\tThu, 24 Jan 2019 10:46:24 -0800 (PST)","Date":"Thu, 24 Jan 2019 19:46:22 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190124184621.GB4127@bigcity.dyn.berto.se>","References":"<20190124113000.7142-1-jacopo@jmondi.org>\n\t<20190124113000.7142-2-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190124113000.7142-2-jacopo@jmondi.org>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v2 1/2] libcamera: v4l2_device:\n\tIdentify multiplanar formats","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":"Thu, 24 Jan 2019 18:46:26 -0000"}}]