DTLS usage example

Hi, Could you provide a pipeline examples which should include DTLS encoding and decoding. The goal is that in the traffic capture (wireshark or tshark) that DTLS encryption should appear. Other parts of the pipeline aren’t important.

There’s a README with an example Python application next to the plugin. Apart from that, the usage inside webrtcbin would be the best example how to use the plugin.

Is there any example to use it within webrtcbin element?

It’s always used in webrtcbin, or what do you mean?

I mean if we have relevant examples of webrtcbin transmission and receiving client?

Any of these places have relevant webrtc examples/tests:

1 Like

There are also the tests of the DTLS plugin that could be helpful here.

1 Like

While converting the DTLS example python code into C somehow it is generating SIGSEGV error during parsing of the element.
OS - Debian 11, 12
Gst - 1.18.0, 1.22.0
Code: #include <gst/gst.h>#include <glib.h>#include <stdio.h>GMainLoop *loop; - Pastebin.com
GDB stacktrace: 58 pipeline = gst_parse_launch(tx_pipeline_desc, &error);(gdb) nProgra - Pastebin.com
Are these dtls elements compatible to C at all?

webrtcbin is using them from C, so yes.

The crash is because of dtlssrtpenc: Don't crash if no pad name is provided when requesting a new pad (!6984) · Merge requests · GStreamer / gstreamer · GitLab.

You at least have to do something like

-        "rtpopuspay pt=103 ! "
-        "dtlssrtpenc connection-id=%s is-client=%d ! "
+        "rtpopuspay pt=103 ! dtlssrtpenc.rtp_sink_0 "
+        "dtlssrtpenc name=dtlssrtpenc connection-id=%s is-client=%d ! "

It then still crashes but that looks like a memory problem somewhere else in your code.