1 /* 2 * GStreamer 3 * Copyright (C) 2013 Sebastian Dröge <slomo@circular-chaos.org> 4 * 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. 9 * 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. 14 * 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. 19 */ 20 21 #ifndef __GST_GL_EGL_H__ 22 #define __GST_GL_EGL_H__ 23 24 #include <gst/gl/gstglcontext.h> 25 #include <gst/gl/egl/gstgldisplay_egl.h> 26 27 G_BEGIN_DECLS 28 29 typedef struct _GstGLContextEGL GstGLContextEGL; 30 typedef struct _GstGLContextEGLClass GstGLContextEGLClass; 31 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()) 34 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)) 40 41 #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC 42 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstGLContextEGL, gst_object_unref) 43 #endif 44 45 46 /** 47 * GstGLContextEGL: 48 * 49 * Opaque #GstGLContextEGL struct 50 */ 51 struct _GstGLContextEGL 52 { 53 /* <private> */ 54 GstGLContext context; 55 56 GstGLDisplayEGL *display_egl; 57 58 gpointer egl_context; 59 gpointer egl_display; 60 gpointer egl_surface; 61 gpointer egl_config; 62 63 gint egl_major; 64 gint egl_minor; 65 66 GstGLAPI gl_api; 67 68 const gchar *egl_exts; 69 70 /* Cached handle */ 71 guintptr window_handle; 72 }; 73 74 /** 75 * GstGLContextEGLCLass: 76 * 77 * Opaque #GstGLContextEGLClass struct 78 */ 79 struct _GstGLContextEGLClass 80 { 81 /* <private> */ 82 GstGLContextClass parent; 83 }; 84 85 G_GNUC_INTERNAL 86 GstGLContextEGL * gst_gl_context_egl_new (GstGLDisplay * display); 87 88 G_GNUC_INTERNAL 89 guintptr gst_gl_context_egl_get_current_context (void); 90 91 G_GNUC_INTERNAL 92 gpointer gst_gl_context_egl_get_proc_address (GstGLAPI gl_api, const gchar * name); 93 94 G_END_DECLS 95 96 #endif /* __GST_GL_EGL_H__ */ 97