[Bug 776927] gl: gldownload: convert GstGLMemory to GstDmaBuf

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu May 4 18:36:00 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=776927

Nicolas Dufresne (stormer) <nicolas at ndufresne.ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #345062|none                        |needs-work
             status|                            |

--- Comment #23 from Nicolas Dufresne (stormer) <nicolas at ndufresne.ca> ---
Review of attachment 345062:
 --> (https://bugzilla.gnome.org/review?bug=776927&attachment=345062)

::: ext/gl/gstgldownloadelement.c
@@ +58,3 @@
+    GST_STATIC_CAPS (
+#if GST_GL_HAVE_PLATFORM_EGL && GST_GL_HAVE_DMABUF
+        "video/x-raw(memory:DMABuf); "

Please use GST_CAPS_FEATURE_MEMORY_DMABUF, this way we are sure there is no
typo.

@@ +311,3 @@
+  if (buffer)
+    gst_buffer_add_video_meta_full (buffer, vmeta->flags, vmeta->format,
+        vmeta->width, vmeta->height, vmeta->n_planes, offset, stride);

You need to check if downstream supports GstVideoMeta. If not, you may check
(option) that the list os strides and offsets matches the default set to
GstVideoInfo when doing gst_video_info_set_format(). If that does not match,
dmabuf exportation is not possible, return NULL.

@@ +339,1 @@
+  if (!buffer) {

I think it's a good case were using a goto would be more readable.

::: gst-libs/gst/gl/egl/gsteglimage.c
@@ +481,3 @@
+  gst_eglExportDMABUFImageQueryMESA =
+      gst_gl_context_get_proc_address (image->context,
+      "eglExportDMABUFImageQueryMESA");

We have function tables already, so you don't endup doing get_proc_address()
every image plane.

@@ +506,3 @@
+    return FALSE;
+
+  /* Don't allow multi-plane dmabufs */

Why ? What's the problem ? and why checking this so late ? We already support
multiple FD when importing. I don't think this is very useful if you limit this
to packed formats.

-- 
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