Skip to content

Commit

Permalink
chore: optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
guoxianzhe committed Nov 20, 2024
1 parent e9ca117 commit 846ef93
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ class IMediaEngine {
*/
virtual int unregisterFaceInfoObserver(IFaceInfoObserver* observer) = 0;

/**
* @iris_api_id: MediaEngine_setExternalRemoteEglContext_f337cbf
* @source: virtual int setExternalRemoteEglContext(void* eglContext) = 0;
*/
virtual int setExternalRemoteEglContext(const void* eglContext) = 0;

// ----------------------------- 👆🏻new API👆🏻 -----------------------------
};

Expand Down
14 changes: 13 additions & 1 deletion headers/rtc_4.3.1.201/custom_headers/CustomIAgoraMediaPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class IMediaPlayerVideoFrameObserver {
};

namespace ext {

class IMediaPlayer {
// ----------------------------- 👇🏻overload API👇🏻 -----------------------------

Expand All @@ -29,6 +29,18 @@ class IMediaPlayer {
*/
virtual int setPlayerOptionInString(const char *key, const char *value) = 0;

/**
* @iris_api_id: MediaPlayer_getPlayerOption_ae3d0cf
* @source: virtual int getPlayerOption(const char* key, int& value) = 0;
*/
virtual int getPlayerOptionInInt(const char *key, int &value) = 0;

/**
* @iris_api_id: MediaPlayer_getPlayerOption_f15226a
* @source: virtual int getPlayerOption(const char* key, agora::util::AString& value) = 0;
*/
virtual int getPlayerOptionInString(const char *key, agora::util::AString &value) = 0;

/**
* @iris_api_id: MediaPlayer_registerAudioFrameObserver_a5b510b
* @source: virtual int registerAudioFrameObserver(media::IAudioPcmFrameSink* observer, RAW_AUDIO_FRAME_OP_MODE_TYPE mode) = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class IMusicPlayer : public IMediaPlayer {
/**
* @iris_api_id: MusicPlayer_open_303b92e
* @source: virtual int open(int64_t songCode, int64_t startPos = 0) = 0;
* @generate_iris_api_id: true
*/
virtual int openWithSongCode(int64_t songCode, int64_t startPos = 0) = 0;

Expand Down
55 changes: 30 additions & 25 deletions headers/rtc_4.3.1.201/custom_headers/CustomIAgoraRtcEngine.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "AgoraBase.h"
#include "AgoraMediaBase.h"
#include "IAgoraMediaEngine.h"
#include "IAgoraMediaRecorder.h"
#include "IAgoraMusicContentCenter.h"
Expand Down Expand Up @@ -213,6 +212,30 @@ class IRtcEngine {
*/
virtual void release(bool sync = false) = 0;

/**
* @iris_api_id: RtcEngine_getUserInfoByUid_6b7aee8
* @source: virtual int getUserInfoByUid(uid_t uid, rtc::UserInfo* userInfo) = 0;
*/
virtual int getUserInfoByUid(uid_t uid, rtc::UserInfo* userInfo) = 0;

/**
* @iris_api_id: RtcEngine_getUserInfoByUid_0a0b913
* @source: virtual int getUserInfoByUid(const char* channelId, uid_t uid, rtc::UserInfo* userInfo) = 0;
*/
virtual int getUserInfoByUidWithChannelId(const char *channelId, uid_t uid, rtc::UserInfo *userInfo) = 0;

/**
* @iris_api_id: RtcEngine_getUserInfoByUserAccount_c6a8f08
* @source: virtual int getUserInfoByUserAccount(const char* userAccount, rtc::UserInfo* userInfo) = 0;
*/
virtual int getUserInfoByUserAccount(const char* userAccount, rtc::UserInfo* userInfo) = 0;

/**
* @iris_api_id: RtcEngine_getUserInfoByUserAccount_86c855f
* @source: virtual int getUserInfoByUserAccount(const char* channelId, const char* userAccount, rtc::UserInfo* userInfo) = 0;
*/
virtual int getUserInfoByUserAccountWithChannelId(const char* channelId, const char* userAccount, rtc::UserInfo* userInfo) = 0;

// ----------------------------- 👆🏻overload API👆🏻 -----------------------------

// ----------------------------- 👇🏻rename API👇🏻 -----------------------------
Expand All @@ -224,42 +247,42 @@ class IRtcEngine {
virtual int startPreviewWithoutSourceType() = 0;

/**
* @iris_api_id: RtcEngine_getAudioDeviceManager
* @iris_api_id: RtcEngine_queryInterface_257d192
* @source: virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0;
* AGORA_IID_AUDIO_DEVICE_MANAGER = 1,
*/
virtual IAudioDeviceManager *getAudioDeviceManager() = 0;

/**
* @iris_api_id: RtcEngine_getVideoDeviceManager
* @iris_api_id: RtcEngine_queryInterface_257d192
* @source: virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0;
* AGORA_IID_VIDEO_DEVICE_MANAGER = 2,
*/
virtual IVideoDeviceManager *getVideoDeviceManager() = 0;

/**
* @iris_api_id: RtcEngine_getMusicContentCenter
* @iris_api_id: RtcEngine_queryInterface_257d192
* @source: virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0;
* AGORA_IID_MUSIC_CONTENT_CENTER = 15,
*/
virtual IMusicContentCenter *getMusicContentCenter() = 0;

/**
* @iris_api_id: RtcEngine_getMediaEngine
* @iris_api_id: RtcEngine_queryInterface_257d192
* @source: virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0;
* AGORA_IID_MEDIA_ENGINE = 4,
*/
virtual agora::media::IMediaEngine *getMediaEngine() = 0;

/**
* @iris_api_id: RtcEngine_getLocalSpatialAudioEngine
* @iris_api_id: RtcEngine_queryInterface_257d192
* @source: virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0;
* AGORA_IID_LOCAL_SPATIAL_AUDIO = 11,
*/
virtual ILocalSpatialAudioEngine *getLocalSpatialAudioEngine() = 0;

/**
* @iris_api_id: RtcEngine_getH265Transcoder
* @iris_api_id: RtcEngine_queryInterface_257d192
* @source: virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0;
* AGORA_IID_H265_TRANSCODER = 16,
*/
Expand Down Expand Up @@ -319,24 +342,6 @@ class IRtcEngine {
* @source: 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;

/**
* @iris_api_id: RtcEngine_takeSnapshot_1922dd1
* @source: virtual int takeSnapshot(uid_t uid, const char* filePath) = 0;
*/
virtual int takeSnapshot(uid_t uid, const char* filePath) = 0;

/**
* @iris_api_id: RtcEngine_takeSnapshot_5669ea6
* @source: virtual int takeSnapshot(uid_t uid, const agora::media::SnapshotConfig& config) = 0;
*/
virtual int takeSnapshotWithConfig(uid_t uid, const agora::media::SnapshotConfig& config) = 0;

/**
* @iris_api_id: RtcEngine_setExternalMediaProjection_f337cbf
* @source: virtual int setExternalMediaProjection(void* mediaProjection) = 0;
*/
virtual int setExternalMediaProjection(const void* mediaProjection) = 0;
};

} // namespace ext
Expand Down
24 changes: 3 additions & 21 deletions headers/rtc_4.3.1.201/custom_headers/CustomIAgoraRtcEngineEx.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "AgoraBase.h"
#include "AgoraMediaBase.h"
#include "IAgoraRtcEngineEx.h"

namespace agora {
Expand All @@ -18,29 +17,12 @@ class IRtcEngineEx {
virtual int leaveChannelEx(const RtcConnection &connection,
const LeaveChannelOptions *options = NULL) = 0;

/**
* @iris_api_id: RtcEngineEx_leaveChannelWithUserAccountEx_8bbe372
* @source: virtual int leaveChannelWithUserAccountEx(const char* channelId, const char* userAccount, const LeaveChannelOptions& options) = 0;
*/
virtual int leaveChannelWithUserAccountEx(const char* channelId, const char* userAccount, const LeaveChannelOptions* options = NULL) = 0;

/**
* @iris_api_id: RtcEngineEx_takeSnapshotEx_de1c015
* @source: virtual int takeSnapshotEx(const RtcConnection& connection, uid_t uid, const char* filePath) = 0;
*/
virtual int takeSnapshotEx(const RtcConnection& connection, uid_t uid, const char* filePath) = 0;

/**
* @iris_api_id: RtcEngineEx_takeSnapshotEx_b856417
* @source: virtual int takeSnapshotEx(const RtcConnection& connection, uid_t uid, const agora::media::SnapshotConfig& config) = 0;
*/
virtual int takeSnapshotWithConfigEx(const RtcConnection& connection, uid_t uid, const agora::media::SnapshotConfig& config) = 0;

/**
* @iris_api_id: RtcEngineEx_createDataStreamEx_9f641b6
* @source: virtual int createDataStreamEx(int* streamId, const DataStreamConfig& config, const RtcConnection& connection) = 0;
* @source: virtual int createDataStreamEx(int* streamId, DataStreamConfig& config, const RtcConnection& connection) = 0;
*/
virtual int createDataStreamEx(int* streamId, const DataStreamConfig& config, const RtcConnection& connection) = 0;
virtual int createDataStreamEx(int *streamId, DataStreamConfig &config,
const RtcConnection &connection) = 0;

// ----------------------------- 👆🏻overload API👆🏻 -----------------------------
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ class IAudioDeviceManager {
* @iris_api_id: AudioDeviceManager_getPlaybackDeviceInfo_ed3a96d
* @source: virtual int getPlaybackDeviceInfo(char deviceId[MAX_DEVICE_ID_LENGTH], char deviceName[MAX_DEVICE_ID_LENGTH], char deviceTypeName[MAX_DEVICE_ID_LENGTH]) = 0;
*/
virtual AudioDeviceInfo *getPlaybackDeviceInfo() = 0;
virtual AudioDeviceInfo * getPlaybackDeviceInfo() = 0;

/**
* @iris_api_id: AudioDeviceManager_getRecordingDeviceInfo_ed3a96d
* @source: virtual int getRecordingDeviceInfo(char deviceId[MAX_DEVICE_ID_LENGTH], char deviceName[MAX_DEVICE_ID_LENGTH], char deviceTypeName[MAX_DEVICE_ID_LENGTH]) = 0;
*/
virtual AudioDeviceInfo *getRecordingDeviceInfo() = 0;
virtual AudioDeviceInfo * getRecordingDeviceInfo() = 0;

// ----------------------------- 👆🏻overload API👆🏻 -----------------------------

Expand Down

0 comments on commit 846ef93

Please sign in to comment.