Commit febbdd41 authored by Guillaume Beraudo's avatar Guillaume Beraudo

Move ZRTP flags from mediastreamer to application level.

parent 97b4a85b
......@@ -74,9 +74,6 @@ struct _AudioStream
bool_t use_rc;
bool_t is_beginning;
OrtpZrtpContext *ortpZrtpContext;
char *auth_token;
bool_t auth_token_verified;
bool_t encrypted;
};
#ifdef __cplusplus
......@@ -233,7 +230,6 @@ struct _VideoStream
bool_t use_preview_window;
bool_t adapt_bitrate;
OrtpZrtpContext *ortpZrtpContext;
bool_t encrypted;
};
typedef struct _VideoStream VideoStream;
......
......@@ -199,13 +199,7 @@ void audio_stream_iterate(AudioStream *stream){
/*we choose to update the quality indicator when the oRTP stack decides to emit a RTCP report */
ms_quality_indicator_update_local(stream->qi);
}
if (evt == ORTP_EVENT_ZRTP_ENCRYPTION_CHANGED || evt == ORTP_EVENT_ZRTP_SAS_READY) {
// Keep the event in the queue
ortp_ev_queue_put(stream->evq, ev);
} else {
ortp_event_destroy(ev);
}
ortp_event_destroy(ev);
}
}
}
......
......@@ -177,19 +177,14 @@ void video_stream_iterate(VideoStream *stream){
MS_VIDEO_OUT_HANDLE_RESIZING);
*/
if (stream->evq){
OrtpEvent *ev=ortp_ev_queue_get(stream->evq);
if (ev!=NULL){
OrtpEvent *ev;
while (NULL != (ev=ortp_ev_queue_get(stream->evq))) {
OrtpEventType evt=ortp_event_get_type(ev);
if (evt == ORTP_EVENT_RTCP_PACKET_RECEIVED){
OrtpEventData *evd=ortp_event_get_data(ev);
video_steam_process_rtcp(stream,evd->packet);
}
if (evt == ORTP_EVENT_ZRTP_ENCRYPTION_CHANGED || evt == ORTP_EVENT_ZRTP_SAS_READY) {
// Keep the event in the queue
ortp_ev_queue_put(stream->evq, ev);
} else {
ortp_event_destroy(ev);
}
ortp_event_destroy(ev);
}
}
}
......@@ -674,8 +669,7 @@ void video_stream_send_only_stop(VideoStream *vs){
/* enable ZRTP on the video stream using information from the audio stream */
void video_stream_enable_zrtp(VideoStream *vstream, AudioStream *astream, OrtpZrtpParams *param){
if (astream->ortpZrtpContext != NULL) {
ms_warning("ZRTP for video stream is disabled");
// vstream->ortpZrtpContext=ortp_zrtp_multistream_new(astream->ortpZrtpContext, vstream->session, param);
vstream->ortpZrtpContext=ortp_zrtp_multistream_new(astream->ortpZrtpContext, vstream->session, param);
}
}
......@@ -403,10 +403,8 @@ static void run_media_streams(int localport, const char *remote_ip, int remotepo
if (zrtp_id != NULL) {
OrtpZrtpParams params;
OrtpZrtpUiCb cbs={0};
params.zid=zrtp_id;
params.zid_file=zrtp_secrets;
params.ui_cbs=&cbs;
audio_stream_enable_zrtp(audio,&params);
}
......
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