diff options
author | Olivier Crete <tester@tester.ca> | 2008-03-11 12:40:58 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2009-08-11 02:30:34 +0100 |
commit | 3f5884708033ba3579e24b22ce3bb44657eec66f (patch) | |
tree | 767a642d4dc3aa304f8e70efcddf91383fb89b6e /gst/rtpmanager/rtpsource.c | |
parent | 6ba2fcd4ffc3d84755ef953eaa1494fff76fcc67 (diff) |
gst/rtpmanager/rtpsession.*: Implement collision and loop detection in rtpmanager.
Original commit message from CVS:
Patch by: Olivier Crete <tester at tester dot ca>
* gst/rtpmanager/rtpsession.c: (find_add_conflicting_addresses),
(check_collision), (obtain_source), (rtp_session_create_new_ssrc),
(rtp_session_create_source), (rtp_session_process_rtp),
(rtp_session_process_sr), (rtp_session_process_rr),
(rtp_session_process_sdes), (rtp_session_process_bye),
(rtp_session_send_bye_locked), (rtp_session_send_bye),
(rtp_session_on_timeout):
* gst/rtpmanager/rtpsession.h:
Implement collision and loop detection in rtpmanager.
Fixes #520626.
* gst/rtpmanager/rtpsource.c: (rtp_source_reset),
(rtp_source_init):
* gst/rtpmanager/rtpsource.h:
Add method to reset stats.
Diffstat (limited to 'gst/rtpmanager/rtpsource.c')
-rw-r--r-- | gst/rtpmanager/rtpsource.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/gst/rtpmanager/rtpsource.c b/gst/rtpmanager/rtpsource.c index 1938324f..938a1d56 100644 --- a/gst/rtpmanager/rtpsource.c +++ b/gst/rtpmanager/rtpsource.c @@ -142,6 +142,24 @@ rtp_source_class_init (RTPSourceClass * klass) GST_DEBUG_CATEGORY_INIT (rtp_source_debug, "rtpsource", 0, "RTP Source"); } +/** + * rtp_source_reset: + * @src: an #RTPSource + * + * Reset the stats of @src. + */ +void +rtp_source_reset (RTPSource * src) +{ + src->received_bye = FALSE; + + src->stats.cycles = -1; + src->stats.jitter = 0; + src->stats.transit = -1; + src->stats.curr_sr = 0; + src->stats.curr_rr = 0; +} + static void rtp_source_init (RTPSource * src) { @@ -157,11 +175,7 @@ rtp_source_init (RTPSource * src) src->seqnum_base = -1; src->last_rtptime = -1; - src->stats.cycles = -1; - src->stats.jitter = 0; - src->stats.transit = -1; - src->stats.curr_sr = 0; - src->stats.curr_rr = 0; + rtp_source_reset (src); } static void |