aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJiri Novak <j.novak@netsystem.cz>2016-12-12 20:57:40 +0100
committerAnders Broman <a.broman58@gmail.com>2016-12-14 05:32:17 +0000
commite6dcb061b57f081e4803b804f221d328914eee56 (patch)
treeea42d3e2bb647e5d5c2eae70203a550c129de4df /ui
parentb1ed5284a3166d0dc169c3f9ae5cf9da14b37fea (diff)
RTP Stream Analysis dialog: dialog shows when forward/reverse stream starts
Dialog shows time (relative to capture start) and packet number when forward and reverse stream starts. It shows difference in such values on bottom of dialog too. Bug: 13239 Change-Id: If807b8a56723df17ed131b1aac053cf8f985bb7b Reviewed-on: https://code.wireshark.org/review/19239 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/rtp_analysis_dialog.cpp14
-rw-r--r--ui/tap-rtp-analysis.h1
-rw-r--r--ui/tap-rtp-common.c1
3 files changed, 15 insertions, 1 deletions
diff --git a/ui/qt/rtp_analysis_dialog.cpp b/ui/qt/rtp_analysis_dialog.cpp
index 8263a4401c..2bac1f183e 100644
--- a/ui/qt/rtp_analysis_dialog.cpp
+++ b/ui/qt/rtp_analysis_dialog.cpp
@@ -928,6 +928,9 @@ void RtpAnalysisDialog::updateStatistics()
.arg(f_lost).arg(f_perc, 0, 'f', 2);
stats_tables += QString("<tr><th align=\"left\">Seq Errs</th><td>%1</td></tr>")
.arg(fwd_statinfo_.sequence);
+ stats_tables += QString("<tr><th align=\"left\">Start at</th><td>%1 s @ %2</td></tr>")
+ .arg(fwd_statinfo_.start_time / 1000.0, 0, 'f', 6)
+ .arg(fwd_statinfo_.first_packet_num);
stats_tables += QString("<tr><th align=\"left\">Duration</th><td>%1 s</td></tr>")
.arg(f_duration / 1000.0, 0, 'f', 2);
stats_tables += QString("<tr><th align=\"left\">Clock Drift</th><td>%1 ms</td></tr>")
@@ -957,13 +960,22 @@ void RtpAnalysisDialog::updateStatistics()
.arg(r_lost).arg(r_perc, 0, 'f', 2);
stats_tables += QString("<tr><th align=\"left\">Seq Errs</th><td>%1</td></tr>")
.arg(rev_statinfo_.sequence);
+ stats_tables += QString("<tr><th align=\"left\">Start at</th><td>%1 s @ %2</td></tr>")
+ .arg(rev_statinfo_.start_time / 1000.0, 0, 'f', 6)
+ .arg(rev_statinfo_.first_packet_num);
stats_tables += QString("<tr><th align=\"left\">Duration</th><td>%1 s</td></tr>")
.arg(r_duration / 1000.0, 0, 'f', 2);
stats_tables += QString("<tr><th align=\"left\">Clock Drift</th><td>%1 ms</td></tr>")
.arg(r_duration * (r_clock_drift - 1.0), 0, 'f', 0);
stats_tables += QString("<tr><th align=\"left\">Freq Drift</th><td>%1 Hz (%2 %)</td></tr>") // XXX Terminology?
.arg(r_clock_drift * r_clock_rate, 0, 'f', 0).arg(100.0 * (r_clock_drift - 1.0), 0, 'f', 2);
- stats_tables += "</table></p></body></html>\n";
+ stats_tables += "</table></p>";
+ if (rev_statinfo_.total_nr) {
+ stats_tables += QString("<h4>Forward to reverse<br/>start diff %1 s @ %2</h4>")
+ .arg((rev_statinfo_.start_time - fwd_statinfo_.start_time) / 1000.0, 0, 'f', 6)
+ .arg((gint64)rev_statinfo_.first_packet_num - (gint64)fwd_statinfo_.first_packet_num);
+ }
+ stats_tables += "</body></html>\n";
ui->statisticsLabel->setText(stats_tables);
diff --git a/ui/tap-rtp-analysis.h b/ui/tap-rtp-analysis.h
index 569d5dfd31..af41ff1291 100644
--- a/ui/tap-rtp-analysis.h
+++ b/ui/tap-rtp-analysis.h
@@ -106,6 +106,7 @@ typedef struct _tap_rtp_stat_t {
gint cycles;
guint16 pt;
int reg_pt;
+ guint32 first_packet_num;
} tap_rtp_stat_t;
#define PT_UNDEFINED -1
diff --git a/ui/tap-rtp-common.c b/ui/tap-rtp-common.c
index 375ee07b39..75da3edf47 100644
--- a/ui/tap-rtp-common.c
+++ b/ui/tap-rtp-common.c
@@ -469,6 +469,7 @@ rtp_packet_analyse(tap_rtp_stat_t *statinfo,
if (rtpinfo->info_marker_set) {
statinfo->flags |= STAT_FLAG_MARKER;
}
+ statinfo->first_packet_num = pinfo->num;
statinfo->first_packet = FALSE;
return;
}