wayland: Set a debug category for the shm allocator

None was set, which meant the debug was associated with default.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7494>
This commit is contained in:
Nicolas Dufresne 2024-08-30 14:59:14 -04:00 committed by Backport Bot
parent 1d629a1d69
commit 4c3e5435d1
3 changed files with 17 additions and 0 deletions

View file

@ -98,6 +98,7 @@ gst_wl_display_init (GstWlDisplay * self)
g_rec_mutex_init (&priv->sync_mutex);
gst_wl_linux_dmabuf_init_once ();
gst_wl_shm_init_once ();
gst_shm_allocator_init_once ();
gst_wl_videoformat_init_once ();
}

View file

@ -26,6 +26,19 @@
#include "gstwlshmallocator.h"
GST_DEBUG_CATEGORY (gst_wl_shm_debug);
#define GST_CAT_DEFAULT gst_wl_shm_debug
void
gst_wl_shm_init_once (void)
{
static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (gst_wl_shm_debug, "wl_shm", 0, "wl_shm library");
g_once_init_leave (&_init, 1);
}
}
static gboolean
gst_wl_shm_validate_video_info (const GstVideoInfo * vinfo)

View file

@ -29,6 +29,9 @@
G_BEGIN_DECLS
GST_WL_API
void gst_wl_shm_init_once (void);
GST_WL_API
struct wl_buffer * gst_wl_shm_memory_construct_wl_buffer (GstMemory * mem,
GstWlDisplay * display, const GstVideoInfo * info);