After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 520626 - Implement collision and loop detection in rtpmanager
Implement collision and loop detection in rtpmanager
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-03-05 23:07 UTC by Olivier Crête
Modified: 2008-03-11 12:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Collision and loop detection (13.03 KB, patch)
2008-03-05 23:08 UTC, Olivier Crête
none Details | Review
Add gst_netaddress_compare() to gst-p-base (2.02 KB, patch)
2008-03-05 23:09 UTC, Olivier Crête
committed Details | Review
use comparison function from g-p-base instead of local copy (2.02 KB, patch)
2008-03-05 23:09 UTC, Olivier Crête
none Details | Review
Improved collision/loop detection patch (13.36 KB, patch)
2008-03-07 22:23 UTC, Olivier Crête
committed Details | Review

Description Olivier Crête 2008-03-05 23:07:51 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.
Comment 1 Olivier Crête 2008-03-05 23:08:32 UTC
Created attachment 106649 [details] [review]
Collision and loop detection
Comment 2 Olivier Crête 2008-03-05 23:09:05 UTC
Created attachment 106650 [details] [review]
Add gst_netaddress_compare() to gst-p-base
Comment 3 Olivier Crête 2008-03-05 23:09:56 UTC
Created attachment 106651 [details] [review]
use comparison function from g-p-base instead of local copy
Comment 4 Wim Taymans 2008-03-07 18:18:00 UTC
        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
Comment 5 Wim Taymans 2008-03-07 18:19:10 UTC
Commited trivial compare function for 0.10.18 so that we have it in the release already.
Comment 6 Olivier Crête 2008-03-07 22:23:19 UTC
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
Comment 7 Wim Taymans 2008-03-11 12:42:21 UTC
        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.