[vlc-commits] XCB/XVideo: reject hardware surfaces for the time being
Rémi Denis-Courmont
git at videolan.org
Sun Oct 5 21:44:39 CEST 2014
vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct 5 22:38:44 2014 +0300| [fc5cf8a8bd5515eaff4f9daab53b48be40b173df] | committer: Rémi Denis-Courmont
XCB/XVideo: reject hardware surfaces for the time being
The core cannot blend subpictures to hardware surfaces. In principles,
blending could be performed post chroma conversion, but this is not
supported by the video output wrapper so far.
(cherry picked from commit 47d7b5c0537f16a99ee224c2c75f4f41dd18415d)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=fc5cf8a8bd5515eaff4f9daab53b48be40b173df
---
modules/video_output/xcb/xvideo.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index cf1353f..32f207b 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -374,6 +374,14 @@ static int Open (vlc_object_t *obj)
if (!var_InheritBool (obj, "overlay"))
return VLC_EGENERIC;
+ else
+ { /* NOTE: Reject hardware surface formats. Blending would break. */
+ const vlc_chroma_description_t *chroma =
+ vlc_fourcc_GetChromaDescription(vd->source.i_chroma);
+ if (chroma != NULL && chroma->plane_count == 0)
+ return VLC_EGENERIC;
+ }
+
p_sys = malloc (sizeof (*p_sys));
if (p_sys == NULL)
return VLC_ENOMEM;
More information about the vlc-commits
mailing list