Skip to content

Commit

Permalink
feat: upgrade native sdk 4.2.6.20
Browse files Browse the repository at this point in the history
  • Loading branch information
peilinok committed Dec 25, 2024
1 parent 5e03f20 commit b87093e
Show file tree
Hide file tree
Showing 27 changed files with 719 additions and 447 deletions.
5 changes: 3 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ dependencies {
if (isDev(project)) {
implementation fileTree(dir: "libs", include: ["*.jar"])
} else {
api 'io.agora.rtc:iris-rtc:4.2.6.147-build.1'
api 'io.agora.rtc:agora-special-full:4.2.6.147.BASIC'
api 'io.agora.rtc:iris-rtc:4.2.6.20-build.1'
api 'io.agora.rtc:agora-special-full:4.2.6.20'
api 'io.agora.rtc:full-screen-sharing:4.2.6.20'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6069,6 +6069,27 @@ class IRtcEngine : public agora::base::IEngineBase {
*/
virtual int setRemoteRenderMode(uid_t uid, media::base::RENDER_MODE_TYPE renderMode,
VIDEO_MIRROR_MODE_TYPE mirrorMode) = 0;

/**
* Sets the target frames per second (FPS) for the local render target.
*
* @param sourceType The type of video source.
* @param targetFps The target frames per second to be set.
*
* @return
* - 0: Success.
* - < 0: Failure.
*/
virtual int setLocalRenderTargetFps(VIDEO_SOURCE_TYPE sourceType, int targetFps) = 0;
/**
* Sets the target frames per second (FPS) for the remote render target.
*
* @param targetFps The target frames per second to be set for the remote render target.
* @return
* - 0: Success.
* - < 0: Failure.
*/
virtual int setRemoteRenderTargetFps(int targetFps) = 0;

// The following APIs are either deprecated and going to deleted.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1978,6 +1978,74 @@ class IRtcEngineEx : public IRtcEngine {
* - < 0: Failure.
*/
virtual int getCallIdEx(agora::util::AString& callId, const RtcConnection& connection) = 0;

/** Preloads a specified audio effect.
*
* This method preloads only one specified audio effect into the memory each time
* it is called. To preload multiple audio effects, call this method multiple times.
*
* After preloading, you can call \ref IRtcEngine::playEffect "playEffect"
* to play the preloaded audio effect or call
* \ref IRtcEngine::playAllEffects "playAllEffects" to play all the preloaded
* audio effects.
*
* @note
* - To ensure smooth communication, limit the size of the audio effect file.
* - Agora recommends calling this method before joining the channel.
*
* @param connection The RtcConnection object.
* @param soundId The ID of the audio effect.
* @param filePath The absolute path of the local audio effect file or the URL
* of the online audio effect file. Supported audio formats: mp3, mp4, m4a, aac,
* 3gp, mkv, and wav.
*
* @return
* - 0: Success.
* - < 0: Failure.
*/
virtual int preloadEffectEx(const RtcConnection& connection, int soundId, const char* filePath, int startPos = 0) = 0;

/** Plays a specified audio effect.
*
*
* This method plays only one specified audio effect each time it is called.
* To play multiple audio effects, call this method multiple times.
*
* @note
* - Agora recommends playing no more than three audio effects at the same time.
* - The ID and file path of the audio effect in this method must be the same
* as that in the \ref IRtcEngine::preloadEffect "preloadEffect" method.
*
* @param connection The RtcConnection object.
* @param soundId The ID of the audio effect.
* @param filePath The absolute path of the local audio effect file or the URL
* of the online audio effect file. Supported audio formats: mp3, mp4, m4a, aac,
* 3gp, mkv, and wav.
* @param loopCount The number of times the audio effect loops:
* - `-1`: Play the audio effect in an indefinite loop until
* \ref IRtcEngine::stopEffect "stopEffect" or
* \ref IRtcEngine::stopAllEffects "stopAllEffects"
* - `0`: Play the audio effect once.
* - `1`: Play the audio effect twice.
* @param pitch The pitch of the audio effect. The value ranges between 0.5 and 2.0.
* The default value is `1.0` (original pitch). The lower the value, the lower the pitch.
* @param pan The spatial position of the audio effect. The value ranges between -1.0 and 1.0:
* - `-1.0`: The audio effect displays to the left.
* - `0.0`: The audio effect displays ahead.
* - `1.0`: The audio effect displays to the right.
* @param gain The volume of the audio effect. The value ranges between 0 and 100.
* The default value is `100` (original volume). The lower the value, the lower
* the volume of the audio effect.
* @param publish Sets whether to publish the audio effect to the remote:
* - true: Publish the audio effect to the remote.
* - false: (Default) Do not publish the audio effect to the remote.
*
* @return
* - 0: Success.
* - < 0: Failure.
*/
virtual int playEffectEx(const RtcConnection& connection, int soundId, const char* filePath, int loopCount, double pitch, double pan, int gain, bool publish = false, int startPos = 0) = 0;

};

} // namespace rtc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@
#define FUNC_RTCENGINE_SETLOGFILESIZE "RtcEngine_setLogFileSize"
#define FUNC_RTCENGINE_UPLOADLOGFILE "RtcEngine_uploadLogFile"
#define FUNC_RTCENGINE_WRITELOG "RtcEngine_writeLog"
#define FUNC_RTCENGINE_SETLOCALRENDERTARGETFPS \
"RtcEngine_setLocalRenderTargetFps"
#define FUNC_RTCENGINE_SETREMOTERENDERTARGETFPS \
"RtcEngine_setRemoteRenderTargetFps"
#define FUNC_RTCENGINE_SETLOCALRENDERMODE "RtcEngine_setLocalRenderMode"
#define FUNC_RTCENGINE_SETREMOTERENDERMODE "RtcEngine_setRemoteRenderMode"
#define FUNC_RTCENGINE_SETLOCALRENDERMODE2 "RtcEngine_setLocalRenderMode2"
Expand Down Expand Up @@ -925,7 +929,8 @@
"RtcEngineEx_startOrUpdateChannelMediaRelayEx"
#define FUNC_RTCENGINEEX_SETHIGHPRIORITYUSERLISTEX \
"RtcEngineEx_setHighPriorityUserListEx"

#define FUNC_RTCENGINEEX_PRELOADEFFECTEX "RtcEngineEx_preloadEffectEx"
#define FUNC_RTCENGINEEX_PLAYEFFECTEX "RtcEngineEx_playEffectEx"
// class IRtcEngineEx end

// class IMusicContentCenter start
Expand Down
29 changes: 15 additions & 14 deletions internal/deps_summary.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
Iris:
https://download.agora.io/sdk/release/iris_4.2.6.142-build.1_DCG_Android_Video_20240815_0148.zip
https://download.agora.io/sdk/release/iris_4.2.6.142-build.1_DCG_iOS_Video_20240815_0148.zip
https://download.agora.io/sdk/release/iris_4.2.6.142-build.1_DCG_Mac_Video_20240815_0148.zip
https://download.agora.io/sdk/release/iris_4.2.6.147-build.1_DCG_Windows_Video_20241122_1154.zip
implementation 'io.agora.rtc:iris-rtc:4.2.6.147-build.1'
pod 'AgoraIrisRTC_iOS', '4.2.6.147-build.1'
pod 'AgoraIrisRTC_macOS', '4.2.6.147-build.1'
https://download.agora.io/sdk/release/iris_4.2.6.20-build.1_DCG_Android_Video_20241217_0416.zip
https://download.agora.io/sdk/release/iris_4.2.6.20-build.1_DCG_iOS_Video_20241217_0419.zip
https://download.agora.io/sdk/release/iris_4.2.6.20-build.1_DCG_Mac_Video_20241217_0416.zip
https://download.agora.io/sdk/release/iris_4.2.6.20-build.1_DCG_Windows_Video_20241217_0416.zip
implementation 'io.agora.rtc:iris-rtc:4.2.6.20-build.1'
pod 'AgoraIrisRTC_iOS', '4.2.6.20-build.1'
pod 'AgoraIrisRTC_macOS', '4.2.6.20-build.1'

Native:
https://download.agora.io/sdk/release/Agora_Native_SDK_for_Android_rel.v4.2.6.10_59623_FULL_20240423_1956_300131.zip
https://download.agora.io/sdk/release/Agora_Native_SDK_for_iOS_rel.v4.2.6.10_41553_FULL_20240424_1218_300208.zip
https://download.agora.io/sdk/release/Agora_Native_SDK_for_Mac_rel.v4.2.6.15_21056_FULL_20240710_1438_318435.zip
https://download.agora.io/sdk/release/Agora_Native_SDK_for_Windows_rel.v4.2.6.15_25607_FULL_20240709_1059_318143.zip
implementation 'io.agora.rtc:agora-special-full:4.2.6.147.BASIC'
pod 'AgoraRtcEngine_Special_iOS', '4.2.6.147.BASIC'
pod 'AgoraRtcEngine_Special_macOS', '4.2.6.147.BASIC'
https://download.agora.io/sdk/release/Agora_Native_SDK_for_Android_rel.v4.2.6.20_67657_FULL_20241214_1641_478400.zip
https://download.agora.io/sdk/release/Agora_Native_SDK_for_iOS_rel.v4.2.6.20_48107_FULL_20241214_1716_478436.zip
https://download.agora.io/sdk/release/Agora_Native_SDK_for_Mac_rel.v4.2.6.20_23040_FULL_20241214_1645_478405.zip
https://download.agora.io/sdk/release/Agora_Native_SDK_for_Windows_rel.v4.2.6.20_27477_FULL_20241214_1658_478403.zip
implementation 'io.agora.rtc:agora-special-full:4.2.6.20'
implementation 'io.agora.rtc:full-screen-sharing:4.2.6.20'
pod 'AgoraRtcEngine_Special_iOS', '4.2.6.20'
pod 'AgoraRtcEngine_Special_macOS', '4.2.6.20'
4 changes: 2 additions & 2 deletions ios/agora_rtc_engine.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Pod::Spec.new do |s|
puts '[plugin_dev] Found .plugin_dev file, use vendored_frameworks instead.'
s.vendored_frameworks = 'libs/*.xcframework'
else
s.dependency 'AgoraIrisRTC_iOS', '4.2.6.147-build.1'
s.dependency 'AgoraRtcEngine_Special_iOS', '4.2.6.147.BASIC'
s.dependency 'AgoraIrisRTC_iOS', '4.2.6.20-build.1'
s.dependency 'AgoraRtcEngine_Special_iOS', '4.2.6.20'
end

s.platform = :ios, '9.0'
Expand Down
33 changes: 21 additions & 12 deletions lib/src/agora_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ enum QualityType {
@JsonValue(7)
qualityUnsupported,

/// 8: Detecting the network quality.
/// 8: The last-mile network probe test is in progress.
@JsonValue(8)
qualityDetecting,
}
Expand Down Expand Up @@ -938,7 +938,7 @@ extension OrientationModeExt on OrientationMode {
/// Video degradation preferences when the bandwidth is a constraint.
@JsonEnum(alwaysCreate: true)
enum DegradationPreference {
/// 0: (Default) Prefers to reduce the video frame rate while maintaining video resolution during video encoding under limited bandwidth. This degradation preference is suitable for scenarios where video quality is prioritized.
/// 0: Prefers to reduce the video frame rate while maintaining video resolution during video encoding under limited bandwidth. This degradation preference is suitable for scenarios where video quality is prioritized. Deprecated: This enumerator is deprecated. Use other enumerations instead.
@JsonValue(0)
maintainQuality,

Expand Down Expand Up @@ -1582,7 +1582,7 @@ enum CompressionPreference {
@JsonValue(0)
preferLowLatency,

/// 1: (Default) High quality preference. The SDK compresses video frames while maintaining video quality. This preference is suitable for scenarios where video quality is prioritized.
/// 1: High quality preference. The SDK compresses video frames while maintaining video quality. This preference is suitable for scenarios where video quality is prioritized.
@JsonValue(1)
preferQuality,
}
Expand Down Expand Up @@ -2562,7 +2562,7 @@ enum VideoApplicationScenarioType {
@JsonValue(0)
applicationScenarioGeneral,

/// applicationScenarioMeeting (1) is suitable for meeting scenarios. If set to applicationScenarioMeeting (1), the SDK automatically enables the following strategies:
/// applicationScenarioMeeting (1) is suitable for meeting scenarios. The SDK automatically enables the following strategies:
/// In meeting scenarios where low-quality video streams are required to have a high bitrate, the SDK automatically enables multiple technologies used to deal with network congestions, to enhance the performance of the low-quality streams and to ensure the smooth reception by subscribers.
/// The SDK monitors the number of subscribers to the high-quality video stream in real time and dynamically adjusts its configuration based on the number of subscribers.
/// If nobody subscribers to the high-quality stream, the SDK automatically reduces its bitrate and frame rate to save upstream bandwidth.
Expand Down Expand Up @@ -2901,7 +2901,7 @@ enum LocalVideoStreamError {

/// @nodoc
@JsonValue(30)
localVideoStreamReasonScreenCaptureDisplayDiscnnected,
localVideoStreamReasonScreenCaptureDisplayDisconnected,
}

/// @nodoc
Expand Down Expand Up @@ -4522,7 +4522,7 @@ extension NetworkTypeExt on NetworkType {
/// Setting mode of the view.
@JsonEnum(alwaysCreate: true)
enum VideoViewSetupMode {
/// 0: (Default) Replaces a view.
/// 0: (Default) Clear all added views and replace with a new view.
@JsonValue(0)
videoViewSetupReplace,

Expand Down Expand Up @@ -4562,7 +4562,8 @@ class VideoCanvas {
this.sourceType,
this.mediaPlayerId,
this.cropArea,
this.enableAlphaMask});
this.enableAlphaMask,
this.rotation});

/// The video display window. In one VideoCanvas, you can only choose to set either view or surfaceTexture. If both are set, only the settings in view take effect.
@JsonKey(name: 'view', readValue: readIntPtr)
Expand Down Expand Up @@ -4608,6 +4609,10 @@ class VideoCanvas {
@JsonKey(name: 'enableAlphaMask')
final bool? enableAlphaMask;

/// @nodoc
@JsonKey(name: 'rotation')
final VideoOrientation? rotation;

/// @nodoc
factory VideoCanvas.fromJson(Map<String, dynamic> json) =>
_$VideoCanvasFromJson(json);
Expand Down Expand Up @@ -4803,18 +4808,18 @@ extension VideoDenoiserModeExt on VideoDenoiserMode {
}
}

/// The video noise reduction level.
/// Video noise reduction level.
@JsonEnum(alwaysCreate: true)
enum VideoDenoiserLevel {
/// 0: (Default) Promotes video quality during video noise reduction. balances performance consumption and video noise reduction quality. The performance consumption is moderate, the video noise reduction speed is moderate, and the overall video quality is optimal.
@JsonValue(0)
videoDenoiserLevelHighQuality,

/// 1: Promotes reducing performance consumption during video noise reduction. prioritizes reducing performance consumption over video noise reduction quality. The performance consumption is lower, and the video noise reduction speed is faster. To avoid a noticeable shadowing effect (shadows trailing behind moving objects) in the processed video, Agora recommends that you use this settinging when the camera is fixed.
/// 1: Promotes reducing performance consumption during video noise reduction. It prioritizes reducing performance consumption over video noise reduction quality. The performance consumption is lower, and the video noise reduction speed is faster. To avoid a noticeable shadowing effect (shadows trailing behind moving objects) in the processed video, Agora recommends that you use this setting when the camera is fixed.
@JsonValue(1)
videoDenoiserLevelFast,

/// 2: Enhanced video noise reduction. prioritizes video noise reduction quality over reducing performance consumption. The performance consumption is higher, the video noise reduction speed is slower, and the video noise reduction quality is better. If videoDenoiserLevelHighQuality is not enough for your video noise reduction needs, you can use this enumerator.
/// @nodoc
@JsonValue(2)
videoDenoiserLevelStrength,
}
Expand Down Expand Up @@ -5528,7 +5533,7 @@ class AudioRecordingConfiguration {
@JsonKey(name: 'fileRecordingType')
final AudioFileRecordingType? fileRecordingType;

/// Recording quality. See audiorecordingqualitytype. Note: This parameter applies to AAC files only.
/// Recording quality. See audiorecordingqualitytype. This parameter applies to AAC files only.
@JsonKey(name: 'quality')
final AudioRecordingQualityType? quality;

Expand Down Expand Up @@ -5696,6 +5701,10 @@ enum AreaCodeEx {
@JsonValue(0x00000800)
areaCodeUs,

/// @nodoc
@JsonValue(0x00001000)
areaCodeRu,

/// @nodoc
@JsonValue(0xFFFFFFFE)
areaCodeOvs,
Expand Down Expand Up @@ -5934,7 +5943,7 @@ class ChannelMediaRelayConfiguration {

/// The information of the target channel ChannelMediaInfo. It contains the following members: channelName : The name of the target channel. token : The token for joining the target channel. It is generated with the channelName and uid you set in destInfos.
/// If you have not enabled the App Certificate, set this parameter as the default value NULL, which means the SDK applies the App ID.
/// If you have enabled the App Certificate, you must use the token generated with the channelName and uid. If the token of any target channel expires, the whole media relay stops; hence Agora recommends that you specify the same expiration time for the tokens of all the target channels. uid : The unique user ID to identify the relay stream in the target channel. The value ranges from 0 to (2 32 -1). To avoid user ID conflicts, this user ID must be different from any other user ID in the target channel. The default value is 0, which means the SDK generates a random user ID.
/// If you have enabled the App Certificate, you must use the token generated with the channelName and uid. If the token of any target channel expires, the whole media relay stops; hence Agora recommends that you specify the same expiration time for the tokens of all the target channels. uid : The unique user ID to identify the relay stream in the target channel. The value ranges from 0 to (2 32 -1). To avoid user ID conflicts, this user ID must be different from any other user ID in the target channel. The default value is 0, which means the SDK generates a random UID.
@JsonKey(name: 'destInfos')
final List<ChannelMediaInfo>? destInfos;

Expand Down
6 changes: 5 additions & 1 deletion lib/src/agora_base.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b87093e

Please sign in to comment.