diff options
author | Niklas Haas <git@nand.wakku.to> | 2016-06-06 02:44:15 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-06-07 12:17:25 +0200 |
commit | 393a06911269b69ed83f1b29bd5e252c07ba59bf (patch) | |
tree | ba49b6ce002d4a9ef1946d04c8bfa5be4fb3755a /video/out/vo.h | |
parent | 8ceb935bd8e1062ff83287c00cca0b7428a7dfba (diff) | |
download | mpv-393a06911269b69ed83f1b29bd5e252c07ba59bf.tar.bz2 mpv-393a06911269b69ed83f1b29bd5e252c07ba59bf.tar.xz |
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>
Diffstat (limited to 'video/out/vo.h')
-rw-r--r-- | video/out/vo.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/video/out/vo.h b/video/out/vo.h index 000283cd36..9c29d5f2cc 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -77,6 +77,8 @@ enum mp_voctrl { VOCTRL_UPDATE_WINDOW_TITLE, // char* VOCTRL_UPDATE_PLAYBACK_STATE, // struct voctrl_playback_state* + VOCTRL_PERFORMANCE_DATA, // struct voctrl_performance_data* + VOCTRL_SET_CURSOR_VISIBILITY, // bool* VOCTRL_KILL_SCREENSAVER, @@ -137,6 +139,16 @@ struct voctrl_playback_state { int percent_pos; }; +// VOCTRL_PERFORMANCE_DATA +struct voctrl_performance_entry { + // Times are in microseconds + uint64_t last, avg, peak; +}; + +struct voctrl_performance_data { + struct voctrl_performance_entry upload, render, present; +}; + enum { // VO does handle mp_image_params.rotate in 90 degree steps VO_CAP_ROTATE90 = 1 << 0, |