Skip to content

Commit

Permalink
fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
plutoless committed Mar 20, 2020
1 parent 218b1a3 commit 28335f0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ByteDance290101/ByteDancePlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,11 @@ bool ByteDancePlugin::onPluginCaptureVideoFrame(VideoPluginFrame *videoFrame)

// 2. initialize if not yet done
if (!mNamaInited) {
//load nama and initialize
//load bytedance and initialize
if (false == initOpenGL()) {
break;
}

ret = bef_effect_ai_create(&m_renderMangerHandle);
CHECK_BEF_AI_RET_SUCCESS(ret, "EffectHandle::initializeHandle:: create effect handle failed !");

Expand Down Expand Up @@ -382,30 +383,30 @@ int ByteDancePlugin::setParameter(const char *param)
d.Parse(param);

if(d.HasParseError()) {
return false;
return -100;
}


if(d.HasMember("plugin.bytedance.licensePath")) {
Value& licencePath = d["plugin.bytedance.licensePath"];
if(!licencePath.IsString()) {
return false;
return -101;
}
mLicensePath = std::string(licencePath.GetString());
}

if(d.HasMember("plugin.bytedance.stickerPath")) {
Value& stickerPath = d["plugin.bytedance.stickerPath"];
if(!stickerPath.IsString()) {
return false;
return -101;
}
mStickerPath = std::string(stickerPath.GetString());
}

if(d.HasMember("plugin.bytedance.faceDetectModelPath")) {
Value& faceDetectModelPath = d["plugin.bytedance.faceDetectModelPath"];
if(!faceDetectModelPath.IsString()) {
return false;
return -101;
}
mFaceDetectPath = std::string(faceDetectModelPath.GetString());
}
Expand Down

0 comments on commit 28335f0

Please sign in to comment.