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_GLSL_STAGE_H__ |
22 | #define __GST_GLSL_STAGE_H__ |
23 | |
24 | #include <gst/gl/gstglsl.h> |
25 | |
26 | G_BEGIN_DECLS |
27 | |
28 | #define GST_TYPE_GLSL_STAGE (gst_glsl_stage_get_type()) |
29 | #define GST_GLSL_STAGE(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GLSL_STAGE, GstGLSLStage)) |
30 | #define GST_GLSL_STAGE_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_GLSL_STAGE, GstGLSLStageClass)) |
31 | #define GST_IS_GLSL_STAGE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GLSL_STAGE)) |
32 | #define GST_IS_GLSL_STAGE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GLSL_STAGE)) |
33 | #define GST_GLSL_STAGE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GLSL_STAGE, GstGLSLStageClass)) |
34 | |
35 | /** |
36 | * GstGLSLStage: |
37 | * |
38 | * Opaque #GstGLSLStage struct |
39 | */ |
40 | struct _GstGLSLStage |
41 | { |
42 | /*< private >*/ |
43 | GstObject parent; |
44 | |
45 | GstGLContext *context; |
46 | |
47 | GstGLSLStagePrivate *priv; |
48 | |
49 | gpointer _padding[GST_PADDING]; |
50 | }; |
51 | |
52 | /** |
53 | * GstGLSLStageClass: |
54 | * |
55 | * Opaque #GstGLSLStageClass struct |
56 | */ |
57 | struct _GstGLSLStageClass |
58 | { |
59 | /*< private >*/ |
60 | GstObjectClass parent; |
61 | |
62 | gpointer _padding[GST_PADDING]; |
63 | }; |
64 | |
65 | GST_GL_API |
66 | GType gst_glsl_stage_get_type (void); |
67 | GST_GL_API |
68 | GstGLSLStage * gst_glsl_stage_new (GstGLContext * context, guint type); |
69 | GST_GL_API |
70 | GstGLSLStage * gst_glsl_stage_new_with_string (GstGLContext * context, |
71 | guint type, |
72 | GstGLSLVersion version, |
73 | GstGLSLProfile profile, |
74 | const gchar * str); |
75 | GST_GL_API |
76 | GstGLSLStage * gst_glsl_stage_new_with_strings (GstGLContext * context, |
77 | guint type, |
78 | GstGLSLVersion version, |
79 | GstGLSLProfile profile, |
80 | gint n_strings, |
81 | const gchar ** str); |
82 | |
83 | GST_GL_API |
84 | GstGLSLStage * gst_glsl_stage_new_default_fragment (GstGLContext * context); |
85 | GST_GL_API |
86 | GstGLSLStage * gst_glsl_stage_new_default_vertex (GstGLContext * context); |
87 | |
88 | GST_GL_API |
89 | guint gst_glsl_stage_get_handle (GstGLSLStage * stage); |
90 | GST_GL_API |
91 | GstGLSLProfile gst_glsl_stage_get_profile (GstGLSLStage * stage); |
92 | GST_GL_API |
93 | GstGLSLVersion gst_glsl_stage_get_version (GstGLSLStage * stage); |
94 | GST_GL_API |
95 | guint gst_glsl_stage_get_shader_type (GstGLSLStage * stage); |
96 | GST_GL_API |
97 | gboolean gst_glsl_stage_set_strings (GstGLSLStage * stage, |
98 | GstGLSLVersion version, |
99 | GstGLSLProfile profile, |
100 | gint n_strings, |
101 | const gchar ** str); |
102 | GST_GL_API |
103 | gboolean gst_glsl_stage_compile (GstGLSLStage * stage, |
104 | GError ** error); |
105 | |
106 | G_END_DECLS |
107 | |
108 | #endif /* __GST_GLSL_STAGE_H__ */ |
109 | |