1/*
2 * GStreamer
3 * Copyright (C) 2012 Matthew Waters <ystreet00@gmail.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_GL_API_H__
22#define __GST_GL_API_H__
23
24#include <gst/gl/gstglconfig.h>
25#include <gst/gl/gl-prelude.h>
26
27#include <gst/gst.h>
28
29G_BEGIN_DECLS
30
31/**
32 * GstGLAPI:
33 * @GST_GL_API_NONE: no API
34 * @GST_GL_API_OPENGL: Desktop OpenGL up to and including 3.1. The
35 * compatibility profile when the OpenGL version is >= 3.2
36 * @GST_GL_API_OPENGL3: Desktop OpenGL >= 3.2 core profile
37 * @GST_GL_API_GLES1: OpenGL ES 1.x
38 * @GST_GL_API_GLES2: OpenGL ES 2.x and 3.x
39 * @GST_GL_API_ANY: Any OpenGL API
40 */
41typedef enum /*< underscore_name=gst_gl_api >*/ {
42 GST_GL_API_NONE = 0,
43 GST_GL_API_OPENGL = (1 << 0),
44 GST_GL_API_OPENGL3 = (1 << 1),
45 GST_GL_API_GLES1 = (1 << 15),
46 GST_GL_API_GLES2 = (1 << 16),
47
48 GST_GL_API_ANY = G_MAXUINT32
49} GstGLAPI;
50
51/**
52 * GST_GL_API_OPENGL_NAME:
53 *
54 * The name for %GST_GL_API_OPENGL used in various places
55 */
56#define GST_GL_API_OPENGL_NAME "opengl"
57
58/**
59 * GST_GL_API_OPENGL3_NAME:
60 *
61 * The name for %GST_GL_API_OPENGL3 used in various places
62 */
63#define GST_GL_API_OPENGL3_NAME "opengl3"
64
65/**
66 * GST_GL_API_GLES1_NAME:
67 *
68 * The name for %GST_GL_API_GLES1 used in various places
69 */
70#define GST_GL_API_GLES1_NAME "gles1"
71
72/**
73 * GST_GL_API_GLES2_NAME:
74 *
75 * The name for %GST_GL_API_GLES2 used in various places
76 */
77#define GST_GL_API_GLES2_NAME "gles2"
78
79/**
80 * GstGLPlatform:
81 * @GST_GL_PLATFORM_NONE: no platform
82 * @GST_GL_PLATFORM_EGL: the EGL platform used primarily with the X11, wayland
83 * and android window systems as well as on embedded Linux
84 * @GST_GL_PLATFORM_GLX: the GLX platform used primarily with the X11 window system
85 * @GST_GL_PLATFORM_WGL: the WGL platform used primarily on Windows
86 * @GST_GL_PLATFORM_CGL: the CGL platform used primarily on OS X
87 * @GST_GL_PLATFORM_EAGL: the EAGL platform used primarily on iOS
88 * @GST_GL_PLATFORM_ANY: any OpenGL platform
89 */
90typedef enum
91{
92 GST_GL_PLATFORM_NONE = 0,
93 GST_GL_PLATFORM_EGL = (1 << 0),
94 GST_GL_PLATFORM_GLX = (1 << 1),
95 GST_GL_PLATFORM_WGL = (1 << 2),
96 GST_GL_PLATFORM_CGL = (1 << 3),
97 GST_GL_PLATFORM_EAGL = (1 << 4),
98
99 GST_GL_PLATFORM_ANY = G_MAXUINT32
100} GstGLPlatform;
101
102GST_GL_API
103gchar * gst_gl_api_to_string (GstGLAPI api);
104GST_GL_API
105GstGLAPI gst_gl_api_from_string (const gchar * api_s);
106
107GST_GL_API
108gchar * gst_gl_platform_to_string (GstGLPlatform platform);
109GST_GL_API
110GstGLPlatform gst_gl_platform_from_string (const gchar * platform_s);
111
112G_END_DECLS
113
114#endif /* __GST_GL_API_H__ */
115

source code of include/gstreamer-1.0/gst/gl/gstglapi.h