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;
}
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);
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;
/**
* 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
struct _GstAggregatorClass {
GstElementClass parent_class;
- GType sinkpads_type;
-
GstFlowReturn (*flush) (GstAggregator * aggregator);
GstBuffer * (*clip) (GstAggregator * aggregator,