(GBoxedCopyFunc) gst_vaapi_display_ref,
(GBoxedFreeFunc) gst_vaapi_display_unref);
+static void
+_init_context_debug (void)
+{
+#ifndef GST_DISABLE_GST_DEBUG
+ static volatile gsize _init = 0;
+
+ if (g_once_init_enter (&_init)) {
+ GST_DEBUG_CATEGORY_GET (GST_CAT_CONTEXT, "GST_CONTEXT");
+ g_once_init_leave (&_init, 1);
+ }
+#endif
+}
+
GstContext *
gst_vaapi_video_context_new_with_display (GstVaapiDisplay * display,
gboolean persistent)
return FALSE;
}
+ _init_context_debug ();
GST_CAT_INFO_OBJECT (GST_CAT_CONTEXT, pad, "context pad peer query failed");
return TRUE;
}
GstQuery *query;
GstMessage *msg;
- if (!GST_CAT_CONTEXT)
- GST_DEBUG_CATEGORY_GET (GST_CAT_CONTEXT, "GST_CONTEXT");
+ _init_context_debug ();
/* 1) Check if the element already has a context of the specific
* type, i.e. it was previously set via
context = gst_vaapi_video_context_new_with_display (display, FALSE);
+ _init_context_debug ();
GST_CAT_INFO_OBJECT (GST_CAT_CONTEXT, element,
"posting `have-context' (%p) message with display (%p)",
context, display);