Skip to content

Commit d6dc03c

Browse files
committed
[AUTO] Update native headers to rtc_4.2.2.154
1 parent 918a240 commit d6dc03c

27 files changed

+24069
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#pragma once
2+
3+
#include "AgoraBase.h"
4+
#include "IAgoraMediaEngine.h"
5+
6+
namespace agora {
7+
namespace media {
8+
namespace ext {
9+
10+
class IMediaEngine {
11+
// ----------------------------- 👇🏻new API👇🏻 -----------------------------
12+
13+
// add for registerAudioFrameObserver
14+
// virtual int registerAudioFrameObserver(IAudioFrameObserver* observer) = 0;
15+
virtual int unregisterAudioFrameObserver(IAudioFrameObserver *observer) = 0;
16+
17+
// add for registerVideoFrameObserver
18+
// virtual int registerVideoFrameObserver(IVideoFrameObserver* observer) = 0;
19+
virtual int unregisterVideoFrameObserver(IVideoFrameObserver *observer) = 0;
20+
21+
// add for registerVideoEncodedFrameObserver
22+
// virtual int registerVideoEncodedFrameObserver(IVideoEncodedFrameObserver* observer) = 0;
23+
virtual int
24+
unregisterVideoEncodedFrameObserver(IVideoEncodedFrameObserver *observer) = 0;
25+
26+
// ----------------------------- 👆🏻new API👆🏻 -----------------------------
27+
};
28+
29+
} // namespace ext
30+
} // namespace media
31+
} // namespace agora
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#pragma once
2+
3+
#include "AgoraBase.h"
4+
#include "AgoraMediaBase.h"
5+
#include "IAgoraMediaPlayer.h"
6+
7+
namespace agora {
8+
namespace rtc {
9+
namespace ext {
10+
11+
class IMediaPlayerVideoFrameObserver {
12+
virtual void onFrame(const agora::media::base::VideoFrame *frame) = 0;
13+
};
14+
15+
class IMediaPlayer {
16+
// ----------------------------- 👇🏻overload API👇🏻 -----------------------------
17+
18+
// virtual int setPlayerOption(const char* key, int value) = 0;
19+
virtual int setPlayerOptionInInt(const char *key, int value) = 0;
20+
21+
// virtual int setPlayerOption(const char* key, const char* value) = 0;
22+
virtual int setPlayerOptionInString(const char *key, const char *value) = 0;
23+
24+
// virtual int registerAudioFrameObserver(media::IAudioPcmFrameSink* observer,
25+
// RAW_AUDIO_FRAME_OP_MODE_TYPE mode) = 0;
26+
virtual int
27+
registerAudioFrameObserver(media::IAudioPcmFrameSink* observer,
28+
RAW_AUDIO_FRAME_OP_MODE_TYPE mode = RAW_AUDIO_FRAME_OP_MODE_TYPE::RAW_AUDIO_FRAME_OP_MODE_READ_ONLY) = 0;
29+
30+
// ----------------------------- 👆🏻overload API👆🏻 -----------------------------
31+
32+
// ----------------------------- 👇🏻rename API👇🏻 -----------------------------
33+
34+
// virtual int registerVideoFrameObserver(media::base::IVideoFrameObserver* observer) = 0;
35+
virtual int
36+
registerVideoFrameObserver(IMediaPlayerVideoFrameObserver *observer) = 0;
37+
38+
// virtual int unregisterVideoFrameObserver(agora::media::base::IVideoFrameObserver* observer) = 0;
39+
virtual int
40+
unregisterVideoFrameObserver(IMediaPlayerVideoFrameObserver *observer) = 0;
41+
42+
// ----------------------------- 👆🏻rename API👆🏻 -----------------------------
43+
};
44+
45+
} // namespace ext
46+
} // namespace rtc
47+
} // namespace agora
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#pragma once
2+
3+
#include "IAgoraMediaPlayer.h"
4+
5+
namespace agora {
6+
namespace rtc {
7+
namespace ext {
8+
9+
class IMusicPlayer : public IMediaPlayer {
10+
// ----------------------------- 👇🏻overload API👇🏻 -----------------------------
11+
12+
// virtual int open(int64_t songCode, int64_t startPos = 0) = 0;
13+
virtual int openWithSongCode(int64_t songCode, int64_t startPos = 0) = 0;
14+
15+
// ----------------------------- 👆🏻overload API👆🏻 -----------------------------
16+
};
17+
18+
class IMusicContentCenter
19+
{
20+
// reason: keep
21+
// virtual int preload(agora::util::AString& requestId, int64_t songCode) = 0;
22+
//
23+
// original:
24+
// virtual int preload(int64_t songCode, const char* jsonOption) __deprecated = 0;
25+
// virtual int preload(agora::util::AString& requestId, int64_t songCode) = 0;
26+
virtual int preload(agora::util::AString& requestId, int64_t songCode) = 0;
27+
};
28+
} // namespace ext
29+
} // namespace rtc
30+
} // namespace agora
Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
#pragma once
2+
3+
#include "AgoraBase.h"
4+
#include "IAgoraMediaEngine.h"
5+
#include "IAgoraMediaRecorder.h"
6+
#include "IAgoraMusicContentCenter.h"
7+
#include "IAgoraRtcEngine.h"
8+
#include "IAgoraSpatialAudio.h"
9+
#include "IAudioDeviceManager.h"
10+
11+
namespace agora {
12+
namespace rtc {
13+
namespace ext {
14+
15+
// virtual const char* getVersion(int* build) = 0;
16+
struct SDKBuildInfo {
17+
int build;
18+
const char *version;
19+
};
20+
21+
// IVideoDeviceCollection
22+
// virtual int getDevice(int index, char deviceName[MAX_DEVICE_ID_LENGTH],
23+
// char deviceId[MAX_DEVICE_ID_LENGTH]) = 0;
24+
struct VideoDeviceInfo {
25+
const char *deviceId;
26+
const char *deviceName;
27+
};
28+
29+
// IAudioDeviceCollection
30+
// virtual int getDevice(int index, char deviceName[MAX_DEVICE_ID_LENGTH],
31+
// char deviceId[MAX_DEVICE_ID_LENGTH]) = 0;
32+
struct AudioDeviceInfo {
33+
const char *deviceId;
34+
const char *deviceName;
35+
};
36+
37+
class IRtcEngine {
38+
// ----------------------------- 👇🏻overload API👇🏻 -----------------------------
39+
40+
// virtual int joinChannel(const char* token, const char* channelId, uid_t uid,
41+
// const ChannelMediaOptions& options) = 0;
42+
virtual int joinChannel(const char *token, const char *channelId, uid_t uid,
43+
const ChannelMediaOptions &options) = 0;
44+
45+
// virtual int leaveChannel(const LeaveChannelOptions& options) = 0;
46+
virtual int leaveChannel(const LeaveChannelOptions *options = NULL) = 0;
47+
48+
// virtual int setClientRole(CLIENT_ROLE_TYPE role, const ClientRoleOptions& options) = 0;
49+
virtual int setClientRole(CLIENT_ROLE_TYPE role,
50+
const ClientRoleOptions *options = NULL) = 0;
51+
52+
// virtual int startEchoTest(const EchoTestConfiguration& config) = 0;
53+
virtual int startEchoTest(const EchoTestConfiguration &config) = 0;
54+
55+
// virtual int startPreview(VIDEO_SOURCE_TYPE sourceType) = 0;
56+
virtual int
57+
startPreview(VIDEO_SOURCE_TYPE sourceType =
58+
VIDEO_SOURCE_TYPE::VIDEO_SOURCE_CAMERA_PRIMARY) = 0;
59+
60+
// virtual int stopPreview(VIDEO_SOURCE_TYPE sourceType) = 0;
61+
virtual int
62+
stopPreview(VIDEO_SOURCE_TYPE sourceType =
63+
VIDEO_SOURCE_TYPE::VIDEO_SOURCE_CAMERA_PRIMARY) = 0;
64+
65+
// virtual int setAudioProfile(AUDIO_PROFILE_TYPE profile, AUDIO_SCENARIO_TYPE scenario) __deprecated = 0;
66+
virtual int
67+
setAudioProfile(AUDIO_PROFILE_TYPE profile,
68+
AUDIO_SCENARIO_TYPE scenario =
69+
AUDIO_SCENARIO_TYPE::AUDIO_SCENARIO_DEFAULT) = 0;
70+
71+
// virtual int startAudioRecording(const AudioRecordingConfiguration& config) = 0;
72+
virtual int
73+
startAudioRecording(const AudioRecordingConfiguration &config) = 0;
74+
75+
// virtual int startAudioMixing(const char* filePath, bool loopback, int cycle, int startPos) = 0;
76+
virtual int startAudioMixing(const char *filePath, bool loopback, int cycle,
77+
int startPos = 0) = 0;
78+
79+
// virtual int setLocalRenderMode(media::base::RENDER_MODE_TYPE renderMode, VIDEO_MIRROR_MODE_TYPE mirrorMode) = 0;
80+
virtual int
81+
setLocalRenderMode(media::base::RENDER_MODE_TYPE renderMode,
82+
VIDEO_MIRROR_MODE_TYPE mirrorMode =
83+
VIDEO_MIRROR_MODE_TYPE::VIDEO_MIRROR_MODE_AUTO) = 0;
84+
85+
// virtual int enableDualStreamMode(bool enabled, const SimulcastStreamConfig& streamConfig) = 0;
86+
virtual int
87+
enableDualStreamMode(bool enabled,
88+
const SimulcastStreamConfig *streamConfig = NULL) = 0;
89+
90+
// virtual int setDualStreamMode(SIMULCAST_STREAM_MODE mode,
91+
// const SimulcastStreamConfig& streamConfig) = 0;
92+
virtual int
93+
setDualStreamMode(SIMULCAST_STREAM_MODE mode,
94+
const SimulcastStreamConfig *streamConfig = NULL) = 0;
95+
96+
// virtual int createDataStream(int* streamId, DataStreamConfig& config) = 0;
97+
virtual int createDataStream(int *streamId,
98+
const DataStreamConfig &config) = 0;
99+
100+
// virtual int addVideoWatermark(const char* watermarkUrl, const WatermarkOptions& options) = 0;
101+
virtual int addVideoWatermark(const char *watermarkUrl,
102+
const WatermarkOptions &options) = 0;
103+
104+
// virtual int joinChannelWithUserAccount(const char* token, const char* channelId,
105+
// const char* userAccount, const ChannelMediaOptions& options) = 0;
106+
virtual int
107+
joinChannelWithUserAccount(const char *token, const char *channelId,
108+
const char *userAccount,
109+
const ChannelMediaOptions *options = NULL) = 0;
110+
111+
// virtual int enableExtension(const char* provider, const char* extension, const ExtensionInfo& extensionInfo, bool enable = true) = 0;
112+
virtual int enableExtension(const char *provider, const char *extension,
113+
bool enable = true,
114+
agora::media::MEDIA_SOURCE_TYPE type =
115+
agora::media::UNKNOWN_MEDIA_SOURCE) = 0;
116+
117+
// virtual int setExtensionProperty(
118+
// const char* provider, const char* extension,
119+
// const char* key, const char* value, agora::media::MEDIA_SOURCE_TYPE type = agora::media::UNKNOWN_MEDIA_SOURCE) = 0;
120+
virtual int setExtensionProperty(const char *provider, const char *extension,
121+
const char *key, const char *value,
122+
agora::media::MEDIA_SOURCE_TYPE type =
123+
agora::media::UNKNOWN_MEDIA_SOURCE) = 0;
124+
125+
// virtual int getExtensionProperty(
126+
// const char* provider, const char* extension,
127+
// const char* key, char* value, int buf_len, agora::media::MEDIA_SOURCE_TYPE type = agora::media::UNKNOWN_MEDIA_SOURCE) = 0;
128+
virtual int getExtensionProperty(const char *provider, const char *extension,
129+
const char *key, char *value, int buf_len,
130+
agora::media::MEDIA_SOURCE_TYPE type =
131+
agora::media::UNKNOWN_MEDIA_SOURCE) = 0;
132+
133+
// virtual int startScreenCapture(const ScreenCaptureParameters2& captureParams) = 0;
134+
virtual int
135+
startScreenCapture(const ScreenCaptureParameters2 &captureParams) = 0;
136+
137+
// virtual int startScreenCapture(VIDEO_SOURCE_TYPE sourceType, const ScreenCaptureConfiguration& config) = 0;
138+
virtual int startScreenCaptureBySourceType(
139+
VIDEO_SOURCE_TYPE sourceType,
140+
const ScreenCaptureConfiguration &config) = 0;
141+
142+
// virtual int stopScreenCapture() = 0;
143+
virtual int stopScreenCapture() = 0;
144+
145+
// virtual int stopScreenCapture(VIDEO_SOURCE_TYPE sourceType) = 0;
146+
virtual int stopScreenCaptureBySourceType(VIDEO_SOURCE_TYPE sourceType) = 0;
147+
148+
// ----------------------------- 👆🏻overload API👆🏻 -----------------------------
149+
150+
// ----------------------------- 👇🏻rename API👇🏻 -----------------------------
151+
152+
// virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0;
153+
// AGORA_IID_AUDIO_DEVICE_MANAGER = 1,
154+
virtual IAudioDeviceManager *getAudioDeviceManager() = 0;
155+
156+
// virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0;
157+
// AGORA_IID_VIDEO_DEVICE_MANAGER = 2,
158+
virtual IVideoDeviceManager *getVideoDeviceManager() = 0;
159+
160+
// virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0;
161+
// AGORA_IID_MUSIC_CONTENT_CENTER = 15,
162+
virtual IMusicContentCenter *getMusicContentCenter() = 0;
163+
164+
// virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0;
165+
// AGORA_IID_MEDIA_ENGINE = 4,
166+
virtual agora::media::IMediaEngine *getMediaEngine() = 0;
167+
168+
// virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0;
169+
// AGORA_IID_LOCAL_SPATIAL_AUDIO = 11,
170+
virtual ILocalSpatialAudioEngine *getLocalSpatialAudioEngine() = 0;
171+
172+
// virtual bool onReadyToSendMetadata(Metadata &metadata, VIDEO_SOURCE_TYPE source_type) = 0;
173+
virtual int sendMetaData(const IMetadataObserver::Metadata &metadata,
174+
VIDEO_SOURCE_TYPE source_type) = 0;
175+
176+
// virtual int getMaxMetadataSize() { return DEFAULT_METADATA_SIZE_IN_BYTE; }
177+
virtual int setMaxMetadataSize(int size) = 0;
178+
179+
// ----------------------------- 👆🏻rename API👆🏻 -----------------------------
180+
181+
// ----------------------------- 👇🏻new API👇🏻 -----------------------------
182+
183+
#ifdef __ELECTRON__
184+
virtual void destroyRendererByView(view_t view) = 0;
185+
186+
virtual void destroyRendererByConfig(VIDEO_SOURCE_TYPE sourceType,
187+
const char *channelId = NULL,
188+
uid_t uid = 0) = 0;
189+
#endif
190+
191+
192+
// add for registerAudioEncodedFrameObserver
193+
// virtual int registerAudioEncodedFrameObserver(const AudioEncodedFrameObserverConfig& config, IAudioEncodedFrameObserver *observer) = 0;
194+
virtual int
195+
unregisterAudioEncodedFrameObserver(IAudioEncodedFrameObserver *observer) = 0;
196+
197+
// add for createAgoraRtcEngine
198+
// AGORA_API agora::rtc::IRtcEngine* AGORA_CALL createAgoraRtcEngine();
199+
virtual intptr_t getNativeHandle() = 0;
200+
201+
// ----------------------------- 👆🏻new API👆🏻 -----------------------------
202+
203+
// reason: keep
204+
// original:
205+
// virtual int preloadChannel(const char* token, const char* channelId, uid_t uid) = 0;
206+
virtual int preloadChannel(const char* token, const char* channelId, uid_t uid) = 0;
207+
208+
// reason: rename
209+
// original:
210+
// virtual int preloadChannel(const char* token, const char* channelId, const char* userAccount) = 0;
211+
virtual int preloadChannelWithUserAccount(const char* token, const char* channelId, const char* userAccount) = 0;
212+
};
213+
214+
} // namespace ext
215+
} // namespace rtc
216+
} // namespace agora
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#pragma once
2+
3+
#include "AgoraBase.h"
4+
#include "IAgoraRtcEngineEx.h"
5+
6+
namespace agora {
7+
namespace rtc {
8+
namespace ext {
9+
10+
class IRtcEngineEx {
11+
// ----------------------------- 👇🏻overload API👇🏻 -----------------------------
12+
13+
// virtual int leaveChannelEx(const RtcConnection& connection, const LeaveChannelOptions& options) = 0;
14+
virtual int leaveChannelEx(const RtcConnection &connection,
15+
const LeaveChannelOptions *options = NULL) = 0;
16+
17+
// virtual int createDataStreamEx(int* streamId, DataStreamConfig& config, const RtcConnection& connection) = 0;
18+
virtual int createDataStreamEx(int *streamId, DataStreamConfig &config,
19+
const RtcConnection &connection) = 0;
20+
21+
// ----------------------------- 👆🏻overload API👆🏻 -----------------------------
22+
};
23+
24+
} // namespace ext
25+
} // namespace rtc
26+
} // namespace agora
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#pragma once
2+
3+
#include "CustomIAgoraRtcEngine.h"
4+
5+
namespace agora {
6+
namespace rtc {
7+
namespace ext {
8+
9+
class IAudioDeviceManager {
10+
// ----------------------------- 👇🏻rename API👇🏻 -----------------------------
11+
12+
// IAudioDeviceCollection
13+
// virtual int getDefaultDevice(char deviceName[MAX_DEVICE_ID_LENGTH], char deviceId[MAX_DEVICE_ID_LENGTH]) = 0;
14+
virtual AudioDeviceInfo *getPlaybackDefaultDevice() = 0;
15+
16+
// IAudioDeviceCollection
17+
// virtual int getDefaultDevice(char deviceName[MAX_DEVICE_ID_LENGTH], char deviceId[MAX_DEVICE_ID_LENGTH]) = 0;
18+
virtual AudioDeviceInfo *getRecordingDefaultDevice() = 0;
19+
20+
// ----------------------------- 👆🏻rename API👆🏻 -----------------------------
21+
};
22+
23+
} // namespace ext
24+
} // namespace rtc
25+
} // namespace agora

0 commit comments

Comments
 (0)