Skip to content

Commit

Permalink
feat: upgrade native sdk 4.1.1.28 (#1672)
Browse files Browse the repository at this point in the history
Update native sdk 4.1.1.28 dependencies

> This pull request is trigger by bot, you can checkout this branch and
update it.

---------

Co-authored-by: littleGnAl <[email protected]>
  • Loading branch information
littleGnAl and littleGnAl authored Apr 3, 2024
1 parent 78eadd2 commit 0ab1e46
Show file tree
Hide file tree
Showing 27 changed files with 1,872 additions and 706 deletions.
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ dependencies {
if (isDev(project)) {
implementation fileTree(dir: "libs", include: ["*.jar"])
} else {
api 'io.agora.rtc:iris-rtc:4.1.1.25-sp.1'
api 'io.agora.rtc:agora-special-full:4.1.1.25'
api 'io.agora.rtc:full-screen-sharing:4.1.1.25'
api 'io.agora.rtc:iris-rtc:4.1.1.28-build.2'
api 'io.agora.rtc:agora-special-full:4.1.1.28'
api 'io.agora.rtc:full-screen-sharing:4.1.1.28'
}
}

Expand Down
4 changes: 2 additions & 2 deletions ios/agora_rtc_engine.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Pod::Spec.new do |s|
s.source = { :path => '.' }
s.source_files = 'Classes/**/*.{h,mm,m,swift}'
s.dependency 'Flutter'
s.dependency 'AgoraIrisRTC_iOS', '4.1.1.25-sp.1'
s.dependency 'AgoraRtcEngine_Special_iOS', '4.1.1.25'
s.dependency 'AgoraIrisRTC_iOS', '4.1.1.28-build.2'
s.dependency 'AgoraRtcEngine_Special_iOS', '4.1.1.28'
# s.dependency 'AgoraRtcWrapper'
s.platform = :ios, '9.0'
s.swift_version = '5.0'
Expand Down
103 changes: 94 additions & 9 deletions lib/src/agora_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1035,10 +1035,55 @@ extension ScreenCaptureCapabilityLevelExt on ScreenCaptureCapabilityLevel {
}
}

/// The level of the codec capability.
@JsonEnum(alwaysCreate: true)
enum VideoCodecCapabilityLevel {
/// -1: Unsupported video type. Currently, only H.264 and H.265 formats are supported. If the video is in another format, this value will be returned.
@JsonValue(-1)
codecCapabilityLevelUnspecified,

/// 5: Supports encoding and decoding videos up to 1080p and 30 fps.
@JsonValue(5)
codecCapabilityLevelBasicSupport,

/// 10: Supports encoding and decoding videos up to1080p and 30 fps.
@JsonValue(10)
codecCapabilityLevel1080p30fps,

/// 20: Support encoding and decoding videos up to 1080p and 60 fps.
@JsonValue(20)
codecCapabilityLevel1080p60fps,

/// @nodoc
@JsonValue(23)
codecCapabilityLevel2k30fps,

/// @nodoc
@JsonValue(26)
codecCapabilityLevel2k60fps,

/// 30: Support encoding and decoding videos up to 4K and 30 fps.
@JsonValue(30)
codecCapabilityLevel4k60fps,
}

/// @nodoc
extension VideoCodecCapabilityLevelExt on VideoCodecCapabilityLevel {
/// @nodoc
static VideoCodecCapabilityLevel fromValue(int value) {
return $enumDecode(_$VideoCodecCapabilityLevelEnumMap, value);
}

/// @nodoc
int value() {
return _$VideoCodecCapabilityLevelEnumMap[this]!;
}
}

