Commit 67586605 authored by Guillaume Beraudo's avatar Guillaume Beraudo
Browse files

Use ortp event queues in streams for ZRTP ev bubbling.

parent 90912505
......@@ -199,7 +199,13 @@ 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);
}
ortp_event_destroy(ev);
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);
}
}
}
}
......
......@@ -179,11 +179,17 @@ void video_stream_iterate(VideoStream *stream){
if (stream->evq){
OrtpEvent *ev=ortp_ev_queue_get(stream->evq);
if (ev!=NULL){
if (ortp_event_get_type(ev)==ORTP_EVENT_RTCP_PACKET_RECEIVED){
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);
}
ortp_event_destroy(ev);
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);
}
}
}
}
......
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