static gboolean _stop (GstAggregator * agg) { _reset_flow_values (agg); gst_aggregator_iterate_sinkpads (agg, (GstAggregatorPadForeachFunc) _flush_pad, NULL); return TRUE; }
static gboolean _stop (GstAggregator * agg) { _reset_flow_values (agg); gst_aggregator_iterate_sinkpads (agg, (GstAggregatorPadForeachFunc) _stop_pad, NULL); if (agg->priv->tags) gst_tag_list_unref (agg->priv->tags); agg->priv->tags = NULL; return TRUE; }
static void gst_aggregator_init (GstAggregator * self, GstAggregatorClass * klass) { GstPadTemplate *pad_template; GstAggregatorPrivate *priv; g_return_if_fail (klass->aggregate != NULL); self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GST_TYPE_AGGREGATOR, GstAggregatorPrivate); priv = self->priv; pad_template = gst_element_class_get_pad_template (GST_ELEMENT_CLASS (klass), "src"); g_return_if_fail (pad_template != NULL); priv->padcount = -1; priv->tags_changed = FALSE; self->priv->latency_live = FALSE; self->priv->latency_min = 0; self->priv->latency_max = GST_CLOCK_TIME_NONE; _reset_flow_values (self); AGGREGATOR_QUEUE (self) = g_async_queue_new (); self->srcpad = gst_pad_new_from_template (pad_template, "src"); gst_pad_set_event_function (self->srcpad, GST_DEBUG_FUNCPTR ((GstPadEventFunction) src_event_func)); gst_pad_set_query_function (self->srcpad, GST_DEBUG_FUNCPTR ((GstPadQueryFunction) src_query_func)); gst_pad_set_activatemode_function (self->srcpad, GST_DEBUG_FUNCPTR ((GstPadActivateModeFunction) src_activate_mode)); gst_element_add_pad (GST_ELEMENT (self), self->srcpad); self->clock = gst_system_clock_obtain (); self->timeout = -1; g_mutex_init (&self->priv->setcaps_lock); }
static void gst_aggregator_init (GstAggregator * self, GstAggregatorClass * klass) { GstPadTemplate *pad_template; GstAggregatorPrivate *priv; g_return_if_fail (klass->aggregate != NULL); self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GST_TYPE_AGGREGATOR, GstAggregatorPrivate); priv = self->priv; pad_template = gst_element_class_get_pad_template (GST_ELEMENT_CLASS (klass), "src"); g_return_if_fail (pad_template != NULL); priv->padcount = -1; priv->tags_changed = FALSE; _reset_flow_values (self); priv->mcontext = g_main_context_new (); self->srcpad = gst_pad_new_from_template (pad_template, "src"); gst_pad_set_event_function (self->srcpad, GST_DEBUG_FUNCPTR ((GstPadEventFunction) src_event_func)); gst_pad_set_query_function (self->srcpad, GST_DEBUG_FUNCPTR ((GstPadQueryFunction) src_query_func)); gst_pad_set_activatemode_function (self->srcpad, GST_DEBUG_FUNCPTR ((GstPadActivateModeFunction) src_activate_mode)); gst_element_add_pad (GST_ELEMENT (self), self->srcpad); g_mutex_init (&self->priv->mcontext_lock); }