eglglessink: Properly set a debug category for the adaption layers
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 16 Apr 2013 20:25:19 +0000 (22:25 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 16 Apr 2013 20:25:19 +0000 (22:25 +0200)
ext/eglgles/gstegladaptation.c
ext/eglgles/gstegladaptation.h
ext/eglgles/gstegladaptation_eagl.m
ext/eglgles/gstegladaptation_egl.c
ext/eglgles/gsteglglessink.c

index 1315308..6011707 100644 (file)
@@ -49,6 +49,9 @@
 #include <gst/video/video.h>
 #include <string.h>
 
+#define GST_CAT_DEFAULT egladaption_debug
+GST_DEBUG_CATEGORY (egladaption_debug);
+
 /* GLESv2 GLSL Shaders
  *
  * OpenGL ES Standard does not mandate YUV support. This is
@@ -208,6 +211,12 @@ static const char *frag_NV12_NV21_prog = {
 };
 /* *INDENT-ON* */
 
+void
+gst_egl_adaption_init (void)
+{
+  GST_DEBUG_CATEGORY_INIT (egladaption_debug, "egladaption", 0, "EGL adaption layer");
+}
+
 static GstCaps *
 _gst_video_format_new_template_caps (GstVideoFormat format)
 {
index b8089dd..63eec95 100644 (file)
@@ -151,6 +151,10 @@ struct _GstEglAdaptationContext
   gboolean buffer_preserved;
 };
 
+GST_DEBUG_CATEGORY_EXTERN (egladaption_debug);
+
+void gst_egl_adaption_init (void);
+
 GstEglAdaptationContext * gst_egl_adaptation_context_new (GstElement * element);
 void gst_egl_adaptation_context_free (GstEglAdaptationContext * ctx);
 void gst_egl_adaptation_init (GstEglAdaptationContext * ctx);
index f786447..68541f4 100644 (file)
@@ -49,6 +49,8 @@
 
 #include "gstegladaptation.h"
 
+#define GST_CAT_DEFAULT egladaption_debug
+
 struct _GstEaglContext
 {
   EAGLContext *eagl_context;
index eeefc7e..edd360a 100644 (file)
@@ -53,6 +53,8 @@
 #include <GLES2/gl2ext.h>
 #include <gst/egl/egl.h>
 
+#define GST_CAT_DEFAULT egladaption_debug
+
 /* Some EGL implementations are reporting wrong
  * values for the display's EGL_PIXEL_ASPECT_RATIO.
  * They are required by the khronos specs to report
index b006863..4526132 100644 (file)
@@ -2449,6 +2449,8 @@ eglglessink_plugin_init (GstPlugin * plugin)
   GST_DEBUG_CATEGORY_INIT (gst_eglglessink_debug, "eglglessink",
       0, "Simple EGL/GLES Sink");
 
+  gst_egl_adaption_init ();
+
 #ifdef USE_EGL_RPI
   GST_DEBUG ("Initialize BCM host");
   bcm_host_init ();