2009-10-27 14:27:14 +00:00
|
|
|
/*
|
2009-10-22 23:11:27 +00:00
|
|
|
* GStreamer
|
|
|
|
* Copyright (C) 2009 Julien Isorce <julien.isorce@gmail.com>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
2012-11-08 11:53:56 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2009-10-22 23:11:27 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GST_GL_MIXER_H__
|
|
|
|
#define __GST_GL_MIXER_H__
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
#include <gst/video/video.h>
|
2013-07-11 09:03:31 +00:00
|
|
|
#include <gst/gl/gl.h>
|
2015-02-11 03:48:45 +00:00
|
|
|
#include "gstglbasemixer.h"
|
2012-07-12 08:19:44 +00:00
|
|
|
|
2009-10-22 23:11:27 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2015-02-11 03:48:45 +00:00
|
|
|
typedef struct _GstGLMixer GstGLMixer;
|
|
|
|
typedef struct _GstGLMixerClass GstGLMixerClass;
|
|
|
|
typedef struct _GstGLMixerPrivate GstGLMixerPrivate;
|
|
|
|
|
|
|
|
#define GST_TYPE_GL_MIXER_PAD (gst_gl_mixer_pad_get_type())
|
|
|
|
#define GST_GL_MIXER_PAD(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_MIXER_PAD, GstGLMixerPad))
|
|
|
|
#define GST_GL_MIXER_PAD_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_MIXER_PAD, GstGLMixerPadClass))
|
|
|
|
#define GST_IS_GL_MIXER_PAD(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_MIXER_PAD))
|
|
|
|
#define GST_IS_GL_MIXER_PAD_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_MIXER_PAD))
|
|
|
|
#define GST_GL_MIXER_PAD_GET_CLASS(obj) \
|
|
|
|
(G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_GL_MIXER_PAD,GstGLMixerPadClass))
|
|
|
|
|
|
|
|
typedef struct _GstGLMixerPad GstGLMixerPad;
|
|
|
|
typedef struct _GstGLMixerPadClass GstGLMixerPadClass;
|
|
|
|
|
|
|
|
/* all information needed for one video stream */
|
|
|
|
struct _GstGLMixerPad
|
|
|
|
{
|
2015-02-25 13:20:37 +00:00
|
|
|
GstGLBaseMixerPad parent;
|
2016-02-16 14:08:18 +00:00
|
|
|
|
|
|
|
guint current_texture;
|
2015-02-11 03:48:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstGLMixerPadClass
|
|
|
|
{
|
|
|
|
GstGLBaseMixerPadClass parent_class;
|
|
|
|
};
|
|
|
|
|
|
|
|
GType gst_gl_mixer_pad_get_type (void);
|
|
|
|
|
2009-10-22 23:11:27 +00:00
|
|
|
#define GST_TYPE_GL_MIXER (gst_gl_mixer_get_type())
|
|
|
|
#define GST_GL_MIXER(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_MIXER, GstGLMixer))
|
|
|
|
#define GST_GL_MIXER_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_MIXER, GstGLMixerClass))
|
|
|
|
#define GST_IS_GL_MIXER(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_MIXER))
|
|
|
|
#define GST_IS_GL_MIXER_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_MIXER))
|
|
|
|
#define GST_GL_MIXER_GET_CLASS(obj) \
|
|
|
|
(G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_GL_MIXER,GstGLMixerClass))
|
|
|
|
|
2009-10-27 14:27:14 +00:00
|
|
|
typedef gboolean (*GstGLMixerSetCaps) (GstGLMixer* mixer,
|
2009-10-22 23:11:27 +00:00
|
|
|
GstCaps* outcaps);
|
|
|
|
typedef void (*GstGLMixerReset) (GstGLMixer *mixer);
|
2016-02-16 14:08:18 +00:00
|
|
|
typedef gboolean (*GstGLMixerProcessFunc) (GstGLMixer *mix, GstBuffer *outbuf);
|
2016-07-11 14:30:22 +00:00
|
|
|
typedef gboolean (*GstGLMixerProcessTextures) (GstGLMixer *mix, GstGLMemory *out_tex);
|
2009-10-22 23:11:27 +00:00
|
|
|
|
|
|
|
struct _GstGLMixer
|
|
|
|
{
|
2015-02-11 03:48:45 +00:00
|
|
|
GstGLBaseMixer vaggregator;
|
2009-10-22 23:11:27 +00:00
|
|
|
|
2016-07-12 02:59:57 +00:00
|
|
|
GstGLFramebuffer *fbo;
|
2014-09-24 03:13:19 +00:00
|
|
|
|
|
|
|
GstCaps *out_caps;
|
2015-02-11 03:48:45 +00:00
|
|
|
|
|
|
|
GstGLMixerPrivate *priv;
|
2009-10-22 23:11:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstGLMixerClass
|
|
|
|
{
|
2015-02-11 03:48:45 +00:00
|
|
|
GstGLBaseMixerClass parent_class;
|
2009-10-22 23:11:27 +00:00
|
|
|
|
|
|
|
GstGLMixerSetCaps set_caps;
|
|
|
|
GstGLMixerReset reset;
|
|
|
|
GstGLMixerProcessFunc process_buffers;
|
2012-09-20 13:27:00 +00:00
|
|
|
GstGLMixerProcessTextures process_textures;
|
2009-10-22 23:11:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
GType gst_gl_mixer_get_type(void);
|
|
|
|
|
2012-09-20 13:27:00 +00:00
|
|
|
gboolean gst_gl_mixer_process_textures (GstGLMixer * mix, GstBuffer * outbuf);
|
|
|
|
|
2009-10-22 23:11:27 +00:00
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __GST_GL_MIXER_H__ */
|