summaryrefslogtreecommitdiffstats
path: root/video/out/vo_opengl.c
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2016-06-06 02:44:15 +0200
committerwm4 <wm4@nowhere>2016-06-07 12:17:25 +0200
commit393a06911269b69ed83f1b29bd5e252c07ba59bf (patch)
treeba49b6ce002d4a9ef1946d04c8bfa5be4fb3755a /video/out/vo_opengl.c
parent8ceb935bd8e1062ff83287c00cca0b7428a7dfba (diff)
downloadmpv-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_opengl.c')
-rw-r--r--video/out/vo_opengl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c
index 4a84e8b3ba..426236e436 100644
--- a/video/out/vo_opengl.c
+++ b/video/out/vo_opengl.c
@@ -329,6 +329,9 @@ static int control(struct vo *vo, uint32_t request, void *data)
vo_wakeup(vo);
}
return true;
+ case VOCTRL_PERFORMANCE_DATA:
+ *(struct voctrl_performance_data *)data = gl_video_perfdata(p->renderer);
+ return true;
}
int events = 0;