1 /*
2  * GStreamer
3  * Copyright (C) 2012 Matthew Waters <ystreet00@gmail.com>
4  * Copyright (C) 2015 Freescale Semiconductor <b55597@freescale.com>
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_VIV_FB_EGL_H__
23 #define __GST_GL_WINDOW_VIV_FB_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_VIV_FB_EGL         (gst_gl_window_viv_fb_egl_get_type())
31 #define GST_GL_WINDOW_VIV_FB_EGL(o)           (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_WINDOW_VIV_FB_EGL, GstGLWindowVivFBEGL))
32 #define GST_GL_WINDOW_VIV_FB_EGL_CLASS(k)     (G_TYPE_CHECK_CLASS((k), GST_TYPE_GL_WINDOW_VIV_FB_EGL, GstGLWindowVivFBEGLClass))
33 #define GST_IS_GL_WINDOW_VIV_FB_EGL(o)        (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_WINDOW_VIV_FB_EGL))
34 #define GST_IS_GL_WINDOW_VIV_FB_EGL_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_WINDOW_VIV_FB_EGL))
35 #define GST_GL_WINDOW_VIV_FB_EGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_WINDOW_VIV_FB_EGL, GstGLWindowVivFBEGL_Class))
36 
37 typedef struct _GstGLWindowVivFBEGL        GstGLWindowVivFBEGL;
38 typedef struct _GstGLWindowVivFBEGLClass   GstGLWindowVivFBEGLClass;
39 
40 struct _GstGLWindowVivFBEGL {
41   /*< private >*/
42   GstGLWindow parent;
43 
44   /* <private> */
45   EGLNativeWindowType win_id;
46   gboolean external_window;
47   gint window_width, window_height;
48 
49   GstVideoRectangle render_rectangle;
50   GstVideoRectangle viewport;
51 };
52 
53 struct _GstGLWindowVivFBEGLClass {
54   /*< private >*/
55   GstGLWindowClass parent_class;
56 
57   /*< private >*/
58   gpointer _reserved[GST_PADDING];
59 };
60 
61 GType gst_gl_window_viv_fb_egl_get_type     (void);
62 
63 GstGLWindowVivFBEGL * gst_gl_window_viv_fb_egl_new  (GstGLDisplay * display);
64 
65 G_END_DECLS
66 
67 #endif /* __GST_GL_WINDOW_VIV_FB_EGL_H__ */
68