gl: move gl(base)mixer to library

For use by applications/libraries outside of the opengl plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4608>
This commit is contained in:
Matthew Waters 2023-05-08 13:40:01 +10:00 committed by GStreamer Marge Bot
parent 7613e50cbb
commit 007a602726
10 changed files with 21 additions and 10 deletions

View File

@ -42,6 +42,8 @@
#include "config.h" #include "config.h"
#endif #endif
#include <gst/gl/gstglfuncs.h>
#include "gstglelements.h" #include "gstglelements.h"
#include "gstglmosaic.h" #include "gstglmosaic.h"
#include "gstglutils.h" #include "gstglutils.h"

View File

@ -21,7 +21,7 @@
#ifndef _GST_GL_MOSAIC_H_ #ifndef _GST_GL_MOSAIC_H_
#define _GST_GL_MOSAIC_H_ #define _GST_GL_MOSAIC_H_
#include "gstglmixer.h" #include <gst/gl/gstglmixer.h>
G_BEGIN_DECLS G_BEGIN_DECLS

View File

@ -22,7 +22,7 @@
#ifndef __GST_GL_STEREO_MIX_H__ #ifndef __GST_GL_STEREO_MIX_H__
#define __GST_GL_STEREO_MIX_H__ #define __GST_GL_STEREO_MIX_H__
#include "gstglmixer.h" #include <gst/gl/gstglmixer.h>
G_BEGIN_DECLS G_BEGIN_DECLS
@ -64,7 +64,7 @@ struct _GstGLStereoMix
{ {
GstGLMixer mixer; GstGLMixer mixer;
GLuint out_tex_id; guint out_tex_id;
GstGLViewConvert *viewconvert; GstGLViewConvert *viewconvert;
GstGLStereoDownmix downmix_mode; GstGLStereoDownmix downmix_mode;

View File

@ -21,7 +21,7 @@
#ifndef _GST_GL_VIDEO_MIXER_H_ #ifndef _GST_GL_VIDEO_MIXER_H_
#define _GST_GL_VIDEO_MIXER_H_ #define _GST_GL_VIDEO_MIXER_H_
#include "gstglmixer.h" #include <gst/gl/gstglmixer.h>
G_BEGIN_DECLS G_BEGIN_DECLS
@ -140,9 +140,9 @@ struct _GstGLVideoMixer
GstGLShader *shader; GstGLShader *shader;
GstGLShader *checker; GstGLShader *checker;
GLuint vao; guint vao;
GLuint vbo_indices; guint vbo_indices;
GLuint checker_vbo; guint checker_vbo;
GstGLMemory *out_tex; GstGLMemory *out_tex;
gboolean output_geo_change; gboolean output_geo_change;

View File

@ -30,14 +30,12 @@ opengl_sources = [
'effects/gstgleffectblur.c', 'effects/gstgleffectblur.c',
'effects/gstgleffectsobel.c', 'effects/gstgleffectsobel.c',
'effects/gstgleffectlaplacian.c', 'effects/gstgleffectlaplacian.c',
'gstglbasemixer.c',
'gstglcolorscale.c', 'gstglcolorscale.c',
'gstglcolorbalance.c', 'gstglcolorbalance.c',
'gstgldeinterlace.c', 'gstgldeinterlace.c',
'gstglfiltershader.c', 'gstglfiltershader.c',
'gstglfilterapp.c', 'gstglfilterapp.c',
'gstglmixerbin.c', 'gstglmixerbin.c',
'gstglmixer.c',
'gstglvideomixer.c', 'gstglvideomixer.c',
'gstglstereomix.c', 'gstglstereomix.c',
'gstglstereosplit.c', 'gstglstereosplit.c',

View File

@ -54,6 +54,7 @@ struct _GstGLBaseMixerPadClass
GstVideoAggregatorPadClass parent_class; GstVideoAggregatorPadClass parent_class;
}; };
GST_GL_API
GType gst_gl_base_mixer_pad_get_type (void); GType gst_gl_base_mixer_pad_get_type (void);
#define GST_TYPE_GL_BASE_MIXER (gst_gl_base_mixer_get_type()) #define GST_TYPE_GL_BASE_MIXER (gst_gl_base_mixer_get_type())
@ -95,8 +96,10 @@ struct _GstGLBaseMixerClass
gpointer _padding[GST_PADDING]; gpointer _padding[GST_PADDING];
}; };
GST_GL_API
GType gst_gl_base_mixer_get_type(void); GType gst_gl_base_mixer_get_type(void);
GST_GL_API
GstGLContext * gst_gl_base_mixer_get_gl_context (GstGLBaseMixer * mix); GstGLContext * gst_gl_base_mixer_get_gl_context (GstGLBaseMixer * mix);
G_END_DECLS G_END_DECLS

View File

@ -30,6 +30,8 @@
#include "gstglmixer.h" #include "gstglmixer.h"
#include <gst/gl/gstglfuncs.h>
#define GST_CAT_DEFAULT gst_gl_mixer_debug #define GST_CAT_DEFAULT gst_gl_mixer_debug
GST_DEBUG_CATEGORY (gst_gl_mixer_debug); GST_DEBUG_CATEGORY (gst_gl_mixer_debug);

View File

@ -24,7 +24,6 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/video/video.h> #include <gst/video/video.h>
#include <gst/gl/gl.h> #include <gst/gl/gl.h>
#include <gst/gl/gstglfuncs.h>
#include "gstglbasemixer.h" #include "gstglbasemixer.h"
G_BEGIN_DECLS G_BEGIN_DECLS
@ -61,6 +60,7 @@ struct _GstGLMixerPadClass
GstGLBaseMixerPadClass parent_class; GstGLBaseMixerPadClass parent_class;
}; };
GST_GL_API
GType gst_gl_mixer_pad_get_type (void); GType gst_gl_mixer_pad_get_type (void);
#define GST_TYPE_GL_MIXER (gst_gl_mixer_get_type()) #define GST_TYPE_GL_MIXER (gst_gl_mixer_get_type())
@ -102,8 +102,10 @@ struct _GstGLMixerClass
GstGLMixerProcessTextures process_textures; GstGLMixerProcessTextures process_textures;
}; };
GST_GL_API
GType gst_gl_mixer_get_type(void); GType gst_gl_mixer_get_type(void);
GST_GL_API
gboolean gst_gl_mixer_process_textures (GstGLMixer * mix, GstBuffer * outbuf); gboolean gst_gl_mixer_process_textures (GstGLMixer * mix, GstBuffer * outbuf);
G_END_DECLS G_END_DECLS

View File

@ -14,6 +14,7 @@ gl_sources = files([
'gstglapi.c', 'gstglapi.c',
'gstglbasefilter.c', 'gstglbasefilter.c',
'gstglbasememory.c', 'gstglbasememory.c',
'gstglbasemixer.c',
'gstglbasesrc.c', 'gstglbasesrc.c',
'gstglcolorconvert.c', 'gstglcolorconvert.c',
'gstglbuffer.c', 'gstglbuffer.c',
@ -29,6 +30,7 @@ gl_sources = files([
'gstglframebuffer.c', 'gstglframebuffer.c',
'gstglmemory.c', 'gstglmemory.c',
'gstglmemorypbo.c', 'gstglmemorypbo.c',
'gstglmixer.c',
'gstgloverlaycompositor.c', 'gstgloverlaycompositor.c',
'gstglquery.c', 'gstglquery.c',
'gstglrenderbuffer.c', 'gstglrenderbuffer.c',
@ -53,6 +55,7 @@ gir_gl_headers = files([
'gstglapi.h', 'gstglapi.h',
'gstglbasefilter.h', 'gstglbasefilter.h',
'gstglbasememory.h', 'gstglbasememory.h',
'gstglbasemixer.h',
'gstglbasesrc.h', 'gstglbasesrc.h',
'gstglbuffer.h', 'gstglbuffer.h',
'gstglbufferpool.h', 'gstglbufferpool.h',
@ -67,6 +70,7 @@ gir_gl_headers = files([
'gstglframebuffer.h', 'gstglframebuffer.h',
'gstglmemory.h', 'gstglmemory.h',
'gstglmemorypbo.h', 'gstglmemorypbo.h',
'gstglmixer.h',
'gstgloverlaycompositor.h', 'gstgloverlaycompositor.h',
'gstglquery.h', 'gstglquery.h',
'gstglrenderbuffer.h', 'gstglrenderbuffer.h',