mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
[706/906] display: move activate_context into utils
This commit is contained in:
parent
ac4db593f8
commit
393b483743
4 changed files with 21 additions and 16 deletions
|
@ -200,21 +200,6 @@ gst_gl_display_get_internal_gl_context (GstGLDisplay * display)
|
|||
return gst_gl_window_get_gl_context (display->priv->window);
|
||||
}
|
||||
|
||||
void
|
||||
gst_gl_display_activate_gl_context (GstGLDisplay * display, gboolean activate)
|
||||
{
|
||||
g_return_if_fail (GST_IS_GL_DISPLAY (display));
|
||||
g_return_if_fail (GST_GL_IS_WINDOW (display->priv->window));
|
||||
|
||||
if (!activate)
|
||||
gst_gl_display_lock (display);
|
||||
|
||||
gst_gl_window_activate (display->priv->window, activate);
|
||||
|
||||
if (activate)
|
||||
gst_gl_display_unlock (display);
|
||||
}
|
||||
|
||||
GstGLAPI
|
||||
gst_gl_display_get_gl_api (GstGLDisplay * display)
|
||||
{
|
||||
|
|
|
@ -114,7 +114,6 @@ void gst_gl_display_thread_add (GstGLDisplay * display,
|
|||
GstGLDisplayThreadFunc func, gpointer data);
|
||||
|
||||
gulong gst_gl_display_get_internal_gl_context (GstGLDisplay * display);
|
||||
void gst_gl_display_activate_gl_context (GstGLDisplay * display, gboolean activate);
|
||||
|
||||
/* Must be called inside a lock/unlock on display, or within the glthread */
|
||||
void gst_gl_display_set_error (GstGLDisplay * display, const char * format, ...);
|
||||
|
|
|
@ -232,6 +232,26 @@ gst_gl_display_check_framebuffer_status (GstGLDisplay * display)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
gst_gl_display_activate_gl_context (GstGLDisplay * display, gboolean activate)
|
||||
{
|
||||
GstGLWindow *window;
|
||||
|
||||
g_return_if_fail (GST_IS_GL_DISPLAY (display));
|
||||
|
||||
if (!activate)
|
||||
gst_gl_display_lock (display);
|
||||
|
||||
window = gst_gl_display_get_window_unlocked (display);
|
||||
|
||||
gst_gl_window_activate (window, activate);
|
||||
|
||||
if (activate)
|
||||
gst_gl_display_unlock (display);
|
||||
|
||||
gst_object_unref (window);
|
||||
}
|
||||
|
||||
void
|
||||
gst_gl_display_gen_texture (GstGLDisplay * display, GLuint * pTexture,
|
||||
GstVideoFormat v_format, GLint width, GLint height)
|
||||
|
|
|
@ -100,5 +100,6 @@ gboolean gst_gl_display_gen_shader (GstGLDisplay * display,
|
|||
void gst_gl_display_del_shader (GstGLDisplay * display, GstGLShader * shader);
|
||||
|
||||
gboolean gst_gl_display_check_framebuffer_status (GstGLDisplay * display);
|
||||
void gst_gl_display_activate_gl_context (GstGLDisplay * display, gboolean activate);
|
||||
|
||||
#endif /* __GST_GL_UTILS_H__ */
|
||||
|
|
Loading…
Reference in a new issue