srtp: Support libsrtp2
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>
Fri, 26 Jan 2018 15:25:33 +0000 (16:25 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 29 Jan 2018 07:58:11 +0000 (09:58 +0200)
commite9aa11720071f8a1d22b336395e66dd8cbca0c00
tree79955955ae69c66817148b6feef8030a570957af
parent49d30c901d5ee7db1082432103cdce2fcbf99267
srtp: Support libsrtp2

For libsrtp 1, add defines that translate the new namespaced identifiers
to the old unnamespaced ones. Also move the code for setting and getting
a stream's ROC into two compat functions that match libsrtp2's API.

It seems that libsrtp2 properly supports changing the ROC without having
to touch the sequence numbers afterwards, given that srtp_set_stream_roc
sets a pending_roc field, so the entire roc_changed dance should not be
needed anymore. The compat functions for libsrtp 1 just contain our
preexisting hacks, however, so it's still needed there.

libsrtp2 has no means of discovering the streams in the session, so to
create the stats structure we need to iterate over our own set of SSRCs.
For this we also need to re-add the previously removed ssrcs_set to the
encoder.

https://bugzilla.gnome.org/show_bug.cgi?id=776901
configure.ac
ext/srtp/Makefile.am
ext/srtp/gstsrtp.c
ext/srtp/gstsrtp.h
ext/srtp/gstsrtpdec.c
ext/srtp/gstsrtpdec.h
ext/srtp/gstsrtpenc.c
ext/srtp/gstsrtpenc.h
ext/srtp/gstsrtpenums.h [new file with mode: 0644]
ext/srtp/meson.build
ext/srtp/srtp_mkenum.py