Agora RTC Objective-C API Reference Refactor

NGIAgoraExtensionProvider.h
Go to the documentation of this file.
1 //
2 // Agora SDK
3 //
4 // Copyright (c) 2021 Agora.io. All rights reserved.
5 //
6
7 #pragma once
8
9 #include "AgoraRefPtr.h"
10 #include "NGIAgoraMediaNode.h"
11 #include "AgoraExtensionVersion.h"
12
13 namespace agora {
14 namespace rtc {
15 class IExtensionControl;
16
35 class IExtensionProvider : public RefCountInterface {
36 public:
37 enum EXTENSION_TYPE {
41 AUDIO_FILTER,
42 VIDEO_PRE_PROCESSING_FILTER,
43 VIDEO_POST_PROCESSING_FILTER,
44 AUDIO_SINK,
45 VIDEO_SINK,
46 /*
47 * Used to modify locally captured audio data to play, such as ear monitoring.
48 */
49 AUDIO_RECORDING_LOCAL_PLAYBACK_FILTER = 10000,
50 /*
51 * Used to modify audio data after the local APM (3A).
52 */
53 AUDIO_POST_PROCESSING_FILTER = 10001,
54 /*
55 * Used to modify received and decoded remote user audio data.
56 */
57 AUDIO_REMOTE_USER_PLAYBACK_FILTER = 10002,
58 /*
59 * note: It is used internally by agora and does not support users other than agora.
60 *
61 * Used to modify the audio data of the sender's PCM source to take effect for sending and local playback.
62 */
63 AUDIO_PCM_SOURCE_FILTER = 10003,
64 /*
65 * note: It is used internally by agora and does not support users other than agora.
66 *
67 * Used to Modifying the audio data of the sender's PCM source is only effect for the sending.
68 */
69 AUDIO_PCM_SOURCE_SENDING_FILTER = 10004,
70 /*
71 * note: It is used internally by agora and does not support users other than agora.
72 *
73 * Used to Modifying the audio data of the sender's PCM source is only effect for the local playback.
74 */
75 AUDIO_PCM_SOURCE_LOCAL_PLAYBACK_FILTER = 10005,
76 /*
77 * note: It is used internally by agora and does not support users other than agora.
78 *
79 * Used to modify local playback audio data after the remote audio mixed.
80 */
81 AUDIO_REMOTE_MIXED_PLAYBACK_FILTER = 10006,
82 UNKNOWN = 0xFFFF,
83 };
84
85 struct ExtensionMetaInfo {
86 EXTENSION_TYPE type;
87 const char* extension_name;
88 };
89
90 virtual void setExtensionControl(IExtensionControl* control) {}
91
92 virtual void enumerateExtensions(ExtensionMetaInfo* extension_list,
93 int& extension_count) {
94 (void) extension_list;
95 extension_count = 0;
96 }
97
98 virtual agora_refptr<IAudioFilter> createAudioFilter(const char* name) {
99 return NULL;
100 }
101
102 virtual agora_refptr<IExtensionVideoFilter> createVideoFilter(const char* name) {
103 return NULL;
104 }
105
106 virtual agora_refptr<IVideoSinkBase> createVideoSink(const char* name) {
107 return NULL;
108 }
109
110 virtual void setProperty(const char* key, const char* value) {}
111
112 protected:
113 virtual ~IExtensionProvider() {}
114 };
115
116 class IExtensionProviderV2 : public IExtensionProvider {
117 public:
118 virtual void getExtensionVersion(const char* extension_name, ExtensionVersion& version) = 0;
119 };
120
121 } // namespace rtc
122 } // namespace agora
agora::rtc::IExtensionProvider::AUDIO_PCM_SOURCE_FILTER
@ AUDIO_PCM_SOURCE_FILTER
Definition: NGIAgoraExtensionProvider.h:63
agora::rtc::IExtensionProvider::ExtensionMetaInfo::type
EXTENSION_TYPE type
Definition: NGIAgoraExtensionProvider.h:86
agora::rtc::IExtensionProvider::ExtensionMetaInfo::extension_name
const char * extension_name
Definition: NGIAgoraExtensionProvider.h:87
NGIAgoraMediaNode.h
agora::rtc::IExtensionProvider::ExtensionMetaInfo
Definition: NGIAgoraExtensionProvider.h:85
agora::rtc::ExtensionVersion
Definition: AgoraExtensionVersion.h:14
agora::agora_refptr
Definition: AgoraRefPtr.h:44
AgoraExtensionVersion.h
agora::rtc::IExtensionProvider::VIDEO_SINK
@ VIDEO_SINK
Definition: NGIAgoraExtensionProvider.h:45
agora::rtc::IExtensionProviderV2::getExtensionVersion
virtual void getExtensionVersion(const char *extension_name, ExtensionVersion &version)=0
agora::rtc::IExtensionProvider::AUDIO_REMOTE_MIXED_PLAYBACK_FILTER
@ AUDIO_REMOTE_MIXED_PLAYBACK_FILTER
Definition: NGIAgoraExtensionProvider.h:81
agora::rtc::IExtensionProvider::~IExtensionProvider
virtual ~IExtensionProvider()
Definition: NGIAgoraExtensionProvider.h:113
agora::rtc::IExtensionProvider::createVideoSink
virtual agora_refptr< IVideoSinkBase > createVideoSink(const char *name)
Definition: NGIAgoraExtensionProvider.h:106
agora::rtc::IExtensionProviderV2
Definition: NGIAgoraExtensionProvider.h:116
agora
Definition: AgoraAtomicOps.h:21
agora::rtc::IExtensionProvider::EXTENSION_TYPE
EXTENSION_TYPE
Definition: NGIAgoraExtensionProvider.h:37
agora::rtc::IExtensionProvider::AUDIO_POST_PROCESSING_FILTER
@ AUDIO_POST_PROCESSING_FILTER
Definition: NGIAgoraExtensionProvider.h:53
agora::rtc::IExtensionProvider::AUDIO_PCM_SOURCE_SENDING_FILTER
@ AUDIO_PCM_SOURCE_SENDING_FILTER
Definition: NGIAgoraExtensionProvider.h:69
agora::rtc::IExtensionProvider::VIDEO_PRE_PROCESSING_FILTER
@ VIDEO_PRE_PROCESSING_FILTER
Definition: NGIAgoraExtensionProvider.h:42
agora::rtc::IExtensionProvider::AUDIO_SINK
@ AUDIO_SINK
Definition: NGIAgoraExtensionProvider.h:44
agora::rtc::IExtensionProvider::UNKNOWN
@ UNKNOWN
Definition: NGIAgoraExtensionProvider.h:82
agora::rtc::IExtensionProvider::setProperty
virtual void setProperty(const char *key, const char *value)
Definition: NGIAgoraExtensionProvider.h:110
agora::rtc::IExtensionProvider::AUDIO_PCM_SOURCE_LOCAL_PLAYBACK_FILTER
@ AUDIO_PCM_SOURCE_LOCAL_PLAYBACK_FILTER
Definition: NGIAgoraExtensionProvider.h:75
agora::rtc::IExtensionProvider
Definition: NGIAgoraExtensionProvider.h:35
agora::rtc::IExtensionProvider::VIDEO_POST_PROCESSING_FILTER
@ VIDEO_POST_PROCESSING_FILTER
Definition: NGIAgoraExtensionProvider.h:43
agora::rtc::IExtensionProvider::AUDIO_FILTER
@ AUDIO_FILTER
Definition: NGIAgoraExtensionProvider.h:41
AgoraRefPtr.h
agora::rtc::IExtensionProvider::setExtensionControl
virtual void setExtensionControl(IExtensionControl *control)
Definition: NGIAgoraExtensionProvider.h:90
agora::rtc::IExtensionProvider::AUDIO_RECORDING_LOCAL_PLAYBACK_FILTER
@ AUDIO_RECORDING_LOCAL_PLAYBACK_FILTER
Definition: NGIAgoraExtensionProvider.h:49
agora::RefCountInterface
Definition: AgoraRefPtr.h:31
agora::rtc::IExtensionProvider::createVideoFilter
virtual agora_refptr< IExtensionVideoFilter > createVideoFilter(const char *name)
Definition: NGIAgoraExtensionProvider.h:102
agora::rtc::IExtensionProvider::enumerateExtensions
virtual void enumerateExtensions(ExtensionMetaInfo *extension_list, int &extension_count)
Definition: NGIAgoraExtensionProvider.h:92
agora::rtc::IExtensionProvider::createAudioFilter
virtual agora_refptr< IAudioFilter > createAudioFilter(const char *name)
Definition: NGIAgoraExtensionProvider.h:98
agora::rtc::IExtensionProvider::AUDIO_REMOTE_USER_PLAYBACK_FILTER
@ AUDIO_REMOTE_USER_PLAYBACK_FILTER
Definition: NGIAgoraExtensionProvider.h:57
agora::rtc::IExtensionControl
Definition: NGIAgoraExtensionControl.h:23