Bug 105193

Summary: fsrtpconference feeds SRTP to transmitter even when encryption is disabled
Product: Farstream Reporter: David Woodhouse <dwmw2>
Component: RTP PluginAssignee: Olivier CrĂȘte <olivier.crete>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
i915 platform: i915 features:

Description David Woodhouse 2018-02-21 14:56:15 UTC
I implemented my own FsTransmitter because I need to transport data multiplexed over my protocol's single data connection.

Since fsrawconference doesn't have a jitterbuffer or codec support, I am trying to switch to fsrtpconference instead:

However, fsrtpconference seems to emit application/x-srtp unconditionally, even when encryption is disabled. I was only able to get it to work by removing libgstsrtp.so from my system. Otherwise I get this:

0:00:15.265806297  5308 0x5573bd72c830 DEBUG               GST_CAPS gstpad.c:2215:gst_pad_link_check_compatible_unlocked:<tee1:src_1> src caps application/x-srtp
0:00:15.265814903  5308 0x5573bd72c830 DEBUG               GST_CAPS gstpad.c:2217:gst_pad_link_check_compatible_unlocked:<valve1:sink> sink caps application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], clock-rate=(int)48000, encoding-name=(string){ OPUS, X-GST-OPUS-DRAFT-SPITTKA-00 }
0:00:15.265878067  5308 0x5573bd72c830 INFO                GST_PADS gstpad.c:2464:gst_pad_link_full: link between tee1:src_1 and valve1:sink failed: no common format
Comment 1 David Woodhouse 2018-02-21 14:56:50 UTC
This appears to make it work, although I haven't actually tested that connections which *do* use SRTP are still working:

--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -1167,7 +1167,8 @@ _rtpbin_request_encoder (GstElement *rtpbin, guint session_id,
   FsRtpSession *self = FS_RTP_SESSION (user_data);
-  if (self->id == session_id && self->priv->srtpenc) {
+  if (self->id == session_id && self->priv->srtpenc &&
+      self->priv->encryption_parameters) {
     return gst_object_ref (self->priv->srtpenc);
   } else {
     return NULL;
@@ -1180,7 +1181,8 @@ _rtpbin_request_decoder (GstElement *rtpbin, guint session_id,
   FsRtpSession *self = FS_RTP_SESSION (user_data);
-  if (self->id == session_id && self->priv->srtpdec)
+  if (self->id == session_id && self->priv->srtpdec &&
+      self->priv->encryption_parameters)
     return gst_object_ref (self->priv->srtpdec);
     return NULL;
Comment 2 David Woodhouse 2018-02-21 21:17:08 UTC
Alternative, if srtpenc/srtpdec should be using application/x-rtp caps when encryption is disabled, then the answer would be more like https://bugzilla.gnome.org/show_bug.cgi?id=793704
Comment 3 GitLab Migration User 2018-08-21 12:16:35 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/farstream/farstream/issues/9.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.