mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 00:06:36 +00:00
latency: Dot not override already stored events
First, the event would be leaved, but also when an element takes several buffers before producing one, we want the reported latency to be the aggregation, so the distance from the oldest buffer.
This commit is contained in:
parent
bdb75a1450
commit
5470f6df00
1 changed files with 6 additions and 4 deletions
|
@ -300,8 +300,9 @@ do_push_event_pre (GstTracer * self, guint64 ts, GstPad * pad, GstEvent * ev)
|
|||
|
||||
/* store event so that we can calculate latency when the buffer that
|
||||
* follows has been processed */
|
||||
g_object_set_qdata ((GObject *) pad, latency_probe_id,
|
||||
gst_event_ref (ev));
|
||||
if (!g_object_get_qdata ((GObject *) pad, latency_probe_id))
|
||||
g_object_set_qdata ((GObject *) pad, latency_probe_id,
|
||||
gst_event_ref (ev));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -314,8 +315,9 @@ do_push_event_pre (GstTracer * self, guint64 ts, GstPad * pad, GstEvent * ev)
|
|||
|
||||
if (!g_str_equal (g_value_get_string (value), pad_name)) {
|
||||
GST_DEBUG ("%s: Storing sub-latency event", pad_name);
|
||||
g_object_set_qdata ((GObject *) pad, sub_latency_probe_id,
|
||||
gst_event_ref (ev));
|
||||
if (!g_object_get_qdata ((GObject *) pad, sub_latency_probe_id))
|
||||
g_object_set_qdata ((GObject *) pad, sub_latency_probe_id,
|
||||
gst_event_ref (ev));
|
||||
}
|
||||
|
||||
g_free (pad_name);
|
||||
|
|
Loading…
Reference in a new issue