initCVResource method
@detail api @author zhushufan.ref @brief 检查视频特效证书,设置算法模型路径,并初始化特效模块。 @param licenseFile 证书文件的绝对路径,用于鉴权。 @param algoModelDir 算法模型绝对路径,即存放特效 SDK 所有算法模型的目录。 @return - 0: 调用成功。 - –1000: 未集成特效 SDK。 - –1002: 特效 SDK 版本不兼容。 - < 0: 调用失败,错误码对应具体描述参看 错误码表。 @note 鉴权时,会检查 CV 服务端时间和本地设备的时间差异。你必须保证本地系统时间和实际时间一致。
Implementation
Future<int?> initCVResource(string licenseFile, string algoModelDir) async {
$a() => ($instance as $p_a.IVideoEffect)
.initCVResource(licenseFile, algoModelDir);
$i() => ($instance as $p_i.ByteRTCVideoEffect)
.initCVResource(licenseFile, algoModelDir);
if (Platform.isAndroid) {
return $a();
} else if (Platform.isIOS) {
return $i();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}