gl/egl: Add gst_egl_image_from_dmabuf_direct() function
[platform/upstream/gstreamer.git] / gst-libs / gst / gl / egl / gstegl.h
1 /*
2  * GStreamer
3  * Copyright (C) 2015 Matthew Waters <matthew@centricular.com>
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_EGL_H_
22 #define _GST_EGL_H_
23
24 #include <gst/gl/gstglconfig.h>
25 #include <gst/gl/gl-prelude.h>
26
27 #if GST_GL_HAVE_WINDOW_DISPMANX && defined(__GNUC__)
28 #ifndef __VCCOREVER__
29 #define __VCCOREVER__ 0x04000000
30 #endif
31
32 #pragma GCC diagnostic push
33 #pragma GCC diagnostic ignored "-Wredundant-decls"
34 #if !defined(__cplusplus)
35 #pragma GCC optimize ("gnu89-inline")
36 #endif
37 #endif
38
39 #ifndef EGL_EGLEXT_PROTOTYPES
40 #define EGL_EGLEXT_PROTOTYPES 1
41 #endif
42 #include <EGL/egl.h>
43 #include <EGL/eglext.h>
44
45 #if GST_GL_HAVE_WINDOW_DISPMANX && defined(__GNUC__)
46 #pragma GCC reset_options
47 #pragma GCC diagnostic pop
48 #endif
49
50 /* compatibility definitions... */
51 #if !GST_GL_HAVE_EGLATTRIB
52 typedef gintptr EGLAttrib;
53 #endif
54
55 #if !GST_GL_HAVE_EGLUINT64KHR
56 typedef guint64 EGLuint64KHR;
57 #endif
58
59 GST_GL_API
60 const gchar *   gst_egl_get_error_string             (EGLint err);
61
62 #endif /* _GST_EGL_H_ */