mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
glmixer: remove set_caps() vfunc
All of its implementors can be moved to gl_start/stop() from GstGLBaseMixer instead. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4608>
This commit is contained in:
parent
331b1af468
commit
fc85b63c2b
4 changed files with 2 additions and 34 deletions
|
@ -74,7 +74,6 @@ static GstPad *gst_gl_mosaic_request_new_pad (GstElement * element,
|
|||
static void gst_gl_mosaic_release_pad (GstElement * element, GstPad * pad);
|
||||
|
||||
static void gst_gl_mosaic_gl_stop (GstGLBaseMixer * base_mix);
|
||||
static gboolean gst_gl_mosaic_set_caps (GstGLMixer * mixer, GstCaps * outcaps);
|
||||
|
||||
static gboolean gst_gl_mosaic_process_textures (GstGLMixer * mixer,
|
||||
GstGLMemory * out_tex);
|
||||
|
@ -136,7 +135,6 @@ gst_gl_mosaic_class_init (GstGLMosaicClass * klass)
|
|||
"Filter/Effect/Video", "OpenGL mosaic",
|
||||
"Julien Isorce <julien.isorce@gmail.com>");
|
||||
|
||||
GST_GL_MIXER_CLASS (klass)->set_caps = gst_gl_mosaic_set_caps;
|
||||
GST_GL_BASE_MIXER_CLASS (klass)->gl_stop = gst_gl_mosaic_gl_stop;
|
||||
GST_GL_MIXER_CLASS (klass)->process_textures = gst_gl_mosaic_process_textures;
|
||||
}
|
||||
|
@ -204,15 +202,6 @@ gst_gl_mosaic_gl_stop (GstGLBaseMixer * mixer)
|
|||
GST_GL_BASE_MIXER_CLASS (gst_gl_mosaic_parent_class)->gl_stop (mixer);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_gl_mosaic_set_caps (GstGLMixer * mixer, GstCaps * outcaps)
|
||||
{
|
||||
GstGLMosaic *mosaic = GST_GL_MOSAIC (mixer);
|
||||
|
||||
g_clear_object (&mosaic->shader);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_mosaic_render (GstGLContext * context, GstGLMosaic * mosaic)
|
||||
{
|
||||
|
|
|
@ -666,8 +666,6 @@ static gboolean gst_gl_video_mixer_propose_allocation (GstAggregator *
|
|||
agg, GstAggregatorPad * agg_pad, GstQuery * decide_query, GstQuery * query);
|
||||
static gboolean gst_gl_video_mixer_gl_start (GstGLBaseMixer * base_mix);
|
||||
static void gst_gl_video_mixer_gl_stop (GstGLBaseMixer * base_mix);
|
||||
static gboolean gst_gl_video_mixer_set_caps (GstGLMixer * mixer,
|
||||
GstCaps * outcaps);
|
||||
|
||||
static gboolean gst_gl_video_mixer_process_textures (GstGLMixer * mixer,
|
||||
GstGLMemory * out_tex);
|
||||
|
@ -1313,7 +1311,6 @@ gst_gl_video_mixer_class_init (GstGLVideoMixerClass * klass)
|
|||
GST_TYPE_GL_VIDEO_MIXER_BACKGROUND,
|
||||
DEFAULT_BACKGROUND, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
GST_GL_MIXER_CLASS (klass)->set_caps = gst_gl_video_mixer_set_caps;
|
||||
GST_GL_MIXER_CLASS (klass)->process_textures =
|
||||
gst_gl_video_mixer_process_textures;
|
||||
|
||||
|
@ -1796,17 +1793,6 @@ gst_gl_video_mixer_src_event (GstAggregator * agg, GstEvent * event)
|
|||
return GST_AGGREGATOR_CLASS (parent_class)->src_event (agg, event);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_gl_video_mixer_set_caps (GstGLMixer * mixer, GstCaps * outcaps)
|
||||
{
|
||||
GstGLVideoMixer *video_mixer = GST_GL_VIDEO_MIXER (mixer);
|
||||
|
||||
/* need reconfigure output geometry */
|
||||
video_mixer->output_geo_change = TRUE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
gst_gl_video_mixer_gl_stop (GstGLBaseMixer * base_mix)
|
||||
{
|
||||
|
@ -1825,6 +1811,8 @@ gst_gl_video_mixer_gl_start (GstGLBaseMixer * base_mix)
|
|||
{
|
||||
GstGLVideoMixer *video_mixer = GST_GL_VIDEO_MIXER (base_mix);
|
||||
|
||||
video_mixer->output_geo_change = TRUE;
|
||||
|
||||
if (!video_mixer->shader) {
|
||||
gchar *frag_str = g_strdup_printf ("%s%s",
|
||||
gst_gl_shader_string_get_highest_precision (base_mix->context,
|
||||
|
|
|
@ -452,8 +452,6 @@ gst_gl_mixer_class_init (GstGLMixerClass * klass)
|
|||
/* Register the pad class */
|
||||
g_type_class_ref (GST_TYPE_GL_MIXER_PAD);
|
||||
|
||||
klass->set_caps = NULL;
|
||||
|
||||
gst_type_mark_as_plugin_api (GST_TYPE_GL_MIXER_PAD, 0);
|
||||
gst_type_mark_as_plugin_api (GST_TYPE_GL_MIXER, 0);
|
||||
}
|
||||
|
@ -581,7 +579,6 @@ gst_gl_mixer_decide_allocation (GstAggregator * agg, GstQuery * query)
|
|||
{
|
||||
GstGLBaseMixer *base_mix = GST_GL_BASE_MIXER (agg);
|
||||
GstGLMixer *mix = GST_GL_MIXER (base_mix);
|
||||
GstGLMixerClass *mixer_class = GST_GL_MIXER_GET_CLASS (mix);
|
||||
GstGLContext *context;
|
||||
GstBufferPool *pool = NULL;
|
||||
GstStructure *config;
|
||||
|
@ -614,9 +611,6 @@ gst_gl_mixer_decide_allocation (GstAggregator * agg, GstQuery * query)
|
|||
goto context_error;
|
||||
}
|
||||
|
||||
if (mixer_class->set_caps)
|
||||
mixer_class->set_caps (mix, mix->out_caps);
|
||||
|
||||
mix->priv->gl_resource_ready = TRUE;
|
||||
g_cond_signal (&mix->priv->gl_resource_cond);
|
||||
g_mutex_unlock (&mix->priv->gl_resource_lock);
|
||||
|
|
|
@ -76,8 +76,6 @@ GType gst_gl_mixer_pad_get_type (void);
|
|||
#define GST_GL_MIXER_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_GL_MIXER,GstGLMixerClass))
|
||||
|
||||
typedef gboolean (*GstGLMixerSetCaps) (GstGLMixer* mixer,
|
||||
GstCaps* outcaps);
|
||||
typedef gboolean (*GstGLMixerProcessFunc) (GstGLMixer *mix, GstBuffer *outbuf);
|
||||
typedef gboolean (*GstGLMixerProcessTextures) (GstGLMixer *mix, GstGLMemory *out_tex);
|
||||
|
||||
|
@ -94,7 +92,6 @@ struct _GstGLMixerClass
|
|||
{
|
||||
GstGLBaseMixerClass parent_class;
|
||||
|
||||
GstGLMixerSetCaps set_caps;
|
||||
GstGLMixerProcessFunc process_buffers;
|
||||
GstGLMixerProcessTextures process_textures;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue