switch (gst_iterator_next (iter, &item)) {
case GST_ITERATOR_OK:
{
- GstPad *pad;
+ GstAggregatorPad *pad;
pad = g_value_get_object (&item);
break;
}
- GST_LOG_OBJECT (self, "calling function on pad %s:%s",
- GST_DEBUG_PAD_NAME (pad));
+ GST_LOG_OBJECT (pad, "calling function %s on pad",
+ GST_DEBUG_FUNCPTR_NAME (func));
+
result = func (self, pad, user_data);
done = !result;
}
static inline gboolean
-_check_all_pads_with_data_or_eos (GstAggregator * self,
+gst_aggregator_check_all_pads_with_data_or_eos (GstAggregator * self,
GstAggregatorPad * aggpad, gpointer user_data)
{
if (aggpad->buffer || aggpad->eos) {
gst_aggregator_get_latency (self, &live, &latency_min, &latency_max);
if (gst_aggregator_iterate_sinkpads (self,
- (GstAggregatorPadForeachFunc) _check_all_pads_with_data_or_eos,
- NULL)) {
+ gst_aggregator_check_all_pads_with_data_or_eos, NULL)) {
GST_DEBUG_OBJECT (self, "all pads have data");
SRC_STREAM_UNLOCK (self);
}
res = gst_aggregator_iterate_sinkpads (self,
- (GstAggregatorPadForeachFunc) _check_all_pads_with_data_or_eos, NULL);
+ gst_aggregator_check_all_pads_with_data_or_eos, NULL);
SRC_STREAM_UNLOCK (self);
return res;
return res;
}
-static gboolean
-_stop_pad (GstAggregator * self, GstAggregatorPad * pad, gpointer unused_udata)
+static inline gboolean
+gst_aggregator_stop_pad (GstAggregator * self, GstAggregatorPad * pad,
+ gpointer unused_udata)
{
_aggpad_flush (pad, self);
_reset_flow_values (agg);
- gst_aggregator_iterate_sinkpads (agg,
- (GstAggregatorPadForeachFunc) _stop_pad, NULL);
+ gst_aggregator_iterate_sinkpads (agg, gst_aggregator_stop_pad, NULL);
if (agg->priv->tags)
gst_tag_list_unref (agg->priv->tags);
SRC_STREAM_LOCK (self);
if (gst_aggregator_iterate_sinkpads (self,
- (GstAggregatorPadForeachFunc) _check_all_pads_with_data_or_eos, NULL))
+ gst_aggregator_check_all_pads_with_data_or_eos, NULL))
SRC_STREAM_BROADCAST_UNLOCKED (self);
SRC_STREAM_UNLOCK (self);
GType gst_aggregator_get_type(void);
-/* API that should eventually land in GstElement itself*/
-typedef gboolean (*GstAggregatorPadForeachFunc) (GstAggregator * self,
- GstPad * pad,
+/* API that should eventually land in GstElement itself (FIXME) */
+typedef gboolean (*GstAggregatorPadForeachFunc) (GstAggregator * aggregator,
+ GstAggregatorPad * aggregator_pad,
gpointer user_data);
+
gboolean gst_aggregator_iterate_sinkpads (GstAggregator * self,
GstAggregatorPadForeachFunc func,
gpointer user_data);