GNOME Bugzilla – Bug 793704
srtpenc/srtpdec force application/x-srtp even when encryption disabled
Last modified: 2018-11-03 14:18:40 UTC
Created attachment 368731 [details] [review] Use application/x-rtp caps when decryption is disabled See https://bugs.freedesktop.org/show_bug.cgi?id=105193 The FarStream fsrtpconference creates srtpenc/srtpdec elements unconditionally. If no encryption is negotiated, they pass RTP packets through with no effect. But the negotiated caps are still application/x-srtp, not application/x-rtp which is what's actually being sent. This works OK when the transmitter is some UDP network thing which accepts anything and doesn't care. However, in my case I do care, because I'm connecting fsrtpconference up to my own RTP depayload which really does need it to be correctly labelled as application/x-rtp. Here's a half-baked attempt at making it work, which might work for srtpenc but has certainly broken srtpdec.
Review of attachment 368731 [details] [review]: ::: ext/srtp/gstsrtpdec.c @@ +168,3 @@ GST_PAD_SINK, GST_PAD_ALWAYS, + GST_STATIC_CAPS ("application/x-srtcp;application;x-rtcp") it's application/x-rtcp Also, add a space after the ";" for readability @@ +945,2 @@ GstStructure *ps = gst_caps_get_structure (ret, i); + if (0) { The if(0) here is clearly wrong! And, I'm pretty sure the way this is done here is wrong.. We now need to duplicate all the structure and set the first version to x-srt{c,}p and leave the second copy as-is.
Review of attachment 368731 [details] [review]: ::: ext/srtp/gstsrtpenc.c @@ +200,3 @@ GST_PAD_SRC, GST_PAD_SOMETIMES, + GST_STATIC_CAPS ("application/x-rtcp;application/x-srtcp") Missing space after ;
(In reply to Olivier Crête from comment #1) > The if(0) here is clearly wrong! > > And, I'm pretty sure the way this is done here is wrong.. We now need to > duplicate all the structure and set the first version to x-srt{c,}p and > leave the second copy as-is. Yeah, as I said it *might* be OK for srtpenc but will certainly have broken srtpdec (except for me, where I *wanted* to get application/x-rtp out of it which is kind of the point of this bug). That patch was intended more as a specific description of the problem, than a fix for review.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/661.