Agora RTC Objective-C API Reference  Refactor
AgoraVideoEffectObject.h
Go to the documentation of this file.
1 // AgoraVideoEffectObject.h
2 // AgoraVideoEffect
3 //
4 // Copyright (c) 2023 Agora. All rights reserved.
5 //
6 
7 #import <Foundation/Foundation.h>
8 #import "AgoraObjects.h"
9 
10 NS_ASSUME_NONNULL_BEGIN
11 
17 @protocol AgoraVideoEffectObject <NSObject>
18 
19 #pragma mark - Enumerations
20 
25 typedef NS_ENUM(NSUInteger, AgoraVideoEffectNodeId) {
29  AgoraVideoEffectNodeBeauty = 1 << 0,
33  AgoraVideoEffectNodeStyleMakeup = 1 << 1,
37  AgoraVideoEffectNodeFilter = 1 << 2,
41  AgoraVideoEffectNodeSticker = 1 << 3
42 };
43 
49 typedef NS_ENUM(NSInteger, AgoraVideoEffectAction) {
53  AgoraVideoEffectActionSave = 1,
57  AgoraVideoEffectActionReset = 2
58 };
59 
60 #pragma mark - Core Operations
61 
88 - (int)addOrUpdateVideoEffectWithNodeId:(NSUInteger)nodeId
89  templateName:(NSString *)templateName
90 NS_SWIFT_NAME(addOrUpdateVideoEffect(nodeId:templateName:));
91 
104 - (int)removeVideoEffectWithNodeId:(NSUInteger)nodeId
105 NS_SWIFT_NAME(removeVideoEffect(nodeId:));
106 
107 #pragma mark - Effect Operations
108 
109 
122 - (int)performVideoEffectActionWithNodeId:(NSUInteger)nodeId
123  actionId:(AgoraVideoEffectAction)actionId
124 NS_SWIFT_NAME(performVideoEffectAction(nodeId:actionId:));
125 
126 #pragma mark - Parameter Configuration
127 
140 - (int)setVideoEffectStringParamWithOption:(NSString *)option
141  key:(NSString *)key
142  stringValue:(NSString *)stringValue
143 NS_SWIFT_NAME(setVideoEffectStringParam(option:key:stringValue:));
144 
158 - (int)setVideoEffectFloatParamWithOption:(NSString *)option
159  key:(NSString *)key
160  floatValue:(float)floatValue
161 NS_SWIFT_NAME(setVideoEffectFloatParam(option:key:floatValue:));
162 
176 - (int)setVideoEffectIntParamWithOption:(NSString *)option
177  key:(NSString *)key
178  intValue:(int)intValue
179 NS_SWIFT_NAME(setVideoEffectIntParam(option:key:intValue:));
180 
196 - (int)setVideoEffectBoolParamWithOption:(NSString *)option
197  key:(NSString *)key
198  boolValue:(BOOL)boolValue
199 NS_SWIFT_NAME(setVideoEffectBoolParam(option:key:boolValue:));
200 
201 #pragma mark - Parameter Retrieval
202 
218 - (float)getVideoEffectFloatParamWithOption:(NSString *)option
219  key:(NSString *)key
220 NS_SWIFT_NAME(getVideoEffectFloatParam(option:key:));
221 
237 - (int)getVideoEffectIntParamWithOption:(NSString *)option
238  key:(NSString *)key
239 NS_SWIFT_NAME(getVideoEffectIntParam(option:key:));
240 
253 - (BOOL)getVideoEffectBoolParamWithOption:(NSString *)option
254  key:(NSString *)key
255 NS_SWIFT_NAME(getVideoEffectBoolParam(option:key:));
256 
257 @end
258 
259 NS_ASSUME_NONNULL_END
AgoraObjects.h