Measure elements latency

clubberlang taoming29 at gmail.com
Wed Jun 5 20:25:39 UTC 2019


I'm working on a WebRTC/RTP project which has ultra-low latency requirements
for GStreamer 1.14. Is there a way to measure elements latency and even have
has the latency as a metric?

Initially I had a few ideas, but they all turned out to be not viable. I
would list these ideas down:

1/ Use buffer probes and PTS -- With buffer probes, I could get the PTS as
an ID before coming into an element and record a running time (absolute time
- base time). After the buffer goes out of the element, I could get the new
running time. Then I can calculate the running time difference.

However with this approach, I don't have a way to distinguish them because
the buffers PTS are changed after coming out of the element.

2/ Use buffer probes and inserting GstMeta -- For this I think I would still
not solve the problem that elements may drop/change the buffers.

3/ GStreamer tracer -- Enabling GStreamer tracer has a huge CPU burden as
far as I tested. 

4/ Using latency query -- Turns out this is a calculation for the whole
pipeline if I understand it correctly. i.e. When the pipeline is in playing
state, this number will not change unless there are some elements added or
removed -- which is not what want -- I want something dynamic




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list