diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/wayland/gstwldisplay.c b/subprojects/gst-plugins-bad/gst-libs/gst/wayland/gstwldisplay.c index 9119f1df77..8ae698c0ff 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/wayland/gstwldisplay.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/wayland/gstwldisplay.c @@ -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 (); } diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/wayland/gstwlshmallocator.c b/subprojects/gst-plugins-bad/gst-libs/gst/wayland/gstwlshmallocator.c index fb2fdb9a5e..671f2b7295 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/wayland/gstwlshmallocator.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/wayland/gstwlshmallocator.c @@ -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) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/wayland/gstwlshmallocator.h b/subprojects/gst-plugins-bad/gst-libs/gst/wayland/gstwlshmallocator.h index b57b85c04a..4309bd7f49 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/wayland/gstwlshmallocator.h +++ b/subprojects/gst-plugins-bad/gst-libs/gst/wayland/gstwlshmallocator.h @@ -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);