Skip to content

Commit

Permalink
feat: Upgrade native sdk 4.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
littleGnAl committed Sep 12, 2023
1 parent 7438fb2 commit 7e89c3d
Show file tree
Hide file tree
Showing 25 changed files with 5,281 additions and 5,022 deletions.
34 changes: 31 additions & 3 deletions lib/src/agora_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,10 @@ enum ErrorCodeType {
/// 1501: Permission to access the camera is not granted. Check whether permission to access the camera permission is granted.
@JsonValue(1501)
errVdmCameraNotAuthorized,

/// @nodoc
@JsonValue(2007)
errAdmApplicationLoopback,
}

/// @nodoc
Expand Down Expand Up @@ -1774,7 +1778,7 @@ class VideoEncoderConfiguration {
@JsonKey(name: 'frameRate')
final int? frameRate;

/// The encoding bitrate (Kbps) of the video. : (Recommended) Standard bitrate mode. In this mode, the bitrates of the live broadcasting profile is higher than that of the communication profile. : Adaptive bitrate mode In this mode, the bitrates of the live broadcasting profile equals that of the communication profile. If this mode is selected, the video frame rate of live broadcasting scenarios may be lower than the set value.
/// The encoding bitrate (Kbps) of the video. (0): (Recommended) Standard bitrate mode. In this mode, the bitrates of the live broadcasting profile is higher than that of the communication profile. (-1): Adaptive bitrate mode. In this mode, the bitrates of the live broadcasting profile equals that of the communication profile. If this mode is selected, the video frame rate of live broadcasting scenarios may be lower than the set value.
@JsonKey(name: 'bitrate')
final int? bitrate;

Expand Down Expand Up @@ -2654,7 +2658,7 @@ enum LocalAudioStreamError {
@JsonValue(2)
localAudioStreamErrorDeviceNoPermission,

/// 3: (Android and iOS only) The local audio capture device is used. Remind your users to check whether another application occupies the microphone. Local audio capture automatically resumes after the microphone is idle for about five seconds. You can also try to rejoin the channel after the microphone is idle.
/// 3: (Android and iOS only) The local audio capture device is already in use. Remind your users to check whether another application occupies the microphone. Local audio capture automatically resumes after the microphone is idle for about five seconds. You can also try to rejoin the channel after the microphone is idle.
@JsonValue(3)
localAudioStreamErrorDeviceBusy,

Expand Down Expand Up @@ -2810,6 +2814,26 @@ enum LocalVideoStreamError {
/// @nodoc
@JsonValue(22)
localVideoStreamErrorScreenCaptureNoPermission,

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

/// @nodoc
@JsonValue(24)
localVideoStreamErrorScreenCaptureResumed,

/// @nodoc
@JsonValue(25)
localVideoStreamErrorScreenCaptureWindowHidden,

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

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

/// @nodoc
Expand Down Expand Up @@ -4198,7 +4222,7 @@ enum ConnectionChangedReasonType {
@JsonValue(13)
connectionChangedClientIpAddressChanged,

/// 14: Timeout for the keep-alive of the connection between the SDK and the Agora edge server. The connection state changes to .
/// 14: Timeout for the keep-alive of the connection between the SDK and the Agora edge server. The SDK tries to reconnect to the server automatically.
@JsonValue(14)
connectionChangedKeepAliveTimeout,

Expand Down Expand Up @@ -4229,6 +4253,10 @@ enum ConnectionChangedReasonType {
/// @nodoc
@JsonValue(21)
connectionChangedLicenseValidationFailure,

/// @nodoc
@JsonValue(22)
connectionChangedCertificationVeryfyFailure,
}

/// @nodoc
Expand Down
9 changes: 9 additions & 0 deletions lib/src/agora_base.g.dart

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

22 changes: 20 additions & 2 deletions lib/src/agora_media_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,10 @@ enum ContentInspectType {
/// 2: Screenshot capture. SDK takes screenshots of the video stream in the channel and uploads them.
@JsonValue(2)
contentInspectSupervision,

/// @nodoc
@JsonValue(3)
contentInspectImageModeration,
}

/// @nodoc
Expand Down Expand Up @@ -389,12 +393,17 @@ class ContentInspectModule {
@JsonSerializable(explicitToJson: true, includeIfNull: false)
class ContentInspectConfig {
/// @nodoc
const ContentInspectConfig({this.extraInfo, this.modules, this.moduleCount});
const ContentInspectConfig(
{this.extraInfo, this.serverConfig, this.modules, this.moduleCount});

/// Additional information on the video content (maximum length: 1024 Bytes). The SDK sends the screenshots and additional information on the video content to the Agora server. Once the video screenshot and upload process is completed, the Agora server sends the additional information and the callback notification to your server.
@JsonKey(name: 'extraInfo')
final String? extraInfo;

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

/// Functional module. See ContentInspectModule. A maximum of 32 ContentInspectModule instances can be configured, and the value range of MAX_CONTENT_INSPECT_MODULE_COUNT is an integer in [1,32]. A function module can only be configured with one instance at most. Currently only the video screenshot and upload function is supported.
@JsonKey(name: 'modules')
final List<ContentInspectModule>? modules;
Expand Down Expand Up @@ -585,6 +594,10 @@ enum VideoPixelFormat {
/// 16: The format is I422.
@JsonValue(16)
videoPixelI422,

/// @nodoc
@JsonValue(17)
videoTextureId3d11texture2d,
}

/// @nodoc
Expand Down Expand Up @@ -679,7 +692,8 @@ class ExternalVideoFrame {
this.matrix,
this.metadataBuffer,
this.metadataSize,
this.alphaBuffer});
this.alphaBuffer,
this.textureSliceIndex});

/// The video type. See VideoBufferType.
@JsonKey(name: 'type')
Expand Down Expand Up @@ -749,6 +763,10 @@ class ExternalVideoFrame {
@JsonKey(name: 'alphaBuffer', ignore: true)
final Uint8List? alphaBuffer;

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

/// @nodoc
factory ExternalVideoFrame.fromJson(Map<String, dynamic> json) =>
_$ExternalVideoFrameFromJson(json);
Expand Down
6 changes: 6 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.

2 changes: 1 addition & 1 deletion lib/src/agora_media_engine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ abstract class MediaEngine {
/// Ensure that you call this method before joining a channel.
/// When handling the video data returned in the callbacks, pay attention to the changes in the width and height parameters, which may be adapted under the following circumstances:
/// When network conditions deteriorate, the video resolution decreases incrementally.
/// If the user adjusts the video profile, the resolution of the video returned in the callbacks also changes. After registering the raw video observer, you can use the obtained raw video data in various video pre-processing scenarios, such as implementing virtual backgrounds and image enhacement scenarios by yourself, Agora provides some open source sample projects on GitHub for your reference.
/// If the user adjusts the video profile, the resolution of the video returned in the callbacks also changes.
///
/// * [observer] The observer instance. See VideoFrameObserver.
///
Expand Down
10 changes: 9 additions & 1 deletion lib/src/agora_music_content_center.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ enum MusicContentCenterStatusCode {
/// @nodoc
@JsonValue(6)
kMusicContentCenterStatusErrMusicDecryption,

/// @nodoc
@JsonValue(7)
kMusicContentCenterStatusErrHttpInternalError,
}

/// @nodoc
Expand Down Expand Up @@ -344,7 +348,7 @@ class MusicContentCenterEventHandler {
class MusicContentCenterConfiguration {
/// @nodoc
const MusicContentCenterConfiguration(
{this.appId, this.token, this.mccUid, this.maxCacheSize});
{this.appId, this.token, this.mccUid, this.maxCacheSize, this.mccDomain});

/// @nodoc
@JsonKey(name: 'appId')
Expand All @@ -362,6 +366,10 @@ class MusicContentCenterConfiguration {
@JsonKey(name: 'maxCacheSize')
final int? maxCacheSize;

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

/// @nodoc
factory MusicContentCenterConfiguration.fromJson(Map<String, dynamic> json) =>
_$MusicContentCenterConfigurationFromJson(json);
Expand Down
3 changes: 3 additions & 0 deletions lib/src/agora_music_content_center.g.dart

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

Loading

0 comments on commit 7e89c3d

Please sign in to comment.