mdk-sdk
mdk-sdk copied to clipboard
player一开始的紫色怎么去掉
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
});
什么系统?如果是苹果的话感觉是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);