From b6d0b1334923ec5d3419e3b3488868c7879b701b Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 17 Nov 2008 15:17:52 +0000 Subject: gst/rtpmanager/gstrtpbin.c: Do not try to keep track of the clock-rate ourselves but simply get the value from the ji... Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_associate), (gst_rtp_bin_sync_chain), (create_stream), (new_ssrc_pad_found): Do not try to keep track of the clock-rate ourselves but simply get the value from the jitterbuffer. * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_jitter_buffer_sink_parse_caps), (gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_get_sync): * gst/rtpmanager/gstrtpjitterbuffer.h: Add some debug info. Pass the clock-rate to the jitterbuffer. Also pass the clock-rate along with the rtp timestamp when getting the sync parameters. * gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain): Fix some debug. * gst/rtpmanager/rtpjitterbuffer.c: (rtp_jitter_buffer_reset_skew), (calculate_skew), (rtp_jitter_buffer_get_sync): * gst/rtpmanager/rtpjitterbuffer.h: Keep track of clock-rate changes and return the clock-rate together with the rtp timestamps used for sync. Don't try to construct timestamps when we have no base_time. * gst/rtpmanager/rtpsource.c: (get_clock_rate): Request a new clock-rate when the payload type changes. Reset the jitter calculation when the clock-rate changes. --- gst/rtpmanager/rtpjitterbuffer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gst/rtpmanager/rtpjitterbuffer.h') diff --git a/gst/rtpmanager/rtpjitterbuffer.h b/gst/rtpmanager/rtpjitterbuffer.h index 62f3f47e..325f8f7b 100644 --- a/gst/rtpmanager/rtpjitterbuffer.h +++ b/gst/rtpmanager/rtpjitterbuffer.h @@ -56,6 +56,7 @@ struct _RTPJitterBuffer { /* for calculating skew */ GstClockTime base_time; GstClockTime base_rtptime; + guint32 clock_rate; GstClockTime base_extrtp; guint64 ext_rtptime; gint64 window[RTP_JITTER_BUFFER_MAX_WINDOW]; @@ -91,7 +92,7 @@ guint rtp_jitter_buffer_num_packets (RTPJitterBuffer *jbuf) guint32 rtp_jitter_buffer_get_ts_diff (RTPJitterBuffer *jbuf); void rtp_jitter_buffer_get_sync (RTPJitterBuffer *jbuf, guint64 *rtptime, - guint64 *timestamp); + guint64 *timestamp, guint32 *clock_rate); #endif /* __RTP_JITTER_BUFFER_H__ */ -- cgit v1.2.1