How to calculate round-trip-time(RTT) in gstreamer

arpita banerjee reachtoarpi at
Sun Dec 30 23:46:09 PST 2012

Thanks I am able to do print_source_stats at server side also.

Could any one please explain these stats structure:

Internal src details:
source stats: application/x-rtp-source-stats, ssrc=(uint)797701185,
internal=(boolean)true, validated=(boolean)true,
received-bye=(boolean)false, is-csrc=(boolean)false,
is-sender=(boolean)true, seqnum-base=(int)20923,
clock-rate=(int)90000, octets-sent=(guint64)149387,
packets-sent=(guint64)301, octets-received=(guint64)0,
packets-received=(guint64)0, bitrate=(guint64)146889,
packets-lost=(int)0, jitter=(uint)0, have-sr=(boolean)true,
sr-ntptime=(guint64)15315540521407846658, sr-rtptime=(uint)1846112624,
sr-octet-count=(uint)118810, sr-packet-count=(uint)250;

Remote source's  RTCP details:
source stats: application/x-rtp-source-stats, ssrc=(uint)106166602,
internal=(boolean)false, validated=(boolean)true,
received-bye=(boolean)false, is-csrc=(boolean)false,
is-sender=(boolean)false, seqnum-base=(int)-1, clock-rate=(int)-1,
rtcp-from=(string), octets-sent=(guint64)0,
packets-sent=(guint64)0, octets-received=(guint64)0,
packets-received=(guint64)0, bitrate=(guint64)0, packets-lost=(int)0,
jitter=(uint)0, have-sr=(boolean)false, sr-ntptime=(guint64)0,
sr-rtptime=(uint)0, sr-octet-count=(uint)0, sr-packet-count=(uint)0,
sent-rb=(boolean)false, sent-rb-fractionlost=(uint)0,
sent-rb-packetslost=(int)0, sent-rb-exthighestseq=(uint)0,
sent-rb-jitter=(uint)0, sent-rb-lsr=(uint)0, sent-rb-dlsr=(uint)0,
have-rb=(boolean)true, rb-fractionlost=(uint)0, rb-packetslost=(int)0,
rb-exthighestseq=(uint)21222, rb-jitter=(uint)70,
rb-lsr=(uint)3136651677, rb-dlsr=(uint)77140, rb-round-trip=(uint)273;

On Sat, Dec 29, 2012 at 7:48 PM, arpita banerjee <reachtoarpi at> wrote:
> Thanks for your reply. But, what I will do at sender or server side?
> On Sat, Dec 29, 2012 at 11:44 AM, Olivier Crête
> <olivier.crete at> wrote:
>> Hello,
>> On Fri, 2012-12-28 at 11:25 -0800, arpita banerjee wrote:
>>> How I can calculate round trip time in gstreamer?
>>> round-trip-time(RTT) = RR timestamp - LSR - DLSR
>>> Using gst_rtcp_packet_get_rb()  function I am getting LSR, DLSR values
>>> , but how I will get RR timestamp ?
>>> Should I use the current timestamp when Receiver Report(RR) is
>>> received? Which function should I use?
>> I assume you're talking about RTP, rtpbin already computes it for you.
>> Getting the stats out is really badly documented.. But you can check
>> print_source_stats() in this
>>  as a kind of example.
>> --
>> Olivier Crête
>> olivier.crete at
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at

More information about the gstreamer-devel mailing list