Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

player一开始的紫色怎么去掉 #216

Open
chenyin-code opened this issue Jun 14, 2024 · 1 comment
Open

player一开始的紫色怎么去掉 #216

chenyin-code opened this issue Jun 14, 2024 · 1 comment

Comments

@chenyin-code
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

Environment:

  • OS:
  • GPU: optional

Log
Add any other context about the problem here.

setLogHandler([&log_file](LogLevel level, const char* msg){
    //write_msg_to_a_file(msg); // it's better to add system time. example: https://github.com/wang-bin/mdk-examples/blob/master/GLFW/prettylog.h
});
@wang-bin
Copy link
Owner

什么系统?如果是苹果的话感觉是CAMetalLayer默认的颜色,如果没有视频帧,我这边不会渲染任何东西,我用glfwplay测试结果是用metal就是紫色,opengl是黑的。你可以写个最简单的MTKView验证下。要去掉的话得强行喂一帧,但好像还是会紫色闪一下

        uint8_t rgba[64*64*4] = {};
        const uint8_t* data[] = {
            rgba
        };
        VideoFrame frame(64, 64, PixelFormat::RGBA);
        frame.setBuffers(data);
        player.enqueue(frame, vid);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants