Commit 2ecb9556 authored by Holger Kaelberer's avatar Holger Kaelberer Committed by Gwenole Beauchesne

overlay: fix support for global-alpha.

Fix support for global-alpha subpictures. The previous changes brought
the ability to check for GstVideoOverlayRectangle changes by comparing
the underlying pixel buffer pointers. If sequence number and pixel data
did not change, then this is an indication that only the global-alpha
value changed. Now, try to update the underlying VA subpicture global-alpha
Signed-off-by: default avatarGwenole Beauchesne <>
parent e6390d6e
......@@ -295,6 +295,17 @@ overlay_rectangle_update_render_rect(GstVaapiOverlayRectangle *overlay,
return overlay_rectangle_associate(overlay);
static inline gboolean
overlay_rectangle_update_global_alpha(GstVaapiOverlayRectangle *overlay,
GstVideoOverlayRectangle *rect)
const guint flags = gst_video_overlay_rectangle_get_flags(rect);
return TRUE;
return gst_vaapi_subpicture_set_global_alpha(overlay->subpicture,
static gboolean
overlay_rectangle_update(GstVaapiOverlayRectangle *overlay,
GstVideoOverlayRectangle *rect)
......@@ -303,6 +314,8 @@ overlay_rectangle_update(GstVaapiOverlayRectangle *overlay,
return FALSE;
if (!overlay_rectangle_update_render_rect(overlay, rect))
return FALSE;
if (!overlay_rectangle_update_global_alpha(overlay, rect))
return FALSE;
gst_video_overlay_rectangle_replace(&overlay->rect, rect);
return TRUE;
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