ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
以自定义滤镜的方式进行美狐相关功能的渲染。 添加自定义滤镜,在其回调接口customFilterProcess中进行渲染。 ``` mAlivcLivePusher.setCustomFilter(new AlivcLivePushCustomFilter() { @Override public void customFilterCreate() {      if (mhBeautyManager == null) {          mhBeautyManager = new MHBeautyManager(getApplicationContext(), true); mhBeautyManager.setBeautyDataModel(BeautyDataModel.getInstance());       }       if (beautyViewHolder != null) beautyViewHolder.setMhBeautyManager(mhBeautyManager); } @Override public int customFilterProcess(int inputTexture, int textureWidth, int textureHeight, long extra) {                 int newTex = inputTexture;                 if (mhBeautyManager != null) {                     int textId = mhBeautyManager.render2(inputTexture, textureWidth, textureHeight);                     if (textId != -1) {                         newTex = textId;                     }                 }                 return newTex;             }             @Override             public void customFilterDestroy() {                 if (mhBeautyManager != null) {                     mhBeautyManager.destroy();                 }                 mhBeautyManager = null;             }         }); ```