From 12eb5d6912409cd2ad48985592192ab1c66d8d6d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Fri, 17 Jun 2016 12:16:32 -0700 Subject: [PATCH] rtspsrc: make all srtp encoder properties explicit The Session Data Protocol doesn't allow specifying a cipher for the SRTCP, so it will use the SRTP one. In the "srtpenc" element the cipher "aes-128-icm" is the default for SRTP and SRTCP, but if we want to have an SRTCP with the "aes-256-icm" cipher then we also need to set the SRTP cipher to "aes-256-icm", otherwise "aes-128-icm" will be used instead. https://bugzilla.gnome.org/show_bug.cgi?id=767799 --- gst/rtsp/gstrtspsrc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index e671b0f..3addf7a 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -2843,6 +2843,10 @@ request_rtcp_encoder (GstElement * rtpbin, guint session, gst_value_deserialize (&rtcp_auth, str); gst_structure_get (s, "srtp-key", GST_TYPE_BUFFER, &buf, NULL); + g_object_set_property (G_OBJECT (stream->srtpenc), "rtp-cipher", + &rtcp_cipher); + g_object_set_property (G_OBJECT (stream->srtpenc), "rtp-auth", + &rtcp_auth); g_object_set_property (G_OBJECT (stream->srtpenc), "rtcp-cipher", &rtcp_cipher); g_object_set_property (G_OBJECT (stream->srtpenc), "rtcp-auth", @@ -5971,8 +5975,10 @@ default_srtcp_params (void) buf = gst_buffer_new_wrapped (key_data, KEY_SIZE); - caps = gst_caps_new_simple ("application/x-srtp", + caps = gst_caps_new_simple ("application/x-srtcp", "srtp-key", GST_TYPE_BUFFER, buf, + "srtp-cipher", G_TYPE_STRING, "aes-128-icm", + "srtp-auth", G_TYPE_STRING, "hmac-sha1-80", "srtcp-cipher", G_TYPE_STRING, "aes-128-icm", "srtcp-auth", G_TYPE_STRING, "hmac-sha1-80", NULL); -- 2.7.4