static gboolean aggregate_func (GstAggregator * self) { GstAggregatorPrivate *priv = self->priv; GstAggregatorClass *klass = GST_AGGREGATOR_GET_CLASS (self); GST_LOG_OBJECT (self, "Checking aggregate"); while (priv->send_eos && gst_aggregator_iterate_sinkpads (self, (GstAggregatorPadForeachFunc) _check_all_pads_with_data_or_eos, NULL) && priv->running) { GST_TRACE_OBJECT (self, "Actually aggregating!"); priv->flow_return = klass->aggregate (self); if (priv->flow_return == GST_FLOW_EOS) { g_main_context_wakeup (self->priv->mcontext); _remove_all_sources (self); _push_eos (self); } if (priv->flow_return == GST_FLOW_FLUSHING && g_atomic_int_get (&priv->flush_seeking)) priv->flow_return = GST_FLOW_OK; GST_LOG_OBJECT (self, "flow return is %s", gst_flow_get_name (priv->flow_return)); if (priv->flow_return != GST_FLOW_OK) break; } return G_SOURCE_REMOVE; }
static void aggregate_func (GstAggregator * self) { GstAggregatorPrivate *priv = self->priv; GstAggregatorClass *klass = GST_AGGREGATOR_GET_CLASS (self); if (self->priv->running == FALSE) { GST_DEBUG_OBJECT (self, "Not running anymore"); return; } QUEUE_POP (self); GST_LOG_OBJECT (self, "Checking aggregate"); while (priv->send_eos && gst_aggregator_iterate_sinkpads (self, (GstAggregatorPadForeachFunc) _check_all_pads_with_data_or_eos_or_timeout, NULL) && priv->running) { GST_TRACE_OBJECT (self, "Actually aggregating!"); priv->flow_return = klass->aggregate (self); if (priv->flow_return == GST_FLOW_EOS) { QUEUE_FLUSH (self); _push_eos (self); } if (priv->flow_return == GST_FLOW_FLUSHING && g_atomic_int_get (&priv->flush_seeking)) priv->flow_return = GST_FLOW_OK; GST_LOG_OBJECT (self, "flow return is %s", gst_flow_get_name (priv->flow_return)); if (priv->flow_return != GST_FLOW_OK) break; } }