/// Video codec types.
@JsonEnum(alwaysCreate: true)
enum VideoCodecType {
/// @nodoc
/// 0: (Default) Unspecified codec format. The SDK automatically matches the appropriate codec format based on the current video stream's resolution and device performance.
@JsonValue(0)
videoCodecNone,

Expand All @@ -1050,7 +1095,7 @@ enum VideoCodecType {
@JsonValue(2)
videoCodecH264,

/// 3: (Default) Standard H.265. In certain scenarios, such as low resolution of the captured video stream or limited device performance, the SDK automatically adjusts to the H.264 encoding format.
/// 3: Standard H.265.
@JsonValue(3)
videoCodecH265,

Expand Down Expand Up @@ -1695,20 +1740,46 @@ extension CodecCapMaskExt on CodecCapMask {
}
}

/// The level of the codec capability.
@JsonSerializable(explicitToJson: true, includeIfNull: false)
class CodecCapLevels {
/// @nodoc
const CodecCapLevels({this.hwDecodingLevel, this.swDecodingLevel});

/// Hardware decoding capability level, which represents the device's ability to perform hardware decoding on videos of different quality. See VideoCodecCapabilityLevel.
@JsonKey(name: 'hwDecodingLevel')
final VideoCodecCapabilityLevel? hwDecodingLevel;

/// Software decoding capability level, which represents the device's ability to perform software decoding on videos of different quality. See VideoCodecCapabilityLevel.
@JsonKey(name: 'swDecodingLevel')
final VideoCodecCapabilityLevel? swDecodingLevel;

/// @nodoc
factory CodecCapLevels.fromJson(Map<String, dynamic> json) =>
_$CodecCapLevelsFromJson(json);

/// @nodoc
Map<String, dynamic> toJson() => _$CodecCapLevelsToJson(this);
}

/// The codec capability of the device.
@JsonSerializable(explicitToJson: true, includeIfNull: false)
class CodecCapInfo {
/// @nodoc
const CodecCapInfo({this.codecType, this.codecCapMask});
const CodecCapInfo({this.codecType, this.codecCapMask, this.codecLevels});

/// The video codec types. See VideoCodecType.
@JsonKey(name: 'codec_type')
@JsonKey(name: 'codecType')
final VideoCodecType? codecType;

/// The bit mask of the codec type. See CodecCapMask.
@JsonKey(name: 'codec_cap_mask')
@JsonKey(name: 'codecCapMask')
final int? codecCapMask;

/// The level of the codec capability. See CodecCapLevels.
@JsonKey(name: 'codecLevels')
final CodecCapLevels? codecLevels;

/// @nodoc
factory CodecCapInfo.fromJson(Map<String, dynamic> json) =>
_$CodecCapInfoFromJson(json);
Expand Down Expand Up @@ -1926,7 +1997,7 @@ class WatermarkOptions {
this.watermarkRatio,
this.mode});

/// Is the watermark visible in the local preview view? true : (Default) The watermark is visible in the local preview view. false : The watermark is not visible in the local preview view.
/// Whether the watermark is visible in the local preview view: true : (Default) The watermark is visible in the local preview view. false : The watermark is not visible in the local preview view.
@JsonKey(name: 'visibleInPreview')
final bool? visibleInPreview;

Expand Down Expand Up @@ -2731,6 +2802,10 @@ enum LocalVideoStreamError {
/// @nodoc
@JsonValue(26)
localVideoStreamErrorScreenCaptureWindowRecoverFromHidden,

/// @nodoc
@JsonValue(27)
localVideoStreamErrorScreenCaptureWindowRecoverFromMinimized,
}

/// @nodoc
Expand Down Expand Up @@ -3273,7 +3348,9 @@ class LocalAudioStats {
this.audioDeviceDelay,
this.audioPlayoutDelay,
this.earMonitorDelay,
this.aecEstimatedDelay});
this.aecEstimatedDelay,
this.aedVoiceRes,
this.aedMusicRes});

