#include <stdio.h>
#include <gst/gst.h>
+#include <glib/gprintf.h>
#include "gl.h"
#include "gstglutils.h"
return tmp;
}
+
+#ifndef GST_DISABLE_GST_DEBUG
+void
+gst_gl_insert_debug_marker (GstGLContext * context, const gchar * format, ...)
+{
+ const GstGLFuncs *gl = context->gl_vtable;
+ gchar *string;
+ gint len;
+ va_list args;
+
+ va_start (args, format);
+ len = g_vasprintf (&string, format, args);
+ va_end (args);
+
+#if defined (GL_DEBUG_TYPE_MARKER)
+ if (gl->DebugMessageInsert) {
+ gl->DebugMessageInsert (GL_DEBUG_SOURCE_THIRD_PARTY, GL_DEBUG_TYPE_MARKER,
+ 0, GL_DEBUG_SEVERITY_LOW, (gsize) len, string);
+ } else
+#endif
+ if (gl->InsertEventMarker)
+ gl->InsertEventMarker (len, string);
+ else if (gl->StringMarker)
+ gl->StringMarker (len, string);
+}
+#endif
GstCaps * gst_gl_caps_replace_all_caps_features (const GstCaps * caps,
const gchar * feature_name);
+#ifndef GST_DISABLE_GST_DEBUG
+void gst_gl_insert_debug_marker (GstGLContext * context,
+ const gchar * format, ...) G_GNUC_PRINTF (2, 3);
+#else /* GST_DISABLE_GST_DEBUG */
+#if G_HAVE_ISO_VARARGS
+#define gst_gl_insert_debug_marker(...) G_STMT_START{ }G_STMT_END
+#else /* G_HAVE_ISO_VARARGS */
+#if G_HAVE_GNUC_VARARGS
+#define gst_gl_insert_debug_marker(args...) G_STMT_START{ }G_STMT_END
+#else /* G_HAVE_GNUC_VARARGS */
+static inline void
+gst_gl_insert_debug_marker (GstGLContext * context, const gchar * format, ...)
+{
+}
+#endif /* G_HAVE_GNUC_VARARGS */
+#endif /* G_HAVE_ISO_VARARGS */
+#endif /* GST_DISABLE_GST_DEBUG */
+
G_END_DECLS
#endif /* __GST_GL_UTILS_H__ */