GNOME Bugzilla – Bug 565910
allow forcing the ssrc on a rtpsession
Last modified: 2009-01-02 17:42:47 UTC
I'm attaching a patch so we can force a specific ssrc when sending using rtpsession (it will accept the ssrc in the caps and not try to overwrite it). This is useful because some very broken RTP implementations (hello Google) only accept buffers from a specific SSRC.
Created attachment 125467 [details] [review] allow setting the ssrc in the send-side setcaps
This could only work if the rtpsession did not already send out an RTCP packet with the old SSRC. I think a more robust approach is to set the SSRC of the internal source of the session and let the negotiation convey the SSRC to the payloader.
the SSRC check is valid and now commited. * gst/rtpmanager/rtpsession.c: (rtp_session_set_internal_ssrc): Only change the SSRC of the session and reset the internal source when the SSRC actually changed.
Something like this: * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_getcaps_send_rtp): Use method to get the internal SSRC. * gst/rtpmanager/rtpsession.c: (rtp_session_class_init), (rtp_session_set_property), (rtp_session_get_property): Add property to congiure the internal SSRC of the session. Fixes #565910.
Maybe changing the ssrc should send a BYE if something was already sent with the previous ssrc ?
I think that is allowed and it should also be possible.
Ok, commited. It should work fine, any receiver that got the previous SSRC through RTP or RTCP will time out and eventually use the new SSRC. Sending a BYE on the old SSRC would be nice but it does not seem to be required and it should certainly not cause any problems for the typical use case here. Unfortunatly, forcing the SSRC on the payloader does not work like it should because the negotiated SSRC has higher priority than the one set with the property. Patch by: Olivier Crete <tester at tester dot ca> * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_setcaps_send_rtp), (create_send_rtp_sink): * gst/rtpmanager/rtpsession.c: (rtp_session_set_internal_ssrc): When an SSRC is found on the caps of the sender RTP, use this as the internal SSRC. Fixes #565910.