<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                MHUI 是開源的。英文界面和中文界面所用的文件名稱不同,功能是一樣的.菜單使用默認美顏方法如下(MHUI is open source. The English interface and the Chinese interface use different file names and have the same functions The default beauty method used in the menu is as follows:): 1) 在直播或者視頻頁面中添加美顏功能(Add beauty function in live broadcast or video page) ``` #import <MHBeautySDK/MHBeautyManager.h> #import "MHBeautyParams.h" #import "MHMeiyanMenusView.h" (EnglishVersion is #import "BeautyFoxMenusView.h") ``` 2) 聲明屬性 ``` @property(nonatomic, strong)MHMeiyanMenusView *menusV iew; (@property (nonatomic, strong) BeautyFoxMenusView *menusView;) @property(nonatomic, strong)MHBeautyManager *beautyMana ger; ``` 3) 初始化美顏管理器(Initialize Beauty Manager) \- (MHBeautyManager \*)beautyManager { if (!\_beautyManager) { \_beautyManager = \[\[MHBeautyManager alloc\] init\]; \_beautyManager.maxFace = 3; } return \_beautyManager; } 4) 初始化美顏菜單(Initialize beauty menu) /// 初始化美顏菜單(推薦使用) /// @param frame frame /// @param superView 所要添加到的視圖 /// @param manager 美顏管理器,完成初始化后傳入 /// 該方法默認使用美狐相關功能,不需要實現MHMeiyanMenusViewDelegate中的美顏方法 \- (instancetype)initWithFrame:(CGRect)frame superView:(UIView \*)superView beautyManager:(MHBeautyManager \*)manager; EnhlisjVersion: ///(Initialize beauty menu,Recommand to use) /// @param frame frame /// @param superView /// @param manager Pass in after initialization /// This method uses the relevant functions of Meihu by default \- (instancetype)initWithFrame:(CGRect)frame superView:(UIView \*)superView beautyManager:(MHBeautyManager \*)manager; 5) 初始化美顏菜單頁實例(Initialize beauty menu page instance) \- (MHMeiyanMenusView \*)menusView { if (!\_menusView) { \_menusView = \[\[MHMeiyanMenusView alloc\] initWithFrame:CGRectMake(0, window\_height - MHMeiyanMenuHeight - BottomIndicatorHeight, window\_width, MHMeiyanMenuHeight) superView:self.view beautyManager:self.beautyManager\]; } return \_menusView; } 6) 如果需要實現代理方法,則遵循協議MHMeiyanMenusViewDelegate , (BeautyFoxMenusViewDelegate) 7) 展示美顏頁面,(Show beauty page): \[self.menusView showMenuView:YES\]; 8) 美顏菜單的隱藏,則可以在控制器的 touchesBegan 方法中調用上面的方法。示例代碼(the beauty menu can be hidden in the touchesbegan of the controller The above method is invoked in the method. Sample code): \- (void)touchesBegan:(NSSet<UITouch \*> \*)touches withEvent:(UIEvent \*)event{ if (self.menusView.isShow) { \[self.menusView showMenuView:NO\]; if (!\[self.menusView isDescendantOfView:self.view\]) { //頁面上其他控件顯示,根據自己的項目完善 } } } 9) 如果不想隱藏美顏菜單,可以在 touchesBegan 方法中調用 (If you don't want to hide the beauty menu, you can call it in the touchesBegan method.) \[self.menusView showMenuView:YES\]; 如果項目中有需求是調用保存的美顏效果,調用下面的方法。詳情請看 MHMeiyanMenusView.m(If the demand in the project is to call the saved beauty effect, call the following method. For details, please see MHMeiyanMenusView.m) -(void)setupDefaultBeautyAndFaceValue; 在渲染方法中調用,要設置標志符保證該方法只走一次,不 然耗內存,(In the rendering method, we need to set the identifier to ensure that the method will go only once. Ran out of memory): \- (GLuint)onPreProcessTexture:(GLuint)texture width:(CGFloat)width height:(CGFloat)height { \[self.beautyManager processWithTexture:texture width:width height:height\]; if (!self.isSetDefaultValue) { \[self.menusView setupDefaultBeautyAndFaceValue\]; self.isSetDefaultValue = YES; } return texture; } 10) 渲染結束,要釋放渲染資源,否則會造成內存泄漏(At the end of rendering, the rendering resources should be released, otherwise it will cause memory leakage) \- (void)dealloc { if (\_beautyManager) { \[\_beautyManager destroy\]; \_beautyManager = nil; } } 以下是不同廠商的直播/短視頻 SDK 的調用渲染方法(The following is the call rendering method of live / short video SDKs from different manufacturers):
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看