• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * GStreamer
3  * Copyright (C) 2012 Matthew Waters <ystreet00@gmail.com>
4  * Copyright (C) 2013 Sebastian Dröge <slomo@circular-chaos.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef __GST_GL_WINDOW_ANDROID_EGL_H__
23 #define __GST_GL_WINDOW_ANDROID_EGL_H__
24 
25 #include <gst/gl/gl.h>
26 #include <gst/gl/egl/gstegl.h>
27 
28 G_BEGIN_DECLS
29 
30 #define GST_TYPE_GL_WINDOW_ANDROID_EGL         (gst_gl_window_android_egl_get_type())
31 #define GST_GL_WINDOW_ANDROID_EGL(o)           (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_WINDOW_ANDROID_EGL, GstGLWindowAndroidEGL))
32 #define GST_GL_WINDOW_ANDROID_EGL_CLASS(k)     (G_TYPE_CHECK_CLASS((k), GST_TYPE_GL_WINDOW_ANDROID_EGL, GstGLWindowAndroidEGLClass))
33 #define GST_IS_GL_WINDOW_ANDROID_EGL(o)        (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_WINDOW_ANDROID_EGL))
34 #define GST_IS_GL_WINDOW_ANDROID_EGL_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_WINDOW_ANDROID_EGL))
35 #define GST_GL_WINDOW_ANDROID_EGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_WINDOW_ANDROID_EGL, GstGLWindowAndroidEGL_Class))
36 
37 typedef struct _GstGLWindowAndroidEGL        GstGLWindowAndroidEGL;
38 typedef struct _GstGLWindowAndroidEGLClass   GstGLWindowAndroidEGLClass;
39 
40 struct _GstGLWindowAndroidEGL {
41   /*< private >*/
42   GstGLWindow parent;
43 
44   /* This is actually an ANativeWindow */
45   EGLNativeWindowType native_window;
46   gint window_width, window_height;
47 
48   gpointer _reserved[GST_PADDING];
49 };
50 
51 struct _GstGLWindowAndroidEGLClass {
52   /*< private >*/
53   GstGLWindowClass parent_class;
54 
55   /*< private >*/
56   gpointer _reserved[GST_PADDING];
57 };
58 
59 GType gst_gl_window_android_egl_get_type     (void);
60 
61 GstGLWindowAndroidEGL * gst_gl_window_android_egl_new  (GstGLDisplay * display);
62 
63 G_END_DECLS
64 
65 #endif /* __GST_GL_WINDOW_ANDROID_H__ */
66