mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-22 16:08:45 +00:00
Add network latency to stats overlay
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user