From 6d6c7f1f190fe80ec3e838fdf384a6d1bf510be0 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 12 Feb 2015 14:58:14 +0100 Subject: [PATCH] gl: Make glcontext debug category used in more places As a bonus it makes the egl context debug messages visible now :) --- gst-libs/gst/gl/egl/gstglcontext_egl.c | 6 +++++- gst-libs/gst/gl/gstglcontext.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/gl/egl/gstglcontext_egl.c b/gst-libs/gst/gl/egl/gstglcontext_egl.c index 325f06cc32..3d21d398e1 100644 --- a/gst-libs/gst/gl/egl/gstglcontext_egl.c +++ b/gst-libs/gst/gl/egl/gstglcontext_egl.c @@ -38,6 +38,8 @@ #include "../win32/gstglwindow_win32.h" #endif +#define GST_CAT_DEFAULT gst_gl_context_debug + static gboolean gst_gl_context_egl_create_context (GstGLContext * context, GstGLAPI gl_api, GstGLContext * other_context, GError ** error); static void gst_gl_context_egl_destroy_context (GstGLContext * context); @@ -227,6 +229,8 @@ gst_gl_context_egl_create_context (GstGLContext * context, egl = GST_GL_CONTEXT_EGL (context); window = gst_gl_context_get_window (context); + GST_DEBUG_OBJECT (context, "Creating EGL context"); + if (other_context) { if (gst_gl_context_get_gl_platform (other_context) != GST_GL_PLATFORM_EGL) { g_set_error (error, GST_GL_CONTEXT_ERROR, @@ -330,7 +334,7 @@ gst_gl_context_egl_create_context (GstGLContext * context, egl_exts = eglQueryString (egl->egl_display, EGL_EXTENSIONS); - GST_DEBUG ("about to create gl context\n"); + GST_DEBUG ("about to create gl context"); if (egl->gl_api & GST_GL_API_GLES2) { context_attrib[i++] = EGL_CONTEXT_CLIENT_VERSION; diff --git a/gst-libs/gst/gl/gstglcontext.h b/gst-libs/gst/gl/gstglcontext.h index e9fe5dcafc..769737c4ff 100644 --- a/gst-libs/gst/gl/gstglcontext.h +++ b/gst-libs/gst/gl/gstglcontext.h @@ -151,6 +151,8 @@ gboolean gst_gl_context_fill_info (GstGLContext * context, GError ** error); void gst_gl_context_thread_add (GstGLContext * context, GstGLContextThreadFunc func, gpointer data); +GST_DEBUG_CATEGORY_EXTERN (gst_gl_context_debug); + G_END_DECLS #endif /* __GST_GL_CONTEXT_H__ */