Agora RTC Objective-C API Reference Refactor

AgoraMediaFilterExtensionDelegate.h
Go to the documentation of this file.
1 //
2 // AgoraMediaFilterExtensionDelegate.h
3 // Agora SDK
4 //
5 // Created by LLF on 2020-9-21.
6 // Copyright (c) 2020 Agora. All rights reserved.
7 //
8
9 #import <Foundation/Foundation.h>
10 #import "AgoraAudioFilterDelegate.h"
11 #import "AgoraVideoFilterDelegate.h"
12 #import "AgoraVideoSinkDelegate.h"
13
14 typedef NS_ENUM(NSInteger, AgoraExtProviderType) {
15 AgoraExtProviderTypeLocalAudioFilter = 0,
16 AgoraExtProviderTypeRemoteAudioFilter = 1,
17 AgoraExtProviderTypeLocalVideoFilter = 2,
18 AgoraExtProviderTypeRemoteVideoFilter = 3,
19 AgoraExtProviderTypeLocalVideoSink = 4,
20 AgoraExtProviderTypeRemoteVideoSink = 5,
21 AgoraExtProviderTypeUnknown = 6,
22 };
23
24 typedef NS_ENUM(NSInteger, AgoraExtLogLevel) {
25 AgoraExtLogLevelNone = 0x0000,
26 AgoraExtLogLevelInfo = 0x0001,
27 AgoraExtLogLevelWarn = 0x0002,
28 AgoraExtLogLevelError = 0x0004,
29 AgoraExtLogLevelFatal = 0x0008,
30 };
31
32 @protocol AgoraExtControlDelegate <NSObject>
41 - (NSInteger)log:(AgoraExtLogLevel)level
42 message:(NSString * _Nullable)message NS_SWIFT_NAME(log(_:message:));
43
44 - (NSInteger)fireEvent:(NSString * _Nonnull)provider
45 extension:(NSString * _Nullable)extension
46 key:(NSString * _Nullable)key
47 value:(NSString * _Nullable)value NS_SWIFT_NAME(fireEvent(_:extension:key:value:));
48
49 @end
50
51 @protocol AgoraExtProviderDelegate <NSObject>
52
53 - (NSArray<AgoraExtensionMetaInfo*> * _Nonnull)getExtenionMetaInfoList NS_SWIFT_NAME(getExtenionMetaInfoList());
54
55 - (void)setExtensionControl:(id<AgoraExtControlDelegate> _Nullable)control NS_SWIFT_NAME(setExtensionControl(_:));
56 - (id<AgoraAudioFilterDelegate> _Nullable)createAudioFilter NS_SWIFT_NAME(createAudioFilter());
57 - (id<AgoraVideoFilterDelegate> _Nullable)createVideoFilter NS_SWIFT_NAME(createVideoFilter());
58 - (id<AgoraVideoSinkDelegate> _Nullable)createVideoSink NS_SWIFT_NAME(createVideoSink());
59
60 @end
61
62 /*
63 * If you prefer to use cpp to implement Extension Plugin, you MUST implement
64 * - (NSString * _Nonnull)vendor; & - (void * _Nullable)mediaFilterRawProvider; interface methods
65 * If you prefer to use ObjC to implement Extension Plugin, you MUST implement
66 * - (NSString * _Nonnull)vendor; & - (id<AgoraExtProviderDelegate> _Nullable)mediaFilterProvider; interface methods
67 */
68 @protocol AgoraMediaFilterExtensionDelegate <NSObject>
69 /* Media filter(audio filter or video fitler) name, shoud be unique
70 *
71 */
72 - (NSString * _Nonnull)vendor NS_SWIFT_NAME(vendor());
73
74 @optional
75 /* Meida filter(audio filter or video filter or video sink) pointer,
76 * this pointer MUST implement AgoraExtProviderDelegate interface
77 */
78 - (id<AgoraExtProviderDelegate> _Nullable)mediaFilterProvider NS_SWIFT_NAME(mediaFilterProvider());
79
80 /* Meida filter(audio filter or video filter) pointer,
81 * this pointer MUST implement IExtensionProvider interface
82 */
83 - (void * _Nullable)mediaFilterRawProvider NS_SWIFT_NAME(mediaFilterRawProvider());
84
85 @end
AgoraExtProviderTypeLocalVideoSink
@ AgoraExtProviderTypeLocalVideoSink
Definition: AgoraMediaFilterExtensionDelegate.h:19
-[AgoraMediaFilterExtensionDelegate-p mediaFilterProvider]
id< AgoraExtProviderDelegate > _Nullable mediaFilterProvider()
AgoraAudioFilterDelegate-p
Definition: AgoraAudioFilterDelegate.h:18
AgoraExtLogLevelInfo
@ AgoraExtLogLevelInfo
Definition: AgoraMediaFilterExtensionDelegate.h:26
AgoraExtensionMetaInfo
Definition: AgoraExtObjects.h:189
AgoraExtProviderTypeRemoteVideoSink
@ AgoraExtProviderTypeRemoteVideoSink
Definition: AgoraMediaFilterExtensionDelegate.h:20
AgoraExtLogLevelError
@ AgoraExtLogLevelError
Definition: AgoraMediaFilterExtensionDelegate.h:28
AgoraVideoFilterDelegate.h
AgoraExtLogLevelFatal
@ AgoraExtLogLevelFatal
Definition: AgoraMediaFilterExtensionDelegate.h:29
-[AgoraMediaFilterExtensionDelegate-p mediaFilterRawProvider]
void *_Nullable mediaFilterRawProvider()
AgoraExtLogLevelWarn
@ AgoraExtLogLevelWarn
Definition: AgoraMediaFilterExtensionDelegate.h:27
AgoraExtProviderTypeRemoteVideoFilter
@ AgoraExtProviderTypeRemoteVideoFilter
Definition: AgoraMediaFilterExtensionDelegate.h:18
AgoraMediaFilterExtensionDelegate-p
Definition: AgoraMediaFilterExtensionDelegate.h:68
AgoraAudioFilterDelegate.h
AgoraExtProviderDelegate-p
Definition: AgoraMediaFilterExtensionDelegate.h:51
-[AgoraExtProviderDelegate-p createVideoSink]
id< AgoraVideoSinkDelegate > _Nullable createVideoSink()
AgoraExtLogLevel
AgoraExtLogLevel
Definition: AgoraMediaFilterExtensionDelegate.h:24
AgoraExtProviderTypeLocalVideoFilter
@ AgoraExtProviderTypeLocalVideoFilter
Definition: AgoraMediaFilterExtensionDelegate.h:17
AgoraVideoSinkDelegate.h
-[AgoraExtProviderDelegate-p getExtenionMetaInfoList]
NSArray< AgoraExtensionMetaInfo * > *_Nonnull getExtenionMetaInfoList()
AgoraExtProviderTypeRemoteAudioFilter
@ AgoraExtProviderTypeRemoteAudioFilter
Definition: AgoraMediaFilterExtensionDelegate.h:16
-[AgoraExtProviderDelegate-p createAudioFilter]
id< AgoraAudioFilterDelegate > _Nullable createAudioFilter()
AgoraExtProviderTypeUnknown
@ AgoraExtProviderTypeUnknown
Definition: AgoraMediaFilterExtensionDelegate.h:21
AgoraVideoSinkDelegate-p
Definition: AgoraVideoSinkDelegate.h:15
-[AgoraMediaFilterExtensionDelegate-p vendor]
NSString *_Nonnull vendor()
AgoraExtLogLevelNone
@ AgoraExtLogLevelNone
Definition: AgoraMediaFilterExtensionDelegate.h:25
AgoraExtControlDelegate-p
Definition: AgoraMediaFilterExtensionDelegate.h:32
-[AgoraExtProviderDelegate-p createVideoFilter]
id< AgoraVideoFilterDelegate > _Nullable createVideoFilter()
AgoraVideoFilterDelegate-p
Definition: AgoraVideoFilterDelegate.h:43
AgoraExtProviderType
AgoraExtProviderType
Definition: AgoraMediaFilterExtensionDelegate.h:14
AgoraExtProviderTypeLocalAudioFilter
@ AgoraExtProviderTypeLocalAudioFilter
Definition: AgoraMediaFilterExtensionDelegate.h:15