1 /*
2  * GStreamer
3  * Copyright (C) 2009 Julien Isorce <julien.isorce@gmail.com>
4  * Copyright (C) 2014 Jan Schmidt <jan@noraisin.net>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef __GST_GL_STEREO_MIX_H__
23 #define __GST_GL_STEREO_MIX_H__
24 
25 #include "gstglmixer.h"
26 
27 G_BEGIN_DECLS
28 
29 #define GST_TYPE_GL_STEREO_MIX (gst_gl_stereo_mix_get_type())
30 #define GST_GL_STEREO_MIX(obj) \
31         (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_STEREO_MIX, GstGLStereoMix))
32 #define GST_GL_STEREO_MIX_CLASS(klass) \
33         (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_STEREO_MIX, GstGLStereoMixClass))
34 #define GST_IS_GL_STEREO_MIX(obj) \
35         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_STEREO_MIX))
36 #define GST_IS_GL_STEREO_MIX_CLASS(klass) \
37         (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_STEREO_MIX))
38 #define GST_GL_STEREO_MIX_GET_CLASS(obj) \
39         (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_GL_STEREO_MIX,GstGLStereoMixClass))
40 
41 typedef struct _GstGLStereoMix GstGLStereoMix;
42 typedef struct _GstGLStereoMixClass GstGLStereoMixClass;
43 typedef struct _GstGLStereoMixPad GstGLStereoMixPad;
44 typedef struct _GstGLStereoMixPadClass GstGLStereoMixPadClass;
45 
46 struct _GstGLStereoMixPad
47 {
48   GstGLMixerPad mixer_pad;
49 
50   gboolean mapped;
51   GstBuffer *current_buffer;
52 };
53 
54 struct _GstGLStereoMixPadClass
55 {
56   GstGLMixerPadClass mixer_pad_class;
57 };
58 
59 #define GST_TYPE_GL_STEREO_MIX_PAD (gst_gl_stereo_mix_pad_get_type ())
60 GType gst_gl_stereo_mix_pad_get_type (void);
61 
62 
63 struct _GstGLStereoMix
64 {
65   GstGLMixer mixer;
66 
67   GLuint out_tex_id;
68 
69   GstGLViewConvert *viewconvert;
70   GstGLStereoDownmix downmix_mode;
71 
72   GstVideoInfo mix_info;
73 
74   GPtrArray *input_frames;
75   GstBuffer *primary_out;
76   GstBuffer *auxilliary_out;
77 };
78 
79 struct _GstGLStereoMixClass
80 {
81     GstGLMixerClass mixer_class;
82 };
83 
84 GType gst_gl_stereo_mix_get_type(void);
85 
86 G_END_DECLS
87 #endif /* __GST_GL_STEREO_MIX_H__ */
88