• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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   EGLNativeWindowType win_id;
45   gboolean external_window;
46   gint window_width, window_height;
47 
48   GstVideoRectangle render_rectangle;
49   GstVideoRectangle viewport;
50 };
51 
52 struct _GstGLWindowVivFBEGLClass {
53   /*< private >*/
54   GstGLWindowClass parent_class;
55 
56   gpointer _reserved[GST_PADDING];
57 };
58 
59 GType gst_gl_window_viv_fb_egl_get_type     (void);
60 
61 GstGLWindowVivFBEGL * gst_gl_window_viv_fb_egl_new  (GstGLDisplay * display);
62 void gst_gl_window_viv_fb_egl_create_window (GstGLWindowVivFBEGL * window_egl);
63 
64 G_END_DECLS
65 
66 #endif /* __GST_GL_WINDOW_VIV_FB_EGL_H__ */
67