summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Duponchelle <mathieu@centricular.com>2017-11-06 21:07:51 +0100
committerTim-Philipp Müller <tim@centricular.com>2017-12-02 15:10:27 +0000
commit79d0239e2fe92ea39a6abc0ecdccc92034a64ce6 (patch)
treebfb8df68cb8fc7b6fee0d0cee7520b7c44768e94
parent4e4438de215fcea209bb2f78b5cb378132958e48 (diff)
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
-rw-r--r--libs/gst/base/gstaggregator.c7
-rw-r--r--libs/gst/base/gstaggregator.h5
2 files changed, 4 insertions, 8 deletions
diff --git a/libs/gst/base/gstaggregator.c b/libs/gst/base/gstaggregator.c
index 40e1e18fd..9dddf837c 100644
--- a/libs/gst/base/gstaggregator.c
+++ b/libs/gst/base/gstaggregator.c
@@ -1564,6 +1564,9 @@ gst_aggregator_default_create_new_pad (GstAggregator * self,
GstAggregatorPrivate *priv = self->priv;
gint serial = 0;
gchar *name = NULL;
+ GType pad_type =
+ GST_PAD_TEMPLATE_GTYPE (templ) ==
+ G_TYPE_NONE ? GST_TYPE_AGGREGATOR_PAD : GST_PAD_TEMPLATE_GTYPE (templ);
if (templ->direction != GST_PAD_SINK)
goto not_sink;
@@ -1584,7 +1587,7 @@ gst_aggregator_default_create_new_pad (GstAggregator * self,
}
name = g_strdup_printf ("sink_%u", serial);
- agg_pad = g_object_new (GST_AGGREGATOR_GET_CLASS (self)->sinkpads_type,
+ agg_pad = g_object_new (pad_type,
"name", name, "direction", GST_PAD_SINK, "template", templ, NULL);
g_free (name);
@@ -2224,8 +2227,6 @@ gst_aggregator_class_init (GstAggregatorClass * klass)
GST_DEBUG_CATEGORY_INIT (aggregator_debug, "aggregator",
GST_DEBUG_FG_MAGENTA, "GstAggregator");
- klass->sinkpads_type = GST_TYPE_AGGREGATOR_PAD;
-
klass->sink_event = gst_aggregator_default_sink_event;
klass->sink_query = gst_aggregator_default_sink_query;
diff --git a/libs/gst/base/gstaggregator.h b/libs/gst/base/gstaggregator.h
index d23dd9cb7..fc2d6aeae 100644
--- a/libs/gst/base/gstaggregator.h
+++ b/libs/gst/base/gstaggregator.h
@@ -152,9 +152,6 @@ struct _GstAggregator
/**
* GstAggregatorClass:
- * @sinkpads_type: Optional.
- * The type of the pads that should be created when
- * GstElement.request_new_pad is called.
* @flush: Optional.
* Called after a successful flushing seek, once all the flush
* stops have been received. Flush pad-specific data in
@@ -233,8 +230,6 @@ struct _GstAggregator
struct _GstAggregatorClass {
GstElementClass parent_class;
- GType sinkpads_type;
-
GstFlowReturn (*flush) (GstAggregator * aggregator);
GstBuffer * (*clip) (GstAggregator * aggregator,