mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 21:35:44 +00:00
eglimage: Ensure that the debug category is always initalized
Before the initializer was only run if dmabuf support was used. https://bugzilla.gnome.org/show_bug.cgi?id=766794
This commit is contained in:
parent
113d5c143c
commit
b730f7e89d
1 changed files with 13 additions and 13 deletions
|
@ -65,23 +65,25 @@
|
|||
#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274
|
||||
#endif
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (GST_CAT_EGL_IMAGE);
|
||||
#define GST_CAT_DEFAULT GST_CAT_EGL_IMAGE
|
||||
#ifndef GST_DISABLE_GST_DEBUG
|
||||
#define GST_CAT_DEFAULT gst_egl_image_ensure_debug_category()
|
||||
|
||||
GST_DEFINE_MINI_OBJECT_TYPE (GstEGLImage, gst_egl_image);
|
||||
|
||||
static void
|
||||
_init_debug (void)
|
||||
static GstDebugCategory *
|
||||
gst_egl_image_ensure_debug_category (void)
|
||||
{
|
||||
static volatile gsize _init = 0;
|
||||
static gsize cat_gonce = 0;
|
||||
|
||||
if (g_once_init_enter (&_init)) {
|
||||
GST_DEBUG_CATEGORY_INIT (GST_CAT_EGL_IMAGE, "gleglimage", 0,
|
||||
"EGLImage wrapper");
|
||||
if (g_once_init_enter (&cat_gonce)) {
|
||||
GstDebugCategory *cat = NULL;
|
||||
|
||||
g_once_init_leave (&_init, 1);
|
||||
GST_DEBUG_CATEGORY_INIT (cat, "gleglimage", 0, "EGLImage wrapper");
|
||||
|
||||
g_once_init_leave (&cat_gonce, (gsize) cat);
|
||||
}
|
||||
|
||||
return (GstDebugCategory *) cat_gonce;
|
||||
}
|
||||
#endif /* GST_DISABLE_GST_DEBUG */
|
||||
|
||||
EGLImageKHR
|
||||
gst_egl_image_get_image (GstEGLImage * image)
|
||||
|
@ -174,8 +176,6 @@ _drm_fourcc_from_info (GstVideoInfo * info, int plane)
|
|||
const gint rg_fourcc = DRM_FORMAT_RG88;
|
||||
#endif
|
||||
|
||||
_init_debug ();
|
||||
|
||||
GST_DEBUG ("Getting DRM fourcc for %s plane %i",
|
||||
gst_video_format_to_string (format), plane);
|
||||
|
||||
|
|
Loading…
Reference in a new issue