diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2008-04-25 08:15:58 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2008-04-25 08:15:58 +0000 |
commit | 9285e110ccb5b062926557f4ca5e682ea796267e (patch) | |
tree | e39854dc6429e3ada1e7ad54ad98cc6ea9ccc736 /gst/rtpmanager/rtpsession.c | |
parent | af19b9121617cb5be2abf3ac4c3b035343c72da0 (diff) | |
download | gst-plugins-bad-9285e110ccb5b062926557f4ca5e682ea796267e.tar.gz gst-plugins-bad-9285e110ccb5b062926557f4ca5e682ea796267e.tar.bz2 gst-plugins-bad-9285e110ccb5b062926557f4ca5e682ea796267e.zip |
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/rtpsession.c')
-rw-r--r-- | gst/rtpmanager/rtpsession.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c index 0eaf3e6f..7ddcfe4d 100644 --- a/gst/rtpmanager/rtpsession.c +++ b/gst/rtpmanager/rtpsession.c @@ -1233,6 +1233,7 @@ update_arrival_stats (RTPSession * sess, RTPArrivalStats * arrival, /* get time of arrival */ g_get_current_time (¤t); arrival->time = GST_TIMEVAL_TO_TIME (current); + arrival->timestamp = GST_BUFFER_TIMESTAMP (buffer); arrival->ntpnstime = ntpnstime; /* get packet size including header overhead */ @@ -1434,6 +1435,7 @@ rtp_session_process_sr (RTPSession * sess, GstRTCPPacket * packet, return; GST_BUFFER_OFFSET (packet->buffer) = source->clock_base; + GST_BUFFER_OFFSET_END (packet->buffer) = source->clock_base_time; prevsender = RTP_SOURCE_IS_SENDER (source); |