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>
This commit is contained in:
committed by
Laurent Pinchart
parent
6d0cf98bb1
commit
db50b1072a
@@ -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_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user