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.
This commit is contained in:
wm4 2015-11-09 11:58:38 +01:00
parent 76e50f6a3d
commit 11888a9270
5 changed files with 8 additions and 8 deletions

View File

@ -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) {

View File

@ -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

View File

@ -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;
}

View File

@ -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,

View File

@ -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;
}