diff options
author | Matthew Waters <ystreet00@gmail.com> | 2014-07-31 18:46:33 +1000 |
---|---|---|
committer | Matthew Waters <ystreet00@gmail.com> | 2014-07-31 18:46:33 +1000 |
commit | 750c70f8f55234c215dc6613ea9956bce6edee5a (patch) | |
tree | bbbe7ac6c1aa0c973539238fbf737196197af878 | |
parent | 46db28ac2cbddbcc505be8f0376c85c39f3bfbc9 (diff) |
glcontext: add a destroy function
that just calls the subclass
-rw-r--r-- | gst-libs/gst/gl/gstglcontext.c | 21 | ||||
-rw-r--r-- | gst-libs/gst/gl/gstglcontext.h | 1 |
2 files changed, 22 insertions, 0 deletions
diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c index 82d468b19..d03b94b0c 100644 --- a/gst-libs/gst/gl/gstglcontext.c +++ b/gst-libs/gst/gl/gstglcontext.c @@ -878,6 +878,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: * diff --git a/gst-libs/gst/gl/gstglcontext.h b/gst-libs/gst/gl/gstglcontext.h index 999b86af9..c7df03859 100644 --- a/gst-libs/gst/gl/gstglcontext.h +++ b/gst-libs/gst/gl/gstglcontext.h @@ -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); |