-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
27 changed files
with
23,786 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
headers/rtc_4.1.1.27/custom_headers/CustomIAgoraMediaEngine.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#pragma once | ||
|
||
#include "AgoraBase.h" | ||
#include "IAgoraMediaEngine.h" | ||
|
||
namespace agora { | ||
namespace media { | ||
namespace ext { | ||
|
||
class IMediaEngine { | ||
virtual int unregisterAudioFrameObserver(IAudioFrameObserver *observer) = 0; | ||
|
||
virtual int unregisterVideoFrameObserver(IVideoFrameObserver *observer) = 0; | ||
|
||
virtual int | ||
unregisterVideoEncodedFrameObserver(IVideoEncodedFrameObserver *observer) = 0; | ||
}; | ||
|
||
} // namespace ext | ||
} // namespace media | ||
} // namespace agora |
39 changes: 39 additions & 0 deletions
39
headers/rtc_4.1.1.27/custom_headers/CustomIAgoraMediaPlayer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#pragma once | ||
|
||
#include "AgoraBase.h" | ||
#include "AgoraMediaBase.h" | ||
#include "IAgoraMediaPlayer.h" | ||
|
||
namespace agora { | ||
namespace rtc { | ||
namespace ext { | ||
|
||
class IMediaPlayerAudioFrameObserver { | ||
virtual void onFrame(const agora::media::base::AudioPcmFrame *frame) = 0; | ||
}; | ||
|
||
class IMediaPlayerVideoFrameObserver { | ||
virtual void onFrame(const agora::media::base::VideoFrame *frame) = 0; | ||
}; | ||
|
||
class IMediaPlayer { | ||
virtual int | ||
registerAudioFrameObserver(IMediaPlayerAudioFrameObserver *observer) = 0; | ||
|
||
virtual int | ||
unregisterAudioFrameObserver(IMediaPlayerAudioFrameObserver *observer) = 0; | ||
|
||
virtual int | ||
registerVideoFrameObserver(IMediaPlayerVideoFrameObserver *observer) = 0; | ||
|
||
virtual int | ||
unregisterVideoFrameObserver(IMediaPlayerVideoFrameObserver *observer) = 0; | ||
|
||
virtual int setPlayerOptionInInt(const char *key, int value) = 0; | ||
|
||
virtual int setPlayerOptionInString(const char *key, const char *value) = 0; | ||
}; | ||
|
||
} // namespace ext | ||
} // namespace rtc | ||
} // namespace agora |
30 changes: 30 additions & 0 deletions
30
headers/rtc_4.1.1.27/custom_headers/CustomIAgoraMusicContentCenter.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#pragma once | ||
|
||
#include "IAgoraMediaPlayer.h" | ||
|
||
namespace agora { | ||
namespace rtc { | ||
namespace ext { | ||
|
||
class IMusicPlayer : public IMediaPlayer { | ||
// ----------------------------- 👇🏻overload API👇🏻 ----------------------------- | ||
|
||
// virtual int open(int64_t songCode, int64_t startPos = 0) = 0; | ||
virtual int openWithSongCode(int64_t songCode, int64_t startPos = 0) = 0; | ||
|
||
// ----------------------------- 👆🏻overload API👆🏻 ----------------------------- | ||
}; | ||
|
||
class IMusicContentCenter | ||
{ | ||
// reason: keep | ||
// virtual int preload(agora::util::AString& requestId, int64_t songCode) = 0; | ||
// | ||
// original: | ||
// virtual int preload(int64_t songCode, const char* jsonOption) __deprecated = 0; | ||
// virtual int preload(agora::util::AString& requestId, int64_t songCode) = 0; | ||
virtual int preload(agora::util::AString& requestId, int64_t songCode) = 0; | ||
}; | ||
} // namespace ext | ||
} // namespace rtc | ||
} // namespace agora |
218 changes: 218 additions & 0 deletions
218
headers/rtc_4.1.1.27/custom_headers/CustomIAgoraRtcEngine.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,218 @@ | ||
#pragma once | ||
|
||
#include "AgoraBase.h" | ||
#include "IAgoraMediaEngine.h" | ||
#include "IAgoraMediaRecorder.h" | ||
#include "IAgoraMusicContentCenter.h" | ||
#include "IAgoraRtcEngine.h" | ||
#include "IAgoraSpatialAudio.h" | ||
#include "IAudioDeviceManager.h" | ||
|
||
namespace agora { | ||
namespace rtc { | ||
namespace ext { | ||
|
||
// virtual const char* getVersion(int* build) = 0; | ||
struct SDKBuildInfo { | ||
int build; | ||
const char *version; | ||
}; | ||
|
||
// IVideoDeviceCollection | ||
// virtual int getDevice(int index, char deviceName[MAX_DEVICE_ID_LENGTH], | ||
// char deviceId[MAX_DEVICE_ID_LENGTH]) = 0; | ||
struct VideoDeviceInfo { | ||
const char *deviceId; | ||
const char *deviceName; | ||
}; | ||
|
||
// IAudioDeviceCollection | ||
// virtual int getDevice(int index, char deviceName[MAX_DEVICE_ID_LENGTH], | ||
// char deviceId[MAX_DEVICE_ID_LENGTH]) = 0; | ||
struct AudioDeviceInfo { | ||
const char *deviceId; | ||
const char *deviceName; | ||
}; | ||
|
||
class IRtcEngine { | ||
// ----------------------------- 👇🏻overload API👇🏻 ----------------------------- | ||
|
||
// virtual int joinChannel(const char* token, const char* channelId, uid_t uid, | ||
// const ChannelMediaOptions& options) = 0; | ||
virtual int joinChannel(const char *token, const char *channelId, uid_t uid, | ||
const ChannelMediaOptions &options) = 0; | ||
|
||
// virtual int leaveChannel(const LeaveChannelOptions& options) = 0; | ||
virtual int leaveChannel(const LeaveChannelOptions *options = NULL) = 0; | ||
|
||
// virtual int setClientRole(CLIENT_ROLE_TYPE role, const ClientRoleOptions& options) = 0; | ||
virtual int setClientRole(CLIENT_ROLE_TYPE role, | ||
const ClientRoleOptions *options = NULL) = 0; | ||
|
||
// virtual int startEchoTest(const EchoTestConfiguration& config) = 0; | ||
virtual int startEchoTest(const EchoTestConfiguration &config) = 0; | ||
|
||
// virtual int startPreview(VIDEO_SOURCE_TYPE sourceType) = 0; | ||
virtual int | ||
startPreview(VIDEO_SOURCE_TYPE sourceType = | ||
VIDEO_SOURCE_TYPE::VIDEO_SOURCE_CAMERA_PRIMARY) = 0; | ||
|
||
// virtual int stopPreview(VIDEO_SOURCE_TYPE sourceType) = 0; | ||
virtual int | ||
stopPreview(VIDEO_SOURCE_TYPE sourceType = | ||
VIDEO_SOURCE_TYPE::VIDEO_SOURCE_CAMERA_PRIMARY) = 0; | ||
|
||
// virtual int setAudioProfile(AUDIO_PROFILE_TYPE profile, AUDIO_SCENARIO_TYPE scenario) __deprecated = 0; | ||
virtual int | ||
setAudioProfile(AUDIO_PROFILE_TYPE profile, | ||
AUDIO_SCENARIO_TYPE scenario = | ||
AUDIO_SCENARIO_TYPE::AUDIO_SCENARIO_DEFAULT) = 0; | ||
|
||
// virtual int startAudioRecording(const AudioRecordingConfiguration& config) = 0; | ||
virtual int | ||
startAudioRecording(const AudioRecordingConfiguration &config) = 0; | ||
|
||
// virtual int startAudioMixing(const char* filePath, bool loopback, int cycle, int startPos) = 0; | ||
virtual int startAudioMixing(const char *filePath, bool loopback, int cycle, | ||
int startPos = 0) = 0; | ||
|
||
// virtual int setLocalRenderMode(media::base::RENDER_MODE_TYPE renderMode, VIDEO_MIRROR_MODE_TYPE mirrorMode) = 0; | ||
virtual int | ||
setLocalRenderMode(media::base::RENDER_MODE_TYPE renderMode, | ||
VIDEO_MIRROR_MODE_TYPE mirrorMode = | ||
VIDEO_MIRROR_MODE_TYPE::VIDEO_MIRROR_MODE_AUTO) = 0; | ||
|
||
// virtual int enableDualStreamMode(bool enabled, const SimulcastStreamConfig& streamConfig) = 0; | ||
virtual int | ||
enableDualStreamMode(bool enabled, | ||
const SimulcastStreamConfig *streamConfig = NULL) = 0; | ||
|
||
// virtual int setDualStreamMode(SIMULCAST_STREAM_MODE mode, | ||
// const SimulcastStreamConfig& streamConfig) = 0; | ||
virtual int | ||
setDualStreamMode(SIMULCAST_STREAM_MODE mode, | ||
const SimulcastStreamConfig *streamConfig = NULL) = 0; | ||
|
||
// virtual int createDataStream(int* streamId, DataStreamConfig& config) = 0; | ||
virtual int createDataStream(int *streamId, | ||
const DataStreamConfig &config) = 0; | ||
|
||
// virtual int addVideoWatermark(const char* watermarkUrl, const WatermarkOptions& options) = 0; | ||
virtual int addVideoWatermark(const char *watermarkUrl, | ||
const WatermarkOptions &options) = 0; | ||
|
||
// virtual int joinChannelWithUserAccount(const char* token, const char* channelId, | ||
// const char* userAccount, const ChannelMediaOptions& options) = 0; | ||
virtual int | ||
joinChannelWithUserAccount(const char *token, const char *channelId, | ||
const char *userAccount, | ||
const ChannelMediaOptions *options = NULL) = 0; | ||
|
||
// virtual int enableExtension(const char* provider, const char* extension, const ExtensionInfo& extensionInfo, bool enable = true) = 0; | ||
virtual int enableExtension(const char *provider, const char *extension, | ||
bool enable = true, | ||
agora::media::MEDIA_SOURCE_TYPE type = | ||
agora::media::UNKNOWN_MEDIA_SOURCE) = 0; | ||
|
||
// virtual int setExtensionProperty( | ||
// const char* provider, const char* extension, | ||
// const char* key, const char* value, agora::media::MEDIA_SOURCE_TYPE type = agora::media::UNKNOWN_MEDIA_SOURCE) = 0; | ||
virtual int setExtensionProperty(const char *provider, const char *extension, | ||
const char *key, const char *value, | ||
agora::media::MEDIA_SOURCE_TYPE type = | ||
agora::media::UNKNOWN_MEDIA_SOURCE) = 0; | ||
|
||
// virtual int getExtensionProperty( | ||
// const char* provider, const char* extension, | ||
// const char* key, char* value, int buf_len, agora::media::MEDIA_SOURCE_TYPE type = agora::media::UNKNOWN_MEDIA_SOURCE) = 0; | ||
virtual int getExtensionProperty(const char *provider, const char *extension, | ||
const char *key, char *value, int buf_len, | ||
agora::media::MEDIA_SOURCE_TYPE type = | ||
agora::media::UNKNOWN_MEDIA_SOURCE) = 0; | ||
|
||
// virtual int startScreenCapture(const ScreenCaptureParameters2& captureParams) = 0; | ||
virtual int | ||
startScreenCapture(const ScreenCaptureParameters2 &captureParams) = 0; | ||
|
||
// virtual int startScreenCapture(VIDEO_SOURCE_TYPE sourceType, const ScreenCaptureConfiguration& config) = 0; | ||
virtual int startScreenCaptureBySourceType( | ||
VIDEO_SOURCE_TYPE sourceType, | ||
const ScreenCaptureConfiguration &config) = 0; | ||
|
||
// virtual int stopScreenCapture() = 0; | ||
virtual int stopScreenCapture() = 0; | ||
|
||
// virtual int stopScreenCapture(VIDEO_SOURCE_TYPE sourceType) = 0; | ||
virtual int stopScreenCaptureBySourceType(VIDEO_SOURCE_TYPE sourceType) = 0; | ||
|
||
// ----------------------------- 👆🏻overload API👆🏻 ----------------------------- | ||
|
||
// ----------------------------- 👇🏻rename API👇🏻 ----------------------------- | ||
|
||
// virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0; | ||
// AGORA_IID_AUDIO_DEVICE_MANAGER = 1, | ||
virtual IAudioDeviceManager *getAudioDeviceManager() = 0; | ||
|
||
// virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0; | ||
// AGORA_IID_VIDEO_DEVICE_MANAGER = 2, | ||
virtual IVideoDeviceManager *getVideoDeviceManager() = 0; | ||
|
||
// virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0; | ||
// AGORA_IID_MUSIC_CONTENT_CENTER = 15, | ||
virtual IMusicContentCenter *getMusicContentCenter() = 0; | ||
|
||
// virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0; | ||
// AGORA_IID_MEDIA_ENGINE = 4, | ||
virtual agora::media::IMediaEngine *getMediaEngine() = 0; | ||
|
||
virtual IMediaRecorder *getMediaRecorder() = 0; | ||
|
||
// virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0; | ||
// AGORA_IID_LOCAL_SPATIAL_AUDIO = 11, | ||
virtual ILocalSpatialAudioEngine *getLocalSpatialAudioEngine() = 0; | ||
|
||
// virtual bool onReadyToSendMetadata(Metadata &metadata, VIDEO_SOURCE_TYPE source_type) = 0; | ||
virtual int sendMetaData(const IMetadataObserver::Metadata &metadata, | ||
VIDEO_SOURCE_TYPE source_type) = 0; | ||
|
||
// virtual int getMaxMetadataSize() { return DEFAULT_METADATA_SIZE_IN_BYTE; } | ||
virtual int setMaxMetadataSize(int size) = 0; | ||
|
||
// ----------------------------- 👆🏻rename API👆🏻 ----------------------------- | ||
|
||
// ----------------------------- 👇🏻new API👇🏻 ----------------------------- | ||
|
||
#ifdef __ELECTRON__ | ||
virtual void destroyRendererByView(view_t view) = 0; | ||
|
||
virtual void destroyRendererByConfig(VIDEO_SOURCE_TYPE sourceType, | ||
const char *channelId = NULL, | ||
uid_t uid = 0) = 0; | ||
#endif | ||
|
||
|
||
// add for registerAudioEncodedFrameObserver | ||
// virtual int registerAudioEncodedFrameObserver(const AudioEncodedFrameObserverConfig& config, IAudioEncodedFrameObserver *observer) = 0; | ||
virtual int | ||
unregisterAudioEncodedFrameObserver(IAudioEncodedFrameObserver *observer) = 0; | ||
|
||
// add for createAgoraRtcEngine | ||
// AGORA_API agora::rtc::IRtcEngine* AGORA_CALL createAgoraRtcEngine(); | ||
virtual intptr_t getNativeHandle() = 0; | ||
|
||
// ----------------------------- 👆🏻new API👆🏻 ----------------------------- | ||
|
||
// reason: keep | ||
// original: | ||
// virtual int preloadChannel(const char* token, const char* channelId, uid_t uid) = 0; | ||
virtual int preloadChannel(const char* token, const char* channelId, uid_t uid) = 0; | ||
|
||
// reason: rename | ||
// original: | ||
// virtual int preloadChannel(const char* token, const char* channelId, const char* userAccount) = 0; | ||
virtual int preloadChannelWithUserAccount(const char* token, const char* channelId, const char* userAccount) = 0; | ||
}; | ||
|
||
} // namespace ext | ||
} // namespace rtc | ||
} // namespace agora |
20 changes: 20 additions & 0 deletions
20
headers/rtc_4.1.1.27/custom_headers/CustomIAgoraRtcEngineEx.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#pragma once | ||
|
||
#include "AgoraBase.h" | ||
#include "IAgoraRtcEngineEx.h" | ||
|
||
namespace agora { | ||
namespace rtc { | ||
namespace ext { | ||
|
||
class IRtcEngineEx { | ||
virtual int leaveChannelEx(const RtcConnection &connection, | ||
const LeaveChannelOptions *options = NULL) = 0; | ||
|
||
virtual int createDataStreamEx(int *streamId, DataStreamConfig &config, | ||
const RtcConnection &connection) = 0; | ||
}; | ||
|
||
} // namespace ext | ||
} // namespace rtc | ||
} // namespace agora |
17 changes: 17 additions & 0 deletions
17
headers/rtc_4.1.1.27/custom_headers/CustomIAudioDeviceManager.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#pragma once | ||
|
||
#include "CustomIAgoraRtcEngine.h" | ||
|
||
namespace agora { | ||
namespace rtc { | ||
namespace ext { | ||
|
||
class IAudioDeviceManager { | ||
virtual AudioDeviceInfo *getPlaybackDefaultDevice() = 0; | ||
|
||
virtual AudioDeviceInfo *getRecordingDefaultDevice() = 0; | ||
}; | ||
|
||
} // namespace ext | ||
} // namespace rtc | ||
} // namespace agora |
Oops, something went wrong.