mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
videoaggregator: push the caps event as soon as we receive it
Along with the required mandatory dependent events. Some elements need to perform an allocation query inside ::negotiated_caps(). Without the caps event being sent prior, downstream elements will be unable to answer and will return an error. https://bugzilla.gnome.org/show_bug.cgi?id=732662
This commit is contained in:
parent
0ab1136f4e
commit
4b1bf9b52a
1 changed files with 1 additions and 8 deletions
|
@ -283,7 +283,6 @@ struct _GstVideoAggregatorPrivate
|
||||||
|
|
||||||
/* current caps */
|
/* current caps */
|
||||||
GstCaps *current_caps;
|
GstCaps *current_caps;
|
||||||
gboolean send_caps;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstVideoAggregator, gst_videoaggregator,
|
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstVideoAggregator, gst_videoaggregator,
|
||||||
|
@ -502,7 +501,7 @@ gst_videoaggregator_src_setcaps (GstVideoAggregator * vagg, GstCaps * caps)
|
||||||
if (vagg->priv->current_caps == NULL ||
|
if (vagg->priv->current_caps == NULL ||
|
||||||
gst_caps_is_equal (caps, vagg->priv->current_caps) == FALSE) {
|
gst_caps_is_equal (caps, vagg->priv->current_caps) == FALSE) {
|
||||||
gst_caps_replace (&vagg->priv->current_caps, caps);
|
gst_caps_replace (&vagg->priv->current_caps, caps);
|
||||||
vagg->priv->send_caps = TRUE;
|
gst_aggregator_set_src_caps (agg, caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
@ -1188,11 +1187,6 @@ gst_videoaggregator_aggregate (GstAggregator * agg)
|
||||||
if (gst_pad_check_reconfigure (agg->srcpad))
|
if (gst_pad_check_reconfigure (agg->srcpad))
|
||||||
gst_videoaggregator_update_src_caps (vagg);
|
gst_videoaggregator_update_src_caps (vagg);
|
||||||
|
|
||||||
if (vagg->priv->send_caps) {
|
|
||||||
gst_aggregator_set_src_caps (agg, vagg->priv->current_caps);
|
|
||||||
vagg->priv->send_caps = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
GST_VIDEO_AGGREGATOR_LOCK (vagg);
|
GST_VIDEO_AGGREGATOR_LOCK (vagg);
|
||||||
|
|
||||||
if (agg->segment.position == -1)
|
if (agg->segment.position == -1)
|
||||||
|
@ -1652,7 +1646,6 @@ gst_videoaggregator_start (GstAggregator * agg)
|
||||||
if (!GST_AGGREGATOR_CLASS (gst_videoaggregator_parent_class)->start (agg))
|
if (!GST_AGGREGATOR_CLASS (gst_videoaggregator_parent_class)->start (agg))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
vagg->priv->send_caps = TRUE;
|
|
||||||
gst_segment_init (&agg->segment, GST_FORMAT_TIME);
|
gst_segment_init (&agg->segment, GST_FORMAT_TIME);
|
||||||
gst_caps_replace (&vagg->priv->current_caps, NULL);
|
gst_caps_replace (&vagg->priv->current_caps, NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue