summaryrefslogtreecommitdiffstats
path: root/player/lua/stats.lua
Commit message (Collapse)AuthorAgeFilesLines
* stats: put vsync ratio and jitter on the same lineJulian2017-10-091-15/+10
| | | | Free some vertical space. Hope this doesn't hurt visibility.
* stats: declare function as localJulian2017-10-091-1/+1
| | | | Apparently forgot this one
* stats: use container-fps together with fps (as fallback)Julian2017-10-091-1/+3
| | | | | This was already done for the actual stats a few months ago. Now it is also used by the perfdata coloring code.
* stats: rename option timing_total to print_perfdata_totalJulian2017-10-091-2/+2
| | | | | Should make its purpose more clear. Also add a comment to further explain its use.
* stats: add vsync-ratio and vsync-jitterJulian2017-10-091-69/+138
| | | | | | | | | | | | | | | | | | | Both come with graphs enabled by default. They can be disabled using the options plot_vsync_ratio and plot_vsync_jitter (see the readme regarding customization). In case both graphs are deactivated the ratio and jitter properties will be printed on the same line to save some space. One more user-visible/noticeable change: the maximum used to scale the values for each graph is no longer calculated each time the stats are shown but instead when collecting the data. This means the maximum can actually be higher than all values currently present in a graph's data buffer. This makes it easier to judge a graph's values, especially since as we have no axis labels. To prevent high values staying max forever graph data buffers are cleared when toggling (can be disabled). It was never useful to keep old data and simply append newer data (with a time skip) anyway.
* stats: add some documentation for generate_graph()Julian2017-10-091-1/+10
|
* stats: access less variables outside function's stateJulian2017-10-091-12/+10
|
* stats: add new container-fps that deprecates fpsRicardo Constantino (:RiCON)2017-10-091-1/+2
|
* stats: remove hwdec-active propertyRicardo Constantino (:RiCON)2017-10-091-7/+2
|
* stats: fix bug introduced in earlier commitJulian2017-10-091-5/+4
| | | | | Commit 76387aba26574d0d96af688cf11d10bd165171f7 broke the script in case of timing_total=true.
* stats: fix comment typoJulian2017-10-091-7/+7
|
* stats: disable coloring peak performance dataJulian2017-10-091-1/+2
| | | | | The peak value is probably not very well suited to draw many conclusions from it.
* stats: change coloring of performance dataJulian2017-10-091-7/+8
| | | | | Previously it used display-fps to determine coloration even when display-sync was not even used.
* stats: save ASS sequences locallyJulian2017-10-091-3/+10
| | | | | Instead of querying them constantly. Also add a tiny bit of documentation to some variables.
* stats: only print graphs when ASS tags are goodJulian2017-10-091-1/+1
|
* stats: clearify a few descriptions/labelsJulian2017-10-091-3/+3
|
* stats: don't show video/audio-speed-correction when 0Julian2017-10-091-1/+1
| | | | | | | | This used to be the case, I'm not sure when it changed. The current way of 'hiding' it in case of 0 is not exactly good and relies on the OSD representation. It could be done better by querying the video-sync-active property but that would require querying yet one more thing...
* stats: add HDR signal peak informationNiklas Haas2017-10-091-5/+15
| | | | | | | | Added to mpv in commit a14f9249. Simply shown after the gamma curve if available, since it's semantically attached to it. Also regroup some of the colorimetry options to make this fit (and for them to make more sense)
* stats: add sum of timing valuesJulian2017-10-091-7/+13
| | | | | | | Display an additional line with the sum of all three timing values. Disabled by default. I didn't see the necessity to also create a graph for this line
* stats: put colormatrix, primaries and gamma togetherJulian2017-10-091-3/+4
| | | | Saves a bit of space.
* stats: change highlighting of performance dataJulian2017-10-091-4/+11
| | | | | | | Add a yellow highlight to the existing red highlight. Red is still used once the available time is exhausted, yellow is supposed to be a warning when the headroom is getting small. The threshold is configurable.
* stats: declare functions as localJulian2017-10-091-197/+200
| | | | | Because why not. Simply reorder functions instead of forward declaring stuff.
* stats: align graphsJulian2017-10-091-44/+63
| | | | | | | | | Graphs are now aligned. This required a change in the layout of performance data. Reason is a wrong (but intended) calculation of vector drawing sizes in libass to maintain compatibility. This essentially prevents text following the graph. To achieve alignment only monospaced text can precede the graph. This led to the layout changing slightly when graphs are shown.
* stats: change the way the output is builtJulian2017-10-091-85/+65
| | | | | | | | Instead of creating new strings with the content of the previous one followed by some new content we now write all content into tables that are concatenated in the end. This is unlikely to improve performance but at least it will cut down on all these temporary, growing strings polluting memory.
* stats: rewrite parts of performance dataJulian2017-10-091-64/+110
| | | | | | | | Major changes: - graphs are only drawn when in toggled mode - performance data is retrieved every ith frame (default: 5) - highlighting of performance data (numbers): add a highlight when the summed numbers (last/avg/peak) exceed 1/display-fps
* stats: add performance dataJulian2017-10-091-9/+103
| | | | | | | | Display various performance data about frames and their display/rendering. Additionally plot graphs for this data. This is experimental and pretty much just a test at this point and by far not final.
* stats: update stats when file changesJulian2017-10-091-1/+7
| | | | | | | Only in toggled mode and actually only when the video output is reconfigured. This should cover the relevant cases. Fixes #22
* stats: small spelling correctionJulian2017-10-091-1/+1
|
* stats: use redraw_delay for timer periodJulian2017-10-091-2/+2
| | | | | | Previously the delay was slightly shortened but a user explicitly setting a specific delay most likely expects the stats to refresh in exactly the frequency he desired.
* stats: always print title if different from filenameRicardo Constantino (:RiCON)2017-10-091-1/+3
|
* stats: make a warning more visibleJulian2017-10-091-1/+3
| | | | Print it to console and especially OSD upon each invocation
* stats: rename some functionsJulian2017-10-091-6/+6
| | | | More useful names
* stats: add toggling of statsJulian2017-10-091-4/+29
| | | | | | | | | | | | You can now either show the stats once or toggle their display. Both are using different key bindings which are additionally configurable now. Please bear in mind that "toggling" means "redraw every x seconds for x seconds". Therefore, this approach is prone to problems especially when something else is printing text to the OSD as well as every of these calls will overwrite each other. This is currently a limitation of mpv. Fixes #18
* stats: add hwdec-currentRicardo Constantino (:RiCON)2017-10-091-1/+6
| | | | | Fallback to hwdec-active if not available. This one will be removed in mpv 0.19.0.
* stats: add cache-speedRicardo Constantino (:RiCON)2017-10-091-2/+3
|
* stats: decrease default font sizeJulian2017-10-091-1/+1
| | | | It's getting a bit cramped
* stats: add video-params/gamma propertyNiklas Haas2017-10-091-0/+1
|
* stats: update frame drop diagnosticsKevin Mitchell2017-10-091-1/+2
|
* stats: add display fpsKevin Mitchell2017-10-091-0/+7
|
* stats: rename some variables for consistencyJulian2017-10-091-9/+9
|
* stats: add support for video-sync=displayNiklas Haas2017-10-091-0/+5
|
* stats: fix line wrappingJulian2017-10-091-2/+2
| | | | | These spaces were not displayed on screen, however they were taken into account for line wrapping.
* stats: remove dead link from commentJulian2017-10-091-1/+0
|
* stats: print bold text in terminalsRostislav Pehlivanov2017-10-091-4/+16
| | | | | | | | | | This simply prints ASCII codes to display any text marked as bold in the terminal. Supported by every sane terminal since 1986. For those insane, there's a check. The check has been copied from the ansicolors.lua script floating around and it checks if the directory path uses "\" instead of "/", and in case it does, it checks whether ANSICON env variable has been set (which is used to indicate the Windows terminal supports ACII escape sequences).
* stats: minor simplificationJulian2017-10-091-4/+8
|
* stats: remove countless hardcoded stringsJulian2017-10-091-30/+33
| | | | feels a bit better that way
* stats: document append_property return valueJulian2017-10-091-2/+3
|
* stats: fix oversightJulian2017-10-091-1/+1
| | | | this one slipped through my "tests"
* stats: unify redundant functionsJulian2017-10-091-53/+58
| | | | | | | | | Unify both append_property* functions and greatly refactor them. Instead of thousands of arguments we now use a table. While this is in theory cleaner it does not exactly look like it. However, it's way more flexible and extendable this way. Also, since the new append_property() might look a bit confusing I felt the need to add a comment.
* stats: proper usage of imported moduleJulian2017-10-091-13/+13
| | | | and comment nitpicking
* stats: add debug optionJulian2017-10-091-0/+7
| | | | print a warning for properties without value
* stats: reflect latest changes to mpvJulian2017-10-091-2/+2
| | | | | | Some properties were renamed recently. Of course this requires a recent mpv built (> https://github.com/mpv-player/mpv/commit/f9507f) now.
* stats: don't add superfluous EOL charactersJulian2017-10-091-9/+12
| | | | | Previously we unnecessarily added newline characters at the end. Only noticeable when printed on terminal, though.
* stats: make non-ASS styling configurableJulian2017-10-091-44/+56
| | | | | Also add a few convenience functions and remove the unused italic and underlined formatting functions.
* stats: make the OSD usable in audio-only modeRostislav Pehlivanov2017-10-091-4/+32
| | | | | | | | | | | | Previously, the script would throw garbage (ASS tags) at the terminal when the bound key was pressed. This changes the behaviour to _not_ print any ASS tags (and replace those which can be interpreted by the terminal) if there's no video. I cleaned the patch up since you mentioned you were busy. As I said before, there is absolutely no problem with calling mpv to display strings to the OSD without any video. They'll just go straight to the terminal just as they would with an active VO.
* stats: avoid clashing with similar named scriptsJulian2017-10-091-1/+1
|
* stats: initial commitJulian2017-10-091-0/+189