Is there a clean migration path from RTP to SRTP?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there a clean migration path from RTP to SRTP?

Andres Gonzalez
Hi,
I have several RTP video/audio GStreamer feeds working nicely.  Thank you GStreamer team!!!

I now want to add support for SRTP streams. The pipeline is somewhat complex, but the section of concern is simply:

  x264enc -> rtph264pay -> rtpbin

Question: since SRTP is essentially a profile and only appends the credentials to the payload, I am assuming all that is necessary is to add the srtpenc element to the pipeline.  Is this correct?

Question: assuming correct, is the additional srtpenc element inserted between the x264enc -> rtph264pay elements or between the rtph264pay -> rtpbin elements?

Question: SRTP modifies RTCP format, so how is that taken care of?  

Any other tips, cautions, warnings, etc, about migrating to SRTP??

Thanks,
-Andres
Reply | Threaded
Open this post in threaded view
|

Re: Is there a clean migration path from RTP to SRTP?

Sebastian Dröge-3
On Mo, 2016-06-27 at 15:25 -0700, Andres Gonzalez wrote:

> Hi,
> I have several RTP video/audio GStreamer feeds working nicely.  Thank you
> GStreamer team!!!
>
> I now want to add support for SRTP streams. The pipeline is somewhat
> complex, but the section of concern is simply:
>
>   x264enc -> rtph264pay -> rtpbin
>
> Question: since SRTP is essentially a profile and only appends the
> credentials to the payload, I am assuming all that is necessary is to add
> the srtpenc element to the pipeline.  Is this correct?
See the request-rtp-encoder / decoder signals on rtpbin and the same
for rtcp. That's where you would want to hook in for SRTP instead of
putting the elements manually into the pipeline.

See for example rtspsrc's and gst-rtsp-server's usage of these signals.

> Question: assuming correct, is the additional srtpenc element inserted
> between the x264enc -> rtph264pay elements or between the rtph264pay ->
> rtpbin elements?
>
> Question: SRTP modifies RTCP format, so how is that taken care of?  

What do you mean with that? But using the signals above takes care of
anything so that RTCP is also encrypted/decrypted as needed.

--

Sebastian Dröge, Centricular Ltd · http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Is there a clean migration path from RTP to SRTP?

Andres Gonzalez
Thank you Sebastian for your response. I was going down the wrong rabbit hole so that helps.

I have looked at the rtsp-server code and I can see its use of the request-rtp-encoder/decoder signals for connecting the srtp GstElement to a pipeline.  However, I do not understand that code base well enough to understand how to actually use srtpenc and srtpdec in my own existing GStreamer rtp pipelines.

It appears that using srtpenc/srtpdec elements is very different from other GStreamer elements which follow a pattern of linking various processing elements together in a serial pipeline. Since they are not manually linked in the pipeline like other elements, I am at a loss as to how to migrate my RTP pipelines to use SRTP.

Question: Is there any example code available on how to specifically use the srtpenc and srtpdec elements?

Thanks,
-Andres
Reply | Threaded
Open this post in threaded view
|

Re: Is there a clean migration path from RTP to SRTP?

Sebastian Dröge-3
On Di, 2016-07-26 at 15:47 -0700, Andres Gonzalez wrote:

> Thank you Sebastian for your response. I was going down the wrong rabbit hole
> so that helps.
>
> I have looked at the rtsp-server code and I can see its use of the
> request-rtp-encoder/decoder signals for connecting the srtp GstElement to a
> pipeline.  However, I do not understand that code base well enough to
> understand how to actually use srtpenc and srtpdec in my own existing
> GStreamer rtp pipelines.
>
> It appears that using srtpenc/srtpdec elements is very different from other
> GStreamer elements which follow a pattern of linking various processing
> elements together in a serial pipeline. Since they are not manually linked
> in the pipeline like other elements, I am at a loss as to how to migrate my
> RTP pipelines to use SRTP.
>
> Question: Is there any example code available on how to specifically use the
> srtpenc and srtpdec elements?
I'm not aware of any, sorry. But the basic idea is that instead of
linking them in the pipeline yourself, you just provide them to rtpbin
via those signals when needed and it will link it at the appropriate
places.

Apart from that the element usage is exactly the same, you set the
properties and connect to the signals as usual.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment