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
-[AgoraMediaFilterExtensionDelegate-p vendor]
NSString *__nonnull vendor()
AgoraExtProviderTypeLocalVideoSink
@ AgoraExtProviderTypeLocalVideoSink
Definition: AgoraMediaFilterExtensionDelegate.h:19
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
-[AgoraExtProviderDelegate-p createVideoFilter]
id< AgoraVideoFilterDelegate > __nullable createVideoFilter()
-[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
AgoraExtLogLevel
AgoraExtLogLevel
Definition: AgoraMediaFilterExtensionDelegate.h:24
-[AgoraMediaFilterExtensionDelegate-p mediaFilterProvider]
id< AgoraExtProviderDelegate > __nullable mediaFilterProvider()
AgoraExtProviderTypeLocalVideoFilter
@ AgoraExtProviderTypeLocalVideoFilter
Definition: AgoraMediaFilterExtensionDelegate.h:17
AgoraVideoSinkDelegate.h
-[AgoraExtProviderDelegate-p getExtenionMetaInfoList]
NSArray< AgoraExtensionMetaInfo * > *__nonnull getExtenionMetaInfoList()
AgoraExtProviderTypeRemoteAudioFilter
@ AgoraExtProviderTypeRemoteAudioFilter
Definition: AgoraMediaFilterExtensionDelegate.h:16
AgoraExtProviderTypeUnknown
@ AgoraExtProviderTypeUnknown
Definition: AgoraMediaFilterExtensionDelegate.h:21
AgoraVideoSinkDelegate-p
Definition: AgoraVideoSinkDelegate.h:15
AgoraExtLogLevelNone
@ AgoraExtLogLevelNone
Definition: AgoraMediaFilterExtensionDelegate.h:25
AgoraExtControlDelegate-p
Definition: AgoraMediaFilterExtensionDelegate.h:32
AgoraVideoFilterDelegate-p
Definition: AgoraVideoFilterDelegate.h:43
AgoraExtProviderType
AgoraExtProviderType
Definition: AgoraMediaFilterExtensionDelegate.h:14
-[AgoraExtProviderDelegate-p createVideoSink]
id< AgoraVideoSinkDelegate > __nullable createVideoSink()
AgoraExtProviderTypeLocalAudioFilter
@ AgoraExtProviderTypeLocalAudioFilter
Definition: AgoraMediaFilterExtensionDelegate.h:15
-[AgoraExtProviderDelegate-p createAudioFilter]
id< AgoraAudioFilterDelegate > __nullable createAudioFilter()