diff --git a/app/streaming/video/ffmpeg.cpp b/app/streaming/video/ffmpeg.cpp index ec22e8ed..ea69b5c2 100644 --- a/app/streaming/video/ffmpeg.cpp +++ b/app/streaming/video/ffmpeg.cpp @@ -835,20 +835,29 @@ void FFmpegVideoDecoder::stringifyVideoStats(VIDEO_STATS& stats, char* output, i if (stats.receivedFps > 0) { if (m_VideoDecoderCtx != nullptr) { +#ifdef DISPLAY_BITRATE double avgVideoMbps = m_BwTracker.GetAverageMbps(); double peakVideoMbps = m_BwTracker.GetPeakMbps(); +#endif ret = snprintf(&output[offset], length - offset, "Video stream: %dx%d %.2f FPS (Codec: %s)\n" - "Bitrate: %.1f Mbps, Peak (%us): %.1f\n", +#ifdef DISPLAY_BITRATE + "Bitrate: %.1f Mbps, Peak (%us): %.1f\n" +#endif + , m_VideoDecoderCtx->width, m_VideoDecoderCtx->height, stats.totalFps, - codecString, + codecString +#ifdef DISPLAY_BITRATE + , avgVideoMbps, m_BwTracker.GetWindowSeconds(), - peakVideoMbps); + peakVideoMbps +#endif + ); if (ret < 0 || ret >= length - offset) { SDL_assert(false); return;