mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
gstqsg6material: print loaded fragment shader to log
This is useful for checking that the qml6glsink selected the correct fragment shader for the expected texture format. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7319>
This commit is contained in:
parent
94ba97ab80
commit
c91e002b5e
1 changed files with 8 additions and 3 deletions
|
@ -272,24 +272,29 @@ private:
|
|||
GstQSGMaterialShader::GstQSGMaterialShader(GstVideoFormat v_format)
|
||||
: v_format(v_format)
|
||||
{
|
||||
const gchar *frag_shader;
|
||||
|
||||
setShaderFileName(VertexStage, ":/org/freedesktop/gstreamer/qml6/vertex.vert.qsb");
|
||||
|
||||
switch (v_format) {
|
||||
case GST_VIDEO_FORMAT_RGBA:
|
||||
case GST_VIDEO_FORMAT_BGRA:
|
||||
case GST_VIDEO_FORMAT_RGB:
|
||||
setShaderFileName(FragmentStage, ":/org/freedesktop/gstreamer/qml6/RGBA.frag.qsb");
|
||||
frag_shader = ":/org/freedesktop/gstreamer/qml6/RGBA.frag.qsb";
|
||||
break;
|
||||
case GST_VIDEO_FORMAT_YV12:
|
||||
setShaderFileName(FragmentStage, ":/org/freedesktop/gstreamer/qml6/YUV_TRIPLANAR.frag.qsb");
|
||||
frag_shader = ":/org/freedesktop/gstreamer/qml6/YUV_TRIPLANAR.frag.qsb";
|
||||
break;
|
||||
case GST_VIDEO_FORMAT_NV12:
|
||||
setShaderFileName(FragmentStage, ":/org/freedesktop/gstreamer/qml6/YUV_BIPLANAR.frag.qsb");
|
||||
frag_shader = ":/org/freedesktop/gstreamer/qml6/YUV_BIPLANAR.frag.qsb";
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
GST_DEBUG("load fragment shader: %s", frag_shader);
|
||||
setShaderFileName(FragmentStage, frag_shader);
|
||||
|
||||
m_textures[0] = nullptr;
|
||||
m_textures[1] = nullptr;
|
||||
m_textures[2] = nullptr;
|
||||
|
|
Loading…
Reference in a new issue