mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
qt: Support RGB format
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>
This commit is contained in:
parent
2f9fa71ab3
commit
4ed342db5d
2 changed files with 6 additions and 3 deletions
|
@ -228,8 +228,11 @@ GstQSGTexture::textureSize () const
|
|||
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 */
|
||||
|
|
|
@ -108,7 +108,7 @@ GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
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 ", "
|
||||
|
|
Loading…
Reference in a new issue