diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2020-01-21 17:16:40 -0500 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-03-07 01:57:45 +0200 |
commit | d41b356564caef80ceee4096405a1ef439976cfa (patch) | |
tree | 66bb43e0cf7c768ff7c3c4a64af162548f926b9a /src/gstreamer/gstlibcamerapad.cpp | |
parent | 1d8cbaf214199c55ba9c7210fa900001d59cc24c (diff) |
gst: libcamerapad: Add a method to access the role
Each pad can have a different roles. Users will have to request and configure
their pads role before moving to a higher state.
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/gstreamer/gstlibcamerapad.cpp')
-rw-r--r-- | src/gstreamer/gstlibcamerapad.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gstreamer/gstlibcamerapad.cpp b/src/gstreamer/gstlibcamerapad.cpp index ca5c8203..ed24557b 100644 --- a/src/gstreamer/gstlibcamerapad.cpp +++ b/src/gstreamer/gstlibcamerapad.cpp @@ -100,3 +100,11 @@ gst_libcamera_pad_class_init(GstLibcameraPadClass *klass) | G_PARAM_STATIC_STRINGS)); g_object_class_install_property(object_class, PROP_STREAM_ROLE, spec); } + +StreamRole +gst_libcamera_pad_get_role(GstPad *pad) +{ + auto *self = GST_LIBCAMERA_PAD(pad); + GLibLocker lock(GST_OBJECT(self)); + return self->role; +} |