summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-30 14:36:42 +0200
committerwm4 <wm4@nowhere>2016-09-30 14:36:42 +0200
commit33c24b07e4ee7d54ddfc84e529806faf1266a70a (patch)
tree7145f3fe31816d54afd70e6df8ff030f4942c2d2 /video
parent5f547e57e332897daee101bb2b304925b0ab8522 (diff)
downloadmpv-33c24b07e4ee7d54ddfc84e529806faf1266a70a.tar.bz2
mpv-33c24b07e4ee7d54ddfc84e529806faf1266a70a.tar.xz
vo_opengl: vaegl: log more debugging infos
Diffstat (limited to 'video')
-rw-r--r--video/out/opengl/hwdec_vaegl.c19
1 files changed, 12 insertions, 7 deletions
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) {