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) ...@@ -137,7 +137,7 @@ static int Open (vlc_object_t *obj)
goto error; goto error;
/* Initialize video display */ /* 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) if (!sys->vgl)
goto error; goto error;
......
...@@ -151,7 +151,7 @@ static int Open(vlc_object_t *this) ...@@ -151,7 +151,7 @@ static int Open(vlc_object_t *this)
sys->gl.getProcAddress = NULL; sys->gl.getProcAddress = NULL;
sys->gl.sys = sys; 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) if (!sys->vgl)
{ {
sys->gl.sys = NULL; sys->gl.sys = NULL;
......
...@@ -190,7 +190,7 @@ static int Open(vlc_object_t *this) ...@@ -190,7 +190,7 @@ static int Open(vlc_object_t *this)
sys->gl.getProcAddress = NULL; sys->gl.getProcAddress = NULL;
sys->gl.sys = sys; 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) if (!sys->vgl)
{ {
sys->gl.sys = NULL; sys->gl.sys = NULL;
......
...@@ -116,7 +116,8 @@ static int Open(vlc_object_t *object) ...@@ -116,7 +116,8 @@ static int Open(vlc_object_t *object)
sys->gl.sys = vd; sys->gl.sys = vd;
video_format_t fmt = vd->fmt; 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) if (!sys->vgl)
goto error; goto error;
...@@ -125,6 +126,7 @@ static int Open(vlc_object_t *object) ...@@ -125,6 +126,7 @@ static int Open(vlc_object_t *object)
info.has_hide_mouse = false; info.has_hide_mouse = false;
info.has_pictures_invalid = true; info.has_pictures_invalid = true;
info.has_event_thread = true; info.has_event_thread = true;
info.subpicture_chromas = subpicture_chromas;
/* Setup vout_display now that everything is fine */ /* Setup vout_display now that everything is fine */
vd->fmt = fmt; vd->fmt = fmt;
......
...@@ -114,6 +114,7 @@ static inline int GetAlignedSize(unsigned size) ...@@ -114,6 +114,7 @@ static inline int GetAlignedSize(unsigned size)
} }
vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt, vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
const vlc_fourcc_t **subpicture_chromas,
vlc_gl_t *gl) vlc_gl_t *gl)
{ {
vout_display_opengl_t *vgl = calloc(1, sizeof(*vgl)); 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, ...@@ -336,6 +337,9 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
vgl->pool = NULL; vgl->pool = NULL;
*fmt = vgl->fmt; *fmt = vgl->fmt;
if (subpicture_chromas) {
*subpicture_chromas = NULL;
}
return vgl; return vgl;
} }
......
...@@ -58,7 +58,9 @@ ...@@ -58,7 +58,9 @@
typedef struct vout_display_opengl_t vout_display_opengl_t; 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); void vout_display_opengl_Delete(vout_display_opengl_t *vgl);
picture_pool_t *vout_display_opengl_GetPool(vout_display_opengl_t *vgl, unsigned); picture_pool_t *vout_display_opengl_GetPool(vout_display_opengl_t *vgl, unsigned);
......
...@@ -366,7 +366,8 @@ static int Open (vlc_object_t *obj) ...@@ -366,7 +366,8 @@ static int Open (vlc_object_t *obj)
sys->gl.getProcAddress = GetProcAddress; sys->gl.getProcAddress = GetProcAddress;
sys->gl.sys = sys; 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) if (!sys->vgl)
{ {
sys->gl.sys = NULL; sys->gl.sys = NULL;
...@@ -380,6 +381,7 @@ static int Open (vlc_object_t *obj) ...@@ -380,6 +381,7 @@ static int Open (vlc_object_t *obj)
vout_display_info_t info = vd->info; vout_display_info_t info = vd->info;
info.has_pictures_invalid = false; info.has_pictures_invalid = false;
info.has_event_thread = true; info.has_event_thread = true;
info.subpicture_chromas = subpicture_chromas;
/* Setup vout_display_t once everything is fine */ /* Setup vout_display_t once everything is fine */
vd->info = info; vd->info = info;
...@@ -477,7 +479,8 @@ static void PictureDisplay (vout_display_t *vd, picture_t *pic, subpicture_t *su ...@@ -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); vout_display_opengl_Display (sys->vgl, &vd->source);
picture_Release (pic); picture_Release (pic);
(void)subpicture; if (subpicture)
subpicture_Delete(subpicture);
} }
static int Control (vout_display_t *vd, int query, va_list ap) 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