glfeature add a specific debug category

Saves having to trawl through the 'default' category when function retrieval
goes wrong.
This commit is contained in:
Matthew Waters 2016-01-07 18:05:23 +11:00 committed by Tim-Philipp Müller
parent 6667408cb5
commit 1b49603d78

View file

@ -27,6 +27,21 @@
#include "gl.h"
#include "gstglfeature.h"
#define GST_CAT_DEFAULT gl_feature
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
static void
_init_debug (void)
{
static volatile gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "glfeature", 0,
"OpenGL feature detection");
g_once_init_leave (&_init, 1);
}
}
gboolean
gst_gl_check_extension (const char *name, const gchar * ext)
{
@ -250,6 +265,8 @@ _gst_gl_feature_check_ext_functions (GstGLContext * context,
{
int i;
_init_debug ();
for (i = 0; i < G_N_ELEMENTS (gst_gl_feature_ext_functions_data); i++) {
_gst_gl_feature_check (context, "GL",
gst_gl_feature_ext_functions_data + i, gl_major, gl_minor,