pod install。# 将S1-07替换成您购买的套餐,注意TEBeautyKit和TencentEffect要使用相同套餐pod 'TEBeautyKit/S1-07', :podspec => 'https://mediacloud-76607.gzc.vod.tencent-cloud.com/TencentEffect/iOS/TEBeautyKit/latest/TEBeautyKit.podspec'pod 'TencentEffect_S1-07', :podspec => 'https://mediacloud-76607.gzc.vod.tencent-cloud.com/TencentEffect/iOS/podspec/latest/TencentEffect_S1-07.podspec'
- (void)initXMagic {__weak typeof(self)weakSelf = self;[TEBeautyKit createXMagic:EFFECT_MODE_PRO onInitListener:^(TEBeautyKit * _Nullable beautyKit) {__strong typeof(weakSelf)strongSelf = weakSelf;strongSelf.teBeautyKit = beautyKit;strongSelf.tePanelView.teBeautyKit = strongSelf.teBeautyKit;[strongSelf.tePanelView setDefaultBeauty];[strongSelf.teBeautyKit setLogLevel:YT_SDK_ERROR_LEVEL];[strongSelf.teBeautyKit registerSDKEventListener:strongSelf];}];}
- (GLuint)onPreProcessTexture:(GLuint)texture width:(CGFloat)width height:(CGFloat)height {YTProcessOutput *output = [self.teBeautyKit processTexture:texturetextureWidth:widthtextureHeight:heightwithOrigin:YtLightImageOriginTopLeftwithOrientation:YtLightCameraRotation0];return output.textureData.texture;}
- (void)destroyXMagic {[self.teBeautyKit onDestroy];self.teBeautyKit = nil;}
文档反馈