diff options
author | Olivier Crete <tester@tester.ca> | 2008-03-11 12:40:58 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2008-03-11 12:40:58 +0000 |
commit | fe7b1e82ee5fb0a99cdd2249a0e9513afa45bf88 (patch) | |
tree | f1d736a15026a098c74bb20b2c6b3e8478d4d220 /gst/rtpmanager/rtpsource.c | |
parent | 0b94354a0d2930dfd9ad9dcefb6a68a6b18817c7 (diff) | |
download | gst-plugins-bad-fe7b1e82ee5fb0a99cdd2249a0e9513afa45bf88.tar.gz gst-plugins-bad-fe7b1e82ee5fb0a99cdd2249a0e9513afa45bf88.tar.bz2 gst-plugins-bad-fe7b1e82ee5fb0a99cdd2249a0e9513afa45bf88.zip |
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 |