Sfoglia il codice sorgente

Put display FPS on debug overlay

It prints two numbers; one detected by PMP, and the one we told to
libmpv. Unless there's some sort of bug, unless something broke. (This
is a debug overlay, so we want to know about such cases.)

On RPI, libmpv also does its own FPS detection.
Vincent Lang 9 anni fa
parent
commit
6b105231ab
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      src/player/PlayerComponent.cpp

+ 3 - 0
src/player/PlayerComponent.cpp

@@ -806,6 +806,9 @@ QString PlayerComponent::videoInformation() const
   info << "Aspect: " << MPV_PROPERTY("video-aspect") << endl;
   info << "Bitrate: " << MPV_PROPERTY("video-bitrate") << endl;
   info << "Display Sync: " << MPV_PROPERTY("display-sync-active") << endl;
+  double display_fps = DisplayComponent::Get().currentRefreshRate();
+  info << "Display FPS: " << MPV_PROPERTY("display-fps")
+                          << " (" << display_fps << ")" << endl;
   info << "Hardware Decoding: " << MPV_PROPERTY("hwdec-active")
                                 << " (" << MPV_PROPERTY("hwdec-detected") << ")" << endl;
   info << endl;