💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
以添加自定义滤镜方式来进行美狐相关功能的渲染。 //添加成员变量 ``` private ImgBeautyProFilter mImgBeautyProFilter;//金山自带美颜filter private ImgFilterBase[] mFilterArray = new ImgFilterBase[3]; ``` //共需要3个filter,分别为美狐filter,金山基础美颜filter,金山自带滤镜filter stremer创建之后设置美狐自定义渲染filter ``` //初始化美狐filter private void initFilter(){         MHFilter mhFilter = new MHFilter(KSYActivity.this.getApplicationContext(), mhBeautyManager, mStreamer.getGLRender());         mFilterArray[1] = mhFilter;         if (mStreamer != null) {          mStreamer.getImgTexFilterMgt().setFilter(mhFilter);         } ```         setKsyBeauty();//金山自带基础美颜,参考章节(**不同直播SDK设置基础美颜方式:**) } ``` //初始化金山基础美颜 private void initBaseBeauty() {         if (mStreamer != null) {             ImgBeautyProFilter filter = new ImgBeautyProFilter(mStreamer.getGLRender(), this);             if (mFilterArray[0] == null){ mStreamer.getImgTexFilterMgt().addFilterBefore(mFilterArray[1], filter);             }else {   mStreamer.getImgTexFilterMgt().replaceFilter(mFilterArray[0], filter);             }             mFilterArray[0] = filter;             mImgBeautyProFilter = filter;      } } ```