本文整理汇总了C++中GstGLFuncs::DebugMessageCallback方法的典型用法代码示例。如果您正苦于以下问题:C++ GstGLFuncs::DebugMessageCallback方法的具体用法?C++ GstGLFuncs::DebugMessageCallback怎么用?C++ GstGLFuncs::DebugMessageCallback使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GstGLFuncs
的用法示例。
在下文中一共展示了GstGLFuncs::DebugMessageCallback方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: api
//.........这里部分代码省略.........
if (!gst_gl_context_activate (context, TRUE)) {
g_set_error (error, GST_GL_CONTEXT_ERROR,
GST_GL_CONTEXT_ERROR_RESOURCE_UNAVAILABLE,
"Failed to activate the GL Context");
g_free (compiled_api_s);
g_free (user_api_s);
g_free (display_api_s);
goto failure;
}
gl_api = gst_gl_context_get_gl_api (context);
g_assert (gl_api != GST_GL_API_NONE && gl_api != GST_GL_API_ANY);
api_string = gst_gl_api_to_string (gl_api);
GST_INFO_OBJECT (context, "available GL APIs: %s", api_string);
if (((compiled_api & gl_api & display_api) & user_api) == GST_GL_API_NONE) {
g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_WRONG_API,
"failed to create context, context "
"could not provide correct api. user (%s), compiled (%s), context (%s)",
user_api_s, compiled_api_s, api_string);
g_free (api_string);
g_free (compiled_api_s);
g_free (user_api_s);
g_free (display_api_s);
goto failure;
}
g_free (api_string);
g_free (compiled_api_s);
g_free (user_api_s);
g_free (display_api_s);
GST_DEBUG_OBJECT (context, "Filling info");
if (!gst_gl_context_fill_info (context, error)) {
g_assert (error == NULL || *error != NULL);
goto failure;
}
context->priv->alive = TRUE;
if (gl->DebugMessageCallback) {
#if !defined(GST_DISABLE_GST_DEBUG)
GST_INFO_OBJECT (context, "Enabling GL context debugging");
/* enable them all */
gl->DebugMessageControl (GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, 0,
GL_TRUE);
gl->DebugMessageCallback (_gst_gl_debug_callback, context);
#endif
}
if (other_context) {
GST_DEBUG_OBJECT (context, "Unreffing other_context %" GST_PTR_FORMAT,
other_context);
gst_object_unref (other_context);
}
g_cond_signal (&context->priv->create_cond);
// g_mutex_unlock (&context->priv->render_lock);
gst_gl_window_send_message_async (context->window,
(GstGLWindowCB) _unlock_create_thread, context, NULL);
gst_gl_window_run (context->window);
GST_INFO_OBJECT (context, "loop exited");
g_mutex_lock (&context->priv->render_lock);
context->priv->alive = FALSE;
gst_gl_context_activate (context, FALSE);
context_class->destroy_context (context);
/* User supplied callback */
if (context->window->close)
context->window->close (context->window->close_data);
/* window specific shutdown */
if (window_class->close) {
window_class->close (context->window);
}
g_cond_signal (&context->priv->destroy_cond);
g_mutex_unlock (&context->priv->render_lock);
return NULL;
failure:
{
if (other_context)
gst_object_unref (other_context);
g_cond_signal (&context->priv->create_cond);
g_mutex_unlock (&context->priv->render_lock);
return NULL;
}
}