mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:56:14 +00:00
Improve and fix LATENCY query handling
This now follows the design docs everywhere, especially the maximum latency handling. https://bugzilla.gnome.org/show_bug.cgi?id=744106
This commit is contained in:
parent
0d89c672e8
commit
d9a267f030
1 changed files with 5 additions and 3 deletions
|
@ -598,13 +598,15 @@ 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) {
|
||||||
|
GstClockTime latency;
|
||||||
|
|
||||||
gst_caps_replace (&vagg->priv->current_caps, caps);
|
gst_caps_replace (&vagg->priv->current_caps, caps);
|
||||||
GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
|
GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
|
||||||
|
|
||||||
gst_aggregator_set_src_caps (agg, caps);
|
gst_aggregator_set_src_caps (agg, caps);
|
||||||
gst_aggregator_set_latency (agg, gst_util_uint64_scale (GST_SECOND,
|
latency = gst_util_uint64_scale (GST_SECOND,
|
||||||
GST_VIDEO_INFO_FPS_D (&info), GST_VIDEO_INFO_FPS_N (&info)),
|
GST_VIDEO_INFO_FPS_D (&info), GST_VIDEO_INFO_FPS_N (&info));
|
||||||
GST_CLOCK_TIME_NONE);
|
gst_aggregator_set_latency (agg, latency, latency);
|
||||||
|
|
||||||
GST_VIDEO_AGGREGATOR_LOCK (vagg);
|
GST_VIDEO_AGGREGATOR_LOCK (vagg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue