From 9dba2a52db2adb42e7c1a292625bd0114ce81969 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 17 Apr 2014 21:47:00 +0200 Subject: player: add a --dump-stats option This collects statistics and other things. The option dumps raw data into a file. A script to visualize this data is included too. Litter some of the player code with calls that generate these statistics. In general, this will be helpful to debug timing dependent issues, such as A/V sync problems. Normally, one could argue that this is the task of a real profiler, but then we'd have a hard time to include extra information like audio/video PTS differences. We could also just hardcode all statistics collection and processing in the player code, but then we'd end up with something like mplayer's status line, which was cluttered and required a centralized approach (i.e. getting the data to the status line; so it was all in mplayer.c). Some players can visualize such statistics on OSD, but that sounds even more complicated. So the approach added with this commit sounds sensible. The stats-conv.py script is rather primitive at the moment and its output is semi-ugly. It uses matplotlib, so it could probably be extended to do a lot, so it's not a dead-end. --- DOCS/man/en/options.rst | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'DOCS/man') diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index 9e139c0578..d46ba0e959 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -759,6 +759,14 @@ OPTIONS Time in milliseconds to recognize two consecutive button presses as a double-click (default: 300). +``--dump-stats=`` + Write certain statistics to the given file. The file is truncated on + opening. The file will contain raw samples, each with a timestamp. To + make this file into a readable, the script ``TOOLS/stats-conv.py`` can be + used (which currently displays it as a graph). + + This option is useful for debugging only. + ``--dvbin=`` Pass the following parameters to the DVB input module, in order to override the default ones: -- cgit v1.2.3