From 33c24b07e4ee7d54ddfc84e529806faf1266a70a Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 30 Sep 2016 14:36:42 +0200 Subject: vo_opengl: vaegl: log more debugging infos --- video/out/opengl/hwdec_vaegl.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'video') diff --git a/video/out/opengl/hwdec_vaegl.c b/video/out/opengl/hwdec_vaegl.c index 85f994ec5e..96a35fcb22 100644 --- a/video/out/opengl/hwdec_vaegl.c +++ b/video/out/opengl/hwdec_vaegl.c @@ -79,27 +79,30 @@ static VADisplay *create_drm_va_display(GL *gl) #endif struct va_create_native { + const char *name; VADisplay *(*create)(GL *gl); }; static const struct va_create_native create_native_cbs[] = { #if HAVE_VAAPI_X11 - {create_x11_va_display}, + {"x11", create_x11_va_display}, #endif #if HAVE_VAAPI_WAYLAND - {create_wayland_va_display}, + {"wayland", create_wayland_va_display}, #endif #if HAVE_VAAPI_DRM - {create_drm_va_display}, + {"drm", create_drm_va_display}, #endif }; -static VADisplay *create_native_va_display(GL *gl) +static VADisplay *create_native_va_display(GL *gl, struct mp_log *log) { if (!gl->MPGetNativeDisplay) return NULL; for (int n = 0; n < MP_ARRAY_SIZE(create_native_cbs); n++) { - VADisplay *display = create_native_cbs[n].create(gl); + const struct va_create_native *disp = &create_native_cbs[n]; + mp_verbose(log, "Trying to open a %s VA display...\n", disp->name); + VADisplay *display = disp->create(gl); if (display) return display; } @@ -205,9 +208,11 @@ static int create(struct gl_hwdec *hw) !p->EGLImageTargetTexture2DOES) return -1; - p->display = create_native_va_display(gl); - if (!p->display) + p->display = create_native_va_display(gl, hw->log); + if (!p->display) { + MP_VERBOSE(hw, "Could not create a VA display.\n"); return -1; + } p->ctx = va_initialize(p->display, p->log, true); if (!p->ctx) { -- cgit v1.2.3