企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
**1.初始化SDK(To initialize the SDK)** ~~~ MHSDK.init(this,"你的授权密钥");//建议在Application子类的onCreate方法中初始化SDK ~~~ ~~~ MHSDK.init(this,"Your authorization key");//It is recommended that you initialize the SDK in the onCreate method of the Application subclass ~~~ ***** **2.添加美狐UI组件(Adding Beauty UI Components)** 在布局文件中添加美狐的UI组件 Add a Beauty UI component to the layout file ``` <com.meihu.beauty.views.MeiHuBeautyControl android:layout_width="match_parent" android:layout_height="match_parent"/> ``` ***** **3.在集成了美狐UI组件的Activity中初始化(Class in an Activity that integrates the Beauty UI component)** ~~~ //初始化(initialize) MhDataManager.getInstance().create(this.getApplicationContext()); ~~~ **4.在腾讯云直播的自定义渲染方法中 调用美狐SDK的渲染方法(Call the rendering method of THE US SDK in the custom rendering method of Tencent Cloud live )** 实现TXLivePusher.VideoCustomProcessListener接口 调用 livePusher.setVideoProcessListener(this); 设置回调。 Implement TXLivePusher VideoCustomProcessListener interface Call livePusher. SetVideoProcessListener (this); Set the callback. ~~~ @Override public int onTextureCustomProcess(int texture, int width, int height) { int newTexture = MhDataManager.getInstance().render(texture,width,height); return newTexture; } ~~~