#857·QtScrcpy

显示黑屏,点击可以,但是不能正常显示内容

Author: diangong182Created Oct 12, 2023Updated Sep 1, 2026

AdbProcessImpl::out:[server] INFO: Device: Xiaomi M2007J17C (Android 12)

server start finish in 0.4s

AdbProcessImpl::out:[server] DEBUG: Using encoder: 'OMX.qcom.video.encoder.avc'

QOpenGLShader::compile(Fragment): ERROR: 0:2: '' : No precision specified for (float) ERROR: 0:8: '' : No precision specified for (float) ERROR: 0:9: '' : No precision specified for (float) ERROR: 0:13: '' : No precision specified for (float) ERROR: 0:14: '' : No precision specified for (float) ERROR: 0:15: '' : No precision specified for (float)

*** Problematic Fragment shader source code *** #ifdef GL_KHR_blend_equation_advanced #extension GL_ARB_fragment_coord_conventions : enable #extension GL_KHR_blend_equation_advanced : enable #endif #line 1

varying vec2 textureOut;        // ???????????????
uniform sampler2D textureY;     // uniform ???????????????????
uniform sampler2D textureU;     // sampler2D?2D???
uniform sampler2D textureV;     // ??yuv??????
void main(void)
{
    vec3 yuv;
    vec3 rgb;

    // SDL2 BT709_SHADER_CONSTANTS
    // https://github.com/spurious/SDL-mirror/blob/4ddd4c445aa059bb127e101b74a8c5b59257fbe2/src/render/opengl/SDL_shaders_gl.c#L102
    const vec3 Rcoeff = vec3(1.1644,  0.000,  1.7927);
    const vec3 Gcoeff = vec3(1.1644, -0.2132, -0.5329);
    const vec3 Bcoeff = vec3(1.1644,  2.1124,  0.000);

    // ???????textureY???textureOut???
    yuv.x = texture2D(textureY, textureOut).r;
    yuv.y = texture2D(textureU, textureOut).r - 0.5;
    yuv.z = texture2D(textureV, textureOut).r - 0.5;

    // ?????rgb
    // ??????
    yuv.x = yuv.x - 0.0625;
    rgb.r = dot(yuv, Rcoeff);
    rgb.g = dot(yuv, Gcoeff);
    rgb.b = dot(yuv, Bcoeff);
    // ?????
    gl_FragColor = vec4(rgb, 1.0);
}

QOpenGLShaderProgram::attributeLocation(vertexIn): shader program is not linked