summaryrefslogtreecommitdiffstats
path: root/gst/rtpmanager/rtpsource.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2008-04-25 08:15:58 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-08-11 02:30:34 +0100
commite779adca6947da83100a9af502c36d021882b117 (patch)
treee3699998bb899e8ddb883636dbf772365a018489 /gst/rtpmanager/rtpsource.c
parent3c5cf0cd38ac558736197d73bd2a9c0f04f7958c (diff)
gst/rtpmanager/: Also keep track of the first buffer timestamp together with the first
Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_associate), (gst_rtp_bin_sync_chain): * gst/rtpmanager/rtpsession.c: (update_arrival_stats), (rtp_session_process_sr), (rtp_session_on_timeout): * gst/rtpmanager/rtpsource.c: (rtp_source_init), (calculate_jitter): * gst/rtpmanager/rtpsource.h: * gst/rtpmanager/rtpstats.h: Also keep track of the first buffer timestamp together with the first RTP timestamp as they both are needed to construct the timing of outgoing packets in the jitterbuffer and are therefore also needed to manage lip-sync. This fixes lip-sync if the first RTP packets arrive with a wildly different gap.
Diffstat (limited to 'gst/rtpmanager/rtpsource.c')
-rw-r--r--gst/rtpmanager/rtpsource.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gst/rtpmanager/rtpsource.c b/gst/rtpmanager/rtpsource.c
index 938a1d56..36def461 100644
--- a/gst/rtpmanager/rtpsource.c
+++ b/gst/rtpmanager/rtpsource.c
@@ -171,6 +171,7 @@ rtp_source_init (RTPSource * src)
src->payload = 0;
src->clock_rate = -1;
src->clock_base = -1;
+ src->clock_base_time = -1;
src->packets = g_queue_new ();
src->seqnum_base = -1;
src->last_rtptime = -1;
@@ -772,6 +773,7 @@ calculate_jitter (RTPSource * src, GstBuffer * buffer,
if (src->clock_base == -1) {
GST_DEBUG ("using clock-base of %" G_GUINT32_FORMAT, rtptime);
src->clock_base = rtptime;
+ src->clock_base_time = arrival->timestamp;
}
/* convert arrival time to RTP timestamp units, truncate to 32 bits, we don't