[Bug 783521] gl: Add "direct" dmabuf uploader
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Tue Jun 13 05:02:32 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=783521
Matthew Waters (ystreet00) <ystreet00 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #353351|none |needs-work
status| |
--- Comment #6 from Matthew Waters (ystreet00) <ystreet00 at gmail.com> ---
Review of attachment 353351:
--> (https://bugzilla.gnome.org/review?bug=783521&attachment=353351)
The for loop seems to complicate the code flow a bit, it's probably best to
just expand it out in full and avoid the indirections.
What other code does for these GL attribute pairs is:
guint i;
EGLAttrib attribs[SOME_LARGE_ENOUGH_VALUE] = { 0, };
attribs[i++] = SOME_ATTRIBUTE;
attribs[i++] = some_value;
...
attribs[i++] = sentinel;
g_assert (i < SOME_LARGE_ENOUGH_VALUE);
Need to also use the GST_*_OBJECT debugging macros where possible instead of
the non-OBJECT variants.
I think the name of the two functions should be
gst_egl_image_from_dmabuf_as_rgba() and gst_egl_image_from_dmabuf().
::: gst-libs/gst/gl/egl/gsteglimage.c
@@ +617,3 @@
+
+ /* Make sure we never set up more than MAX_NUM_DMA_BUF_PLANES planes */
+ if (G_UNLIKELY (n_planes > MAX_NUM_DMA_BUF_PLANES))
This should be a g_return_val_if_fail()
@@ +635,3 @@
+ if (!gst_buffer_find_memory (buffer, in_info->offset[i], plane_size,
+ &mems_idx[i], &length, &mems_skip[i])) {
+ GST_DEBUG ("Couldn't find memory for plane %d", i);
GST_WARNING_OBJECT at least
@@ +642,3 @@
+ if (length != 1) {
+ GST_DEBUG
+ ("There are multiple dmabufs for plane %d, which is unsupported",
i);
GST_FIXME_OBJECT or GST_WARNING_OBJECT.
@@ +651,3 @@
+ /* And all memory found must be dmabuf */
+ if (!gst_is_dmabuf_memory (mems[i])) {
+ GST_DEBUG ("Plane %d memory isn't dmabuf", i);
GST_FIXME_OBJECT or GST_WARNING_OBJECT
@@ +667,3 @@
+ attribs[6 + 6 * i + 5] = stride;
+
+ GST_DEBUG ("Plane %d has FD %d offset %" G_GSIZE_FORMAT " stride %"
GST_DEBUG_OBJECT
@@ +676,3 @@
+ img = _gst_egl_image_create (context, EGL_LINUX_DMA_BUF_EXT, NULL, attribs);
+ if (!img) {
+ GST_WARNING ("eglCreateImage failed: %s",
GST_WARNING_OBJECT
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list