Commit 095fa2ea authored by Laurent Aimar's avatar Laurent Aimar

Made vout_display_opengl_New return a list of chroma supported for subpicture blending.

Not yet used.
parent 5a018ce8
......@@ -137,7 +137,7 @@ static int Open (vlc_object_t *obj)
goto error;
/* Initialize video display */
sys->vgl = vout_display_opengl_New (&vd->fmt, sys->gl);
sys->vgl = vout_display_opengl_New (&vd->fmt, NULL, sys->gl);
if (!sys->vgl)
goto error;
......
......@@ -151,7 +151,7 @@ static int Open(vlc_object_t *this)
sys->gl.getProcAddress = NULL;
sys->gl.sys = sys;
sys->vgl = vout_display_opengl_New(&vd->fmt, &sys->gl);
sys->vgl = vout_display_opengl_New(&vd->fmt, NULL, &sys->gl);
if (!sys->vgl)
{
sys->gl.sys = NULL;
......
......@@ -190,7 +190,7 @@ static int Open(vlc_object_t *this)
sys->gl.getProcAddress = NULL;
sys->gl.sys = sys;
sys->vgl = vout_display_opengl_New(&vd->fmt, &sys->gl);
sys->vgl = vout_display_opengl_New(&vd->fmt, NULL, &sys->gl);
if (!sys->vgl)
{
sys->gl.sys = NULL;
......
......@@ -116,7 +116,8 @@ static int Open(vlc_object_t *object)
sys->gl.sys = vd;
video_format_t fmt = vd->fmt;
sys->vgl = vout_display_opengl_New(&fmt, &sys->gl);
const vlc_fourcc_t *subpicture_chromas;
sys->vgl = vout_display_opengl_New(&fmt, &subpicture_chromas, &sys->gl);
if (!sys->vgl)
goto error;
......@@ -125,6 +126,7 @@ static int Open(vlc_object_t *object)
info.has_hide_mouse = false;
info.has_pictures_invalid = true;
info.has_event_thread = true;
info.subpicture_chromas = subpicture_chromas;
/* Setup vout_display now that everything is fine */
vd->fmt = fmt;
......
......@@ -114,6 +114,7 @@ static inline int GetAlignedSize(unsigned size)
}
vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
const vlc_fourcc_t **subpicture_chromas,
vlc_gl_t *gl)
{
vout_display_opengl_t *vgl = calloc(1, sizeof(*vgl));
......@@ -336,6 +337,9 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
vgl->pool = NULL;
*fmt = vgl->fmt;
if (subpicture_chromas) {
*subpicture_chromas = NULL;
}
return vgl;
}
......
......@@ -58,7 +58,9 @@
typedef struct vout_display_opengl_t vout_display_opengl_t;
vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt, vlc_gl_t *gl);
vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
const vlc_fourcc_t **subpicture_chromas,
vlc_gl_t *gl);
void vout_display_opengl_Delete(vout_display_opengl_t *vgl);
picture_pool_t *vout_display_opengl_GetPool(vout_display_opengl_t *vgl, unsigned);
......
......@@ -366,7 +366,8 @@ static int Open (vlc_object_t *obj)
sys->gl.getProcAddress = GetProcAddress;
sys->gl.sys = sys;
sys->vgl = vout_display_opengl_New (&vd->fmt, &sys->gl);
const vlc_fourcc_t *subpicture_chromas;
sys->vgl = vout_display_opengl_New (&vd->fmt, &subpicture_chromas, &sys->gl);
if (!sys->vgl)
{
sys->gl.sys = NULL;
......@@ -380,6 +381,7 @@ static int Open (vlc_object_t *obj)
vout_display_info_t info = vd->info;
info.has_pictures_invalid = false;
info.has_event_thread = true;
info.subpicture_chromas = subpicture_chromas;
/* Setup vout_display_t once everything is fine */
vd->info = info;
......@@ -477,7 +479,8 @@ static void PictureDisplay (vout_display_t *vd, picture_t *pic, subpicture_t *su
vout_display_opengl_Display (sys->vgl, &vd->source);
picture_Release (pic);
(void)subpicture;
if (subpicture)
subpicture_Delete(subpicture);
}
static int Control (vout_display_t *vd, int query, va_list ap)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment