Skip to content

Commit

Permalink
feat: Upgrade native sdk 4.2.3 (#1312)
Browse files Browse the repository at this point in the history
Co-authored-by: littleGnAl <[email protected]>
Co-authored-by: jinyuagora <[email protected]>
  • Loading branch information
3 people authored Oct 13, 2023
1 parent a153a40 commit 553863a
Show file tree
Hide file tree
Showing 33 changed files with 5,355 additions and 5,066 deletions.
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ dependencies {
if (isDev(project)) {
implementation fileTree(dir: "libs", include: ["*.jar"])
} else {
api 'io.agora.rtc:iris-rtc:4.2.2-build.1'
api 'io.agora.rtc:full-sdk:4.2.2'
api 'io.agora.rtc:full-screen-sharing:4.2.2'
api 'io.agora.rtc:iris-rtc:4.2.3-build.3'
api 'io.agora.rtc:full-sdk:4.2.3'
api 'io.agora.rtc:full-screen-sharing:4.2.3'
}
}

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 @@ -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.2-build.1'
s.dependency 'AgoraRtcEngine_iOS', '4.2.2'
s.dependency 'AgoraIrisRTC_iOS', '4.2.3-build.3'
s.dependency 'AgoraRtcEngine_iOS', '4.2.3'
end

s.platform = :ios, '9.0'
Expand Down
58 changes: 41 additions & 17 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 @@ -2760,42 +2764,42 @@ enum LocalVideoStreamError {
@JsonValue(5)
localVideoStreamErrorEncodeFailure,

/// 6: (For iOS only) The app is in the background. Remind the user that video capture cannot be performed normally when the app is in the background.
/// 6: (iOS only) The app is in the background. Remind the user that video capture cannot be performed normally when the app is in the background.
@JsonValue(6)
localVideoStreamErrorCaptureInbackground,

/// 7: (For iOS only) The current application window is running in Slide Over, Split View, or Picture in Picture mode, and another app is occupying the camera. Remind the user that the application cannot capture video properly when the app is running in Slide Over, Split View, or Picture in Picture mode and another app is occupying the camera.
/// 7: (iOS only) The current application window is running in Slide Over, Split View, or Picture in Picture mode, and another app is occupying the camera. Remind the user that the application cannot capture video properly when the app is running in Slide Over, Split View, or Picture in Picture mode and another app is occupying the camera.
@JsonValue(7)
localVideoStreamErrorCaptureMultipleForegroundApps,

/// 8: Fails to find a local video capture device. Remind the user to check whether the camera is connected to the device properly or the camera is working properly, and then to rejoin the channel.
@JsonValue(8)
localVideoStreamErrorDeviceNotFound,

/// 9: (For macOS only) The video capture device currently in use is disconnected (such as being unplugged).
/// 9: (macOS only) The video capture device currently in use is disconnected (such as being unplugged).
@JsonValue(9)
localVideoStreamErrorDeviceDisconnected,

/// 10: (For macOS and Windows only) The SDK cannot find the video device in the video device list. Check whether the ID of the video device is valid.
/// 10: (macOS and Windows only) The SDK cannot find the video device in the video device list. Check whether the ID of the video device is valid.
@JsonValue(10)
localVideoStreamErrorDeviceInvalidId,

/// 101: The current video capture device is unavailable due to excessive system pressure.
@JsonValue(101)
localVideoStreamErrorDeviceSystemPressure,

/// 11: (For macOS only) The shared window is minimized when you call startScreenCaptureByWindowId to share a window. The SDK cannot share a minimized window. You can cancel the minimization of this window at the application layer, for example by maximizing this window.
/// 11: (macOS only) The shared window is minimized when you call startScreenCaptureByWindowId to share a window. The SDK cannot share a minimized window. You can cancel the minimization of this window at the application layer, for example by maximizing this window.
@JsonValue(11)
localVideoStreamErrorScreenCaptureWindowMinimized,

/// 12: (For macOS and Windows only) The error code indicates that a window shared by the window ID has been closed or a full-screen window shared by the window ID has exited full-screen mode. After exiting full-screen mode, remote users cannot see the shared window. To prevent remote users from seeing a black screen, Agora recommends that you immediately stop screen sharing. Common scenarios for reporting this error code:
/// 12: (macOS and Windows only) The error code indicates that a window shared by the window ID has been closed or a full-screen window shared by the window ID has exited full-screen mode. After exiting full-screen mode, remote users cannot see the shared window. To prevent remote users from seeing a black screen, Agora recommends that you immediately stop screen sharing. Common scenarios reporting this error code:
/// When the local user closes the shared window, the SDK reports this error code.
/// The local user shows some slides in full-screen mode first, and then shares the windows of the slides. After the user exits full-screen mode, the SDK reports this error code.
/// The local user watches a web video or reads a web document in full-screen mode first, and then shares the window of the web video or document. After the user exits full-screen mode, the SDK reports this error code.
@JsonValue(12)
localVideoStreamErrorScreenCaptureWindowClosed,

/// 13: (For Windows only) The window being shared is overlapped by another window, so the overlapped area is blacked out by the SDK during window sharing.
/// 13: (Windows only) The window being shared is overlapped by another window, so the overlapped area is blacked out by the SDK during window sharing.
@JsonValue(13)
localVideoStreamErrorScreenCaptureWindowOccluded,

Expand All @@ -2807,9 +2811,29 @@ enum LocalVideoStreamError {
@JsonValue(21)
localVideoStreamErrorScreenCaptureFailure,

/// @nodoc
/// 22: (Windows and macOS only) No permission for screen capture.
@JsonValue(22)
localVideoStreamErrorScreenCaptureNoPermission,

/// 23: (Windows only) Screen capture has been paused. Common scenarios reporting this error code: The current screen may have been switched to a secure desktop, such as a UAC dialog box or Winlogon desktop.
@JsonValue(23)
localVideoStreamErrorScreenCapturePaused,

/// 24: (Windows only) Screen capture has resumed from paused state.
@JsonValue(24)
localVideoStreamErrorScreenCaptureResumed,

/// 25: (Windows only) The window for the current screen capture is hidden and not visible on the current screen.
@JsonValue(25)
localVideoStreamErrorScreenCaptureWindowHidden,

/// 26: (Windows only) The window for screen capture has been restored from hidden state.
@JsonValue(26)
localVideoStreamErrorScreenCaptureWindowRecoverFromHidden,

/// 27: (Windows only) The window for screen capture has been restored from minimized state.
@JsonValue(27)
localVideoStreamErrorScreenCaptureWindowRecoverFromMinimized,
}

/// @nodoc
Expand Down Expand Up @@ -3972,10 +3996,6 @@ class LocalTranscoderConfiguration {
/// The error code of the local video mixing failure.
@JsonEnum(alwaysCreate: true)
enum VideoTranscoderError {
/// @nodoc
@JsonValue(0)
vtErrOk,

/// 1: The selected video source has not started video capture. You need to create a video track for it and start video capture.
@JsonValue(1)
vtErrVideoSourceNotReady,
Expand Down Expand Up @@ -4198,7 +4218,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 +4249,10 @@ enum ConnectionChangedReasonType {
/// @nodoc
@JsonValue(21)
connectionChangedLicenseValidationFailure,

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

/// @nodoc
Expand Down Expand Up @@ -5256,7 +5280,7 @@ class ScreenCaptureParameters {
@JsonKey(name: 'bitrate')
final int? bitrate;

/// Whether to capture the mouse in screen sharing: true : (Default) Capture the mouse. false : Do not capture the mouse.
/// Whether to capture the mouse in screen sharing: true : (Default) Capture the mouse. false : Do not capture the mouse. Due to macOS system restrictions, setting this parameter to false is ineffective during screen sharing (it has no impact when sharing a window).
@JsonKey(name: 'captureMouseCursor')
final bool? captureMouseCursor;

Expand Down Expand Up @@ -5397,7 +5421,7 @@ class AudioRecordingConfiguration {
this.quality,
this.recordingChannel});

/// The absolute path (including the filename extensions) of the recording file. For example: C:\music\audio.mp4. Ensure that the directory for the log files exists and is writable.
/// The absolute path (including the filename extensions) of the recording file. For example: C:\music\audio.aac. Ensure that the directory for the log files exists and is writable.
@JsonKey(name: 'filePath')
final String? filePath;

Expand Down
10 changes: 9 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.

28 changes: 23 additions & 5 deletions lib/src/agora_media_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -341,13 +341,17 @@ enum ContentInspectType {
@JsonValue(0)
contentInspectInvalid,

/// 1: Video content moderation. SDK takes screenshots, inspects video content of the video stream in the channel, and uploads the screenshots and moderation results.
/// @nodoc
@JsonValue(1)
contentInspectModeration,

/// 2: Screenshot capture. SDK takes screenshots of the video stream in the channel and uploads them.
/// 2: Video screenshot and upload via Agora self-developed extension. SDK takes screenshots of the video stream in the channel and uploads them.
@JsonValue(2)
contentInspectSupervision,

/// 3: Video screenshot and upload via extensions from Agora Extensions Marketplace. SDK uses video moderation extensions from Agora Extensions Marketplace to take screenshots of the video stream in the channel and uploads them.
@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;

/// (Optional) Server configuration related to uploading video screenshots via extensions from Agora Extensions Marketplace. This parameter only takes effect when type in ContentInspectModule is set to contentInspectImageModeration. If you want to use it, contact.
@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 @@ -558,7 +567,7 @@ enum VideoPixelFormat {
@JsonValue(4)
videoPixelRgba,

/// 8: The format is NV12.
/// @nodoc
@JsonValue(8)
videoPixelNv12,

Expand All @@ -585,6 +594,10 @@ enum VideoPixelFormat {
/// 16: The format is I422.
@JsonValue(16)
videoPixelI422,

/// 17: The ID3D11TEXTURE2D format. Currently supported types are DXGI_FORMAT_B8G8R8A8_UNORM, DXGI_FORMAT_B8G8R8A8_TYPELESS and DXGI_FORMAT_NV12.
@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;

/// This parameter only applies to video data in Windows Texture format. It represents an index of an ID3D11Texture2D texture object used by the video frame in the ID3D11Texture2D array.
@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.

4 changes: 2 additions & 2 deletions 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 Expand Up @@ -232,7 +232,7 @@ abstract class MediaEngine {
/// 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.
void unregisterVideoFrameObserver(VideoFrameObserver observer);

/// Unregisters a receiver object for the encoded video image.
/// Unregisters a receiver object for the encoded video frame.
///
/// * [observer] The video observer, reporting the reception of each video frame. See VideoEncodedFrameObserver.
///
Expand Down
Loading

0 comments on commit 553863a

Please sign in to comment.