mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 02:00:33 +00:00
videoaggregator: Remember if the last LATENCY query returned live or not and use the in the QoS messages
This commit is contained in:
parent
98c6860097
commit
4f3adad607
1 changed files with 13 additions and 2 deletions
|
@ -425,6 +425,8 @@ struct _GstVideoAggregatorPrivate
|
|||
|
||||
/* current caps */
|
||||
GstCaps *current_caps;
|
||||
|
||||
gboolean live;
|
||||
};
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstVideoAggregator, gst_videoaggregator,
|
||||
|
@ -945,6 +947,7 @@ gst_videoaggregator_reset (GstVideoAggregator * vagg)
|
|||
gst_video_info_init (&vagg->info);
|
||||
vagg->priv->ts_offset = 0;
|
||||
vagg->priv->nframes = 0;
|
||||
vagg->priv->live = FALSE;
|
||||
|
||||
agg->segment.position = -1;
|
||||
|
||||
|
@ -1417,9 +1420,8 @@ gst_videoaggregator_aggregate (GstAggregator * agg, gboolean timeout)
|
|||
|
||||
vagg->priv->qos_dropped++;
|
||||
|
||||
/* TODO: live */
|
||||
msg =
|
||||
gst_message_new_qos (GST_OBJECT_CAST (vagg), FALSE,
|
||||
gst_message_new_qos (GST_OBJECT_CAST (vagg), vagg->priv->live,
|
||||
gst_segment_to_running_time (&agg->segment, GST_FORMAT_TIME,
|
||||
output_start_time), gst_segment_to_stream_time (&agg->segment,
|
||||
GST_FORMAT_TIME, output_start_time), output_start_time,
|
||||
|
@ -1569,6 +1571,15 @@ gst_videoaggregator_src_query (GstAggregator * agg, GstQuery * query)
|
|||
case GST_QUERY_DURATION:
|
||||
res = gst_videoaggregator_query_duration (vagg, query);
|
||||
break;
|
||||
case GST_QUERY_LATENCY:
|
||||
res =
|
||||
GST_AGGREGATOR_CLASS (gst_videoaggregator_parent_class)->src_query
|
||||
(agg, query);
|
||||
|
||||
if (res) {
|
||||
gst_query_parse_latency (query, &vagg->priv->live, NULL, NULL);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
res =
|
||||
GST_AGGREGATOR_CLASS (gst_videoaggregator_parent_class)->src_query
|
||||
|
|
Loading…
Reference in a new issue