1/*
2 * GStreamer
3 * Copyright (C) 2009 Julien Isorce <julien.isorce@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_BASE_MIXER_H__
22#define __GST_GL_BASE_MIXER_H__
23
24#include <gst/gst.h>
25#include <gst/video/video.h>
26#include <gst/video/gstvideoaggregator.h>
27#include <gst/gl/gstglcontext.h>
28
29G_BEGIN_DECLS
30
31#define GST_TYPE_GL_BASE_MIXER_PAD (gst_gl_base_mixer_pad_get_type())
32#define GST_GL_BASE_MIXER_PAD(obj) \
33 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_BASE_MIXER_PAD, GstGLBaseMixerPad))
34#define GST_GL_BASE_MIXER_PAD_CLASS(klass) \
35 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_BASE_MIXER_PAD, GstGLBaseMixerPadClass))
36#define GST_IS_GL_BASE_MIXER_PAD(obj) \
37 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_BASE_MIXER_PAD))
38#define GST_IS_GL_BASE_MIXER_PAD_CLASS(klass) \
39 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_BASE_MIXER_PAD))
40#define GST_GL_BASE_MIXER_PAD_GET_CLASS(obj) \
41 (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_GL_BASE_MIXER_PAD,GstGLBaseMixerPadClass))
42
43typedef struct _GstGLBaseMixerPad GstGLBaseMixerPad;
44typedef struct _GstGLBaseMixerPadClass GstGLBaseMixerPadClass;
45
46/**
47 * GstGLBaseMixerPad:
48 *
49 * Since: 1.24
50 */
51struct _GstGLBaseMixerPad
52{
53 /**
54 * GstGLBaseMixerPad.parent:
55 *
56 * parent #GstVideoAggregatorPad
57 *
58 * Since: 1.24
59 */
60 GstVideoAggregatorPad parent;
61
62 /*< private >*/
63 gpointer _padding[GST_PADDING];
64};
65
66/**
67 * GstGLBaseMixerPadClass:
68 *
69 * Since: 1.24
70 */
71struct _GstGLBaseMixerPadClass
72{
73 /**
74 * GstGLBaseMixerPadClass.parent_class:
75 *
76 * parent #GstVideoAggregatorPadClass
77 *
78 * Since: 1.24
79 */
80 GstVideoAggregatorPadClass parent_class;
81
82 /*< private >*/
83 gpointer _padding[GST_PADDING];
84};
85
86G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstGLBaseMixerPad, gst_object_unref);
87
88GST_GL_API
89GType gst_gl_base_mixer_pad_get_type (void);
90
91#define GST_TYPE_GL_BASE_MIXER (gst_gl_base_mixer_get_type())
92#define GST_GL_BASE_MIXER(obj) \
93 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_BASE_MIXER, GstGLBaseMixer))
94#define GST_GL_BASE_MIXER_CLASS(klass) \
95 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_BASE_MIXER, GstGLBaseMixerClass))
96#define GST_IS_GL_BASE_MIXER(obj) \
97 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_BASE_MIXER))
98#define GST_IS_GL_BASE_MIXER_CLASS(klass) \
99 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_BASE_MIXER))
100#define GST_GL_BASE_MIXER_GET_CLASS(obj) \
101 (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_GL_BASE_MIXER,GstGLBaseMixerClass))
102
103typedef struct _GstGLBaseMixer GstGLBaseMixer;
104typedef struct _GstGLBaseMixerClass GstGLBaseMixerClass;
105typedef struct _GstGLBaseMixerPrivate GstGLBaseMixerPrivate;
106
107/**
108 * GstGLBaseMixer:
109 *
110 * Since: 1.24
111 */
112struct _GstGLBaseMixer
113{
114 /**
115 * GstGLBaseMixer.parent:
116 *
117 * parent #GstVideoAggregator
118 *
119 * Since: 1.24
120 */
121 GstVideoAggregator parent;
122
123 /**
124 * GstGLBaseMixer.display:
125 *
126 * the currently configured #GstGLDisplay
127 *
128 * Since: 1.24
129 */
130 GstGLDisplay *display;
131 /**
132 * GstGLBaseMixer.context:
133 *
134 * the currently configured #GstGLContext
135 *
136 * Since: 1.24
137 */
138 GstGLContext *context;
139
140 /*< private >*/
141 gpointer _padding[GST_PADDING];
142
143 GstGLBaseMixerPrivate *priv;
144};
145
146/**
147 * GstGLBaseMixerClass:
148 *
149 * Since: 1.24
150 */
151struct _GstGLBaseMixerClass
152{
153 /**
154 * GstGLBaseMixerClass.parent_class:
155 *
156 * the parent #GstVideoAggregatorClass
157 *
158 * Since: 1.24
159 */
160 GstVideoAggregatorClass parent_class;
161 /**
162 * GstGLBaseMixerClass.supported_gl_api:
163 *
164 * the logical-OR of #GstGLAPI's supported by this element
165 *
166 * Since: 1.24
167 */
168 GstGLAPI supported_gl_api;
169
170 /**
171 * GstGLBaseMixerClass::gl_start:
172 *
173 * called in the GL thread to setup the element GL state.
174 *
175 * Returns: whether the start was successful
176 *
177 * Since: 1.24
178 */
179 gboolean (*gl_start) (GstGLBaseMixer * mix);
180 /**
181 * GstGLBaseMixerClass::gl_stop:
182 *
183 * called in the GL thread to setup the element GL state.
184 *
185 * Since: 1.24
186 */
187 void (*gl_stop) (GstGLBaseMixer * mix);
188
189 /*< private >*/
190 gpointer _padding[GST_PADDING];
191};
192
193G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstGLBaseMixer, gst_object_unref);
194
195GST_GL_API
196GType gst_gl_base_mixer_get_type(void);
197
198GST_GL_API
199GstGLContext * gst_gl_base_mixer_get_gl_context (GstGLBaseMixer * mix);
200
201G_END_DECLS
202#endif /* __GST_GL_BASE_MIXER_H__ */
203

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