[gstreamer-bugs] [Bug 599292] Synchronizing two RTP streams from different devices using RTCP is inaccurate.

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Jan 21 00:22:48 PST 2010

  GStreamer | gst-plugins-good | git

--- Comment #11 from Per Smitt <slow.racoon at gmail.com> 2010-01-21 08:22:46 UTC ---
Unfortunately the problem still persists with your latest patch Wim.

It appears that the problem is caused by running_time not being the same when
calculated from the segment and when calculated from the base_time.

I applied your patch and made modifications purely for debugging to illustrate
the behavior I get.

Excerpt from gst_rtp_session_chain_send_rtp_common:
  if (GST_CLOCK_TIME_IS_VALID (timestamp)) {

    /* convert to running time using the segment start value. */
    running_time =
        gst_segment_to_running_time (&rtpsession->send_rtp_seg,
    get_current_times(rtpsession, &running_time2, NULL);

    g_print ("Running time (segment): %llu\n", running_time / 1000000ULL);
    g_print ("Running time (get_current): %llu\n", running_time2 / 1000000ULL);
    g_print ("Timestamp age: %llu\n",
        (gst_clock_get_time (priv->sysclock) - timestamp) / 1000000ULL);
    g_print ("Time difference: %lld\n\n",
        (gint64)(running_time - running_time2) / 1000000LL);
  } else {

As you can see I get the running time both ways now when sending an RTP packet
and divide with 1000000 to get it into readable milliseconds. The timestamp age
is compared to the absolute clock, i know, but it is purely for debug purposes
to show how much time passed since the gst-buffer was created.

Here is the runtime result:
Running time (segment): 0
Running time (get_current): 10
Timestamp age: 290
Time difference: -10

Running time (segment): 395
Running time (get_current): 118
Timestamp age: 1
Time difference: 276

Running time (segment): 414
Running time (get_current): 137
Timestamp age: 1
Time difference: 276

Running time (segment): 423
Running time (get_current): 146
Timestamp age: 1
Time difference: 276

It seems like the time difference becomes approximate to the timestamp age for
the first packet (when segment runtime becomes zero). Is this how it should be
or are we looking at a bug?

Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the Gstreamer-bugs mailing list