From 846ef93ae8afc75b9aa08fd2d438558516cb389c Mon Sep 17 00:00:00 2001 From: gxz Date: Wed, 20 Nov 2024 20:05:35 +0800 Subject: [PATCH] chore: optimize --- .../custom_headers/CustomIAgoraMediaEngine.h | 6 -- .../custom_headers/CustomIAgoraMediaPlayer.h | 14 ++++- .../CustomIAgoraMusicContentCenter.h | 1 - .../custom_headers/CustomIAgoraRtcEngine.h | 55 ++++++++++--------- .../custom_headers/CustomIAgoraRtcEngineEx.h | 24 +------- .../CustomIAudioDeviceManager.h | 4 +- 6 files changed, 48 insertions(+), 56 deletions(-) diff --git a/headers/rtc_4.3.1.201/custom_headers/CustomIAgoraMediaEngine.h b/headers/rtc_4.3.1.201/custom_headers/CustomIAgoraMediaEngine.h index 8ed2603..70c8579 100644 --- a/headers/rtc_4.3.1.201/custom_headers/CustomIAgoraMediaEngine.h +++ b/headers/rtc_4.3.1.201/custom_headers/CustomIAgoraMediaEngine.h @@ -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👆🏻 ----------------------------- }; diff --git a/headers/rtc_4.3.1.201/custom_headers/CustomIAgoraMediaPlayer.h b/headers/rtc_4.3.1.201/custom_headers/CustomIAgoraMediaPlayer.h index ae81020..82b8f4a 100644 --- a/headers/rtc_4.3.1.201/custom_headers/CustomIAgoraMediaPlayer.h +++ b/headers/rtc_4.3.1.201/custom_headers/CustomIAgoraMediaPlayer.h @@ -13,7 +13,7 @@ class IMediaPlayerVideoFrameObserver { }; namespace ext { - + class IMediaPlayer { // ----------------------------- 👇🏻overload API👇🏻 ----------------------------- @@ -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; diff --git a/headers/rtc_4.3.1.201/custom_headers/CustomIAgoraMusicContentCenter.h b/headers/rtc_4.3.1.201/custom_headers/CustomIAgoraMusicContentCenter.h index 8bbf740..b421097 100644 --- a/headers/rtc_4.3.1.201/custom_headers/CustomIAgoraMusicContentCenter.h +++ b/headers/rtc_4.3.1.201/custom_headers/CustomIAgoraMusicContentCenter.h @@ -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; diff --git a/headers/rtc_4.3.1.201/custom_headers/CustomIAgoraRtcEngine.h b/headers/rtc_4.3.1.201/custom_headers/CustomIAgoraRtcEngine.h index bda2f11..1d4ee02 100644 --- a/headers/rtc_4.3.1.201/custom_headers/CustomIAgoraRtcEngine.h +++ b/headers/rtc_4.3.1.201/custom_headers/CustomIAgoraRtcEngine.h @@ -1,7 +1,6 @@ #pragma once #include "AgoraBase.h" -#include "AgoraMediaBase.h" #include "IAgoraMediaEngine.h" #include "IAgoraMediaRecorder.h" #include "IAgoraMusicContentCenter.h" @@ -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👇🏻 ----------------------------- @@ -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, */ @@ -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 diff --git a/headers/rtc_4.3.1.201/custom_headers/CustomIAgoraRtcEngineEx.h b/headers/rtc_4.3.1.201/custom_headers/CustomIAgoraRtcEngineEx.h index 931aa4d..5bc5265 100644 --- a/headers/rtc_4.3.1.201/custom_headers/CustomIAgoraRtcEngineEx.h +++ b/headers/rtc_4.3.1.201/custom_headers/CustomIAgoraRtcEngineEx.h @@ -1,7 +1,6 @@ #pragma once #include "AgoraBase.h" -#include "AgoraMediaBase.h" #include "IAgoraRtcEngineEx.h" namespace agora { @@ -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👆🏻 ----------------------------- }; diff --git a/headers/rtc_4.3.1.201/custom_headers/CustomIAudioDeviceManager.h b/headers/rtc_4.3.1.201/custom_headers/CustomIAudioDeviceManager.h index b68d3f6..bbaf9fd 100644 --- a/headers/rtc_4.3.1.201/custom_headers/CustomIAudioDeviceManager.h +++ b/headers/rtc_4.3.1.201/custom_headers/CustomIAudioDeviceManager.h @@ -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👆🏻 -----------------------------