3 * Copyright (C) 2013 Sebastian Dröge <slomo@circular-chaos.org>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef __GST_GL_CONTEXT_EGL_H__
22 #define __GST_GL_CONTEXT_EGL_H__
24 #include <gst/gl/gstglcontext.h>
25 #include <gst/gl/egl/gstgldisplay_egl.h>
29 typedef struct _GstGLContextEGL GstGLContextEGL;
30 typedef struct _GstGLContextEGLClass GstGLContextEGLClass;
32 G_GNUC_INTERNAL GType gst_gl_context_egl_get_type (void);
33 #define GST_TYPE_GL_CONTEXT_EGL (gst_gl_context_egl_get_type())
35 #define GST_GL_CONTEXT_EGL(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_CONTEXT_EGL, GstGLContextEGL))
36 #define GST_GL_CONTEXT_EGL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GST_TYPE_GL_CONTEXT_EGL, GstGLContextEGLClass))
37 #define GST_IS_GL_CONTEXT_EGL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_CONTEXT_EGL))
38 #define GST_IS_GL_CONTEXT_EGL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_CONTEXT_EGL))
39 #define GST_GL_CONTEXT_EGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_CONTEXT_EGL, GstGLContextEGLClass))
41 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstGLContextEGL, gst_object_unref)
47 * Opaque #GstGLContextEGL struct
49 struct _GstGLContextEGL
54 GstGLDisplayEGL *display_egl;
66 const gchar *egl_exts;
69 guintptr window_handle;
70 gulong window_handle_signal;
72 GstStructure *requested_config;
76 * GstGLContextEGLCLass:
78 * Opaque #GstGLContextEGLClass struct
80 struct _GstGLContextEGLClass
83 GstGLContextClass parent;
87 GstGLContextEGL * gst_gl_context_egl_new (GstGLDisplay * display);
90 guintptr gst_gl_context_egl_get_current_context (void);
93 gpointer gst_gl_context_egl_get_proc_address (GstGLAPI gl_api, const gchar * name);
96 gboolean gst_gl_context_egl_fill_info (GstGLContext * context, GError ** error);
100 #endif /* __GST_GL_CONTEXT_EGL_H__ */