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) {
27  AgoraVideoEffectNodeBeauty = 1 << 0,
29  AgoraVideoEffectNodeStyleMakeup = 1 << 1,
31  AgoraVideoEffectNodeFilter = 1 << 2
32 };
33 
39 typedef NS_ENUM(NSInteger, AgoraVideoEffectAction) {
41  AgoraVideoEffectActionSave = 1,
43  AgoraVideoEffectActionReset = 2
44 };
45 
46 #pragma mark - Core Operations
47 
68 - (int)addOrUpdateVideoEffectWithNodeId:(NSUInteger)nodeId
69  templateName:(NSString *)templateName
70 NS_SWIFT_NAME(addOrUpdateVideoEffect(nodeId:templateName:));
71 
83 - (int)removeVideoEffectWithNodeId:(NSUInteger)nodeId
84 NS_SWIFT_NAME(removeVideoEffect(nodeId:));
85 
86 #pragma mark - Effect Operations
87 
88 
101 - (int)performVideoEffectActionWithNodeId:(NSUInteger)nodeId
102  actionId:(AgoraVideoEffectAction)actionId
103 NS_SWIFT_NAME(performVideoEffectAction(nodeId:actionId:));
104 
105 #pragma mark - Parameter Configuration
106 
119 - (int)setVideoEffectFloatParamWithOption:(NSString *)option
120  key:(NSString *)key
121  floatValue:(float)floatValue
122 NS_SWIFT_NAME(setVideoEffectFloatParam(option:key:floatValue:));
123 
137 - (int)setVideoEffectIntParamWithOption:(NSString *)option
138  key:(NSString *)key
139  intValue:(int)intValue
140 NS_SWIFT_NAME(setVideoEffectIntParam(option:key:intValue:));
141 
154 - (int)setVideoEffectBoolParamWithOption:(NSString *)option
155  key:(NSString *)key
156  boolValue:(BOOL)boolValue
157 NS_SWIFT_NAME(setVideoEffectBoolParam(option:key:boolValue:));
158 
159 #pragma mark - Parameter Retrieval
160 
172 - (float)getVideoEffectFloatParamWithOption:(NSString *)option
173  key:(NSString *)key
174 NS_SWIFT_NAME(getVideoEffectFloatParam(option:key:));
175 
187 - (int)getVideoEffectIntParamWithOption:(NSString *)option
188  key:(NSString *)key
189 NS_SWIFT_NAME(getVideoEffectIntParam(option:key:));
190 
202 - (BOOL)getVideoEffectBoolParamWithOption:(NSString *)option
203  key:(NSString *)key
204 NS_SWIFT_NAME(getVideoEffectBoolParam(option:key:));
205 
206 @end
207 
208 NS_ASSUME_NONNULL_END
AgoraObjects.h