Commit a4ce736c authored by Simon Morlat's avatar Simon Morlat

printout round trip delay

parent a03bd189
......@@ -576,7 +576,7 @@ if test "$external_ortp" = 'false'; then
fi
fi
if test "$external_ortp" = 'true'; then
PKG_CHECK_MODULES(ORTP, ortp >= 0.9.0, ,
PKG_CHECK_MODULES(ORTP, ortp >= 0.17.0, ,
[ AC_MSG_ERROR([Couldn't find ortp library]) ] )
fi
AC_SUBST(ORTP_CFLAGS)
......
......@@ -133,13 +133,18 @@ static void parse_rtcp(mblk_t *m){
}while(rtcp_next_packet(m));
}
static void parse_events(OrtpEvQueue *q){
static void parse_events(RtpSession *session, OrtpEvQueue *q){
OrtpEvent *ev;
int delay;
while((ev=ortp_ev_queue_get(q))!=NULL){
OrtpEventData *d=ortp_event_get_data(ev);
switch(ortp_event_get_type(ev)){
case ORTP_EVENT_RTCP_PACKET_RECEIVED:
parse_rtcp(d->packet);
delay=rtp_session_get_round_trip_propagation(session);
if (delay!=-1)
ms_message("Round trip propagation estimated to %i ms");
break;
default:
ms_warning("Unhandled ortp event.");
......@@ -468,7 +473,7 @@ static void run_media_streams(int localport, const char *remote_ip, int remotepo
printf("Bandwidth usage: download=%f kbits/sec, upload=%f kbits/sec\n",
rtp_session_compute_recv_bandwidth(session)*1e-3,
rtp_session_compute_send_bandwidth(session)*1e-3);
parse_events(q);
parse_events(session,q);
}
}
#endif // target MAC
......
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