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 793704 - srtpenc/srtpdec force application/x-srtp even when encryption disabled
srtpenc/srtpdec force application/x-srtp even when encryption disabled
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.x
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-02-21 21:14 UTC by David Woodhouse
Modified: 2018-11-03 14:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use application/x-rtp caps when decryption is disabled (4.52 KB, patch)
2018-02-21 21:14 UTC, David Woodhouse
needs-work Details | Review

Description David Woodhouse 2018-02-21 21:14:35 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.
Comment 1 Olivier Crête 2018-02-22 23:07:45 UTC
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.
Comment 2 Olivier Crête 2018-02-22 23:11:25 UTC
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 ;
Comment 3 David Woodhouse 2018-02-23 16:34:15 UTC
(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.
Comment 4 GStreamer system administrator 2018-11-03 14:18:40 UTC
-- 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.