Commit 35788c85 authored by Julian Bouzas's avatar Julian Bouzas Committed by Sebastian Dröge

tracer: latency: Don't compare element name as element Id is already unique

parent e128c731
Pipeline #30736 passed with stages
in 76 minutes and 4 seconds
......@@ -353,20 +353,16 @@ do_drop_sub_latency_event (GstPad * pad, GstPadProbeInfo * info,
GstElement *peer_parent = get_real_pad_parent (peer_pad);
const GValue *value;
gchar *element_id = g_strdup_printf ("%p", peer_parent);
gchar *element_name = gst_element_get_name (peer_parent);
gchar *pad_name = gst_pad_get_name (peer_pad);
const gchar *value_element_id, *value_element_name, *value_pad_name;
const gchar *value_element_id, *value_pad_name;
/* Get the element id, element name and pad name from data */
value = gst_structure_id_get_value (data, latency_probe_element_id);
value_element_id = g_value_get_string (value);
value = gst_structure_id_get_value (data, latency_probe_element);
value_element_name = g_value_get_string (value);
value = gst_structure_id_get_value (data, latency_probe_pad);
value_pad_name = g_value_get_string (value);
if (!g_str_equal (value_element_id, element_id) ||
!g_str_equal (value_element_name, element_name) ||
!g_str_equal (value_pad_name, pad_name)) {
GST_DEBUG ("%s_%s: Dropping sub-latency event",
GST_DEBUG_PAD_NAME (pad));
......@@ -374,7 +370,6 @@ do_drop_sub_latency_event (GstPad * pad, GstPadProbeInfo * info,
}
g_free (pad_name);
g_free (element_name);
g_free (element_id);
}
}
......@@ -420,20 +415,16 @@ do_push_event_pre (GstTracer * self, guint64 ts, GstPad * pad, GstEvent * ev)
if (gst_structure_get_name_id (data) == sub_latency_probe_id) {
const GValue *value;
gchar *element_id = g_strdup_printf ("%p", peer_parent);
gchar *element_name = gst_element_get_name (peer_parent);
gchar *pad_name = gst_pad_get_name (peer_pad);
const gchar *value_element_id, *value_element_name, *value_pad_name;
const gchar *value_element_id, *value_pad_name;
/* Get the element id, element name and pad name from data */
value = gst_structure_id_get_value (data, latency_probe_element_id);
value_element_id = g_value_get_string (value);
value = gst_structure_id_get_value (data, latency_probe_element);
value_element_name = g_value_get_string (value);
value = gst_structure_id_get_value (data, latency_probe_pad);
value_pad_name = g_value_get_string (value);
if (!g_str_equal (value_element_id, element_id) ||
!g_str_equal (value_element_name, element_name) ||
!g_str_equal (value_pad_name, pad_name)) {
GST_DEBUG ("%s_%s: Storing sub-latency event",
GST_DEBUG_PAD_NAME (pad));
......@@ -442,7 +433,6 @@ do_push_event_pre (GstTracer * self, guint64 ts, GstPad * pad, GstEvent * ev)
}
g_free (pad_name);
g_free (element_name);
g_free (element_id);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment