[Bug 711155] wayland: add wl_drm support to wayland sink

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Nov 11 09:26:39 PST 2013


https://bugzilla.gnome.org/show_bug.cgi?id=711155
  GStreamer | gst-plugins-bad | 1.x

Sebastian Dröge (slomo) <slomo> changed:

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

--- Comment #1 from Sebastian Dröge (slomo) <slomo at coaxion.net> 2013-11-11 17:26:31 UTC ---
Review of attachment 258580:
 --> (https://bugzilla.gnome.org/review?bug=711155&attachment=258580)

::: ext/wayland/gstwaylandsink.c
@@ +78,3 @@
+    {GST_WAYLAND_POOL_DRM,  "use DRM to allocated pool buffers", "DRM"},
+    {GST_WAYLAND_POOL_SHM,  "use shared memory to allocated pool buffers",
"SHM"},
+    {GST_WAYLAND_POOL_AUTO, "use DRM or share memory", "AUTO"},

The allocation method should be negotiated with the ALLOCATION query.
waylandsink would put a dmabuf allocator in there and a shmem allocator.
Depending on what the upstream element configures on the pool then, you would
use dmabuf or shm. As both can behave like sysmem (they can be mapped), no
additional precautions have to be done.

So you also would only have a single buffer pool class.

@@ +385,3 @@
+  sink->device_name = strdup (name);
+  if (!sink->device_name) {
+    GST_WARNING_OBJECT (sink, "no device name");

Maybe put this above the strdup? :)

::: ext/wayland/waylanddrmpool.c
@@ +32,3 @@
+#include "gst/allocators/gstdmabuf.h"
+#include "waylanddrmpool.h"
+#include <libkms/libkms.h>

Needs configure checks for libkms and also need to put that into the LIBADD in
Makefile.am

@@ +47,3 @@
+wayland_drm_pool_mem_unmap (GstMemory * gmem)
+{
+    /* do nothing, except avoid doing munmap */

Why?

@@ +73,3 @@
+  allocator = gst_dmabuf_allocator_obtain ();
+  /* hook to avoid unmap issue on drm buffer */
+  allocator->mem_unmap = wayland_drm_pool_mem_unmap;

This way you break all other dmabuf allocators btw. One of the reasons why it's
not a singleton anymore now ;)

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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