[vlc-devel] [PATCH] gl: favor glx for vdpau chromas
Thomas Guillem
thomas at gllm.fr
Mon Jul 24 09:50:50 CEST 2017
On Sun, Jul 23, 2017, at 19:26, Rémi Denis-Courmont wrote:
> Le perjantaina 21. heinäkuuta 2017, 11.47.14 EEST Thomas Guillem a écrit
> :
> > When using X11, favor glx instead of egl in order to use vdpau interop.
> > ---
> > modules/video_output/opengl/display.c | 25 ++++++++++++++++++++++++-
> > 1 file changed, 24 insertions(+), 1 deletion(-)
> >
> > diff --git a/modules/video_output/opengl/display.c
> > b/modules/video_output/opengl/display.c index 63376f1cd8..0e3b5e39e7 100644
> > --- a/modules/video_output/opengl/display.c
> > +++ b/modules/video_output/opengl/display.c
> > @@ -103,7 +103,30 @@ static int Open (vlc_object_t *obj)
> > goto error;
> > }
> >
> > - sys->gl = vlc_gl_Create (surface, API, "$" MODULE_VARNAME);
> > + const char *gl_name = "$" MODULE_VARNAME;
> > +#ifndef USE_OPENGL_ES2
> > + if (surface->type == VOUT_WINDOW_TYPE_XID)
> > + {
> > + switch (vd->fmt.i_chroma)
> > + {
> > + case VLC_CODEC_VDPAU_VIDEO_444:
> > + case VLC_CODEC_VDPAU_VIDEO_422:
> > + case VLC_CODEC_VDPAU_VIDEO_420:
> > + {
> > + /* VDPAU GL interop works only with glx for now. */
> > + char *str = var_InheritString(surface, MODULE_VARNAME);
> > + if (str == NULL)
> > + gl_name = "glx";
> > + free(str);
> > + break;
> > + }
> > + default:
> > + break;
> > + }
> > + }
>
> Overriding the module preference is a terrible idea. Sooner or later,
> somebody
> will assume the variable works, but it won't. E.g. if LibVLC gained
> callbacks
> for custom GL context.
We respect the user choice if he override the variable. "if LibVLC
gained callbacks for custom GL context." This is not a problem for 3.0,
right ?
>
> --
> 雷米‧德尼-库尔蒙
> https://www.remlab.net/
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list