/// The number of audio channels.
@JsonKey(name: 'numChannels')
Expand Down Expand Up @@ -3311,6 +3388,14 @@ class LocalAudioStats {
@JsonKey(name: 'aecEstimatedDelay')
final int? aecEstimatedDelay;

/// @nodoc
@JsonKey(name: 'aedVoiceRes')
final int? aedVoiceRes;

/// @nodoc
@JsonKey(name: 'aedMusicRes')
final int? aedMusicRes;

/// @nodoc
factory LocalAudioStats.fromJson(Map<String, dynamic> json) =>
_$LocalAudioStatsFromJson(json);
Expand Down Expand Up @@ -5539,7 +5624,7 @@ enum ChannelMediaRelayError {
@JsonValue(1)
relayErrorServerErrorResponse,

/// 2: No server response. You can call leaveChannel to leave the channel. This error can also occur if your project has not enabled co-host token authentication. You can to enable the service for cohosting across channels before starting a channel media relay.
/// 2: No server response. This error may be caused by poor network connections. If this error occurs when initiating a channel media relay, you can try again later; if this error occurs during channel media relay, you can call leaveChannel to leave the channel. This error can also occur if the channel media relay service is not enabled in the project. You can contact to enable the service.
@JsonValue(2)
relayErrorServerNoResponse,

Expand Down Expand Up @@ -6144,7 +6229,7 @@ class EchoTestConfiguration {
@JsonKey(name: 'enableAudio')
final bool? enableAudio;

/// Whether to enable the video device for the loop test: true : (Default) Enable the video device. To test the video device, set this parameter as true. false : Disable the video device.
/// Whether to enable the video device for the loop test. Currently, video device loop test is not supported. Please set this parameter to false.
@JsonKey(name: 'enableVideo')
final bool? enableVideo;

Expand Down
53 changes: 49 additions & 4 deletions lib/src/agora_base.g.dart

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

31 changes: 31 additions & 0 deletions lib/src/agora_media_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,37 @@ const defaultConnectionId = 0;
/// @nodoc
const dummyConnectionId = 4294967295;

/// @nodoc
@JsonSerializable(explicitToJson: true, includeIfNull: false)
class ExtensionContext {
/// @nodoc
const ExtensionContext(
{this.isValid, this.uid, this.providerName, this.extensionName});

/// @nodoc
@JsonKey(name: 'isValid')
final bool? isValid;

/// @nodoc
@JsonKey(name: 'uid')
final int? uid;

/// @nodoc
@JsonKey(name: 'providerName')
final String? providerName;

/// @nodoc
@JsonKey(name: 'extensionName')
final String? extensionName;

/// @nodoc
factory ExtensionContext.fromJson(Map<String, dynamic> json) =>
_$ExtensionContextFromJson(json);

/// @nodoc
Map<String, dynamic> toJson() => _$ExtensionContextToJson(this);
}

/// The type of the video source.
@JsonEnum(alwaysCreate: true)
enum VideoSourceType {
Expand Down
24 changes: 24 additions & 0 deletions lib/src/agora_media_base.g.dart

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

9 changes: 4 additions & 5 deletions lib/src/agora_media_engine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,12 @@ abstract class MediaEngine {

/// Pulls the remote audio data.
///
/// Before calling this method, you need to call setExternalAudioSink to notify the app to enable and set the external rendering. After a successful call of this method, the app pulls the decoded and mixed audio data for playback.
/// This method only supports pulling data from custom audio source. If you need to pull the data captured by the SDK, do not call this method.
/// Before calling this method, call setExternalAudioSink (enabled : true) to notify the app to enable and set the external audio rendering. After a successful call of this method, the app pulls the decoded and mixed audio data for playback.
/// Call this method after joining a channel.
/// Once you enable the external audio sink, the app will not retrieve any audio data from the onPlaybackAudioFrame callback.
/// The difference between this method and the onPlaybackAudioFrame callback is as follows:
/// Both this method and onPlaybackAudioFrame callback can be used to get audio data after remote mixing. Note that after calling setExternalAudioSink to enable external audio rendering, the app no longer receives data from the onPlaybackAudioFrame callback. Therefore, you should choose between this method and the onPlaybackAudioFrame callback based on your actual business requirements. The specific distinctions between them are as follows:
/// After calling this method, the app automatically pulls the audio data from the SDK. By setting the audio data parameters, the SDK adjusts the frame buffer to help the app handle latency, effectively avoiding audio playback jitter.
/// The SDK sends the audio data to the app through the onPlaybackAudioFrame callback. Any delay in processing the audio frames may result in audio jitter.
/// After a successful method call, the app automatically pulls the audio data from the SDK. After setting the audio data parameters, the SDK adjusts the frame buffer and avoids problems caused by jitter in the external audio playback.
/// This method is only used for retrieving audio data after remote mixing. If you need to get audio data from different audio processing stages such as capture and playback, you can register the corresponding callbacks by calling registerAudioFrameObserver.
///
/// * [frame] Pointers to AudioFrame.
///
Expand Down
11 changes: 10 additions & 1 deletion lib/src/agora_media_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,16 @@ abstract class MediaPlayer {
/// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly.
Future<void> selectAudioTrack(int index);

/// @nodoc
/// Selects the audio tracks that you want to play on your local device and publish to the channel respectively.
///
/// You can call this method to determine the audio track to be played on your local device and published to the channel. Before calling this method, you need to open the media file with the openWithMediaSource method and set enableMultiAudioTrack in MediaSource as true.
///
/// * [playoutTrackIndex] The index of audio tracks for local playback. You can obtain the index through getStreamInfo.
/// * [publishTrackIndex] The index of audio tracks to be published in the channel. You can obtain the index through getStreamInfo.
///
/// Returns
/// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly.
/// < 0: Failure.
Future<void> selectMultiAudioTrack(
{required int playoutTrackIndex, required int publishTrackIndex});

Expand Down
Loading

0 comments on commit 0ab1e46

Please sign in to comment.