summaryrefslogtreecommitdiff
path: root/src/gstreamer/gstlibcameraallocator.cpp
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2020-01-27 17:41:08 -0500
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-07 01:58:08 +0200
commitdb50b1072a94a0b004f5099a7def5a7d0294bb50 (patch)
tree3034babbdedf7b08873a5b2813fea57daa1800a7 /src/gstreamer/gstlibcameraallocator.cpp
parent6d0cf98bb1a808e767f7d0fe91599848ce955227 (diff)
gst: Add getters for Stream and FrameBuffer
This adds getters on pad/pool/allocator so that we can retrieve the Stream or FrameBuffer. 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/gstlibcameraallocator.cpp')
-rw-r--r--src/gstreamer/gstlibcameraallocator.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gstreamer/gstlibcameraallocator.cpp b/src/gstreamer/gstlibcameraallocator.cpp
index 861af596..d0b90eca 100644
--- a/src/gstreamer/gstlibcameraallocator.cpp
+++ b/src/gstreamer/gstlibcameraallocator.cpp
@@ -243,3 +243,11 @@ gst_libcamera_allocator_get_pool_size(GstLibcameraAllocator *self,
return pool->length;
}
+
+FrameBuffer *
+gst_libcamera_memory_get_frame_buffer(GstMemory *mem)
+{
+ auto *frame = reinterpret_cast<FrameWrap *>(gst_mini_object_get_qdata(GST_MINI_OBJECT_CAST(mem),
+ FrameWrap::getQuark()));
+ return frame->buffer_;
+}