summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2018-02-15 12:58:43 +1100
committerTim-Philipp Müller <tim@centricular.com>2018-02-16 13:14:40 +0000
commit7fad93d03559513c947e38065b1cc160b1621cf6 (patch)
treeaff1221297d8b813feeaa27058438fa721b933b8
parent81a767bbdb75960d5ddf0f89a03cfee0777498e2 (diff)
tracers: latency: allow for non parented pads to send latency probes
Such a setup is used in rtspsrc for its TCP connection https://bugzilla.gnome.org/show_bug.cgi?id=793478
-rw-r--r--plugins/tracers/gstlatency.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/tracers/gstlatency.c b/plugins/tracers/gstlatency.c
index f94193a45..de4a71c46 100644
--- a/plugins/tracers/gstlatency.c
+++ b/plugins/tracers/gstlatency.c
@@ -114,8 +114,10 @@ log_latency (const GstStructure * data, GstPad * sink_pad, guint64 sink_ts)
static void
send_latency_probe (GstElement * parent, GstPad * pad, guint64 ts)
{
- if (parent && (!GST_IS_BIN (parent)) &&
- GST_OBJECT_FLAG_IS_SET (parent, GST_ELEMENT_FLAG_SOURCE)) {
+ /* allow for non-parented pads to send latency probes as used in e.g.
+ * rtspsrc for TCP connections */
+ if (!parent || (!GST_IS_BIN (parent) &&
+ GST_OBJECT_FLAG_IS_SET (parent, GST_ELEMENT_FLAG_SOURCE))) {
GstEvent *latency_probe = gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM,
gst_structure_new_id (latency_probe_id,
latency_probe_pad, GST_TYPE_PAD, pad,