[{"id":901,"web_url":"https://patchwork.libcamera.org/comment/901/","msgid":"<283058d3-0d91-89b0-93c3-56c981ba2bf4@ideasonboard.com>","date":"2019-02-26T23:24:48","subject":"Re: [libcamera-devel] [PATCH v3 3/8] libcamera: v4l2_device: Add\n\tsupport for META_CAPTURE devices","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn 26/02/2019 16:26, Jacopo Mondi wrote:\n> Add support for devices that provide video meta-data to v4l2_device.cpp\n> and re-arrange bufferType handling in open() method.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/libcamera/include/v4l2_device.h |  4 +++\n>  src/libcamera/v4l2_device.cpp       | 38 +++++++++++++++++------------\n>  2 files changed, 27 insertions(+), 15 deletions(-)\n> \n> diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h\n> index 1d31d1b403bc..52eb6785cc15 100644\n> --- a/src/libcamera/include/v4l2_device.h\n> +++ b/src/libcamera/include/v4l2_device.h\n> @@ -53,6 +53,10 @@ struct V4L2Capability final : v4l2_capability {\n>  \t\treturn device_caps() & (V4L2_CAP_VIDEO_CAPTURE |\n>  \t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE_MPLANE);\n>  \t}\n> +\tbool isMeta() const\n> +\t{\n> +\t\treturn device_caps() & V4L2_CAP_META_CAPTURE;\n> +\t}\n>  \tbool isOutput() const\n>  \t{\n>  \t\treturn device_caps() & (V4L2_CAP_VIDEO_OUTPUT |\n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index 24e115554a99..8be8af7a2893 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -79,6 +79,15 @@ LOG_DEFINE_CATEGORY(V4L2)\n>   * \\return True if the device can output video frames\n>   */\n>  \n> +/**\n> + * \\fn bool V4L2Capability::isMeta()\n> + * \\brief Identify if the device is capable of providing video meta-data\n> + *\n> + * FIXME: add support for META_OUTPUT, introduced in Linux v4.20\n\nI think I saw Niklas suggest to make this a Todo: rather than fixme -\nbut I don't think we need to worry too much over terminology that should\nbe removed within a couple of weeks :D as We'll update this after the\n5.0 is released.\n\n\nLikewise, I think the conditionals below might get some more thought put\ninto them when we add in META_OUTPUT - but that's all future work.\n\nThis patch gets us closer.\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n\n> + *\n> + * \\return True if the device can provide video meta-data\n> + */\n> +\n>  /**\n>   * \\fn bool V4L2Capability::hasStreaming()\n>   * \\brief Determine if the device can perform Streaming I/O\n> @@ -280,33 +289,32 @@ int V4L2Device::open()\n>  \t\t<< \"Opened device \" << caps_.bus_info() << \": \"\n>  \t\t<< caps_.driver() << \": \" << caps_.card();\n>  \n> -\tif (!caps_.isCapture() && !caps_.isOutput()) {\n> -\t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n> -\t\treturn -EINVAL;\n> -\t}\n> -\n>  \tif (!caps_.hasStreaming()) {\n>  \t\tLOG(V4L2, Error) << \"Device does not support streaming I/O\";\n>  \t\treturn -EINVAL;\n>  \t}\n>  \n> -\tif (caps_.isCapture())\n> +\t/*\n> +\t * Set buffer type and wait for read notifications on CAPTURE devices\n> +\t * (POLLIN), and write notifications for OUTPUT devices (POLLOUT).\n> +\t */\n> +\tif (caps_.isCapture()) {\n> +\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n>  \t\tbufferType_ = caps_.isMultiplanar()\n>  \t\t\t    ? V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE\n>  \t\t\t    : V4L2_BUF_TYPE_VIDEO_CAPTURE;\n> -\telse\n> +\t} else if (caps_.isOutput()) {\n> +\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n>  \t\tbufferType_ = caps_.isMultiplanar()\n>  \t\t\t    ? V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE\n>  \t\t\t    : V4L2_BUF_TYPE_VIDEO_OUTPUT;\n> -\n> -\t/*\n> -\t *  We wait for Read notifications on CAPTURE devices (POLLIN), and\n> -\t *  Write notifications for OUTPUT devices (POLLOUT).\n> -\t */\n> -\tif (caps_.isCapture())\n> +\t} else if (caps_.isMeta()) {\n>  \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n> -\telse\n> -\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n> +\t\tbufferType_ = V4L2_BUF_TYPE_META_CAPTURE;\n> +\t} else {\n> +\t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n> +\t\treturn -EINVAL;\n> +\t}\n>  \n>  \tfdEvent_->activated.connect(this, &V4L2Device::bufferAvailable);\n>  \tfdEvent_->setEnabled(false);\n>","headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2D90B610B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Feb 2019 00:24:52 +0100 (CET)","from [192.168.0.21]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C2B9A67;\n\tWed, 27 Feb 2019 00:24:50 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1551223490;\n\tbh=FtAop4tiQ0sA6SRpQAGT97gvFkmDJF4AQmhKeFUtye8=;\n\th=Reply-To:Subject:To:References:From:Date:In-Reply-To:From;\n\tb=pRo56kJVP5nRJDKU6wUPuPQEKNhBdqkg258PlebFJ6yotREe5Ge8n3551jUOwQg4E\n\tGxtinOs0uABTbyKN/A9fctm9tEsCELqHIuDrmZldcIb7AM9bcmmtmkkuMc5AUy9BHJ\n\tEtj9TWkd47qTQfcSuvgcsYNqx1Hu59SvgpdD2gmE=","Reply-To":"kieran.bingham@ideasonboard.com","To":"Jacopo Mondi <jacopo@jmondi.org>, libcamera-devel@lists.libcamera.org","References":"<20190226162641.12116-1-jacopo@jmondi.org>\n\t<20190226162641.12116-4-jacopo@jmondi.org>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\t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\n\tsbsRB8KNNvVXBOVNwko86rQqF9drZuw=","Organization":"Ideas on Board","Message-ID":"<283058d3-0d91-89b0-93c3-56c981ba2bf4@ideasonboard.com>","Date":"Tue, 26 Feb 2019 23:24:48 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.4.0","MIME-Version":"1.0","In-Reply-To":"<20190226162641.12116-4-jacopo@jmondi.org>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v3 3/8] libcamera: v4l2_device: Add\n\tsupport for META_CAPTURE devices","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":"Tue, 26 Feb 2019 23:24:52 -0000"}},{"id":902,"web_url":"https://patchwork.libcamera.org/comment/902/","msgid":"<dbca7129-52d8-a818-9b7b-39719762efb8@ideasonboard.com>","date":"2019-02-26T23:28:09","subject":"Re: [libcamera-devel] [PATCH v3 3/8] libcamera: v4l2_device: Add\n\tsupport for META_CAPTURE devices","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"On 26/02/2019 23:24, Kieran Bingham wrote:\n> Hi Jacopo,\n> \n> On 26/02/2019 16:26, Jacopo Mondi wrote:\n>> Add support for devices that provide video meta-data to v4l2_device.cpp\n>> and re-arrange bufferType handling in open() method.\n>>\n>> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n>> ---\n>>  src/libcamera/include/v4l2_device.h |  4 +++\n>>  src/libcamera/v4l2_device.cpp       | 38 +++++++++++++++++------------\n>>  2 files changed, 27 insertions(+), 15 deletions(-)\n>>\n>> diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h\n>> index 1d31d1b403bc..52eb6785cc15 100644\n>> --- a/src/libcamera/include/v4l2_device.h\n>> +++ b/src/libcamera/include/v4l2_device.h\n>> @@ -53,6 +53,10 @@ struct V4L2Capability final : v4l2_capability {\n>>  \t\treturn device_caps() & (V4L2_CAP_VIDEO_CAPTURE |\n>>  \t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE_MPLANE);\n>>  \t}\n>> +\tbool isMeta() const\n\nOne last thought here,\n\nI'm a bit concerned that if we have isMeta and isOutput handling this -\nwe might end up with an ugly 2 x 2 matrix in if statements.\n\nAny pretty way to make this better?\n\nOr would it be cleaner to move towards:\n\nbool isMetaCapture()\nbool isMetaOutput()\n\nThis bit feels like a pain point - but I don't think that should stop\nthis patch right now.\n\n\n\n\n>> +\t{\n>> +\t\treturn device_caps() & V4L2_CAP_META_CAPTURE;\n>> +\t}\n>>  \tbool isOutput() const\n>>  \t{\n>>  \t\treturn device_caps() & (V4L2_CAP_VIDEO_OUTPUT |\n>> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n>> index 24e115554a99..8be8af7a2893 100644\n>> --- a/src/libcamera/v4l2_device.cpp\n>> +++ b/src/libcamera/v4l2_device.cpp\n>> @@ -79,6 +79,15 @@ LOG_DEFINE_CATEGORY(V4L2)\n>>   * \\return True if the device can output video frames\n>>   */\n>>  \n>> +/**\n>> + * \\fn bool V4L2Capability::isMeta()\n>> + * \\brief Identify if the device is capable of providing video meta-data\n>> + *\n>> + * FIXME: add support for META_OUTPUT, introduced in Linux v4.20\n> \n> I think I saw Niklas suggest to make this a Todo: rather than fixme -\n> but I don't think we need to worry too much over terminology that should\n> be removed within a couple of weeks :D as We'll update this after the\n> 5.0 is released.\n> \n> \n> Likewise, I think the conditionals below might get some more thought put\n> into them when we add in META_OUTPUT - but that's all future work.\n> \n> This patch gets us closer.\n> \n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> \n>> + *\n>> + * \\return True if the device can provide video meta-data\n>> + */\n>> +\n>>  /**\n>>   * \\fn bool V4L2Capability::hasStreaming()\n>>   * \\brief Determine if the device can perform Streaming I/O\n>> @@ -280,33 +289,32 @@ int V4L2Device::open()\n>>  \t\t<< \"Opened device \" << caps_.bus_info() << \": \"\n>>  \t\t<< caps_.driver() << \": \" << caps_.card();\n>>  \n>> -\tif (!caps_.isCapture() && !caps_.isOutput()) {\n>> -\t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n>> -\t\treturn -EINVAL;\n>> -\t}\n>> -\n>>  \tif (!caps_.hasStreaming()) {\n>>  \t\tLOG(V4L2, Error) << \"Device does not support streaming I/O\";\n>>  \t\treturn -EINVAL;\n>>  \t}\n>>  \n>> -\tif (caps_.isCapture())\n>> +\t/*\n>> +\t * Set buffer type and wait for read notifications on CAPTURE devices\n>> +\t * (POLLIN), and write notifications for OUTPUT devices (POLLOUT).\n>> +\t */\n>> +\tif (caps_.isCapture()) {\n>> +\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n>>  \t\tbufferType_ = caps_.isMultiplanar()\n>>  \t\t\t    ? V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE\n>>  \t\t\t    : V4L2_BUF_TYPE_VIDEO_CAPTURE;\n>> -\telse\n>> +\t} else if (caps_.isOutput()) {\n>> +\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n>>  \t\tbufferType_ = caps_.isMultiplanar()\n>>  \t\t\t    ? V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE\n>>  \t\t\t    : V4L2_BUF_TYPE_VIDEO_OUTPUT;\n>> -\n>> -\t/*\n>> -\t *  We wait for Read notifications on CAPTURE devices (POLLIN), and\n>> -\t *  Write notifications for OUTPUT devices (POLLOUT).\n>> -\t */\n>> -\tif (caps_.isCapture())\n>> +\t} else if (caps_.isMeta()) {\n>>  \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n>> -\telse\n>> -\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n>> +\t\tbufferType_ = V4L2_BUF_TYPE_META_CAPTURE;\n>> +\t} else {\n>> +\t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n>> +\t\treturn -EINVAL;\n>> +\t}\n>>  \n>>  \tfdEvent_->activated.connect(this, &V4L2Device::bufferAvailable);\n>>  \tfdEvent_->setEnabled(false);\n>>\n>","headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8ADF8610B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Feb 2019 00:28:13 +0100 (CET)","from [192.168.0.21]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DF39967;\n\tWed, 27 Feb 2019 00:28:12 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1551223693;\n\tbh=rwEDqRrORZV9N0bXmXa4QPnFM2eszkr+ovTIAHlb9pc=;\n\th=Reply-To:Subject:From:To:References:Date:In-Reply-To:From;\n\tb=Z6ujazmvrjY7OzTmpbHHZ5VZrMdqh9ZnaxoGt4jUhZNIcKY8acSbF0m6yuPu363Pl\n\tVeVuKU/ww/11NTwyElepPJar4prx10EHhDQeEXeATUknzDFvbsMGyhnHbi+lJuNqdI\n\t6VSWEQMe68h3IB80vslJ3yJ5zicgw8t6yHZus0KU=","Reply-To":"kieran.bingham@ideasonboard.com","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>, libcamera-devel@lists.libcamera.org","References":"<20190226162641.12116-1-jacopo@jmondi.org>\n\t<20190226162641.12116-4-jacopo@jmondi.org>\n\t<283058d3-0d91-89b0-93c3-56c981ba2bf4@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\t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\n\tsbsRB8KNNvVXBOVNwko86rQqF9drZuw=","Organization":"Ideas on Board","Message-ID":"<dbca7129-52d8-a818-9b7b-39719762efb8@ideasonboard.com>","Date":"Tue, 26 Feb 2019 23:28:09 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.4.0","MIME-Version":"1.0","In-Reply-To":"<283058d3-0d91-89b0-93c3-56c981ba2bf4@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v3 3/8] libcamera: v4l2_device: Add\n\tsupport for META_CAPTURE devices","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":"Tue, 26 Feb 2019 23:28:13 -0000"}},{"id":912,"web_url":"https://patchwork.libcamera.org/comment/912/","msgid":"<20190227090536.bp7c7ry6arxpfeiz@uno.localdomain>","date":"2019-02-27T09:05:36","subject":"Re: [libcamera-devel] [PATCH v3 3/8] libcamera: v4l2_device: Add\n\tsupport for META_CAPTURE devices","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Kieran,\n\nOn Tue, Feb 26, 2019 at 11:28:09PM +0000, Kieran Bingham wrote:\n>\n>\n> On 26/02/2019 23:24, Kieran Bingham wrote:\n> > Hi Jacopo,\n> >\n> > On 26/02/2019 16:26, Jacopo Mondi wrote:\n> >> Add support for devices that provide video meta-data to v4l2_device.cpp\n> >> and re-arrange bufferType handling in open() method.\n> >>\n> >> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> >> ---\n> >>  src/libcamera/include/v4l2_device.h |  4 +++\n> >>  src/libcamera/v4l2_device.cpp       | 38 +++++++++++++++++------------\n> >>  2 files changed, 27 insertions(+), 15 deletions(-)\n> >>\n> >> diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h\n> >> index 1d31d1b403bc..52eb6785cc15 100644\n> >> --- a/src/libcamera/include/v4l2_device.h\n> >> +++ b/src/libcamera/include/v4l2_device.h\n> >> @@ -53,6 +53,10 @@ struct V4L2Capability final : v4l2_capability {\n> >>  \t\treturn device_caps() & (V4L2_CAP_VIDEO_CAPTURE |\n> >>  \t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE_MPLANE);\n> >>  \t}\n> >> +\tbool isMeta() const\n>\n> One last thought here,\n>\n> I'm a bit concerned that if we have isMeta and isOutput handling this -\n> we might end up with an ugly 2 x 2 matrix in if statements.\n>\n> Any pretty way to make this better?\n>\n> Or would it be cleaner to move towards:\n>\n> bool isMetaCapture()\n> bool isMetaOutput()\n\nIn prevision of introducing support for META_OUTPUT, I have now named\nthis 'isMetaCapture()'.\n\nI'm not so concerned about the if matrix, it will look like:\n\n\tif (caps_.isCapture()) {\n\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n\t\tbufferType_ = caps_.isMultiplanar()\n\t\t\t    ? V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE\n\t\t\t    : V4L2_BUF_TYPE_VIDEO_CAPTURE;\n\t} else if (caps_.isOutput()) {\n\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n\t\tbufferType_ = caps_.isMultiplanar()\n\t\t\t    ? V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE\n\t\t\t    : V4L2_BUF_TYPE_VIDEO_OUTPUT;\n\t} else if (caps_.isMetaCapture()) {\n\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n\t\tbufferType_ = V4L2_BUF_TYPE_META_CAPTURE;\n\t} else if (caps_.isMetaOutput()) {\n\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n\t\tbufferType_ = V4L2_BUF_TYPE_META_OUTPUT;\n\t} else {\n\t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n\t\treturn -EINVAL;\n\t}\n\nWe could rename isCapture/isOutput to isVideoCapture/isVideoOutput for\nsimmetry, but I don't think that's a big deal, isn't it?\n\nThanks\n  j\n\n>\n> This bit feels like a pain point - but I don't think that should stop\n> this patch right now.\n>\n>\n>\n>\n> >> +\t{\n> >> +\t\treturn device_caps() & V4L2_CAP_META_CAPTURE;\n> >> +\t}\n> >>  \tbool isOutput() const\n> >>  \t{\n> >>  \t\treturn device_caps() & (V4L2_CAP_VIDEO_OUTPUT |\n> >> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> >> index 24e115554a99..8be8af7a2893 100644\n> >> --- a/src/libcamera/v4l2_device.cpp\n> >> +++ b/src/libcamera/v4l2_device.cpp\n> >> @@ -79,6 +79,15 @@ LOG_DEFINE_CATEGORY(V4L2)\n> >>   * \\return True if the device can output video frames\n> >>   */\n> >>\n> >> +/**\n> >> + * \\fn bool V4L2Capability::isMeta()\n> >> + * \\brief Identify if the device is capable of providing video meta-data\n> >> + *\n> >> + * FIXME: add support for META_OUTPUT, introduced in Linux v4.20\n> >\n> > I think I saw Niklas suggest to make this a Todo: rather than fixme -\n> > but I don't think we need to worry too much over terminology that should\n> > be removed within a couple of weeks :D as We'll update this after the\n> > 5.0 is released.\n> >\n> >\n> > Likewise, I think the conditionals below might get some more thought put\n> > into them when we add in META_OUTPUT - but that's all future work.\n> >\n> > This patch gets us closer.\n> >\n> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >\n> >\n> >> + *\n> >> + * \\return True if the device can provide video meta-data\n> >> + */\n> >> +\n> >>  /**\n> >>   * \\fn bool V4L2Capability::hasStreaming()\n> >>   * \\brief Determine if the device can perform Streaming I/O\n> >> @@ -280,33 +289,32 @@ int V4L2Device::open()\n> >>  \t\t<< \"Opened device \" << caps_.bus_info() << \": \"\n> >>  \t\t<< caps_.driver() << \": \" << caps_.card();\n> >>\n> >> -\tif (!caps_.isCapture() && !caps_.isOutput()) {\n> >> -\t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n> >> -\t\treturn -EINVAL;\n> >> -\t}\n> >> -\n> >>  \tif (!caps_.hasStreaming()) {\n> >>  \t\tLOG(V4L2, Error) << \"Device does not support streaming I/O\";\n> >>  \t\treturn -EINVAL;\n> >>  \t}\n> >>\n> >> -\tif (caps_.isCapture())\n> >> +\t/*\n> >> +\t * Set buffer type and wait for read notifications on CAPTURE devices\n> >> +\t * (POLLIN), and write notifications for OUTPUT devices (POLLOUT).\n> >> +\t */\n> >> +\tif (caps_.isCapture()) {\n> >> +\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n> >>  \t\tbufferType_ = caps_.isMultiplanar()\n> >>  \t\t\t    ? V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE\n> >>  \t\t\t    : V4L2_BUF_TYPE_VIDEO_CAPTURE;\n> >> -\telse\n> >> +\t} else if (caps_.isOutput()) {\n> >> +\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n> >>  \t\tbufferType_ = caps_.isMultiplanar()\n> >>  \t\t\t    ? V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE\n> >>  \t\t\t    : V4L2_BUF_TYPE_VIDEO_OUTPUT;\n> >> -\n> >> -\t/*\n> >> -\t *  We wait for Read notifications on CAPTURE devices (POLLIN), and\n> >> -\t *  Write notifications for OUTPUT devices (POLLOUT).\n> >> -\t */\n> >> -\tif (caps_.isCapture())\n> >> +\t} else if (caps_.isMeta()) {\n> >>  \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n> >> -\telse\n> >> -\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n> >> +\t\tbufferType_ = V4L2_BUF_TYPE_META_CAPTURE;\n> >> +\t} else {\n> >> +\t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n> >> +\t\treturn -EINVAL;\n> >> +\t}\n> >>\n> >>  \tfdEvent_->activated.connect(this, &V4L2Device::bufferAvailable);\n> >>  \tfdEvent_->setEnabled(false);\n> >>\n> >\n>\n> --\n> Regards\n> --\n> Kieran","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 593C3601E2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Feb 2019 10:05:07 +0100 (CET)","from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id CB10F20000E;\n\tWed, 27 Feb 2019 09:05:06 +0000 (UTC)"],"Date":"Wed, 27 Feb 2019 10:05:36 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190227090536.bp7c7ry6arxpfeiz@uno.localdomain>","References":"<20190226162641.12116-1-jacopo@jmondi.org>\n\t<20190226162641.12116-4-jacopo@jmondi.org>\n\t<283058d3-0d91-89b0-93c3-56c981ba2bf4@ideasonboard.com>\n\t<dbca7129-52d8-a818-9b7b-39719762efb8@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"cstdwnn5shi3krfp\"","Content-Disposition":"inline","In-Reply-To":"<dbca7129-52d8-a818-9b7b-39719762efb8@ideasonboard.com>","User-Agent":"NeoMutt/20180716","Subject":"Re: [libcamera-devel] [PATCH v3 3/8] libcamera: v4l2_device: Add\n\tsupport for META_CAPTURE devices","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, 27 Feb 2019 09:05:07 -0000"}},{"id":930,"web_url":"https://patchwork.libcamera.org/comment/930/","msgid":"<20190227175418.GM4813@pendragon.ideasonboard.com>","date":"2019-02-27T17:54:18","subject":"Re: [libcamera-devel] [PATCH v3 3/8] libcamera: v4l2_device: Add\n\tsupport for META_CAPTURE devices","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Tue, Feb 26, 2019 at 05:26:36PM +0100, Jacopo Mondi wrote:\n> Add support for devices that provide video meta-data to v4l2_device.cpp\n> and re-arrange bufferType handling in open() method.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/libcamera/include/v4l2_device.h |  4 +++\n>  src/libcamera/v4l2_device.cpp       | 38 +++++++++++++++++------------\n>  2 files changed, 27 insertions(+), 15 deletions(-)\n> \n> diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h\n> index 1d31d1b403bc..52eb6785cc15 100644\n> --- a/src/libcamera/include/v4l2_device.h\n> +++ b/src/libcamera/include/v4l2_device.h\n> @@ -53,6 +53,10 @@ struct V4L2Capability final : v4l2_capability {\n>  \t\treturn device_caps() & (V4L2_CAP_VIDEO_CAPTURE |\n>  \t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE_MPLANE);\n>  \t}\n> +\tbool isMeta() const\n> +\t{\n> +\t\treturn device_caps() & V4L2_CAP_META_CAPTURE;\n> +\t}\n>  \tbool isOutput() const\n>  \t{\n>  \t\treturn device_caps() & (V4L2_CAP_VIDEO_OUTPUT |\n\nEven if you don't introduce support for V4L2_CAP_META_OUTPUT now,\nisCapture() should still return true for V4L2_CAP_META_CAPTURE to ease\ntransition later. Don't forget to update the isOutput() and isCapture()\ndocumentation to not mention video frames anymore, but just output and\ncapture.\n\n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index 24e115554a99..8be8af7a2893 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -79,6 +79,15 @@ LOG_DEFINE_CATEGORY(V4L2)\n>   * \\return True if the device can output video frames\n>   */\n>  \n> +/**\n> + * \\fn bool V4L2Capability::isMeta()\n> + * \\brief Identify if the device is capable of providing video meta-data\n> + *\n> + * FIXME: add support for META_OUTPUT, introduced in Linux v4.20\n\nMaybe \\todo ?\n\ns/v4.20/v5.0/\n\n> + *\n> + * \\return True if the device can provide video meta-data\n> + */\n> +\n>  /**\n>   * \\fn bool V4L2Capability::hasStreaming()\n>   * \\brief Determine if the device can perform Streaming I/O\n> @@ -280,33 +289,32 @@ int V4L2Device::open()\n>  \t\t<< \"Opened device \" << caps_.bus_info() << \": \"\n>  \t\t<< caps_.driver() << \": \" << caps_.card();\n>  \n> -\tif (!caps_.isCapture() && !caps_.isOutput()) {\n> -\t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n> -\t\treturn -EINVAL;\n> -\t}\n> -\n>  \tif (!caps_.hasStreaming()) {\n>  \t\tLOG(V4L2, Error) << \"Device does not support streaming I/O\";\n>  \t\treturn -EINVAL;\n>  \t}\n>  \n> -\tif (caps_.isCapture())\n> +\t/*\n> +\t * Set buffer type and wait for read notifications on CAPTURE devices\n> +\t * (POLLIN), and write notifications for OUTPUT devices (POLLOUT).\n> +\t */\n> +\tif (caps_.isCapture()) {\n> +\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n>  \t\tbufferType_ = caps_.isMultiplanar()\n>  \t\t\t    ? V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE\n>  \t\t\t    : V4L2_BUF_TYPE_VIDEO_CAPTURE;\n> -\telse\n> +\t} else if (caps_.isOutput()) {\n> +\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n>  \t\tbufferType_ = caps_.isMultiplanar()\n>  \t\t\t    ? V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE\n>  \t\t\t    : V4L2_BUF_TYPE_VIDEO_OUTPUT;\n> -\n> -\t/*\n> -\t *  We wait for Read notifications on CAPTURE devices (POLLIN), and\n> -\t *  Write notifications for OUTPUT devices (POLLOUT).\n> -\t */\n> -\tif (caps_.isCapture())\n> +\t} else if (caps_.isMeta()) {\n>  \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n> -\telse\n> -\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n> +\t\tbufferType_ = V4L2_BUF_TYPE_META_CAPTURE;\n> +\t} else {\n> +\t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n> +\t\treturn -EINVAL;\n> +\t}\n>  \n>  \tfdEvent_->activated.connect(this, &V4L2Device::bufferAvailable);\n>  \tfdEvent_->setEnabled(false);","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5E5DA610B3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Feb 2019 18:54:30 +0100 (CET)","from pendragon.ideasonboard.com (unknown [83.145.195.18])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2CEE249;\n\tWed, 27 Feb 2019 18:54:27 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1551290070;\n\tbh=9/qlMuwCPj1uVW5XMPHlyE27Ke1dnx1g34qdxFTmGcE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=iGZBkvoOkoVdxIrdziTHGclinJSozcxLmatK+oEK8cYpl+RX99g+L/Sftiy5XFp2H\n\t0xYBe+cWRo3jth5Tdy4kAowvsR3zqQTAv8FRbhMuSoSoUAsY0jylWEtFvT+/SXE++j\n\tyJedXBk9XAsczjIPIAQuTka+NAQD1DZ664cfKAGs=","Date":"Wed, 27 Feb 2019 19:54:18 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190227175418.GM4813@pendragon.ideasonboard.com>","References":"<20190226162641.12116-1-jacopo@jmondi.org>\n\t<20190226162641.12116-4-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190226162641.12116-4-jacopo@jmondi.org>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v3 3/8] libcamera: v4l2_device: Add\n\tsupport for META_CAPTURE devices","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, 27 Feb 2019 17:54:30 -0000"}},{"id":941,"web_url":"https://patchwork.libcamera.org/comment/941/","msgid":"<20190228084953.kqgdppccixech7u7@uno.localdomain>","date":"2019-02-28T08:49:53","subject":"Re: [libcamera-devel] [PATCH v3 3/8] libcamera: v4l2_device: Add\n\tsupport for META_CAPTURE devices","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Wed, Feb 27, 2019 at 07:54:18PM +0200, Laurent Pinchart wrote:\n> Hi Jacopo,\n>\n> Thank you for the patch.\n>\n> On Tue, Feb 26, 2019 at 05:26:36PM +0100, Jacopo Mondi wrote:\n> > Add support for devices that provide video meta-data to v4l2_device.cpp\n> > and re-arrange bufferType handling in open() method.\n> >\n> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > ---\n> >  src/libcamera/include/v4l2_device.h |  4 +++\n> >  src/libcamera/v4l2_device.cpp       | 38 +++++++++++++++++------------\n> >  2 files changed, 27 insertions(+), 15 deletions(-)\n> >\n> > diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h\n> > index 1d31d1b403bc..52eb6785cc15 100644\n> > --- a/src/libcamera/include/v4l2_device.h\n> > +++ b/src/libcamera/include/v4l2_device.h\n> > @@ -53,6 +53,10 @@ struct V4L2Capability final : v4l2_capability {\n> >  \t\treturn device_caps() & (V4L2_CAP_VIDEO_CAPTURE |\n> >  \t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE_MPLANE);\n> >  \t}\n> > +\tbool isMeta() const\n> > +\t{\n> > +\t\treturn device_caps() & V4L2_CAP_META_CAPTURE;\n> > +\t}\n> >  \tbool isOutput() const\n> >  \t{\n> >  \t\treturn device_caps() & (V4L2_CAP_VIDEO_OUTPUT |\n>\n> Even if you don't introduce support for V4L2_CAP_META_OUTPUT now,\n> isCapture() should still return true for V4L2_CAP_META_CAPTURE to ease\n> transition later. Don't forget to update the isOutput() and isCapture()\n> documentation to not mention video frames anymore, but just output and\n> capture.\n>\n\nAs done in v4, I introduced an isMetaCapture() method, preparing for\nan isMetaOutput() one. In this way isCapture() and isOutput() would\nrefer to video streams only and the bufferType intialization looks\nlike:\n\n\t * Set buffer type and wait for read notifications on CAPTURE devices\n\t * (POLLIN), and write notifications for OUTPUT devices (POLLOUT).\n\t */\n\tif (caps_.isCapture()) {\n\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n\t\tbufferType_ = caps_.isMultiplanar()\n\t\t\t    ? V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE\n\t\t\t    : V4L2_BUF_TYPE_VIDEO_CAPTURE;\n\t} else if (caps_.isOutput()) {\n\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n\t\tbufferType_ = caps_.isMultiplanar()\n\t\t\t    ? V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE\n\t\t\t    : V4L2_BUF_TYPE_VIDEO_OUTPUT;\n\t} else if (caps_.isMetaCapture()) {\n\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n\t\tbufferType_ = V4L2_BUF_TYPE_META_CAPTURE;\n\t} else if (caps_.isMetaOutput()) {\n\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n\t\tbufferType_ = V4L2_BUF_TYPE_META_OUTPUT;\n\t} else {\n\t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n\t\treturn -EINVAL;\n\t}\n\n\n\n> > diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> > index 24e115554a99..8be8af7a2893 100644\n> > --- a/src/libcamera/v4l2_device.cpp\n> > +++ b/src/libcamera/v4l2_device.cpp\n> > @@ -79,6 +79,15 @@ LOG_DEFINE_CATEGORY(V4L2)\n> >   * \\return True if the device can output video frames\n> >   */\n> >\n> > +/**\n> > + * \\fn bool V4L2Capability::isMeta()\n> > + * \\brief Identify if the device is capable of providing video meta-data\n> > + *\n> > + * FIXME: add support for META_OUTPUT, introduced in Linux v4.20\n>\n> Maybe \\todo ?\n>\n> s/v4.20/v5.0/\n>\n> > + *\n> > + * \\return True if the device can provide video meta-data\n> > + */\n> > +\n> >  /**\n> >   * \\fn bool V4L2Capability::hasStreaming()\n> >   * \\brief Determine if the device can perform Streaming I/O\n> > @@ -280,33 +289,32 @@ int V4L2Device::open()\n> >  \t\t<< \"Opened device \" << caps_.bus_info() << \": \"\n> >  \t\t<< caps_.driver() << \": \" << caps_.card();\n> >\n> > -\tif (!caps_.isCapture() && !caps_.isOutput()) {\n> > -\t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n> > -\t\treturn -EINVAL;\n> > -\t}\n> > -\n> >  \tif (!caps_.hasStreaming()) {\n> >  \t\tLOG(V4L2, Error) << \"Device does not support streaming I/O\";\n> >  \t\treturn -EINVAL;\n> >  \t}\n> >\n> > -\tif (caps_.isCapture())\n> > +\t/*\n> > +\t * Set buffer type and wait for read notifications on CAPTURE devices\n> > +\t * (POLLIN), and write notifications for OUTPUT devices (POLLOUT).\n> > +\t */\n> > +\tif (caps_.isCapture()) {\n> > +\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n> >  \t\tbufferType_ = caps_.isMultiplanar()\n> >  \t\t\t    ? V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE\n> >  \t\t\t    : V4L2_BUF_TYPE_VIDEO_CAPTURE;\n> > -\telse\n> > +\t} else if (caps_.isOutput()) {\n> > +\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n> >  \t\tbufferType_ = caps_.isMultiplanar()\n> >  \t\t\t    ? V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE\n> >  \t\t\t    : V4L2_BUF_TYPE_VIDEO_OUTPUT;\n> > -\n> > -\t/*\n> > -\t *  We wait for Read notifications on CAPTURE devices (POLLIN), and\n> > -\t *  Write notifications for OUTPUT devices (POLLOUT).\n> > -\t */\n> > -\tif (caps_.isCapture())\n> > +\t} else if (caps_.isMeta()) {\n> >  \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n> > -\telse\n> > -\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n> > +\t\tbufferType_ = V4L2_BUF_TYPE_META_CAPTURE;\n> > +\t} else {\n> > +\t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n> > +\t\treturn -EINVAL;\n> > +\t}\n> >\n> >  \tfdEvent_->activated.connect(this, &V4L2Device::bufferAvailable);\n> >  \tfdEvent_->setEnabled(false);\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay10.mail.gandi.net (relay10.mail.gandi.net\n\t[217.70.178.230])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CFD1A600FC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Feb 2019 09:49:23 +0100 (CET)","from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay10.mail.gandi.net (Postfix) with ESMTPSA id F3842240007;\n\tThu, 28 Feb 2019 08:49:22 +0000 (UTC)"],"Date":"Thu, 28 Feb 2019 09:49:53 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190228084953.kqgdppccixech7u7@uno.localdomain>","References":"<20190226162641.12116-1-jacopo@jmondi.org>\n\t<20190226162641.12116-4-jacopo@jmondi.org>\n\t<20190227175418.GM4813@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"apbo5e63nynvn4c4\"","Content-Disposition":"inline","In-Reply-To":"<20190227175418.GM4813@pendragon.ideasonboard.com>","User-Agent":"NeoMutt/20180716","Subject":"Re: [libcamera-devel] [PATCH v3 3/8] libcamera: v4l2_device: Add\n\tsupport for META_CAPTURE devices","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, 28 Feb 2019 08:49:24 -0000"}},{"id":957,"web_url":"https://patchwork.libcamera.org/comment/957/","msgid":"<20190228172549.GD7811@pendragon.ideasonboard.com>","date":"2019-02-28T17:25:49","subject":"Re: [libcamera-devel] [PATCH v3 3/8] libcamera: v4l2_device: Add\n\tsupport for META_CAPTURE devices","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn Thu, Feb 28, 2019 at 09:49:53AM +0100, Jacopo Mondi wrote:\n> On Wed, Feb 27, 2019 at 07:54:18PM +0200, Laurent Pinchart wrote:\n> > On Tue, Feb 26, 2019 at 05:26:36PM +0100, Jacopo Mondi wrote:\n> >> Add support for devices that provide video meta-data to v4l2_device.cpp\n> >> and re-arrange bufferType handling in open() method.\n> >>\n> >> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> >> ---\n> >>  src/libcamera/include/v4l2_device.h |  4 +++\n> >>  src/libcamera/v4l2_device.cpp       | 38 +++++++++++++++++------------\n> >>  2 files changed, 27 insertions(+), 15 deletions(-)\n> >>\n> >> diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h\n> >> index 1d31d1b403bc..52eb6785cc15 100644\n> >> --- a/src/libcamera/include/v4l2_device.h\n> >> +++ b/src/libcamera/include/v4l2_device.h\n> >> @@ -53,6 +53,10 @@ struct V4L2Capability final : v4l2_capability {\n> >>  \t\treturn device_caps() & (V4L2_CAP_VIDEO_CAPTURE |\n> >>  \t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE_MPLANE);\n> >>  \t}\n> >> +\tbool isMeta() const\n> >> +\t{\n> >> +\t\treturn device_caps() & V4L2_CAP_META_CAPTURE;\n> >> +\t}\n> >>  \tbool isOutput() const\n> >>  \t{\n> >>  \t\treturn device_caps() & (V4L2_CAP_VIDEO_OUTPUT |\n> >\n> > Even if you don't introduce support for V4L2_CAP_META_OUTPUT now,\n> > isCapture() should still return true for V4L2_CAP_META_CAPTURE to ease\n> > transition later. Don't forget to update the isOutput() and isCapture()\n> > documentation to not mention video frames anymore, but just output and\n> > capture.\n> >\n> \n> As done in v4, I introduced an isMetaCapture() method, preparing for\n> an isMetaOutput() one. In this way isCapture() and isOutput() would\n> refer to video streams only and the bufferType intialization looks\n> like:\n\nThat's confusing. Let's have\n\nisCapture() -> V4L2_CAP_META_CAPTURE | V4L2_CAP_VIDEO_CAPTURE |\n\t       V4L2_CAP_VIDEO_CAPTURE_MPLANE\nisOutput() -> V4L2_CAP_META_OUTPUT | V4L2_CAP_VIDEO_OUTPUT |\n\t      V4L2_CAP_VIDEO_OUTPUT_MPLANE\nisMeta() -> V4L2_CAP_META_CAPTURE | V4L2_CAP_META_OUTPUT\nisVideo() -> V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_CAPTURE_MPLANE |\n\t     V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_VIDEO_OUTPUT_MPLANE\n\nand you can then also add, if desired,\n\nisMetaCapture() -> isMeta() && isCapture()\n...\n\n> \n> \t * Set buffer type and wait for read notifications on CAPTURE devices\n> \t * (POLLIN), and write notifications for OUTPUT devices (POLLOUT).\n> \t */\n> \tif (caps_.isCapture()) {\n> \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n> \t\tbufferType_ = caps_.isMultiplanar()\n> \t\t\t    ? V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE\n> \t\t\t    : V4L2_BUF_TYPE_VIDEO_CAPTURE;\n> \t} else if (caps_.isOutput()) {\n> \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n> \t\tbufferType_ = caps_.isMultiplanar()\n> \t\t\t    ? V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE\n> \t\t\t    : V4L2_BUF_TYPE_VIDEO_OUTPUT;\n> \t} else if (caps_.isMetaCapture()) {\n> \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n> \t\tbufferType_ = V4L2_BUF_TYPE_META_CAPTURE;\n> \t} else if (caps_.isMetaOutput()) {\n> \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n> \t\tbufferType_ = V4L2_BUF_TYPE_META_OUTPUT;\n> \t} else {\n> \t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n> \t\treturn -EINVAL;\n> \t}\n> \n> >> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> >> index 24e115554a99..8be8af7a2893 100644\n> >> --- a/src/libcamera/v4l2_device.cpp\n> >> +++ b/src/libcamera/v4l2_device.cpp\n> >> @@ -79,6 +79,15 @@ LOG_DEFINE_CATEGORY(V4L2)\n> >>   * \\return True if the device can output video frames\n> >>   */\n> >>\n> >> +/**\n> >> + * \\fn bool V4L2Capability::isMeta()\n> >> + * \\brief Identify if the device is capable of providing video meta-data\n> >> + *\n> >> + * FIXME: add support for META_OUTPUT, introduced in Linux v4.20\n> >\n> > Maybe \\todo ?\n> >\n> > s/v4.20/v5.0/\n> >\n> >> + *\n> >> + * \\return True if the device can provide video meta-data\n> >> + */\n> >> +\n> >>  /**\n> >>   * \\fn bool V4L2Capability::hasStreaming()\n> >>   * \\brief Determine if the device can perform Streaming I/O\n> >> @@ -280,33 +289,32 @@ int V4L2Device::open()\n> >>  \t\t<< \"Opened device \" << caps_.bus_info() << \": \"\n> >>  \t\t<< caps_.driver() << \": \" << caps_.card();\n> >>\n> >> -\tif (!caps_.isCapture() && !caps_.isOutput()) {\n> >> -\t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n> >> -\t\treturn -EINVAL;\n> >> -\t}\n> >> -\n> >>  \tif (!caps_.hasStreaming()) {\n> >>  \t\tLOG(V4L2, Error) << \"Device does not support streaming I/O\";\n> >>  \t\treturn -EINVAL;\n> >>  \t}\n> >>\n> >> -\tif (caps_.isCapture())\n> >> +\t/*\n> >> +\t * Set buffer type and wait for read notifications on CAPTURE devices\n> >> +\t * (POLLIN), and write notifications for OUTPUT devices (POLLOUT).\n> >> +\t */\n> >> +\tif (caps_.isCapture()) {\n> >> +\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n> >>  \t\tbufferType_ = caps_.isMultiplanar()\n> >>  \t\t\t    ? V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE\n> >>  \t\t\t    : V4L2_BUF_TYPE_VIDEO_CAPTURE;\n> >> -\telse\n> >> +\t} else if (caps_.isOutput()) {\n> >> +\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n> >>  \t\tbufferType_ = caps_.isMultiplanar()\n> >>  \t\t\t    ? V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE\n> >>  \t\t\t    : V4L2_BUF_TYPE_VIDEO_OUTPUT;\n> >> -\n> >> -\t/*\n> >> -\t *  We wait for Read notifications on CAPTURE devices (POLLIN), and\n> >> -\t *  Write notifications for OUTPUT devices (POLLOUT).\n> >> -\t */\n> >> -\tif (caps_.isCapture())\n> >> +\t} else if (caps_.isMeta()) {\n> >>  \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n> >> -\telse\n> >> -\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n> >> +\t\tbufferType_ = V4L2_BUF_TYPE_META_CAPTURE;\n> >> +\t} else {\n> >> +\t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n> >> +\t\treturn -EINVAL;\n> >> +\t}\n> >>\n> >>  \tfdEvent_->activated.connect(this, &V4L2Device::bufferAvailable);\n> >>  \tfdEvent_->setEnabled(false);","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DB7B0610B6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Feb 2019 18:25:55 +0100 (CET)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4117D49;\n\tThu, 28 Feb 2019 18:25:55 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1551374755;\n\tbh=1agivXnPK2c62bgLWfFBqZbSvRLE8Ho3CDLPVpLZrtA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Ayh+AL0If5B2aKGFpdRsdlYeyO6G2ABvKLMVIrIwegzioXKwqE0XA66m8vNiDe3dd\n\tvvahNFiSeBUtoRLPM/IyQHByswM4j4V2ym85Lqj/j1Ie/AzmoHto4uy/sXw4+Ziyz+\n\tYDspG9e7qyJP3btXBE4LHe8s7kUGPqg3VhJbAbeI=","Date":"Thu, 28 Feb 2019 19:25:49 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190228172549.GD7811@pendragon.ideasonboard.com>","References":"<20190226162641.12116-1-jacopo@jmondi.org>\n\t<20190226162641.12116-4-jacopo@jmondi.org>\n\t<20190227175418.GM4813@pendragon.ideasonboard.com>\n\t<20190228084953.kqgdppccixech7u7@uno.localdomain>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190228084953.kqgdppccixech7u7@uno.localdomain>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v3 3/8] libcamera: v4l2_device: Add\n\tsupport for META_CAPTURE devices","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, 28 Feb 2019 17:25:56 -0000"}},{"id":966,"web_url":"https://patchwork.libcamera.org/comment/966/","msgid":"<20190228191557.p36rfjxleya45u4h@uno.localdomain>","date":"2019-02-28T19:15:57","subject":"Re: [libcamera-devel] [PATCH v3 3/8] libcamera: v4l2_device: Add\n\tsupport for META_CAPTURE devices","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Thu, Feb 28, 2019 at 07:25:49PM +0200, Laurent Pinchart wrote:\n> Hi Jacopo,\n>\n> On Thu, Feb 28, 2019 at 09:49:53AM +0100, Jacopo Mondi wrote:\n> > On Wed, Feb 27, 2019 at 07:54:18PM +0200, Laurent Pinchart wrote:\n> > > On Tue, Feb 26, 2019 at 05:26:36PM +0100, Jacopo Mondi wrote:\n> > >> Add support for devices that provide video meta-data to v4l2_device.cpp\n> > >> and re-arrange bufferType handling in open() method.\n> > >>\n> > >> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > >> ---\n> > >>  src/libcamera/include/v4l2_device.h |  4 +++\n> > >>  src/libcamera/v4l2_device.cpp       | 38 +++++++++++++++++------------\n> > >>  2 files changed, 27 insertions(+), 15 deletions(-)\n> > >>\n> > >> diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h\n> > >> index 1d31d1b403bc..52eb6785cc15 100644\n> > >> --- a/src/libcamera/include/v4l2_device.h\n> > >> +++ b/src/libcamera/include/v4l2_device.h\n> > >> @@ -53,6 +53,10 @@ struct V4L2Capability final : v4l2_capability {\n> > >>  \t\treturn device_caps() & (V4L2_CAP_VIDEO_CAPTURE |\n> > >>  \t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE_MPLANE);\n> >\n\n[snip]\n\n> > As done in v4, I introduced an isMetaCapture() method, preparing for\n> > an isMetaOutput() one. In this way isCapture() and isOutput() would\n> > refer to video streams only and the bufferType intialization looks\n> > like:\n>\n> That's confusing. Let's have\n>\n> isCapture() -> V4L2_CAP_META_CAPTURE | V4L2_CAP_VIDEO_CAPTURE |\n> \t       V4L2_CAP_VIDEO_CAPTURE_MPLANE\n> isOutput() -> V4L2_CAP_META_OUTPUT | V4L2_CAP_VIDEO_OUTPUT |\n> \t      V4L2_CAP_VIDEO_OUTPUT_MPLANE\n> isMeta() -> V4L2_CAP_META_CAPTURE | V4L2_CAP_META_OUTPUT\n> isVideo() -> V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_CAPTURE_MPLANE |\n> \t     V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_VIDEO_OUTPUT_MPLANE\n>\n> and you can then also add, if desired,\n>\n> isMetaCapture() -> isMeta() && isCapture()\n> ...\n>\n\nI think the code below here, which is the only place where those\nfunctions are used would become less nice if this case.\n\nThose functions are only used to assign bufferType_ and fdEvent_,\nlet's keep it straightforward as the below series of if/else\n\n\n> >\n> > \t * Set buffer type and wait for read notifications on CAPTURE devices\n> > \t * (POLLIN), and write notifications for OUTPUT devices (POLLOUT).\n> > \t */\n> > \tif (caps_.isCapture()) {\n> > \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n> > \t\tbufferType_ = caps_.isMultiplanar()\n> > \t\t\t    ? V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE\n> > \t\t\t    : V4L2_BUF_TYPE_VIDEO_CAPTURE;\n> > \t} else if (caps_.isOutput()) {\n> > \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n> > \t\tbufferType_ = caps_.isMultiplanar()\n> > \t\t\t    ? V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE\n> > \t\t\t    : V4L2_BUF_TYPE_VIDEO_OUTPUT;\n> > \t} else if (caps_.isMetaCapture()) {\n> > \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n> > \t\tbufferType_ = V4L2_BUF_TYPE_META_CAPTURE;\n> > \t} else if (caps_.isMetaOutput()) {\n> > \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n> > \t\tbufferType_ = V4L2_BUF_TYPE_META_OUTPUT;\n> > \t} else {\n> > \t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n> > \t\treturn -EINVAL;\n> > \t}\n> >\n> > >> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> > >> index 24e115554a99..8be8af7a2893 100644\n> > >> --- a/src/libcamera/v4l2_device.cpp\n> > >> +++ b/src/libcamera/v4l2_device.cpp\n> > >> @@ -79,6 +79,15 @@ LOG_DEFINE_CATEGORY(V4L2)\n> > >>   * \\return True if the device can output video frames\n> > >>   */\n> > >>\n> > >> +/**\n> > >> + * \\fn bool V4L2Capability::isMeta()\n> > >> + * \\brief Identify if the device is capable of providing video meta-data\n> > >> + *\n> > >> + * FIXME: add support for META_OUTPUT, introduced in Linux v4.20\n> > >\n> > > Maybe \\todo ?\n> > >\n> > > s/v4.20/v5.0/\n> > >\n> > >> + *\n> > >> + * \\return True if the device can provide video meta-data\n> > >> + */\n> > >> +\n> > >>  /**\n> > >>   * \\fn bool V4L2Capability::hasStreaming()\n> > >>   * \\brief Determine if the device can perform Streaming I/O\n> > >> @@ -280,33 +289,32 @@ int V4L2Device::open()\n> > >>  \t\t<< \"Opened device \" << caps_.bus_info() << \": \"\n> > >>  \t\t<< caps_.driver() << \": \" << caps_.card();\n> > >>\n> > >> -\tif (!caps_.isCapture() && !caps_.isOutput()) {\n> > >> -\t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n> > >> -\t\treturn -EINVAL;\n> > >> -\t}\n> > >> -\n> > >>  \tif (!caps_.hasStreaming()) {\n> > >>  \t\tLOG(V4L2, Error) << \"Device does not support streaming I/O\";\n> > >>  \t\treturn -EINVAL;\n> > >>  \t}\n> > >>\n> > >> -\tif (caps_.isCapture())\n> > >> +\t/*\n> > >> +\t * Set buffer type and wait for read notifications on CAPTURE devices\n> > >> +\t * (POLLIN), and write notifications for OUTPUT devices (POLLOUT).\n> > >> +\t */\n> > >> +\tif (caps_.isCapture()) {\n> > >> +\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n> > >>  \t\tbufferType_ = caps_.isMultiplanar()\n> > >>  \t\t\t    ? V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE\n> > >>  \t\t\t    : V4L2_BUF_TYPE_VIDEO_CAPTURE;\n> > >> -\telse\n> > >> +\t} else if (caps_.isOutput()) {\n> > >> +\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n> > >>  \t\tbufferType_ = caps_.isMultiplanar()\n> > >>  \t\t\t    ? V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE\n> > >>  \t\t\t    : V4L2_BUF_TYPE_VIDEO_OUTPUT;\n> > >> -\n> > >> -\t/*\n> > >> -\t *  We wait for Read notifications on CAPTURE devices (POLLIN), and\n> > >> -\t *  Write notifications for OUTPUT devices (POLLOUT).\n> > >> -\t */\n> > >> -\tif (caps_.isCapture())\n> > >> +\t} else if (caps_.isMeta()) {\n> > >>  \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n> > >> -\telse\n> > >> -\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n> > >> +\t\tbufferType_ = V4L2_BUF_TYPE_META_CAPTURE;\n> > >> +\t} else {\n> > >> +\t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n> > >> +\t\treturn -EINVAL;\n> > >> +\t}\n> > >>\n> > >>  \tfdEvent_->activated.connect(this, &V4L2Device::bufferAvailable);\n> > >>  \tfdEvent_->setEnabled(false);\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net\n\t[217.70.183.193])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 045FB610B6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Feb 2019 20:15:27 +0100 (CET)","from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 7A4F4240009;\n\tThu, 28 Feb 2019 19:15:27 +0000 (UTC)"],"X-Originating-IP":"2.224.242.101","Date":"Thu, 28 Feb 2019 20:15:57 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190228191557.p36rfjxleya45u4h@uno.localdomain>","References":"<20190226162641.12116-1-jacopo@jmondi.org>\n\t<20190226162641.12116-4-jacopo@jmondi.org>\n\t<20190227175418.GM4813@pendragon.ideasonboard.com>\n\t<20190228084953.kqgdppccixech7u7@uno.localdomain>\n\t<20190228172549.GD7811@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"eu2q6baa5ar5q6pf\"","Content-Disposition":"inline","In-Reply-To":"<20190228172549.GD7811@pendragon.ideasonboard.com>","User-Agent":"NeoMutt/20180716","Subject":"Re: [libcamera-devel] [PATCH v3 3/8] libcamera: v4l2_device: Add\n\tsupport for META_CAPTURE devices","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, 28 Feb 2019 19:15:28 -0000"}},{"id":968,"web_url":"https://patchwork.libcamera.org/comment/968/","msgid":"<20190228214537.GK7811@pendragon.ideasonboard.com>","date":"2019-02-28T21:45:37","subject":"Re: [libcamera-devel] [PATCH v3 3/8] libcamera: v4l2_device: Add\n\tsupport for META_CAPTURE devices","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn Thu, Feb 28, 2019 at 08:15:57PM +0100, Jacopo Mondi wrote:\n> On Thu, Feb 28, 2019 at 07:25:49PM +0200, Laurent Pinchart wrote:\n> > On Thu, Feb 28, 2019 at 09:49:53AM +0100, Jacopo Mondi wrote:\n> >> On Wed, Feb 27, 2019 at 07:54:18PM +0200, Laurent Pinchart wrote:\n> >>> On Tue, Feb 26, 2019 at 05:26:36PM +0100, Jacopo Mondi wrote:\n> >>>> Add support for devices that provide video meta-data to v4l2_device.cpp\n> >>>> and re-arrange bufferType handling in open() method.\n> >>>>\n> >>>> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> >>>> ---\n> >>>>  src/libcamera/include/v4l2_device.h |  4 +++\n> >>>>  src/libcamera/v4l2_device.cpp       | 38 +++++++++++++++++------------\n> >>>>  2 files changed, 27 insertions(+), 15 deletions(-)\n> >>>>\n> >>>> diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h\n> >>>> index 1d31d1b403bc..52eb6785cc15 100644\n> >>>> --- a/src/libcamera/include/v4l2_device.h\n> >>>> +++ b/src/libcamera/include/v4l2_device.h\n> >>>> @@ -53,6 +53,10 @@ struct V4L2Capability final : v4l2_capability {\n> >>>>  \t\treturn device_caps() & (V4L2_CAP_VIDEO_CAPTURE |\n> >>>>  \t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE_MPLANE);\n> \n> [snip]\n> \n> >> As done in v4, I introduced an isMetaCapture() method, preparing for\n> >> an isMetaOutput() one. In this way isCapture() and isOutput() would\n> >> refer to video streams only and the bufferType intialization looks\n> >> like:\n> >\n> > That's confusing. Let's have\n> >\n> > isCapture() -> V4L2_CAP_META_CAPTURE | V4L2_CAP_VIDEO_CAPTURE |\n> > \t       V4L2_CAP_VIDEO_CAPTURE_MPLANE\n> > isOutput() -> V4L2_CAP_META_OUTPUT | V4L2_CAP_VIDEO_OUTPUT |\n> > \t      V4L2_CAP_VIDEO_OUTPUT_MPLANE\n> > isMeta() -> V4L2_CAP_META_CAPTURE | V4L2_CAP_META_OUTPUT\n> > isVideo() -> V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_CAPTURE_MPLANE |\n> > \t     V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_VIDEO_OUTPUT_MPLANE\n> >\n> > and you can then also add, if desired,\n> >\n> > isMetaCapture() -> isMeta() && isCapture()\n> > ...\n> >\n> \n> I think the code below here, which is the only place where those\n> functions are used would become less nice if this case.\n> \n> Those functions are only used to assign bufferType_ and fdEvent_,\n> let's keep it straightforward as the below series of if/else\n\nThe code below is fine, my point is that isCapture() should not mean\nisVideoCapture().\n\n\tbool isCapture() const\n\t{\n\t\treturn device_caps() & (V4L2_CAP_META_CAPTURE |\n\t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE |\n\t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE_MPLANE);\n\t}\n\n\tbool isOutput() const\n\t{\n\t\treturn device_caps() & (V4L2_CAP_META_OUTPUT |\n\t\t\t\t\tV4L2_CAP_VIDEO_OUTPUT |\n\t\t\t\t\tV4L2_CAP_VIDEO_OUTPUT_MPLANE);\n\t}\n\n\tbool isMeta() const\n\t{\n\t\treturn device_caps() & (V4L2_CAP_META_CAPTURE |\n\t\t\t\t\tV4L2_CAP_META_OUTPUT);\n\t}\n\n\tbool isVideo() const\n\t{\n\t\treturn device_caps() & (V4L2_CAP_VIDEO_CAPTURE |\n\t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE_MPLANE |\n\t\t\t\t\tV4L2_CAP_VIDEO_OUTPUT |\n\t\t\t\t\tV4L2_CAP_VIDEO_OUTPUT_MPLANE);\n\t}\n\n\tbool isMetaCapture() const\n\t{\n\t\treturn isMeta() && isCapture();\n\t}\n\n\tbool isMetaOutput() const\n\t{\n\t\treturn isMeta() && isOutput();\n\t}\n\n\tbool isVideoCapture() const\n\t{\n\t\treturn isVideo() && isCapture();\n\t}\n\n\tbool isVideoOutput() const\n\t{\n\t\treturn isVideo() && isOutput();\n\t}\n\nand then use those four last functions below.\n\n> >>\n> >> \t * Set buffer type and wait for read notifications on CAPTURE devices\n> >> \t * (POLLIN), and write notifications for OUTPUT devices (POLLOUT).\n> >> \t */\n> >> \tif (caps_.isCapture()) {\n> >> \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n> >> \t\tbufferType_ = caps_.isMultiplanar()\n> >> \t\t\t    ? V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE\n> >> \t\t\t    : V4L2_BUF_TYPE_VIDEO_CAPTURE;\n> >> \t} else if (caps_.isOutput()) {\n> >> \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n> >> \t\tbufferType_ = caps_.isMultiplanar()\n> >> \t\t\t    ? V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE\n> >> \t\t\t    : V4L2_BUF_TYPE_VIDEO_OUTPUT;\n> >> \t} else if (caps_.isMetaCapture()) {\n> >> \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n> >> \t\tbufferType_ = V4L2_BUF_TYPE_META_CAPTURE;\n> >> \t} else if (caps_.isMetaOutput()) {\n> >> \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n> >> \t\tbufferType_ = V4L2_BUF_TYPE_META_OUTPUT;\n> >> \t} else {\n> >> \t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n> >> \t\treturn -EINVAL;\n> >> \t}\n> >>","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6A0EC610B6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Feb 2019 22:45:43 +0100 (CET)","from pendragon.ideasonboard.com\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D223B49;\n\tThu, 28 Feb 2019 22:45:42 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1551390343;\n\tbh=CoBdgp3f9xBwT8446fLpPOqNOhz648MELCKxGqnI67E=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=t6IuKrbD0pq/gJEyIi+OFD6TcCq9RT00WJBt2gu7gURzE0UMJloUrr2W3XaxzyHpY\n\t1LsyrcjQyQPuN1+rSAXDjBxsTh4bKU+YLa+KSUzwIMfPI0m1ED5rpusYXJL7lncqiK\n\tI774fu/01i+0qScBaio4cfyRMX/JDDwgGLLt/iig=","Date":"Thu, 28 Feb 2019 23:45:37 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190228214537.GK7811@pendragon.ideasonboard.com>","References":"<20190226162641.12116-1-jacopo@jmondi.org>\n\t<20190226162641.12116-4-jacopo@jmondi.org>\n\t<20190227175418.GM4813@pendragon.ideasonboard.com>\n\t<20190228084953.kqgdppccixech7u7@uno.localdomain>\n\t<20190228172549.GD7811@pendragon.ideasonboard.com>\n\t<20190228191557.p36rfjxleya45u4h@uno.localdomain>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190228191557.p36rfjxleya45u4h@uno.localdomain>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v3 3/8] libcamera: v4l2_device: Add\n\tsupport for META_CAPTURE devices","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, 28 Feb 2019 21:45:43 -0000"}},{"id":983,"web_url":"https://patchwork.libcamera.org/comment/983/","msgid":"<20190301094046.lswn65vdlcp6dbak@uno.localdomain>","date":"2019-03-01T09:40:46","subject":"Re: [libcamera-devel] [PATCH v3 3/8] libcamera: v4l2_device: Add\n\tsupport for META_CAPTURE devices","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Thu, Feb 28, 2019 at 11:45:37PM +0200, Laurent Pinchart wrote:\n> Hi Jacopo,\n>\n> On Thu, Feb 28, 2019 at 08:15:57PM +0100, Jacopo Mondi wrote:\n> > On Thu, Feb 28, 2019 at 07:25:49PM +0200, Laurent Pinchart wrote:\n> > > On Thu, Feb 28, 2019 at 09:49:53AM +0100, Jacopo Mondi wrote:\n> > >> On Wed, Feb 27, 2019 at 07:54:18PM +0200, Laurent Pinchart wrote:\n> > >>> On Tue, Feb 26, 2019 at 05:26:36PM +0100, Jacopo Mondi wrote:\n> > >>>> Add support for devices that provide video meta-data to v4l2_device.cpp\n> > >>>> and re-arrange bufferType handling in open() method.\n> > >>>>\n> > >>>> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > >>>> ---\n> > >>>>  src/libcamera/include/v4l2_device.h |  4 +++\n> > >>>>  src/libcamera/v4l2_device.cpp       | 38 +++++++++++++++++------------\n> > >>>>  2 files changed, 27 insertions(+), 15 deletions(-)\n> > >>>>\n> > >>>> diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h\n> > >>>> index 1d31d1b403bc..52eb6785cc15 100644\n> > >>>> --- a/src/libcamera/include/v4l2_device.h\n> > >>>> +++ b/src/libcamera/include/v4l2_device.h\n> > >>>> @@ -53,6 +53,10 @@ struct V4L2Capability final : v4l2_capability {\n> > >>>>  \t\treturn device_caps() & (V4L2_CAP_VIDEO_CAPTURE |\n> > >>>>  \t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE_MPLANE);\n> >\n> > [snip]\n> >\n> > >> As done in v4, I introduced an isMetaCapture() method, preparing for\n> > >> an isMetaOutput() one. In this way isCapture() and isOutput() would\n> > >> refer to video streams only and the bufferType intialization looks\n> > >> like:\n> > >\n> > > That's confusing. Let's have\n> > >\n> > > isCapture() -> V4L2_CAP_META_CAPTURE | V4L2_CAP_VIDEO_CAPTURE |\n> > > \t       V4L2_CAP_VIDEO_CAPTURE_MPLANE\n> > > isOutput() -> V4L2_CAP_META_OUTPUT | V4L2_CAP_VIDEO_OUTPUT |\n> > > \t      V4L2_CAP_VIDEO_OUTPUT_MPLANE\n> > > isMeta() -> V4L2_CAP_META_CAPTURE | V4L2_CAP_META_OUTPUT\n> > > isVideo() -> V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_CAPTURE_MPLANE |\n> > > \t     V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_VIDEO_OUTPUT_MPLANE\n> > >\n> > > and you can then also add, if desired,\n> > >\n> > > isMetaCapture() -> isMeta() && isCapture()\n> > > ...\n> > >\n> >\n> > I think the code below here, which is the only place where those\n> > functions are used would become less nice if this case.\n> >\n> > Those functions are only used to assign bufferType_ and fdEvent_,\n> > let's keep it straightforward as the below series of if/else\n>\n> The code below is fine, my point is that isCapture() should not mean\n> isVideoCapture().\n>\n> \tbool isCapture() const\n> \t{\n> \t\treturn device_caps() & (V4L2_CAP_META_CAPTURE |\n> \t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE |\n> \t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE_MPLANE);\n> \t}\n>\n> \tbool isOutput() const\n> \t{\n> \t\treturn device_caps() & (V4L2_CAP_META_OUTPUT |\n> \t\t\t\t\tV4L2_CAP_VIDEO_OUTPUT |\n> \t\t\t\t\tV4L2_CAP_VIDEO_OUTPUT_MPLANE);\n> \t}\n>\n> \tbool isMeta() const\n> \t{\n> \t\treturn device_caps() & (V4L2_CAP_META_CAPTURE |\n> \t\t\t\t\tV4L2_CAP_META_OUTPUT);\n> \t}\n>\n> \tbool isVideo() const\n> \t{\n> \t\treturn device_caps() & (V4L2_CAP_VIDEO_CAPTURE |\n> \t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE_MPLANE |\n> \t\t\t\t\tV4L2_CAP_VIDEO_OUTPUT |\n> \t\t\t\t\tV4L2_CAP_VIDEO_OUTPUT_MPLANE);\n> \t}\n>\n> \tbool isMetaCapture() const\n> \t{\n> \t\treturn isMeta() && isCapture();\n> \t}\n>\n> \tbool isMetaOutput() const\n> \t{\n> \t\treturn isMeta() && isOutput();\n> \t}\n>\n> \tbool isVideoCapture() const\n> \t{\n> \t\treturn isVideo() && isCapture();\n> \t}\n>\n> \tbool isVideoOutput() const\n> \t{\n> \t\treturn isVideo() && isOutput();\n> \t}\n>\n> and then use those four last functions below.\n\nI see. I don't feel like adding 4 functions and one level of\nindirection is super useful considering this is\nused in a single place, but if that would help moving forward I'll\nchange this.\n\n>\n> > >>\n> > >> \t * Set buffer type and wait for read notifications on CAPTURE devices\n> > >> \t * (POLLIN), and write notifications for OUTPUT devices (POLLOUT).\n> > >> \t */\n> > >> \tif (caps_.isCapture()) {\n> > >> \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n> > >> \t\tbufferType_ = caps_.isMultiplanar()\n> > >> \t\t\t    ? V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE\n> > >> \t\t\t    : V4L2_BUF_TYPE_VIDEO_CAPTURE;\n> > >> \t} else if (caps_.isOutput()) {\n> > >> \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n> > >> \t\tbufferType_ = caps_.isMultiplanar()\n> > >> \t\t\t    ? V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE\n> > >> \t\t\t    : V4L2_BUF_TYPE_VIDEO_OUTPUT;\n> > >> \t} else if (caps_.isMetaCapture()) {\n> > >> \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n> > >> \t\tbufferType_ = V4L2_BUF_TYPE_META_CAPTURE;\n> > >> \t} else if (caps_.isMetaOutput()) {\n> > >> \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n> > >> \t\tbufferType_ = V4L2_BUF_TYPE_META_OUTPUT;\n> > >> \t} else {\n> > >> \t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n> > >> \t\treturn -EINVAL;\n> > >> \t}\n> > >>\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net\n\t[217.70.183.197])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 73169610B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  1 Mar 2019 10:40:17 +0100 (CET)","from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay5-d.mail.gandi.net (Postfix) with ESMTPSA id F22D31C0002;\n\tFri,  1 Mar 2019 09:40:16 +0000 (UTC)"],"X-Originating-IP":"2.224.242.101","Date":"Fri, 1 Mar 2019 10:40:46 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190301094046.lswn65vdlcp6dbak@uno.localdomain>","References":"<20190226162641.12116-1-jacopo@jmondi.org>\n\t<20190226162641.12116-4-jacopo@jmondi.org>\n\t<20190227175418.GM4813@pendragon.ideasonboard.com>\n\t<20190228084953.kqgdppccixech7u7@uno.localdomain>\n\t<20190228172549.GD7811@pendragon.ideasonboard.com>\n\t<20190228191557.p36rfjxleya45u4h@uno.localdomain>\n\t<20190228214537.GK7811@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"7xoiu2xo4zgqxvv4\"","Content-Disposition":"inline","In-Reply-To":"<20190228214537.GK7811@pendragon.ideasonboard.com>","User-Agent":"NeoMutt/20180716","Subject":"Re: [libcamera-devel] [PATCH v3 3/8] libcamera: v4l2_device: Add\n\tsupport for META_CAPTURE devices","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":"Fri, 01 Mar 2019 09:40:17 -0000"}},{"id":984,"web_url":"https://patchwork.libcamera.org/comment/984/","msgid":"<20190301095307.GA25460@pendragon.ideasonboard.com>","date":"2019-03-01T09:53:07","subject":"Re: [libcamera-devel] [PATCH v3 3/8] libcamera: v4l2_device: Add\n\tsupport for META_CAPTURE devices","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn Fri, Mar 01, 2019 at 10:40:46AM +0100, Jacopo Mondi wrote:\n> On Thu, Feb 28, 2019 at 11:45:37PM +0200, Laurent Pinchart wrote:\n> > On Thu, Feb 28, 2019 at 08:15:57PM +0100, Jacopo Mondi wrote:\n> >> On Thu, Feb 28, 2019 at 07:25:49PM +0200, Laurent Pinchart wrote:\n> >>> On Thu, Feb 28, 2019 at 09:49:53AM +0100, Jacopo Mondi wrote:\n> >>>> On Wed, Feb 27, 2019 at 07:54:18PM +0200, Laurent Pinchart wrote:\n> >>>>> On Tue, Feb 26, 2019 at 05:26:36PM +0100, Jacopo Mondi wrote:\n> >>>>>> Add support for devices that provide video meta-data to v4l2_device.cpp\n> >>>>>> and re-arrange bufferType handling in open() method.\n> >>>>>>\n> >>>>>> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> >>>>>> ---\n> >>>>>>  src/libcamera/include/v4l2_device.h |  4 +++\n> >>>>>>  src/libcamera/v4l2_device.cpp       | 38 +++++++++++++++++------------\n> >>>>>>  2 files changed, 27 insertions(+), 15 deletions(-)\n> >>>>>>\n> >>>>>> diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h\n> >>>>>> index 1d31d1b403bc..52eb6785cc15 100644\n> >>>>>> --- a/src/libcamera/include/v4l2_device.h\n> >>>>>> +++ b/src/libcamera/include/v4l2_device.h\n> >>>>>> @@ -53,6 +53,10 @@ struct V4L2Capability final : v4l2_capability {\n> >>>>>>  \t\treturn device_caps() & (V4L2_CAP_VIDEO_CAPTURE |\n> >>>>>>  \t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE_MPLANE);\n> >>\n> >> [snip]\n> >>\n> >>>> As done in v4, I introduced an isMetaCapture() method, preparing for\n> >>>> an isMetaOutput() one. In this way isCapture() and isOutput() would\n> >>>> refer to video streams only and the bufferType intialization looks\n> >>>> like:\n> >>>\n> >>> That's confusing. Let's have\n> >>>\n> >>> isCapture() -> V4L2_CAP_META_CAPTURE | V4L2_CAP_VIDEO_CAPTURE |\n> >>> \t       V4L2_CAP_VIDEO_CAPTURE_MPLANE\n> >>> isOutput() -> V4L2_CAP_META_OUTPUT | V4L2_CAP_VIDEO_OUTPUT |\n> >>> \t      V4L2_CAP_VIDEO_OUTPUT_MPLANE\n> >>> isMeta() -> V4L2_CAP_META_CAPTURE | V4L2_CAP_META_OUTPUT\n> >>> isVideo() -> V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_CAPTURE_MPLANE |\n> >>> \t     V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_VIDEO_OUTPUT_MPLANE\n> >>>\n> >>> and you can then also add, if desired,\n> >>>\n> >>> isMetaCapture() -> isMeta() && isCapture()\n> >>> ...\n> >>>\n> >>\n> >> I think the code below here, which is the only place where those\n> >> functions are used would become less nice if this case.\n> >>\n> >> Those functions are only used to assign bufferType_ and fdEvent_,\n> >> let's keep it straightforward as the below series of if/else\n> >\n> > The code below is fine, my point is that isCapture() should not mean\n> > isVideoCapture().\n> >\n> > \tbool isCapture() const\n> > \t{\n> > \t\treturn device_caps() & (V4L2_CAP_META_CAPTURE |\n> > \t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE |\n> > \t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE_MPLANE);\n> > \t}\n> >\n> > \tbool isOutput() const\n> > \t{\n> > \t\treturn device_caps() & (V4L2_CAP_META_OUTPUT |\n> > \t\t\t\t\tV4L2_CAP_VIDEO_OUTPUT |\n> > \t\t\t\t\tV4L2_CAP_VIDEO_OUTPUT_MPLANE);\n> > \t}\n> >\n> > \tbool isMeta() const\n> > \t{\n> > \t\treturn device_caps() & (V4L2_CAP_META_CAPTURE |\n> > \t\t\t\t\tV4L2_CAP_META_OUTPUT);\n> > \t}\n> >\n> > \tbool isVideo() const\n> > \t{\n> > \t\treturn device_caps() & (V4L2_CAP_VIDEO_CAPTURE |\n> > \t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE_MPLANE |\n> > \t\t\t\t\tV4L2_CAP_VIDEO_OUTPUT |\n> > \t\t\t\t\tV4L2_CAP_VIDEO_OUTPUT_MPLANE);\n> > \t}\n> >\n> > \tbool isMetaCapture() const\n> > \t{\n> > \t\treturn isMeta() && isCapture();\n> > \t}\n> >\n> > \tbool isMetaOutput() const\n> > \t{\n> > \t\treturn isMeta() && isOutput();\n> > \t}\n> >\n> > \tbool isVideoCapture() const\n> > \t{\n> > \t\treturn isVideo() && isCapture();\n> > \t}\n> >\n> > \tbool isVideoOutput() const\n> > \t{\n> > \t\treturn isVideo() && isOutput();\n> > \t}\n> >\n> > and then use those four last functions below.\n> \n> I see. I don't feel like adding 4 functions and one level of\n> indirection is super useful considering this is\n> used in a single place, but if that would help moving forward I'll\n> change this.\n\nYou can get rid of the level of indirection if you prefer (although the\ncompiler should really optimize this), but what I really want is\ns/isCapture/isVideoCapture/ and s/isOutput/isVideoOutput/.\n\n> >>>>\n> >>>> \t * Set buffer type and wait for read notifications on CAPTURE devices\n> >>>> \t * (POLLIN), and write notifications for OUTPUT devices (POLLOUT).\n> >>>> \t */\n> >>>> \tif (caps_.isCapture()) {\n> >>>> \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n> >>>> \t\tbufferType_ = caps_.isMultiplanar()\n> >>>> \t\t\t    ? V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE\n> >>>> \t\t\t    : V4L2_BUF_TYPE_VIDEO_CAPTURE;\n> >>>> \t} else if (caps_.isOutput()) {\n> >>>> \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n> >>>> \t\tbufferType_ = caps_.isMultiplanar()\n> >>>> \t\t\t    ? V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE\n> >>>> \t\t\t    : V4L2_BUF_TYPE_VIDEO_OUTPUT;\n> >>>> \t} else if (caps_.isMetaCapture()) {\n> >>>> \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n> >>>> \t\tbufferType_ = V4L2_BUF_TYPE_META_CAPTURE;\n> >>>> \t} else if (caps_.isMetaOutput()) {\n> >>>> \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n> >>>> \t\tbufferType_ = V4L2_BUF_TYPE_META_OUTPUT;\n> >>>> \t} else {\n> >>>> \t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n> >>>> \t\treturn -EINVAL;\n> >>>> \t}\n> >>>>","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B13D1610B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  1 Mar 2019 10:53:13 +0100 (CET)","from pendragon.ideasonboard.com\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1299949;\n\tFri,  1 Mar 2019 10:53:13 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1551433993;\n\tbh=GF1JXtRkMSm/HreLMKQ2Tvp7c34ivopWXEY8ZbY8EJI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=XmjcHx4X+W91+99ECkAexda84qDvswRrRspKpp9D/Xm/AhGI72E9bxxArhR6P8KaC\n\tgqIq/8CWUW/hih4nvTAL/GHrqEwt7RZLRwLG01lZd1Mviz9qNmSxr7bfSBXuSpk4dJ\n\tJ9MavXdfB0SqXITmy1NVTwq13473Ns2yZJ1nfdwE=","Date":"Fri, 1 Mar 2019 11:53:07 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190301095307.GA25460@pendragon.ideasonboard.com>","References":"<20190226162641.12116-1-jacopo@jmondi.org>\n\t<20190226162641.12116-4-jacopo@jmondi.org>\n\t<20190227175418.GM4813@pendragon.ideasonboard.com>\n\t<20190228084953.kqgdppccixech7u7@uno.localdomain>\n\t<20190228172549.GD7811@pendragon.ideasonboard.com>\n\t<20190228191557.p36rfjxleya45u4h@uno.localdomain>\n\t<20190228214537.GK7811@pendragon.ideasonboard.com>\n\t<20190301094046.lswn65vdlcp6dbak@uno.localdomain>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190301094046.lswn65vdlcp6dbak@uno.localdomain>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v3 3/8] libcamera: v4l2_device: Add\n\tsupport for META_CAPTURE devices","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":"Fri, 01 Mar 2019 09:53:13 -0000"}}]