mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
glcontext: add a destroy function
that just calls the subclass
This commit is contained in:
parent
d3077a890c
commit
4277d2742a
2 changed files with 22 additions and 0 deletions
|
@ -877,6 +877,27 @@ failure:
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_gl_context_destroy:
|
||||
* @context: a #GstGLContext:
|
||||
*
|
||||
* Destroys an OpenGL context.
|
||||
*
|
||||
* Should only be called after gst_gl_context_create() has been successfully
|
||||
* called for this context.
|
||||
*/
|
||||
void
|
||||
gst_gl_context_destroy (GstGLContext * context)
|
||||
{
|
||||
GstGLContextClass *context_class;
|
||||
|
||||
g_return_if_fail (GST_GL_IS_CONTEXT (context));
|
||||
context_class = GST_GL_CONTEXT_GET_CLASS (context);
|
||||
g_return_if_fail (context_class->destroy_context != NULL);
|
||||
|
||||
context_class->destroy_context (context);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_gl_context_get_gl_context:
|
||||
* @context: a #GstGLContext:
|
||||
|
|
|
@ -128,6 +128,7 @@ GstGLAPI gst_gl_context_get_gl_api (GstGLContext *context);
|
|||
guintptr gst_gl_context_get_gl_context (GstGLContext *context);
|
||||
|
||||
gboolean gst_gl_context_create (GstGLContext *context, GstGLContext *other_context, GError ** error);
|
||||
void gst_gl_context_destroy (GstGLContext *context);
|
||||
|
||||
gpointer gst_gl_context_default_get_proc_address (GstGLContext *context, const gchar *name);
|
||||
|
||||
|
|
Loading…
Reference in a new issue