mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
vo_opengl: expose performance timers as properties
This is plumbed through a new VOCTRL, VOCTRL_PERFORMANCE_DATA, and exposed as properties render-time-last, render-time-avg etc. All of these numbers are in microseconds, which gives a good precision range when just outputting them via show-text. (Lua scripts can obviously still do their own formatting etc.) Signed-off-by: wm4 <wm4@nowhere>
This commit is contained in:
@@ -894,6 +894,30 @@ Property list
|
||||
.. note:: This is only an estimate. (It's computed from two unreliable
|
||||
quantities: fps and possibly rounded timestamps.)
|
||||
|
||||
``render-time-last``
|
||||
Time needed to render the last frame in microseconds. Not implemented by
|
||||
all VOs.
|
||||
|
||||
``render-time-avg``
|
||||
Average of ``render-time-last`` over the last few frames. (The exact
|
||||
averaging time is variable, but it should generally be a few seconds)
|
||||
|
||||
``render-time-peak``
|
||||
Peak (maximum) of ``render-time-last`` over the last few frames.
|
||||
|
||||
``present-time-last``, ``present-time-avg``, ``present-time-peak``
|
||||
Analogous to ``render-time-last`` etc. but measures the time needed to
|
||||
draw a rendered frame to the screen. Not implemented by all VOs.
|
||||
|
||||
(This is separate from ``render-time-last`` because VOs may interpolate,
|
||||
deinterlace or otherwise mix multiple source frames into a single output
|
||||
frame)
|
||||
|
||||
``upload-time-last``, ``upload-time-avg``, ``upload-time-peak``
|
||||
Analogous to ``render-time-last`` etc. but measures the time needed to
|
||||
upload a frame from system memory to a GPU texture. Not implemented by all
|
||||
VOs.
|
||||
|
||||
``path``
|
||||
Full path of the currently played file. Usually this is exactly the same
|
||||
string you pass on the mpv command line or the ``loadfile`` command, even
|
||||
|
||||
Reference in New Issue
Block a user