XmagicApi object, then please specify EffectMode when creating the XmagicApi object in the constructor method:public XmagicApi(Context context, EffectMode effectMode, String resDir)public XmagicApi(Context context, EffectMode effectMode, String resDir, OnXmagicPropertyErrorListener xmagicPropertyErrorListener)
public TEBeautyKit(Context context, EffectMode effectMode)public static void create(@NonNull Context context, EffectMode effectMode, @NonNull OnInitListener initListener)
public enum EffectMode{NORMAL(0),PRO(1);private final int value;EffectMode(int value) {this.value = value;}public int getValue() {return value;}}
XMagic object, then you need to specify EffectMode when initializing XMagic, as shown in the following code:NSDictionary *assetsDict = @{@"core_name":@"LightCore.bundle",@"root_path":[[NSBundle mainBundle] bundlePath],@"effect_mode":@(effectMode)};self.xmagic = [[XMagic alloc] initWithRenderSize:CGSizeMake(720, 1280) assetsDict:assetsDict];
+ (void)createXMagic:(EffectMode)effectMode onInitListener:(OnInitListener _Nullable )onInitListener;
typedef NS_ENUM(NSInteger, EffectMode) {EFFECT_MODE_NORMAL = 0,EFFECT_MODE_PRO = 1,};
TencentEffectApi method setDowngradePerformance.enableCustomVideoProcess method in TRTC or Live.XmagicApi method setDowngradePerformance.enableCustomVideoProcess method.XmagicApi object, then please call the following interface immediately after creating the XmagicApi object to enable high-performance mode:enableHighPerformance method.setDowngradePerformance method./*** @param context ApplicationContext* @param isEnableHighPerformance Does it enable high-performance pattern?*/public TEBeautyKit(Context context, boolean isEnableHighPerformance)/**** Asynchronously create a TEBeautyKit object* @param context Android application context* @param isEnableHighPerformance Whether to enable enhanced mode* @param initListener Initialization callback interface*/public static void create(@NonNull Context context, boolean isEnableHighPerformance, @NonNull OnInitListener initListener)
XMagic object, you can enable it during the initialization of XMagic:enableHighPerformance to YES in the assetsDict dictionary.setDowngradePerformance to YES in the assetsDict dictionary.NSDictionary *assetsDict = @{@"core_name":@"LightCore.bundle",@"root_path":[NSBundle mainBundle] bundlePath],@"setDowngradePerformance":@(YES)//YES: Enables high-performance mode; NO: Does not enable high-performance mode. By default, high-performance mode is not enabled.};self.xmagic = [[XMagic alloc] initWithRenderSize:CGSizeMake(720, 1280) assetsDict:assetsDict];
/**** Create a TEBeautyKit object* @param isEnableHighPerformance Whether to enable high-performance mode. YES: Enable high-performance mode; NO: Do not enable high-performance mode* @param initListener Initialization callback interface*/+ (void)create:(BOOL)isEnableHighPerformance onInitListener:(OnInitListener _Nullable )onInitListener;
TencentEffectApi method setDowngradePerformance.enableCustomVideoProcess method in TRTC or Live.XmagicApi method setDowngradePerformance.enableCustomVideoProcess method.Feedback