diff options
author | Martin Storsjö | 2012-10-20 23:18:01 +0300 |
---|---|---|
committer | Martin Storsjö | 2013-01-15 11:54:40 +0200 |
commit | 424da308302bef604844d3110a39f2f03bf5358e (patch) | |
tree | 701e11c88de13eaf50c51242886ace686de18342 /libavformat/rtpdec.h | |
parent | ab2ad8bd56882c0ea160b154e8b836eb71abc49d (diff) |
rtsp: Support decryption of SRTP signalled via RFC 4568 (SDES)
This only takes care of decrypting incoming packets; the outgoing
RTCP packets are not encrypted. This is enough for some use cases,
and signalling crypto keys for use with outgoing RTCP packets
doesn't fit as simply into the API. If the SDP demuxer is hooked
up with custom IO, the return packets can be encrypted e.g. via the
SRTP protocol.
If the SRTP keys aren't available within the SDP, the decryption
can be handled externally as well (when using custom IO).
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpdec.h')
-rw-r--r-- | libavformat/rtpdec.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/rtpdec.h b/libavformat/rtpdec.h index b34e099b32..eaef993d09 100644 --- a/libavformat/rtpdec.h +++ b/libavformat/rtpdec.h @@ -27,6 +27,7 @@ #include "avformat.h" #include "rtp.h" #include "url.h" +#include "srtp.h" typedef struct PayloadContext PayloadContext; typedef struct RTPDynamicProtocolHandler RTPDynamicProtocolHandler; @@ -43,6 +44,8 @@ RTPDemuxContext *ff_rtp_parse_open(AVFormatContext *s1, AVStream *st, int payload_type, int queue_size); void ff_rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx, RTPDynamicProtocolHandler *handler); +void ff_rtp_parse_set_crypto(RTPDemuxContext *s, const char *suite, + const char *params); int ff_rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt, uint8_t **buf, int len); void ff_rtp_parse_close(RTPDemuxContext *s); @@ -163,6 +166,9 @@ struct RTPDemuxContext { /* used to send back RTCP RR */ char hostname[256]; + int srtp_enabled; + struct SRTPContext srtp; + /** Statistics for this stream (used by RTCP receiver reports) */ RTPStatistics statistics; |