tencent cloud

Tencent Effect SDK

제품 소개
기본 개념
제품 장점
시나리오
구매 가이드
가격 리스트
구매 안내
연체 및 환불
Demo 체험
무료 평가판 License
License 가이드
License 추가 및 연장(모바일)
FAQ
SDK 다운로드
기능 설명
SDK 다운로드
SDK 통합 가이드
Tencent Effect SDK 통합하기
원자 기능 통합 가이드
API 문서
iOS
Android
Flutter
기능 사례
SDK 패키지 축소
뷰티 필터 시나리오의 권장 매개변수
UGSV 엔터프라이즈 버전 마이그레이션 가이드
서드 파티 퍼블리셔 Tencent Effect 통합(Flutter)
FAQ
일반 질문
기술 관련 질문
License 관련
TE SDK 정책
개인 정보 보호 정책
데이터 처리 및 보안 계약
문서Tencent Effect SDK

EffectMode (High-Performance Mode) Usage Guide.

포커스 모드
폰트 크기
마지막 업데이트 시간: 2025-06-25 09:38:46

EffectMode

Starting from SDK V3.9.0, when creating an SDK, you must specify EffectMode, which has two values: EffectMode_Normal and EffectMode_Pro.
EffectMode_Normal is equivalent to the "High Performance Mode" of the older SDK version.
EffectMode_Pro is equivalent to the default mode of the old SDK version.
The differences between the two are as follows:


High performance mode

"High performance mode" was a concept before SDK V3.9.0. At that time, the SDK had two modes: high performance mode and default mode.
From V3.9.0 onwards, high performance mode became EffectMode_Normal and default mode became EffectMode_Pro.
For the differences between high performance mode and default mode, please refer to the differences between EffectMode_Normal and EffectMode_Pro mentioned above.

How to set EffectMode in V3.9.0 and later versions

Android
iOS
Flutter
uniapp
Method 1
If you are directly using the 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)
Method 2
If you are using the TEBeautyKit object, you can call the following method to enable high performance mode.
public TEBeautyKit(Context context, EffectMode effectMode)

public static void create(@NonNull Context context, EffectMode effectMode, @NonNull OnInitListener initListener)
The EffectMode is defined as follows:
public enum EffectMode{
NORMAL(0),
PRO(1);
private final int value;
EffectMode(int value) {
this.value = value;
}
public int getValue() {
return value;
}
}
Method 1
If you are directly using the 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];
Method 2
If you are using the TEBeautyKit object, please pass in the EffectMode parameter when calling the createXMagic method.
+ (void)createXMagic:(EffectMode)effectMode onInitListener:(OnInitListener _Nullable )onInitListener;
The EffectMode is defined as follows:
typedef NS_ENUM(NSInteger, EffectMode) {
EFFECT_MODE_NORMAL = 0,
EFFECT_MODE_PRO = 1,
};
You can enable it by calling the TencentEffectApi method setDowngradePerformance.
Note:
This method needs to be called before activating beauty features, i.e., before the enableCustomVideoProcess method in TRTC or Live.
You can enable it by calling the XmagicApi method setDowngradePerformance.
Note:
This method needs to be called before activating beauty features, i.e., before the enableCustomVideoProcess method.

How to enable high performance mode before V3.9.0

Android
iOS
Flutter
uniapp
Method 1
If you are directly using the XmagicApi object, then please call the following interface immediately after creating the XmagicApi object to enable high-performance mode:
For SDK 3.7.0 and later: Call the enableHighPerformance method.
For SDK before 3.7.0: Call the setDowngradePerformance method.
Method 2
If you are using the TEBeautyKit object, you can call the following method to enable high performance mode.
/**
* @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)
Method 1
If you are directly using the XMagic object, you can enable it during the initialization of XMagic:
For SDK 3.7.0 and later: please set enableHighPerformance to YES in the assetsDict dictionary.
For SDK prior to 3.7.0: please set 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];

Method 2
If you are using the TEBeautyKit object, you can call the following method to enable high performance mode.
/**
*
* 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;

You can enable it by calling the TencentEffectApi method setDowngradePerformance.
Note:
This method needs to be called before activating beauty features, i.e., before the enableCustomVideoProcess method in TRTC or Live.
You can enable it by calling the XmagicApi method setDowngradePerformance.
Note:
This method needs to be called before activating beauty features, i.e., before the enableCustomVideoProcess method.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백