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

处理视频数据报错! #88

Open
linkedbyte opened this issue Jul 26, 2024 · 0 comments
Open

处理视频数据报错! #88

linkedbyte opened this issue Jul 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@linkedbyte
Copy link

将视频流程中的人脸美颜后输出,
下面是用法:
lipstick_filter = LipstickFilter::create();
blusher_filter = BlusherFilter::create();
face_reshape_filter = FaceReshapeFilter::create();

创建用于处理视频流的输入对象
source_raw_input = SourceRawDataInput::create();
source_raw_input->RegLandmarkCallback([=](std::vector landmarks) {
lipstick_filter->SetFaceLandmarks(landmarks);
blusher_filter->SetFaceLandmarks(landmarks);
face_reshape_filter->SetFaceLandmarks(landmarks);
});

beauty_face_filter = BeautyFaceFilter::create();

获取处理结果的输出对象及回调
source_output = TargetRawDataOutput::create();
source_output->setPixelsCallbck(
[=](const uint8_t* data, int width, int height, int64_t timestamp) {

	std::cout << "target output callback" << std::endl;
});

source_raw_input->addTarget(lipstick_filter)
->addTarget(blusher_filter)
->addTarget(face_reshape_filter)
->addTarget(beauty_face_filter)
->addTarget(source_output);

将解析后的视频流逐帧调用
source_raw_input->uploadBytes(videoData,width, height, width);

发现如下问题:
TargetRawDataOutput中的
GLubyte* ptr = (GLubyte*)glMapBuffer(GL_PIXEL_PACK_BUFFER, GL_READ_ONLY);
始终返回null,
glGetError()获取的值为1282

@linkedbyte linkedbyte added the bug Something isn't working label Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant