[{"id":3866,"web_url":"https://patchwork.libcamera.org/comment/3866/","msgid":"<20200229135413.GM18738@pendragon.ideasonboard.com>","date":"2020-02-29T13:54:13","subject":"Re: [libcamera-devel] [PATCH v2 11/27] gst: libcamerapad: Add a\n\tmethod to access the role","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Nicolas,\n\nThank you for the patch.\n\nOn Thu, Feb 27, 2020 at 03:03:51PM -0500, Nicolas Dufresne wrote:\n> Each pad can have a different roles. Users will have to request and configure\n\ns/roles/role/\n\n> their pads roles before moving higher state.\n\ns/moving/moving to a/ ?\n\n> \n> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  src/gstreamer/gstlibcamerapad.cpp | 8 ++++++++\n>  src/gstreamer/gstlibcamerapad.h   | 2 ++\n>  2 files changed, 10 insertions(+)\n> \n> diff --git a/src/gstreamer/gstlibcamerapad.cpp b/src/gstreamer/gstlibcamerapad.cpp\n> index 6212c3b..d4f5b15 100644\n> --- a/src/gstreamer/gstlibcamerapad.cpp\n> +++ b/src/gstreamer/gstlibcamerapad.cpp\n> @@ -99,3 +99,11 @@ gst_libcamera_pad_class_init(GstLibcameraPadClass *klass)\n>  \t\t\t\t\t\t     | G_PARAM_STATIC_STRINGS));\n>  \tg_object_class_install_property(object_class, PROP_STREAM_ROLE, spec);\n>  }\n> +\n> +StreamRole\n> +gst_libcamera_pad_get_role(GstPad *pad)\n> +{\n> +\tauto *self = GST_LIBCAMERA_PAD(pad);\n> +\tGLibLocker lock(GST_OBJECT(self));\n> +\treturn self->role;\n> +}\n> diff --git a/src/gstreamer/gstlibcamerapad.h b/src/gstreamer/gstlibcamerapad.h\n> index 2e745f1..3dea0e7 100644\n> --- a/src/gstreamer/gstlibcamerapad.h\n> +++ b/src/gstreamer/gstlibcamerapad.h\n> @@ -7,6 +7,7 @@\n>   */\n>  \n>  #include <gst/gst.h>\n\nMissing blank line here.\n\n> +#include <libcamera/stream.h>\n>  \n>  #ifndef __GST_LIBCAMERA_PAD_H__\n>  #define __GST_LIBCAMERA_PAD_H__\n\nThe #include statements should go after the header guard.\n\nLooks like I missed all this in the review of v1, sorry.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nstill applies.\n\n> @@ -15,5 +16,6 @@\n>  G_DECLARE_FINAL_TYPE(GstLibcameraPad, gst_libcamera_pad,\n>  \t\t     GST_LIBCAMERA, PAD, GstPad)\n>  \n> +libcamera::StreamRole gst_libcamera_pad_get_role(GstPad *pad);\n>  \n>  #endif /* __GST_LIBCAMERA_PAD_H__ */","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 108B162689\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 29 Feb 2020 14:54:37 +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 781BD2AF;\n\tSat, 29 Feb 2020 14:54:36 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1582984476;\n\tbh=M6YjrEBCnLp3BBv+4Jz+tRW3s5zhcAPt6hwNL1ntwDY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=vxC/Vs8+xK1KgWe/zkF1U4j0WOepIhSABCbyW8JnEdmhQNqjx0GNn19o1xbOospae\n\tV+qzsB9l4UN+RwFT76u2W10p5w9w6PZAiQSzF53j8ZeB60uEqGklNsooKgTKGGcbhi\n\t6W49oym1TBS7DNqrs2xugeedQx59hbHCUZg2q1AA=","Date":"Sat, 29 Feb 2020 15:54:13 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Nicolas Dufresne <nicolas.dufresne@collabora.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200229135413.GM18738@pendragon.ideasonboard.com>","References":"<20200227200407.490616-1-nicolas.dufresne@collabora.com>\n\t<20200227200407.490616-12-nicolas.dufresne@collabora.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20200227200407.490616-12-nicolas.dufresne@collabora.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v2 11/27] gst: libcamerapad: Add a\n\tmethod to access the role","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Sat, 29 Feb 2020 13:54:37 -0000"}}]