mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
aggregator: Check all pads for data when live
When live, we still need to inspect all pads queue in order to determin if we have received the first buffer or not. https://bugzilla.gnome.org/show_bug.cgi?id=765431
This commit is contained in:
parent
fbd824a2b5
commit
38895f2364
1 changed files with 20 additions and 11 deletions
|
@ -424,6 +424,7 @@ gst_aggregator_check_pads_ready (GstAggregator * self)
|
||||||
{
|
{
|
||||||
GstAggregatorPad *pad;
|
GstAggregatorPad *pad;
|
||||||
GList *l, *sinkpads;
|
GList *l, *sinkpads;
|
||||||
|
gboolean have_data = TRUE;
|
||||||
|
|
||||||
GST_LOG_OBJECT (self, "checking pads");
|
GST_LOG_OBJECT (self, "checking pads");
|
||||||
|
|
||||||
|
@ -438,21 +439,29 @@ gst_aggregator_check_pads_ready (GstAggregator * self)
|
||||||
|
|
||||||
PAD_LOCK (pad);
|
PAD_LOCK (pad);
|
||||||
|
|
||||||
|
if (gst_aggregator_pad_queue_is_empty (pad)) {
|
||||||
|
if (!pad->priv->eos) {
|
||||||
|
have_data = FALSE;
|
||||||
|
|
||||||
|
/* If not live we need data on all pads, so leave the loop */
|
||||||
|
if (!self->priv->peer_latency_live) {
|
||||||
|
PAD_UNLOCK (pad);
|
||||||
|
goto pad_not_ready;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (self->priv->peer_latency_live) {
|
||||||
/* In live mode, having a single pad with buffers is enough to
|
/* In live mode, having a single pad with buffers is enough to
|
||||||
* generate a start time from it. In non-live mode all pads need
|
* generate a start time from it. In non-live mode all pads need
|
||||||
* to have a buffer
|
* to have a buffer
|
||||||
*/
|
*/
|
||||||
if (self->priv->peer_latency_live &&
|
|
||||||
!gst_aggregator_pad_queue_is_empty (pad))
|
|
||||||
self->priv->first_buffer = FALSE;
|
self->priv->first_buffer = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (gst_aggregator_pad_queue_is_empty (pad) && !pad->priv->eos) {
|
|
||||||
PAD_UNLOCK (pad);
|
PAD_UNLOCK (pad);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!have_data)
|
||||||
goto pad_not_ready;
|
goto pad_not_ready;
|
||||||
}
|
|
||||||
PAD_UNLOCK (pad);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
self->priv->first_buffer = FALSE;
|
self->priv->first_buffer = FALSE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue