Commit Graph

45541 Commits

Author SHA1 Message Date
Julian 0242165b3c stats: change coloring of performance data
Previously it used display-fps to determine coloration even when
display-sync was not even used.
2017-10-09 20:40:31 +02:00
Julian 9d8495a960 stats: save ASS sequences locally
Instead of querying them constantly.
Also add a tiny bit of documentation to some variables.
2017-10-09 20:40:31 +02:00
Julian 9b439e9453 stats: only print graphs when ASS tags are good 2017-10-09 20:40:31 +02:00
Julian 4ee669e4db stats: clearify a few descriptions/labels 2017-10-09 20:40:31 +02:00
Julian 7dcebb016c stats: don't show video/audio-speed-correction when 0
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...
2017-10-09 20:40:31 +02:00
Niklas Haas aace3e4cde stats: add HDR signal peak information
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)
2017-10-09 20:40:31 +02:00
Julian 90ecf52a45 stats: add sum of timing values
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
2017-10-09 20:40:31 +02:00
Julian 3663a411d3 stats: put colormatrix, primaries and gamma together
Saves a bit of space.
2017-10-09 20:40:31 +02:00
Julian 8bbbab9523 stats: change highlighting of performance data
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.
2017-10-09 20:40:31 +02:00
Julian 485c3549d7 stats: declare functions as local
Because why not.
Simply reorder functions instead of forward declaring stuff.
2017-10-09 20:40:31 +02:00
Julian 5e0d36c515 stats: align graphs
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.
2017-10-09 20:40:31 +02:00
Julian 946d45a421 stats: change the way the output is built
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.
2017-10-09 20:40:31 +02:00
Julian a256d61ef4 stats: rewrite parts of performance data
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
2017-10-09 20:40:31 +02:00
Julian de38bd0f81 stats: add performance data
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.
2017-10-09 20:40:31 +02:00
Julian 2de778f699 stats: update stats when file changes
Only in toggled mode and actually only when the video output is
reconfigured. This should cover the relevant cases.

Fixes #22
2017-10-09 20:40:31 +02:00
Julian fcacf82865 stats: small spelling correction 2017-10-09 20:40:31 +02:00
Julian f8bafd4734 stats: use redraw_delay for timer period
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.
2017-10-09 20:40:31 +02:00
Ricardo Constantino (:RiCON) 8db09be51a stats: always print title if different from filename 2017-10-09 20:40:31 +02:00
Julian c387b1db6f stats: make a warning more visible
Print it to console and especially OSD upon each invocation
2017-10-09 20:40:31 +02:00
Julian a87af63365 stats: rename some functions
More useful names
2017-10-09 20:40:31 +02:00
Julian 2f5ee99509 stats: add toggling of stats
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
2017-10-09 20:40:31 +02:00
Ricardo Constantino (:RiCON) fe5b042b74 stats: add hwdec-current
Fallback to hwdec-active if not available. This one will be removed in
mpv 0.19.0.
2017-10-09 20:40:31 +02:00
Ricardo Constantino (:RiCON) 7c261899cf stats: add cache-speed 2017-10-09 20:40:31 +02:00
Julian 5fb8dc5943 stats: decrease default font size
It's getting a bit cramped
2017-10-09 20:40:31 +02:00
Niklas Haas bee7404efc stats: add video-params/gamma property 2017-10-09 20:40:31 +02:00
Kevin Mitchell 1f41c729bb stats: update frame drop diagnostics 2017-10-09 20:40:31 +02:00
Kevin Mitchell 41246c8a34 stats: add display fps 2017-10-09 20:40:31 +02:00
Julian 1a1e5b87fb stats: rename some variables for consistency 2017-10-09 20:40:31 +02:00
Niklas Haas 47016bf45e stats: add support for video-sync=display 2017-10-09 20:40:31 +02:00
Julian f22361727e stats: fix line wrapping
These spaces were not displayed on screen, however they were taken into
account for line wrapping.
2017-10-09 20:40:31 +02:00
Julian 6402f88de4 stats: remove dead link from comment 2017-10-09 20:40:31 +02:00
Rostislav Pehlivanov 918774b5aa stats: print bold text in terminals
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).
2017-10-09 20:40:31 +02:00
Julian 89c854dc09 stats: minor simplification 2017-10-09 20:40:31 +02:00
Julian 3dbd031da0 stats: remove countless hardcoded strings
feels a bit better that way
2017-10-09 20:40:31 +02:00
Julian 6ed69cb132 stats: document append_property return value 2017-10-09 20:40:31 +02:00
Julian ab8b6e3c16 stats: fix oversight
this one slipped through my "tests"
2017-10-09 20:40:31 +02:00
Julian 95b6bc31b0 stats: unify redundant functions
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.
2017-10-09 20:40:31 +02:00
Julian d88adcfbc7 stats: proper usage of imported module
and comment nitpicking
2017-10-09 20:40:31 +02:00
Julian 0bf4b0d18a stats: add debug option
print a warning for properties without value
2017-10-09 20:40:31 +02:00
Julian f9fe3b264e stats: reflect latest changes to mpv
Some properties were renamed recently.
Of course this requires a recent mpv built (>
https://github.com/mpv-player/mpv/commit/f9507f) now.
2017-10-09 20:40:31 +02:00
Julian a78fce4676 stats: don't add superfluous EOL characters
Previously we unnecessarily added newline characters at the end.
Only noticeable when printed on terminal, though.
2017-10-09 20:40:31 +02:00
Julian 81efbc3921 stats: make non-ASS styling configurable
Also add a few convenience functions and remove the unused italic and
underlined formatting functions.
2017-10-09 20:40:31 +02:00
Rostislav Pehlivanov 9e57927af1 stats: make the OSD usable in audio-only mode
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.
2017-10-09 20:40:31 +02:00
Julian 74e215e9bf stats: avoid clashing with similar named scripts 2017-10-09 20:40:31 +02:00
Julian c2f0557977 stats: initial commit 2017-10-09 20:40:31 +02:00
Oliver Freyermuth 6b05c774a4 dvb: SYS_DVBC_ANNEX_B is now supported if ATSC is activated.
Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
2017-10-09 20:06:29 +02:00
Oliver Freyermuth de0c1dd4f5 dvb: Skip channel if ATSC device does not support cable / terr.
This matches what is done for the other multi-delivery-system
cards.

Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
2017-10-09 20:06:29 +02:00
Oliver Freyermuth add0cbea2a dvb: Implement parsing of modulation for VDR-style channels config.
This is required for ATSC cable / terrestrial support.

Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
2017-10-09 20:06:29 +02:00
Oliver Freyermuth e46338c66a dvb: Fixes for ATSC tuning.
ATSC is a mix of terrestrial and cable,
and depending on modulation is actually using
DVBC_ANNEX_B. Thus, we need to override the delivery
system depending on the modulation, channel by channel.

Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
2017-10-09 20:06:29 +02:00
Oliver Freyermuth 20381a5f5a stream_dvb: Multiply frequency and sample rate by 1000 for VDR.
These values are kept with a different unit in VDR style config
for all delivery systems, not only for DVB-S / DVB-S2.

Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
2017-10-09 20:06:29 +02:00