gl: Make glcontext debug category used in more places
authorEdward Hervey <bilboed@bilboed.com>
Thu, 12 Feb 2015 13:58:14 +0000 (14:58 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:31:54 +0000 (19:31 +0000)
As a bonus it makes the egl context debug messages visible now :)

gst-libs/gst/gl/egl/gstglcontext_egl.c
gst-libs/gst/gl/gstglcontext.h

index 325f06c..3d21d39 100644 (file)
@@ -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;
index e9fe5dc..769737c 100644 (file)
@@ -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__ */