diff options
author | wm4 <wm4@nowhere> | 2015-11-09 11:58:38 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-11-09 11:58:38 +0100 |
commit | 11888a927035c37759cddcbbb588c4f8b93296d1 (patch) | |
tree | 2d07c3a6450e22b57609c84e744926c1ec699846 | |
parent | 76e50f6a3d52a75bbee3b32b4f57a0e038cb4909 (diff) |
vo_opengl: never load vaapi GLX interop by default
Causes more harm than it helps. Will eventually be removed.
Also rename the "reject_emulated" field to "probing" - this is more
appropriate now.
-rw-r--r-- | video/out/opengl/hwdec.c | 2 | ||||
-rw-r--r-- | video/out/opengl/hwdec.h | 2 | ||||
-rw-r--r-- | video/out/opengl/hwdec_vaegl.c | 2 | ||||
-rw-r--r-- | video/out/opengl/hwdec_vaglx.c | 8 | ||||
-rw-r--r-- | video/out/opengl/hwdec_vdpau.c | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/video/out/opengl/hwdec.c b/video/out/opengl/hwdec.c index 6eefbc4744..2a8c1eb14b 100644 --- a/video/out/opengl/hwdec.c +++ b/video/out/opengl/hwdec.c @@ -64,7 +64,7 @@ static struct gl_hwdec *load_hwdec_driver(struct mp_log *log, GL *gl, .log = mp_log_new(hwdec, log, drv->api_name), .gl = gl, .gl_texture_target = GL_TEXTURE_2D, - .reject_emulated = is_auto, + .probing = is_auto, }; mp_verbose(log, "Loading hwdec driver '%s'\n", drv->api_name); if (hwdec->driver->create(hwdec) < 0) { diff --git a/video/out/opengl/hwdec.h b/video/out/opengl/hwdec.h index 7d6f300db7..6f07536f57 100644 --- a/video/out/opengl/hwdec.h +++ b/video/out/opengl/hwdec.h @@ -14,7 +14,7 @@ struct gl_hwdec { // For free use by hwdec driver void *priv; // For working around the vdpau vs. vaapi mess. - bool reject_emulated; + bool probing; // hwdec backends must set this to an IMGFMT_ that has an equivalent // internal representation in gl_video.c as the hardware texture. // It's used to build the rendering chain. For example, setting it to diff --git a/video/out/opengl/hwdec_vaegl.c b/video/out/opengl/hwdec_vaegl.c index efc09c28ba..462d69a6f0 100644 --- a/video/out/opengl/hwdec_vaegl.c +++ b/video/out/opengl/hwdec_vaegl.c @@ -216,7 +216,7 @@ static int create(struct gl_hwdec *hw) return -1; } - if (hw->reject_emulated && va_guess_if_emulated(p->ctx)) { + if (hw->probing && va_guess_if_emulated(p->ctx)) { destroy(hw); return -1; } diff --git a/video/out/opengl/hwdec_vaglx.c b/video/out/opengl/hwdec_vaglx.c index 34e8ee937e..ff97d14857 100644 --- a/video/out/opengl/hwdec_vaglx.c +++ b/video/out/opengl/hwdec_vaglx.c @@ -74,6 +74,10 @@ static int create(struct gl_hwdec *hw) Display *x11disp = glXGetCurrentDisplay(); if (!x11disp) return -1; + if (hw->probing) { + MP_VERBOSE(hw, "Not using this by default.\n"); + return -1; + } int x11scr = DefaultScreen(x11disp); struct priv *p = talloc_zero(hw, struct priv); hw->priv = p; @@ -96,10 +100,6 @@ static int create(struct gl_hwdec *hw) vaTerminate(p->display); return -1; } - if (hw->reject_emulated && va_guess_if_emulated(p->ctx)) { - destroy(hw); - return -1; - } int attribs[] = { GLX_BIND_TO_TEXTURE_RGBA_EXT, True, diff --git a/video/out/opengl/hwdec_vdpau.c b/video/out/opengl/hwdec_vdpau.c index b9320ba842..086ebf5197 100644 --- a/video/out/opengl/hwdec_vdpau.c +++ b/video/out/opengl/hwdec_vdpau.c @@ -116,7 +116,7 @@ static int create(struct gl_hwdec *hw) return -1; p->vdp_surface = VDP_INVALID_HANDLE; p->mixer = mp_vdpau_mixer_create(p->ctx, hw->log); - if (hw->reject_emulated && mp_vdpau_guess_if_emulated(p->ctx)) { + if (hw->probing && mp_vdpau_guess_if_emulated(p->ctx)) { destroy(hw); return -1; } |