After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796717 - dmabufallocator: add gst_dmabuf_allocator_alloc_wrapped
dmabufallocator: add gst_dmabuf_allocator_alloc_wrapped
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-06-28 19:54 UTC by Peter Seiderer
Modified: 2018-11-03 12:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fdallocator: add gst_fd_allocator_alloc_wrapped (3.54 KB, patch)
2018-06-28 19:55 UTC, Peter Seiderer
none Details | Review
dmabufallocator: add gst_dmabuf_allocator_alloc_wrapped (2.51 KB, patch)
2018-06-28 19:56 UTC, Peter Seiderer
none Details | Review
dmabufallocator: add gst_dmabuf_allocator_alloc_wrapped (2.60 KB, patch)
2018-08-18 21:06 UTC, Peter Seiderer
none Details | Review
dmabufallocator: add gst_dmabuf_allocator_alloc_wrapped (2.65 KB, patch)
2018-08-18 21:21 UTC, Peter Seiderer
none Details | Review

Description Peter Seiderer 2018-06-28 19:54:41 UTC
Add gst_dmabuf_allocator_alloc_wrapped to gain a destroy
notify for custom allocated dma buffer space.
Comment 1 Peter Seiderer 2018-06-28 19:55:39 UTC
Created attachment 372871 [details] [review]
fdallocator: add gst_fd_allocator_alloc_wrapped
Comment 2 Peter Seiderer 2018-06-28 19:56:16 UTC
Created attachment 372872 [details] [review]
dmabufallocator: add gst_dmabuf_allocator_alloc_wrapped
Comment 3 Nicolas Dufresne (ndufresne) 2018-06-28 20:10:21 UTC
Review of attachment 372871 [details] [review]:

::: gst-libs/gst/allocators/gstfdmemory.c
@@ +284,3 @@
+
+/**
+ * gst_fd_allocator_alloc_wrapped:

Why _wrapped ? in other places it would have been called _full ? Just asking.
Comment 4 Nicolas Dufresne (ndufresne) 2018-06-28 20:10:46 UTC
Any code using that ?
Comment 5 Peter Seiderer 2018-06-28 20:20:42 UTC
(In reply to Nicolas Dufresne (ndufresne) from comment #3)
> Review of attachment 372871 [details] [review] [review]:
> 
> ::: gst-libs/gst/allocators/gstfdmemory.c
> @@ +284,3 @@
> +
> +/**
> + * gst_fd_allocator_alloc_wrapped:
> 
> Why _wrapped ? in other places it would have been called _full ? Just asking.

Something between the existing gst_buffer_new_wrapped() and gst_buffer_new_wrapped_full(), maybe should change to
gst_fd_allocator_alloc_wrapped_full()?
Comment 6 Peter Seiderer 2018-06-28 20:25:30 UTC
(In reply to Nicolas Dufresne (ndufresne) from comment #4)
> Any code using that ?

Some custom code on an embeeded device (imx6 based), keeping a appsrc-->v4l2sink running (to avoid HDMI-Out blackouts), feeding alternating by v4l2src-->appsink HDMI-In capture pipeline and custom allocated dma buffers in case the HDMI-In source is changing...
Comment 7 Peter Seiderer 2018-08-18 21:06:52 UTC
Created attachment 373409 [details] [review]
dmabufallocator: add gst_dmabuf_allocator_alloc_wrapped

Changes v1 -> v2: add additional GstFdMemoryFlags parameter
Comment 8 Peter Seiderer 2018-08-18 21:21:12 UTC
Created attachment 373410 [details] [review]
dmabufallocator: add gst_dmabuf_allocator_alloc_wrapped

Changes v1 -> v2: add additional GstFdMemoryFlags parameter (and upload the right patch)
Comment 9 Nicolas Dufresne (ndufresne) 2018-08-19 01:04:58 UTC
Why not just call the base class function ?
Comment 10 Peter Seiderer 2018-08-19 17:58:58 UTC
Because of the same reason all other functions above doing the same pattern,
checking GST_IS_DMABUF_ALLOCATOR (allocator) and calling the gst_fd version (or
do I miss something)?
Comment 11 Nicolas Dufresne (ndufresne) 2018-08-19 18:43:04 UTC
They existed before the base class. Do you have any better reason why we need more API?
Comment 12 Peter Seiderer 2018-08-19 20:13:26 UTC
For consistency? Use dmabuf_allocator functions to gain dma buffers (see e.g.
this commit from 4 month ago [1])?

[1] https://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/gst-libs/gst/allocators/gstdmabuf.c?id=56ab7e0e1d0ebcbfef48c6a1ce89463a415c8e9
Comment 13 Nicolas Dufresne (ndufresne) 2018-08-19 20:27:30 UTC
Looks like a mistake of mine to merge this one. It's exactly the same function, it's totally safe to use. Though for this one, it's used in one of the core repository, so it was easier to say yes.
Comment 14 Nicolas Dufresne (ndufresne) 2018-08-19 20:38:31 UTC
Anyone else ? Can someone bring pro/cons ? Do we only merge the FDAlloctor patch or both ?
Comment 15 GStreamer system administrator 2018-11-03 12:08:33 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/467.