mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 14:40:56 +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) {
|
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],
|
offset += sprintf(&output[offset],
|
||||||
"Frames dropped by your network connection: %.2f%%\n"
|
"Frames dropped by your network connection: %.2f%%\n"
|
||||||
"Frames dropped due to network jitter: %.2f%%\n"
|
"Frames dropped due to network jitter: %.2f%%\n"
|
||||||
|
"Average network latency: %s\n"
|
||||||
"Average receive time: %.2f ms\n"
|
"Average receive time: %.2f ms\n"
|
||||||
"Average decoding time: %.2f ms\n"
|
"Average decoding time: %.2f ms\n"
|
||||||
"Average frame queue delay: %.2f ms\n"
|
"Average frame queue delay: %.2f ms\n"
|
||||||
"Average rendering time (including monitor V-sync latency): %.2f ms\n",
|
"Average rendering time (including monitor V-sync latency): %.2f ms\n",
|
||||||
(float)stats.networkDroppedFrames / stats.totalFrames * 100,
|
(float)stats.networkDroppedFrames / stats.totalFrames * 100,
|
||||||
(float)stats.pacerDroppedFrames / stats.decodedFrames * 100,
|
(float)stats.pacerDroppedFrames / stats.decodedFrames * 100,
|
||||||
|
rttString,
|
||||||
(float)stats.totalReassemblyTime / stats.receivedFrames,
|
(float)stats.totalReassemblyTime / stats.receivedFrames,
|
||||||
(float)stats.totalDecodeTime / stats.decodedFrames,
|
(float)stats.totalDecodeTime / stats.decodedFrames,
|
||||||
(float)stats.totalPacerTime / stats.renderedFrames,
|
(float)stats.totalPacerTime / stats.renderedFrames,
|
||||||
|
|||||||
Submodule moonlight-common-c/moonlight-common-c updated: ccaca624f3...edf1838708
Reference in New Issue
Block a user