1 /* 2 * GStreamer 3 * Copyright (C) 2013 Julien Isorce <julien.isorce@collabora.co.uk> 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_WINDOW_DISPMANX_EGL_H__ 22 #define __GST_GL_WINDOW_DISPMANX_EGL_H__ 23 24 #include <gst/video/gstvideosink.h> 25 #include <gst/gl/gl.h> 26 #include <gst/gl/egl/gstegl.h> 27 28 #if defined(__GNUC__) 29 #ifndef __VCCOREVER__ 30 #define __VCCOREVER__ 0x04000000 31 #endif 32 33 #pragma GCC diagnostic push 34 #pragma GCC diagnostic ignored "-Wredundant-decls" 35 #pragma GCC optimize ("gnu89-inline") 36 #endif 37 38 #include <bcm_host.h> 39 40 #if defined(__GNUC__) 41 #pragma GCC reset_options 42 #pragma GCC diagnostic pop 43 #endif 44 45 G_BEGIN_DECLS 46 47 #define GST_TYPE_GL_WINDOW_DISPMANX_EGL (gst_gl_window_dispmanx_egl_get_type()) 48 #define GST_GL_WINDOW_DISPMANX_EGL(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_WINDOW_DISPMANX_EGL, GstGLWindowDispmanxEGL)) 49 #define GST_GL_WINDOW_DISPMANX_EGL_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_GL_WINDOW_DISPMANX_EGL, GstGLWindowDispmanxEGLClass)) 50 #define GST_IS_GL_WINDOW_DISPMANX_EGL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_WINDOW_DISPMANX_EGL)) 51 #define GST_IS_GL_WINDOW_DISPMANX_EGL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_WINDOW_DISPMANX_EGL)) 52 #define GST_GL_WINDOW_DISPMANX_EGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_WINDOW_DISPMANX_EGL, GstGLWindowDispmanxEGL_Class)) 53 54 typedef struct _GstGLWindowDispmanxEGL GstGLWindowDispmanxEGL; 55 typedef struct _GstGLWindowDispmanxEGLClass GstGLWindowDispmanxEGLClass; 56 57 struct _GstGLWindowDispmanxEGL { 58 /*< private >*/ 59 GstGLWindow parent; 60 61 EGLDisplay egldisplay; 62 63 DISPMANX_DISPLAY_HANDLE_T display; 64 uint32_t dp_height; 65 uint32_t dp_width; 66 EGL_DISPMANX_WINDOW_T native; 67 EGL_DISPMANX_WINDOW_T foreign; 68 69 gint preferred_width; 70 gint preferred_height; 71 GstVideoRectangle render_rect; 72 73 gboolean visible; 74 75 gpointer _reserved[GST_PADDING]; 76 }; 77 78 struct _GstGLWindowDispmanxEGLClass { 79 /*< private >*/ 80 GstGLWindowClass parent_class; 81 82 /*< private >*/ 83 gpointer _reserved[GST_PADDING]; 84 }; 85 86 GType gst_gl_window_dispmanx_egl_get_type (void); 87 88 GstGLWindowDispmanxEGL * gst_gl_window_dispmanx_egl_new (GstGLDisplay * display); 89 gboolean gst_gl_window_dispmanx_egl_create_window (GstGLWindowDispmanxEGL * window_egl); 90 91 G_END_DECLS 92 93 #endif /* __GST_GL_WINDOW_X11_H__ */ 94