summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Sauer <ensonic@users.sf.net>2017-11-01 15:18:08 +0100
committerTim-Philipp Müller <tim@centricular.com>2017-12-02 15:10:27 +0000
commitf51557dbc5a46d25e37cbb0870d02778e9a0f074 (patch)
treef88a1b719c7750637f132899a1f1c96c126cbe68
parent917214ed91325b30c34c6ed5d56b31fff53acb0f (diff)
aggregator: add more comments
-rw-r--r--libs/gst/base/gstaggregator.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/gst/base/gstaggregator.c b/libs/gst/base/gstaggregator.c
index fdffa37cd..b757cff74 100644
--- a/libs/gst/base/gstaggregator.c
+++ b/libs/gst/base/gstaggregator.c
@@ -286,6 +286,8 @@ struct _GstAggregatorPrivate
/* Our state is >= PAUSED */
gboolean running; /* protected by src_lock */
+ /* seqnum from seek or segment,
+ * to be applied to synthetic segment/eos events */
gint seqnum;
gboolean send_stream_start; /* protected by srcpad stream lock */
gboolean send_segment;
@@ -561,6 +563,8 @@ gst_aggregator_push_mandatory_events (GstAggregator * self)
segment = gst_event_new_segment (&self->segment);
if (!self->priv->seqnum)
+ /* This code-path is in preparation to be able to run without a source
+ * connected. Then we won't have a seq-num from a segment event. */
self->priv->seqnum = gst_event_get_seqnum (segment);
else
gst_event_set_seqnum (segment, self->priv->seqnum);
@@ -1103,6 +1107,8 @@ gst_aggregator_aggregate_func (GstAggregator * self)
gst_aggregator_iterate_sinkpads (self, gst_aggregator_do_events_and_queries,
NULL);
+ /* Ensure we have buffers ready (either in clipped_buffer or at the head of
+ * the queue */
if (!gst_aggregator_wait_and_check (self, &timeout))
continue;