diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2008-11-17 15:17:52 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2009-08-11 02:30:38 +0100 |
commit | 5ab3e1059442f3bb77a26e982e834bd383faec47 (patch) | |
tree | ccfa07316f2dbf3fde1a1fdcbb6407d47cfb04ed /gst/rtpmanager/rtpsource.c | |
parent | 1656fad93e59d9f6ac888539b3b8da3a2b318fc7 (diff) |
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.
Diffstat (limited to 'gst/rtpmanager/rtpsource.c')
-rw-r--r-- | gst/rtpmanager/rtpsource.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gst/rtpmanager/rtpsource.c b/gst/rtpmanager/rtpsource.c index af4d3dcd..102ac063 100644 --- a/gst/rtpmanager/rtpsource.c +++ b/gst/rtpmanager/rtpsource.c @@ -721,18 +721,23 @@ push_packet (RTPSource * src, GstBuffer * buffer) static gint get_clock_rate (RTPSource * src, guint8 payload) { + if (payload != src->payload) { + GST_DEBUG ("new payload %d", payload); + src->payload = payload; + src->clock_rate = -1; + src->stats.transit = -1; + } + if (src->clock_rate == -1) { gint clock_rate = -1; if (src->callbacks.clock_rate) clock_rate = src->callbacks.clock_rate (src, payload, src->user_data); - GST_DEBUG ("new payload %d, got clock-rate %d", payload, clock_rate); + GST_DEBUG ("got clock-rate %d", payload, clock_rate); src->clock_rate = clock_rate; } - src->payload = payload; - return src->clock_rate; } |