Agora Java API Reference for Android
NGIAgoraExtensionProvider.h
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 
36  public:
46  VIDEO_POST_PROCESSING_FILTER,
47  AUDIO_SINK,
48  VIDEO_SINK,
49  /*
50  * Used to modify locally captured audio data to play, such as ear monitoring.
51  */
52  AUDIO_RECORDING_LOCAL_PLAYBACK_FILTER = 10000,
53  /*
54  * Used to modify audio data after the local APM (3A).
55  */
56  AUDIO_POST_PROCESSING_FILTER = 10001,
57  /*
58  * Used to modify received and decoded remote user audio data.
59  */
60  AUDIO_REMOTE_USER_PLAYBACK_FILTER = 10002,
61  /*
62  * note: It is used internally by agora and does not support users other than agora.
63  *
64  * Used to modify the audio data of the sender's PCM source to take effect for sending and local playback.
65  */
66  AUDIO_PCM_SOURCE_FILTER = 10003,
67  /*
68  * note: It is used internally by agora and does not support users other than agora.
69  *
70  * Used to Modifying the audio data of the sender's PCM source is only effect for the sending.
71  */
72  AUDIO_PCM_SOURCE_SENDING_FILTER = 10004,
73  /*
74  * note: It is used internally by agora and does not support users other than agora.
75  *
76  * Used to Modifying the audio data of the sender's PCM source is only effect for the local playback.
77  */
78  AUDIO_PCM_SOURCE_LOCAL_PLAYBACK_FILTER = 10005,
79  /*
80  * note: It is used internally by agora and does not support users other than agora.
81  *
82  * Used to modify local playback audio data after the remote audio mixed.
83  */
84  AUDIO_REMOTE_MIXED_PLAYBACK_FILTER = 10006,
85  /*
86  * Used to modify video data betweent capturer and post-capture observer
87  */
88  VIDEO_POST_CAPTURE_FILTER = 20001,
89  /*
90  * Used to modify video data betweent post-capture observer and preview
91  */
92  VIDEO_PRE_PREVIEW_FILTER = 20002,
93  /*
94  * Used to modify video data betweent adapter and encoder
95  */
96  VIDEO_PRE_ENCODER_FILTER = 20003,
97  UNKNOWN = 0xFFFF,
98  };
99 
101  EXTENSION_TYPE type;
102  const char* extension_name;
103  };
104 
105  virtual void setExtensionControl(IExtensionControl* control) {}
106 
107  virtual void enumerateExtensions(ExtensionMetaInfo* extension_list,
108  int& extension_count) {
109  (void) extension_list;
110  extension_count = 0;
111  }
112 
113  virtual agora_refptr<IAudioFilter> createAudioFilter(const char* name) {
114  return NULL;
115  }
116 
117  virtual agora_refptr<IExtensionVideoFilter> createVideoFilter(const char* name) {
118  return NULL;
119  }
120 
121  virtual agora_refptr<IVideoSinkBase> createVideoSink(const char* name) {
122  return NULL;
123  }
124 
125  virtual void setProperty(const char* key, const char* value) {}
126 
127  protected:
128  virtual ~IExtensionProvider() {}
129 };
130 
132  public:
133  virtual void getExtensionVersion(const char* extension_name, ExtensionVersion& version) = 0;
134 };
135 
136 } // namespace rtc
137 } // namespace agora
agora::rtc::IExtensionProvider::ExtensionMetaInfo
Definition: NGIAgoraExtensionProvider.h:100
agora::rtc::ExtensionVersion
Definition: AgoraExtensionVersion.h:14
agora::agora_refptr
Definition: AgoraRefPtr.h:44
agora::rtc::IExtensionProviderV2
Definition: NGIAgoraExtensionProvider.h:131
agora::rtc::IExtensionProvider
Definition: NGIAgoraExtensionProvider.h:35
agora::rtc::IExtensionProvider::VIDEO_PRE_PROCESSING_FILTER
@ VIDEO_PRE_PROCESSING_FILTER
Definition: NGIAgoraExtensionProvider.h:45
agora::RefCountInterface
Definition: AgoraRefPtr.h:31
agora::rtc::IExtensionProvider::EXTENSION_TYPE
EXTENSION_TYPE
Definition: NGIAgoraExtensionProvider.h:37
agora::rtc::IExtensionControl
Definition: NGIAgoraExtensionControl.h:22
agora::rtc::IExtensionProvider::AUDIO_FILTER
@ AUDIO_FILTER
Definition: NGIAgoraExtensionProvider.h:41