else {
add_to_list(list, user_data,
pinfo->fd->num, rtpinfo->info_seq_num,
- statinfo->delta*1000,
- statinfo->jitter*1000,
+ statinfo->delta,
+ statinfo->jitter,
statinfo->bandwidth,
status,
rtpinfo->info_marker_set,
r_perc = 0;
}
- g_snprintf(label_max, sizeof(label_max), "Max delta = %f sec at packet no. %u \n"
+ g_snprintf(label_max, sizeof(label_max), "Max delta = %f ms at packet no. %u \n"
"Total RTP packets = %u (expected %u) Lost RTP packets = %d (%.2f%%)"
" Sequence errors = %u",
user_data->forward.statinfo.max_delta, user_data->forward.statinfo.max_nr,
- user_data->forward.statinfo.total_nr,
- f_expected, f_lost, f_perc, user_data->forward.statinfo.sequence);
+ user_data->forward.statinfo.total_nr, f_expected, f_lost, f_perc,
+ user_data->forward.statinfo.sequence);
gtk_label_set_text(GTK_LABEL(user_data->dlg.label_stats_fwd), label_max);
- g_snprintf(label_max, sizeof(label_max), "Max delta = %f sec at packet no. %u \n"
+ g_snprintf(label_max, sizeof(label_max), "Max delta = %f ms at packet no. %u \n"
"Total RTP packets = %u (expected %u) Lost RTP packets = %d (%.2f%%)"
" Sequence errors = %u",
user_data->reversed.statinfo.max_delta, user_data->reversed.statinfo.max_nr,
- user_data->reversed.statinfo.total_nr,
- r_expected, r_lost, r_perc, user_data->reversed.statinfo.sequence);
+ user_data->reversed.statinfo.total_nr, r_expected, r_lost, r_perc,
+ user_data->reversed.statinfo.sequence);
gtk_label_set_text(GTK_LABEL(user_data->dlg.label_stats_rev), label_max);
clock_rate = 1;
}
- /* store the current time and calculate the current jitter */
- current_time = nstime_to_sec(&pinfo->fd->rel_ts);
- current_diff = fabs (current_time - (statinfo->time) - ((double)(rtpinfo->info_timestamp)-(double)(statinfo->timestamp))/clock_rate);
+ /* Store the current time and calculate the current jitter(in ms) */
+ current_time = nstime_to_msec(&pinfo->fd->rel_ts);
+ current_diff = fabs (current_time - (statinfo->time) - ((double)(rtpinfo->info_timestamp)-(double)(statinfo->timestamp))/(clock_rate*1000));
current_jitter = statinfo->jitter + ( current_diff - statinfo->jitter)/16;
statinfo->delta = current_time-(statinfo->time);
statinfo->jitter = current_jitter;
statinfo->bw_history[statinfo->bw_index].bytes = rtpinfo->info_data_len + 28;
statinfo->bw_history[statinfo->bw_index].time = current_time;
/* check if there are more than 1sec in the history buffer to calculate BW in bps. If so, remove those for the calculation */
- while ((statinfo->bw_history[statinfo->bw_start_index].time+1)<current_time){
+ while ((statinfo->bw_history[statinfo->bw_start_index].time+1000/* ms */)<current_time){
statinfo->total_bytes -= statinfo->bw_history[statinfo->bw_start_index].bytes;
statinfo->bw_start_index++;
if (statinfo->bw_start_index == BUFF_BW) statinfo->bw_start_index=0;
payload_type,
strinfo->npackets,
lost, perc,
- strinfo->rtp_stats.max_delta*1000,
- strinfo->rtp_stats.max_jitter*1000,
- strinfo->rtp_stats.mean_jitter*1000,
+ strinfo->rtp_stats.max_delta,
+ strinfo->rtp_stats.max_jitter,
+ strinfo->rtp_stats.mean_jitter,
(strinfo->problem)?"X":"");
list = g_list_next(list);