Commit 712ebd2d authored by johan's avatar johan

Enable DTLS-SRTP protection on video stream

parent ebbb835d
......@@ -754,6 +754,9 @@ MS2_PUBLIC void video_stream_send_only_stop(VideoStream *vs);
/* enable ZRTP on the video stream using information from the audio stream */
MS2_PUBLIC void video_stream_enable_zrtp(VideoStream *vstream, AudioStream *astream, MSZrtpParams *param);
/* enable DTLS on the video stream */
MS2_PUBLIC void video_stream_enable_dtls(VideoStream *stream, MSDtlsSrtpParams *params);
/* enable SRTP on the video stream */
static MS2_INLINE bool_t video_stream_enable_strp(VideoStream* stream, MSCryptoSuite suite, const char* snd_key, const char* rcv_key) {
return media_stream_enable_srtp(&stream->ms, suite, snd_key, rcv_key);
......
......@@ -1361,7 +1361,6 @@ bool_t audio_stream_zrtp_enabled(const AudioStream *stream) {
void audio_stream_enable_dtls(AudioStream *stream, MSDtlsSrtpParams *params){
#ifdef HAVE_DTLS
if (stream->ms.sessions.dtls_context==NULL) {
//stream->ms.sessions.dtls_context=ms_dtls_srtp_context_new((MediaStream *)stream, stream->ms.sessions.rtp_session, params);
stream->ms.sessions.dtls_context=ms_dtls_srtp_context_new((MediaStream *)stream, params);
}
#endif
......
......@@ -1261,6 +1261,12 @@ void video_stream_enable_zrtp(VideoStream *vstream, AudioStream *astream, MSZrtp
ms_zrtp_reset_transmition_timer(vstream->ms.sessions.zrtp_context,vstream->ms.sessions.rtp_session);
}
void video_stream_enable_dtls(VideoStream *stream, MSDtlsSrtpParams *params){
if (stream->ms.sessions.dtls_context==NULL) {
stream->ms.sessions.dtls_context=ms_dtls_srtp_context_new((MediaStream *)stream, params);
}
}
void video_stream_enable_display_filter_auto_rotate(VideoStream* stream, bool_t enable) {
stream->display_filter_auto_rotate_enabled = enable;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment