SDK 2.0.0。鉴权见 授权与许可。
返回值
大多数 setter 返回int:
BeautyEffectEngine::Create() 返回 std::shared_ptr,失败为 nullptr。ProcessImage 失败也可能返回空指针。
引擎事件
Create 之后注册 on_engine_event:
失败时
message 含详细说明。
常见失败
1. Create 返回 nullptr
常见原因:
resource_path是目录、路径错误,或不是resource.fbd文件app_id+app_key无效,或license_token错误facebetter.dll缺失或与facebetter.lib不匹配- 无法访问
/facebetter/v2/auth
Create 之前打开日志:
2. 找不到 facebetter.dll
DLL 不在加载路径时,Windows 会弹窗。
3. ProcessImage 返回 nullptr
检查输入帧、引擎指针和日志(setter 上的 -7 处理失败 / -8 内存不足)。
4. 效果看起来没变化
2.0 没有SetBeautyTypeEnabled。强度为 0 即关闭。美型 / 美妆还需要检测到人脸。
5. OpenGL / 显示
驱动过旧、虚拟机或无 GPU 的远程桌面会导致 GLFW /gladLoadGLLoader 失败。
EngineConfig::external_context = true,并在该线程调用 ProcessImage。

