FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
API-Examples/macOS/SimpleFilter/ExtensionProvider.cpp at main · jinweizhao/API-Examples · GitHub
jinweizhao
/
API-Examples
Public
forked from
AgoraIO/API-Examples
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
API-Examples
/
macOS
/
SimpleFilter
/
ExtensionProvider.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
57 lines (48 loc) · 2.5 KB
Breadcrumbs
API-Examples
/
macOS
/
SimpleFilter
/
ExtensionProvider.cpp
Copy path
File metadata and controls
57 lines (48 loc) · 2.5 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//
//
Created by 张涛 on 2020/4/26.
//
#
include
"
ExtensionProvider.hpp
"
namespace
agora
{
namespace
extension
{
ExtensionProvider::ExtensionProvider
() {
audioProcessor_ =
new
agora::RefCountedObject<AdjustVolumeAudioProcessor>();
YUVProcessor_ =
new
agora::RefCountedObject<YUVImageProcessor>();
}
ExtensionProvider::~ExtensionProvider
() {
audioProcessor_.
reset
();
YUVProcessor_.
reset
();
}
//
Provide information about all plug-ins that support packaging.
//
When the SDK loads the plug-in, it will call this method to send a callback to the plug-in.
//
You need to provide information about all plug-ins that support encapsulation.
void
ExtensionProvider::enumerateExtensions
(ExtensionMetaInfo* extension_list,
int
& extension_count) {
extension_count =
2
;
//
Declare a Video Filter, and IExtensionProvider::createVideoFilter will be called
ExtensionMetaInfo i;
i.
type
=
EXTENSION_TYPE
::
VIDEO_PRE_PROCESSING_FILTER
;
i.
extension_name
= agora::extension::
VIDEO_FILTER_NAME
;
extension_list[
0
] = i;
//
Declare an Audio Filter, and IExtensionProvider::createAudioFilter will be called
ExtensionMetaInfo j;
j.
type
=
EXTENSION_TYPE
::
AUDIO_FILTER
;
j.
extension_name
= agora::extension::
AUDIO_FILTER_NAME
;
extension_list[
1
] = j;
}
//
Create a video plug-in. After the SDK calls this method, you need to return the IExtensionVideoFilter instance
agora_refptr<agora::rtc::IExtensionVideoFilter>
ExtensionProvider::createVideoFilter
(
const
char
* name) {
auto
videoFilter =
new
agora::RefCountedObject<agora::extension::ExtensionVideoFilter>(YUVProcessor_);
return
videoFilter;
}
//
Create a video plug-in. After the SDK calls this method, you need to return the IAudioFilter instance
agora_refptr<agora::rtc::IAudioFilter>
ExtensionProvider::createAudioFilter
(
const
char
* name) {
auto
audioFilter =
new
agora::RefCountedObject<agora::extension::ExtensionAudioFilter>(name, audioProcessor_);
return
audioFilter;
}
agora_refptr<agora::rtc::IVideoSinkBase>
ExtensionProvider::createVideoSink
(
const
char
* name) {
return
nullptr
;
}
void
ExtensionProvider::setExtensionControl
(rtc::IExtensionControl* control){
}
}
}
Back
|
FazBrowse Home
|
New Git URL