Skip to content

Commit 48c8c8e

Browse files
authored
[AUTO] Update native headers to rtc_4.2.7.125
1 parent 91991f0 commit 48c8c8e

27 files changed

+24767
-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: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
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+
class IRtcEngineEventHandler {
30+
// ----------------------------- 👇🏻overload API👇🏻 -----------------------------
31+
32+
// virtual void onAudioRoutingChanged(int routing) __deprecated { (void)routing; }
33+
virtual void onAudioRoutingChanged(int deviceType, int routing) {
34+
(void)deviceType;
35+
(void)routing;
36+
}
37+
38+
// ----------------------------- 👆🏻overload API👆🏻 -----------------------------
39+
};
40+
41+
class IRtcEngine {
42+
// ----------------------------- 👇🏻overload API👇🏻 -----------------------------
43+
44+
// virtual int joinChannel(const char* token, const char* channelId, uid_t uid,
45+
// const ChannelMediaOptions& options) = 0;
46+
virtual int joinChannel(const char *token, const char *channelId, uid_t uid,
47+
const ChannelMediaOptions &options) = 0;
48+
49+
// virtual int leaveChannel(const LeaveChannelOptions& options) = 0;
50+
virtual int leaveChannel(const LeaveChannelOptions *options = NULL) = 0;
51+
52+
// virtual int setClientRole(CLIENT_ROLE_TYPE role, const ClientRoleOptions& options) = 0;
53+
virtual int setClientRole(CLIENT_ROLE_TYPE role,
54+
const ClientRoleOptions *options = NULL) = 0;
55+
56+
// virtual int startEchoTest(const EchoTestConfiguration& config) = 0;
57+
virtual int startEchoTest(const EchoTestConfiguration &config) = 0;
58+
59+
// virtual int startPreview(VIDEO_SOURCE_TYPE sourceType) = 0;
60+
virtual int
61+
startPreview(VIDEO_SOURCE_TYPE sourceType =
62+
VIDEO_SOURCE_TYPE::VIDEO_SOURCE_CAMERA_PRIMARY) = 0;
63+
64+
// virtual int stopPreview(VIDEO_SOURCE_TYPE sourceType) = 0;
65+
virtual int
66+
stopPreview(VIDEO_SOURCE_TYPE sourceType =
67+
VIDEO_SOURCE_TYPE::VIDEO_SOURCE_CAMERA_PRIMARY) = 0;
68+
69+
// virtual int setAudioProfile(AUDIO_PROFILE_TYPE profile, AUDIO_SCENARIO_TYPE scenario) __deprecated = 0;
70+
virtual int
71+
setAudioProfile(AUDIO_PROFILE_TYPE profile,
72+
AUDIO_SCENARIO_TYPE scenario =
73+
AUDIO_SCENARIO_TYPE::AUDIO_SCENARIO_DEFAULT) = 0;
74+
75+
// virtual int startAudioRecording(const AudioRecordingConfiguration& config) = 0;
76+
virtual int
77+
startAudioRecording(const AudioRecordingConfiguration &config) = 0;
78+
79+
// virtual int startAudioMixing(const char* filePath, bool loopback, int cycle, int startPos) = 0;
80+
virtual int startAudioMixing(const char *filePath, bool loopback, int cycle,
81+
int startPos = 0) = 0;
82+
83+
// virtual int setLocalRenderMode(media::base::RENDER_MODE_TYPE renderMode, VIDEO_MIRROR_MODE_TYPE mirrorMode) = 0;
84+
virtual int
85+
setLocalRenderMode(media::base::RENDER_MODE_TYPE renderMode,
86+
VIDEO_MIRROR_MODE_TYPE mirrorMode =
87+
VIDEO_MIRROR_MODE_TYPE::VIDEO_MIRROR_MODE_AUTO) = 0;
88+
89+
// virtual int enableDualStreamMode(bool enabled, const SimulcastStreamConfig& streamConfig) = 0;
90+
virtual int
91+
enableDualStreamMode(bool enabled,
92+
const SimulcastStreamConfig *streamConfig = NULL) = 0;
93+
94+
// virtual int setDualStreamMode(SIMULCAST_STREAM_MODE mode,
95+
// const SimulcastStreamConfig& streamConfig) = 0;
96+
virtual int
97+
setDualStreamMode(SIMULCAST_STREAM_MODE mode,
98+
const SimulcastStreamConfig *streamConfig = NULL) = 0;
99+
100+
// virtual int createDataStream(int* streamId, DataStreamConfig& config) = 0;
101+
virtual int createDataStream(int *streamId,
102+
const DataStreamConfig &config) = 0;
103+
104+
// virtual int addVideoWatermark(const char* watermarkUrl, const WatermarkOptions& options) = 0;
105+
virtual int addVideoWatermark(const char *watermarkUrl,
106+
const WatermarkOptions &options) = 0;
107+
108+
// virtual int joinChannelWithUserAccount(const char* token, const char* channelId,
109+
// const char* userAccount, const ChannelMediaOptions& options) = 0;
110+
virtual int
111+
joinChannelWithUserAccount(const char *token, const char *channelId,
112+
const char *userAccount,
113+
const ChannelMediaOptions *options = NULL) = 0;
114+
115+
// virtual int enableExtension(const char* provider, const char* extension, const ExtensionInfo& extensionInfo, bool enable = true) = 0;
116+
virtual int enableExtension(const char *provider, const char *extension,
117+
bool enable = true,
118+
agora::media::MEDIA_SOURCE_TYPE type =
119+
agora::media::UNKNOWN_MEDIA_SOURCE) = 0;
120+
121+
// virtual int setExtensionProperty(
122+
// const char* provider, const char* extension,
123+
// const char* key, const char* value, agora::media::MEDIA_SOURCE_TYPE type = agora::media::UNKNOWN_MEDIA_SOURCE) = 0;
124+
virtual int setExtensionProperty(const char *provider, const char *extension,
125+
const char *key, const char *value,
126+
agora::media::MEDIA_SOURCE_TYPE type =
127+
agora::media::UNKNOWN_MEDIA_SOURCE) = 0;
128+
129+
// virtual int getExtensionProperty(
130+
// const char* provider, const char* extension,
131+
// const char* key, char* value, int buf_len, agora::media::MEDIA_SOURCE_TYPE type = agora::media::UNKNOWN_MEDIA_SOURCE) = 0;
132+
virtual int getExtensionProperty(const char *provider, const char *extension,
133+
const char *key, char *value, int buf_len,
134+
agora::media::MEDIA_SOURCE_TYPE type =
135+
agora::media::UNKNOWN_MEDIA_SOURCE) = 0;
136+
137+
// virtual int startScreenCapture(const ScreenCaptureParameters2& captureParams) = 0;
138+
virtual int
139+
startScreenCapture(const ScreenCaptureParameters2 &captureParams) = 0;
140+
141+
// virtual int startScreenCapture(VIDEO_SOURCE_TYPE sourceType, const ScreenCaptureConfiguration& config) = 0;
142+
virtual int startScreenCaptureBySourceType(
143+
VIDEO_SOURCE_TYPE sourceType,
144+
const ScreenCaptureConfiguration &config) = 0;
145+
146+
// virtual int stopScreenCapture() = 0;
147+
virtual int stopScreenCapture() = 0;
148+
149+
// virtual int stopScreenCapture(VIDEO_SOURCE_TYPE sourceType) = 0;
150+
virtual int stopScreenCaptureBySourceType(VIDEO_SOURCE_TYPE sourceType) = 0;
151+
152+
// ----------------------------- 👆🏻overload API👆🏻 -----------------------------
153+
154+
// ----------------------------- 👇🏻rename API👇🏻 -----------------------------
155+
156+
// virtual int startPreview() = 0;
157+
virtual int startPreviewWithoutSourceType() = 0;
158+
159+
// virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0;
160+
// AGORA_IID_AUDIO_DEVICE_MANAGER = 1,
161+
virtual IAudioDeviceManager *getAudioDeviceManager() = 0;
162+
163+
// virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0;
164+
// AGORA_IID_VIDEO_DEVICE_MANAGER = 2,
165+
virtual IVideoDeviceManager *getVideoDeviceManager() = 0;
166+
167+
// virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0;
168+
// AGORA_IID_MUSIC_CONTENT_CENTER = 15,
169+
virtual IMusicContentCenter *getMusicContentCenter() = 0;
170+
171+
// virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0;
172+
// AGORA_IID_MEDIA_ENGINE = 4,
173+
virtual agora::media::IMediaEngine *getMediaEngine() = 0;
174+
175+
// virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0;
176+
// AGORA_IID_LOCAL_SPATIAL_AUDIO = 11,
177+
virtual ILocalSpatialAudioEngine *getLocalSpatialAudioEngine() = 0;
178+
179+
// virtual bool onReadyToSendMetadata(Metadata &metadata, VIDEO_SOURCE_TYPE source_type) = 0;
180+
virtual int sendMetaData(const IMetadataObserver::Metadata &metadata,
181+
VIDEO_SOURCE_TYPE source_type) = 0;
182+
183+
// virtual int getMaxMetadataSize() { return DEFAULT_METADATA_SIZE_IN_BYTE; }
184+
virtual int setMaxMetadataSize(int size) = 0;
185+
186+
// ----------------------------- 👆🏻rename API👆🏻 -----------------------------
187+
188+
// ----------------------------- 👇🏻new API👇🏻 -----------------------------
189+
190+
#ifdef __ELECTRON__
191+
virtual void destroyRendererByView(view_t view) = 0;
192+
193+
virtual void destroyRendererByConfig(VIDEO_SOURCE_TYPE sourceType,
194+
const char *channelId = NULL,
195+
uid_t uid = 0) = 0;
196+
#endif
197+
198+
199+
// add for registerAudioEncodedFrameObserver
200+
// virtual int registerAudioEncodedFrameObserver(const AudioEncodedFrameObserverConfig& config, IAudioEncodedFrameObserver *observer) = 0;
201+
virtual int
202+
unregisterAudioEncodedFrameObserver(IAudioEncodedFrameObserver *observer) = 0;
203+
204+
// add for createAgoraRtcEngine
205+
// AGORA_API agora::rtc::IRtcEngine* AGORA_CALL createAgoraRtcEngine();
206+
virtual intptr_t getNativeHandle() = 0;
207+
208+
// ----------------------------- 👆🏻new API👆🏻 -----------------------------
209+
210+
// reason: keep
211+
// original:
212+
// virtual int preloadChannel(const char* token, const char* channelId, uid_t uid) = 0;
213+
virtual int preloadChannel(const char* token, const char* channelId, uid_t uid) = 0;
214+
215+
// reason: rename
216+
// original:
217+
// virtual int preloadChannel(const char* token, const char* channelId, const char* userAccount) = 0;
218+
virtual int preloadChannelWithUserAccount(const char* token, const char* channelId, const char* userAccount) = 0;
219+
};
220+
221+
} // namespace ext
222+
} // namespace rtc
223+
} // 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)