/** * gst_aggregator_get_timeout: * @agg: a #GstAggregator * * Gets the timeout value. See gst_aggregator_set_timeout for * more details. * * Returns: The time in nanoseconds to wait for data to arrive on a sink pad * before a pad is deemed unresponsive. A value of -1 means an * unlimited time. */ static gint64 gst_aggregator_get_timeout (GstAggregator * agg) { gint64 res; g_return_val_if_fail (GST_IS_AGGREGATOR (agg), -1); GST_OBJECT_LOCK (agg); res = agg->timeout; GST_OBJECT_UNLOCK (agg); return res; }
/** * gst_aggregator_merge_tags: * @self: a #GstAggregator * @tags: a #GstTagList to merge * @mode: the #GstTagMergeMode to use * * Adds tags to so-called pending tags, which will be processed * before pushing out data downstream. * * Note that this is provided for convenience, and the subclass is * not required to use this and can still do tag handling on its own. * * MT safe. */ void gst_aggregator_merge_tags (GstAggregator * self, const GstTagList * tags, GstTagMergeMode mode) { GstTagList *otags; g_return_if_fail (GST_IS_AGGREGATOR (self)); g_return_if_fail (tags == NULL || GST_IS_TAG_LIST (tags)); /* FIXME Check if we can use OBJECT lock here! */ GST_OBJECT_LOCK (self); if (tags) GST_DEBUG_OBJECT (self, "merging tags %" GST_PTR_FORMAT, tags); otags = self->priv->tags; self->priv->tags = gst_tag_list_merge (self->priv->tags, tags, mode); if (otags) gst_tag_list_unref (otags); self->priv->tags_changed = TRUE; GST_OBJECT_UNLOCK (self); }
/** * gst_aggregator_set_timeout: * @agg: a #GstAggregator * @timeout: the new timeout value. * * Sets the new timeout value to @timeout. This value is used to limit the * amount of time a pad waits for data to appear before considering the pad * as unresponsive. */ static void gst_aggregator_set_timeout (GstAggregator * self, gint64 timeout) { g_return_if_fail (GST_IS_AGGREGATOR (self)); GST_OBJECT_LOCK (self); if (self->priv->latency_live && self->priv->latency_max != 0 && GST_CLOCK_TIME_IS_VALID (timeout) && timeout > self->priv->latency_max) { GST_ELEMENT_WARNING (self, CORE, NEGOTIATION, ("%s", "Timeout too big"), ("The requested timeout value is too big for the latency in the " "current pipeline. Limiting to %" G_GINT64_FORMAT, self->priv->latency_max)); timeout = self->priv->latency_max; } self->timeout = timeout; GST_OBJECT_UNLOCK (self); }