GNOME Bugzilla – Bug 520626
Implement collision and loop detection in rtpmanager
Last modified: 2008-03-11 12:42:21 UTC
Here is a basic implementation of the collision and loop detection stuff present in RFC 3550 section 8.2. I does not collect all the stats and increment all the counters where it should (I'm not certain how the whole stats thing is supposed to work in rtpmanager). I'm also not certain that the resetting is done correctly after changing the SSRC of the sender. Also, I think the RTPSource from the old sender should be kept according to the RFC. I'm also attaching at patch against the netaddress code in g-p-base that adds a gst_netaddress_compare (since there is padding in the structure, memcmp can't be used). The g-p-bad code contains a static version of that function (since its probably too late to get it into base) and I'm also attaching a patch that can be applied to rtpmanager once it gets into base after the dep freeze.
Created attachment 106649 [details] [review] Collision and loop detection
Created attachment 106650 [details] [review] Add gst_netaddress_compare() to gst-p-base
Created attachment 106651 [details] [review] use comparison function from g-p-base instead of local copy
Patch by: Olivier Crete <tester at tester ca> * docs/libs/gst-plugins-base-libs-sections.txt: * gst-libs/gst/netbuffer/gstnetbuffer.c: (gst_netaddress_equal): * gst-libs/gst/netbuffer/gstnetbuffer.h: Add trivial function to compare GstNetAddress. See #520626. API: GstNetBuffer::gst_netaddress_equal
Commited trivial compare function for 0.10.18 so that we have it in the release already.
Created attachment 106815 [details] [review] Improved collision/loop detection patch I've more the 10 times rtcp interval into a #define and it now expires the conflicts in the rtcp timeout function. It also uses the newly commited gst_netaddress_equal() function
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.