mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-04 06:29:31 +00:00
glcontext: add gst_gl_context_set_display helper
This commit is contained in:
parent
8ad3c0a7b9
commit
71b8103cbd
2 changed files with 20 additions and 0 deletions
|
@ -1550,6 +1550,25 @@ gst_gl_context_get_display (GstGLContext * context)
|
||||||
return gst_object_ref (context->priv->display);
|
return gst_object_ref (context->priv->display);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_gl_context_set_display:
|
||||||
|
* @context: a #GstGLContext:
|
||||||
|
* @display: a #GstGLDisplay:
|
||||||
|
*
|
||||||
|
* Ref @display and unref previous display if exists.
|
||||||
|
*
|
||||||
|
* Since: 1.6
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gst_gl_context_set_display (GstGLContext * context, GstGLDisplay * display)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GST_GL_IS_CONTEXT (context));
|
||||||
|
g_return_if_fail (GST_IS_GL_DISPLAY (display));
|
||||||
|
|
||||||
|
gst_object_replace ((GstObject **) & context->priv->display,
|
||||||
|
(GstObject *) display);
|
||||||
|
}
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GstGLContext *context;
|
GstGLContext *context;
|
||||||
|
|
|
@ -124,6 +124,7 @@ gboolean gst_gl_context_activate (GstGLContext *context, gboolean a
|
||||||
GThread * gst_gl_context_get_thread (GstGLContext *context);
|
GThread * gst_gl_context_get_thread (GstGLContext *context);
|
||||||
GstGLContext * gst_gl_context_get_current (void);
|
GstGLContext * gst_gl_context_get_current (void);
|
||||||
|
|
||||||
|
void gst_gl_context_set_display (GstGLContext *context, GstGLDisplay *display);
|
||||||
GstGLDisplay * gst_gl_context_get_display (GstGLContext *context);
|
GstGLDisplay * gst_gl_context_get_display (GstGLContext *context);
|
||||||
gpointer gst_gl_context_get_proc_address (GstGLContext *context, const gchar *name);
|
gpointer gst_gl_context_get_proc_address (GstGLContext *context, const gchar *name);
|
||||||
GstGLPlatform gst_gl_context_get_gl_platform (GstGLContext *context);
|
GstGLPlatform gst_gl_context_get_gl_platform (GstGLContext *context);
|
||||||
|
|
Loading…
Reference in a new issue