In GstQSGTexture::hasAlphaChannel return value based on
whether the video format has alpha channel.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1040>
bool
GstQSGTexture::hasAlphaChannel () const
{
- /* FIXME: support RGB textures */
- return true;
+ const bool has_alpha = GST_VIDEO_FORMAT_INFO_HAS_ALPHA(this->v_info.finfo);
+
+ GST_LOG ("%p get has alpha channel %u", this, has_alpha);
+
+ return has_alpha;
}
/* can be called from any thread */
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/x-raw(" GST_CAPS_FEATURE_MEMORY_GL_MEMORY "), "
- "format = (string) RGBA, "
+ "format = (string) { RGB, RGBA }, "
"width = " GST_VIDEO_SIZE_RANGE ", "
"height = " GST_VIDEO_SIZE_RANGE ", "
"framerate = " GST_VIDEO_FPS_RANGE ", "