合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
设置滤镜监听,在回调中进行美狐相关功能的渲染 ``` mMediaStreamingManager.setVideoFilterListener(this,false);//设置回调 @Override     public void onSurfaceCreated() {         if(mhBeautyManager==null){             mhBeautyManager = new MHBeautyManager(getApplicationContext());             mhBeautyManager.setBeautyDataModel(BeautyDataModel.getInstance());             if (beautyViewHolder != null) {                 beautyViewHolder.setMhBeautyManager(mhBeautyManager);             }         }     }     @Override     public void onSurfaceChanged(int width, int height) {}     @Override     public void onSurfaceDestroy() {         if(mhBeautyManager!=null){             mhBeautyManager.destroy();         }          mhBeautyManager = null; }     @Override     public int onDrawFrame(int texId, int texWidth, int texHeight, long timeStampNs, float[] transformMatrix) {         int  newTexId = texId;         if(mhBeautyManager!=null){             int tex = mhBeautyManager.render4(texId,texWidth,texHeight);             if(tex!=-1){                 newTexId = tex;             }         }         return newTexId;     } ```