Add network latency to stats overlay
This commit is contained in:
parent
54bd427f26
commit
581c9438ca
2 changed files with 13 additions and 1 deletions
|
|
@ -482,15 +482,27 @@ void FFmpegVideoDecoder::stringifyVideoStats(VIDEO_STATS& stats, char* output)
|
|||
}
|
||||
|
||||
if (stats.renderedFrames != 0) {
|
||||
uint32_t rtt, variance;
|
||||
char rttString[32];
|
||||
|
||||
if (LiGetEstimatedRttInfo(&rtt, &variance)) {
|
||||
sprintf(rttString, "%u ms (variance: %u ms)", rtt, variance);
|
||||
}
|
||||
else {
|
||||
sprintf(rttString, "N/A");
|
||||
}
|
||||
|
||||
offset += sprintf(&output[offset],
|
||||
"Frames dropped by your network connection: %.2f%%\n"
|
||||
"Frames dropped due to network jitter: %.2f%%\n"
|
||||
"Average network latency: %s\n"
|
||||
"Average receive time: %.2f ms\n"
|
||||
"Average decoding time: %.2f ms\n"
|
||||
"Average frame queue delay: %.2f ms\n"
|
||||
"Average rendering time (including monitor V-sync latency): %.2f ms\n",
|
||||
(float)stats.networkDroppedFrames / stats.totalFrames * 100,
|
||||
(float)stats.pacerDroppedFrames / stats.decodedFrames * 100,
|
||||
rttString,
|
||||
(float)stats.totalReassemblyTime / stats.receivedFrames,
|
||||
(float)stats.totalDecodeTime / stats.decodedFrames,
|
||||
(float)stats.totalPacerTime / stats.renderedFrames,
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit ccaca624f37e9d00ceae7eee1596b40af92bdc4c
|
||||
Subproject commit edf183870897ce9e74a83595ccef238f2c03e5b8
|
||||
Loading…
Add table
Add a link
Reference in a new issue