Commit d5addcb3 authored by Mathieu Duponchelle's avatar Mathieu Duponchelle Committed by Tim-Philipp Müller

aggregator: Remove klass->sinkpads_type

This posed problems for the python bindings (and possibly others).

Instead, subclasses now use add_pad_template_with_gtype.

https://bugzilla.gnome.org/show_bug.cgi?id=789986
parent 5915f45e
......@@ -270,7 +270,6 @@ gst_gl_base_mixer_class_init (GstGLBaseMixerClass * klass)
GST_DEBUG_FUNCPTR (gst_gl_base_mixer_set_context);
element_class->change_state = gst_gl_base_mixer_change_state;
agg_class->sinkpads_type = GST_TYPE_GL_BASE_MIXER_PAD;
agg_class->sink_query = gst_gl_base_mixer_sink_query;
agg_class->src_query = gst_gl_base_mixer_src_query;
agg_class->src_activate = gst_gl_base_mixer_src_activate_mode;
......
......@@ -365,9 +365,9 @@ gst_gl_mixer_class_init (GstGLMixerClass * klass)
gobject_class->set_property = gst_gl_mixer_set_property;
gst_element_class_add_static_pad_template (element_class, &src_factory);
gst_element_class_add_static_pad_template (element_class, &sink_factory);
gst_element_class_add_static_pad_template_with_gtype (element_class,
&sink_factory, GST_TYPE_GL_MIXER_PAD);
agg_class->sinkpads_type = GST_TYPE_GL_MIXER_PAD;
agg_class->sink_query = gst_gl_mixer_sink_query;
agg_class->src_query = gst_gl_mixer_src_query;
agg_class->stop = gst_gl_mixer_stop;
......
......@@ -180,9 +180,9 @@ gst_gl_stereo_mix_class_init (GstGLStereoMixClass * klass)
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gst_element_class_add_static_pad_template (element_class, &src_factory);
gst_element_class_add_static_pad_template (element_class, &sink_factory);
gst_element_class_add_static_pad_template_with_gtype (element_class,
&sink_factory, GST_TYPE_GL_STEREO_MIX_PAD);
agg_class->sinkpads_type = GST_TYPE_GL_STEREO_MIX_PAD;
agg_class->stop = gst_gl_stereo_mix_stop;
agg_class->start = gst_gl_stereo_mix_start;
agg_class->src_query = gst_gl_stereo_mix_src_query;
......
......@@ -55,6 +55,14 @@
#define GST_CAT_DEFAULT gst_gl_video_mixer_debug
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink_%u",
GST_PAD_SINK,
GST_PAD_REQUEST,
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
(GST_CAPS_FEATURE_MEMORY_GL_MEMORY,
"RGBA"))
);
#define GST_TYPE_GL_VIDEO_MIXER_BACKGROUND (gst_gl_video_mixer_background_get_type())
static GType
gst_gl_video_mixer_background_get_type (void)
......@@ -862,6 +870,9 @@ gst_gl_video_mixer_class_init (GstGLVideoMixerClass * klass)
"Filter/Effect/Video/Compositor", "OpenGL video_mixer",
"Matthew Waters <matthew@centricular.com>");
gst_element_class_add_static_pad_template_with_gtype (element_class,
&sink_factory, GST_TYPE_GL_VIDEO_MIXER_PAD);
g_object_class_install_property (gobject_class, PROP_BACKGROUND,
g_param_spec_enum ("background", "Background", "Background type",
GST_TYPE_GL_VIDEO_MIXER_BACKGROUND,
......@@ -875,7 +886,6 @@ gst_gl_video_mixer_class_init (GstGLVideoMixerClass * klass)
vagg_class->update_caps = _update_caps;
agg_class->sinkpads_type = GST_TYPE_GL_VIDEO_MIXER_PAD;
agg_class->fixate_src_caps = _fixate_caps;
agg_class->propose_allocation = gst_gl_video_mixer_propose_allocation;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment