Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto generate codes for native sdk #1776

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 37 additions & 24 deletions lib/src/agora_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -591,19 +591,19 @@ extension UserOfflineReasonTypeExt on UserOfflineReasonType {
/// The interface class.
@JsonEnum(alwaysCreate: true)
enum InterfaceIdType {
/// The AudioDeviceManager interface class.
/// 1: The AudioDeviceManager interface class.
@JsonValue(1)
agoraIidAudioDeviceManager,

/// The VideoDeviceManager interface class.
/// 2: The VideoDeviceManager interface class.
@JsonValue(2)
agoraIidVideoDeviceManager,

/// This interface class is deprecated.
@JsonValue(3)
agoraIidParameterEngine,

/// The MediaEngine interface class.
/// 4: The MediaEngine interface class.
@JsonValue(4)
agoraIidMediaEngine,

Expand Down Expand Up @@ -2898,6 +2898,10 @@ enum LocalVideoStreamError {
/// @nodoc
@JsonValue(27)
localVideoStreamErrorScreenCaptureWindowRecoverFromMinimized,

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

/// @nodoc
Expand Down Expand Up @@ -3863,7 +3867,7 @@ class LiveTranscoding {
@JsonKey(name: 'height')
final int? height;

/// Bitrate of the output video stream for Media Push in Kbps. The default value is 400 Kbps. Set this member according to the table. If you set a bitrate beyond the proper range, the SDK automatically adapts it to a value within the range.
/// The encoding bitrate (Kbps) of the video. This parameter does not need to be set; keeping the default value standardBitrate is sufficient. The SDK automatically matches the most suitable bitrate based on the video resolution and frame rate you have set. For the correspondence between video resolution and frame rate, see.
@JsonKey(name: 'videoBitrate')
final int? videoBitrate;

Expand Down Expand Up @@ -4242,33 +4246,42 @@ enum ConnectionChangedReasonType {
@JsonValue(2)
connectionChangedInterrupted,

/// 3: The connection between the SDK and the Agora edge server is banned by the Agora edge server. This error occurs when the user is kicked out of the channel by the server.
/// 3: The connection between the SDK and the Agora edge server is banned by the Agora edge server. For example, when a user is kicked out of the channel, this status will be returned.
@JsonValue(3)
connectionChangedBannedByServer,

/// 4: The SDK fails to join the channel. When the SDK fails to join the channel for more than 20 minutes, this error occurs and the SDK stops reconnecting to the channel.
/// 4: The SDK fails to join the channel. When the SDK fails to join the channel for more than 20 minutes, this code will be returned and the SDK stops reconnecting to the channel. You need to prompt the user to try to switch to another network and rejoin the channel.
@JsonValue(4)
connectionChangedJoinFailed,

/// 5: The SDK has left the channel.
@JsonValue(5)
connectionChangedLeaveChannel,

/// 6: The connection failed because the App ID is not valid. Please rejoin the channel with a valid App ID.
/// 6: The App ID is invalid. You need to rejoin the channel with a valid APP ID and make sure the App ID you are using is consistent with the one generated in the Agora Console.
@JsonValue(6)
connectionChangedInvalidAppId,

/// 7: The connection failed since channel name is not valid. Rejoin the channel with a valid channel name.
/// 7: Invalid channel name. Rejoin the channel with a valid channel name. A valid channel name is a string of up to 64 bytes in length. Supported characters (89 characters in total):
/// All lowercase English letters: a to z.
/// All uppercase English letters: A to Z.
/// All numeric characters: 0 to 9.
/// Space
/// "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
@JsonValue(7)
connectionChangedInvalidChannelName,

/// 8: The connection failed because the token is not valid. Possible reasons are as follows:
/// The App Certificate for the project is enabled in Agora Console, but you do not use a token when joining the channel. If you enable the App Certificate, you must use a token to join the channel.
/// 8: Invalid token. Possible reasons are as follows:
/// The App Certificate for the project is enabled in Agora Console, but you do not pass in a token when joining a channel.
/// The uid specified when calling joinChannel to join the channel is inconsistent with the uid passed in when generating the token.
/// The generated token and the token used to join the channel are not consistent. Ensure the following:
/// When your project enables App Certificate, you need to pass in a token to join a channel.
/// The user ID specified when generating the token is consistent with the user ID used when joining the channel.
/// The generated token is the same as the token passed in to join the channel.
@JsonValue(8)
connectionChangedInvalidToken,

/// 9: The connection failed since token is expired.
/// (9): The token currently being used has expired. You need to generate a new token on your server and rejoin the channel with the new token.
@JsonValue(9)
connectionChangedTokenExpired,

Expand All @@ -4286,7 +4299,7 @@ enum ConnectionChangedReasonType {
@JsonValue(12)
connectionChangedRenewToken,

/// 13: The IP address of the client has changed, possibly because the network type, IP address, or port has been changed.
/// (13): Client IP address changed. If you receive this code multiple times, You need to prompt the user to switch networks and try joining the channel again.
@JsonValue(13)
connectionChangedClientIpAddressChanged,

Expand Down Expand Up @@ -5359,7 +5372,7 @@ class ScreenCaptureParameters {
@JsonKey(name: 'captureMouseCursor')
final bool? captureMouseCursor;

/// Whether to bring the window to the front when calling the startScreenCaptureByWindowId method to share it: true : Bring the window to the front. false : (Default) Do not bring the window to the front.
/// Whether to bring the window to the front when calling the startScreenCaptureByWindowId method to share it: true : Bring the window to the front. false : (Default) Do not bring the window to the front. Due to macOS system limitations, when setting this member to bring the window to the front, if the current app has multiple windows, only the main window will be brought to the front.
@JsonKey(name: 'windowFocus')
final bool? windowFocus;

Expand Down Expand Up @@ -6588,41 +6601,41 @@ class VideoRenderingTracingInfo {
this.remoteJoined2UnmuteVideo,
this.remoteJoined2PacketReceived});

/// The time interval from calling the startMediaRenderingTracing method to SDK triggering the onVideoRenderingTracingResult callback. The unit is milliseconds. Agora recommends you call startMediaRenderingTracing before joining a channel.
/// The time interval (ms) from startMediaRenderingTracing to SDK triggering the onVideoRenderingTracingResult callback. Agora recommends you call startMediaRenderingTracing before joining a channel.
@JsonKey(name: 'elapsedTime')
final int? elapsedTime;

/// The time interval from calling startMediaRenderingTracing to calling joinChannel. The unit is milliseconds. A negative number means to call joinChannel after calling startMediaRenderingTracing.
/// The time interval (ms) from startMediaRenderingTracing to joinChannel. A negative number indicates that startMediaRenderingTracing is called after calling joinChannel.
@JsonKey(name: 'start2JoinChannel')
final int? start2JoinChannel;

/// Time interval from calling joinChannel to successfully joining the channel. The unit is milliseconds.
/// The time interval (ms) from or joinChannel to successfully joining the channel.
@JsonKey(name: 'join2JoinSuccess')
final int? join2JoinSuccess;

/// If the local user calls startMediaRenderingTracing before successfully joining the channel, this value is the time interval from the local user successfully joining the channel to the remote user joining the channel. The unit is milliseconds.
/// If the local user calls startMediaRenderingTracing after successfully joining the channel, the value is the time interval from calling startMediaRenderingTracing to when the remote user joins the channel. The unit is milliseconds.
/// If the local user calls startMediaRenderingTracing before successfully joining the channel, this value is the time interval (ms) from the local user successfully joining the channel to the remote user joining the channel.
/// If the local user calls startMediaRenderingTracing after successfully joining the channel, the value is the time interval (ms) from startMediaRenderingTracing to when the remote user joins the channel.
/// If the local user calls startMediaRenderingTracing after the remote user joins the channel, the value is 0 and meaningless.
/// In order to reduce the time of rendering the first frame for remote users, Agora recommends that the local user joins the channel when the remote user is in the channel to reduce this value.
@JsonKey(name: 'joinSuccess2RemoteJoined')
final int? joinSuccess2RemoteJoined;

/// If the local user calls startMediaRenderingTracing before the remote user joins the channel, this value is the time interval from when the remote user joins the channel to when the local user sets the remote view. The unit is milliseconds.
/// If the local user calls startMediaRenderingTracing after the remote user joins the channel, this value is the time interval from calling startMediaRenderingTracing to setting the remote view. The unit is milliseconds.
/// If the local user calls startMediaRenderingTracing before the remote user joins the channel, this value is the time interval (ms) from when the remote user joins the channel to when the local user sets the remote view.
/// If the local user calls startMediaRenderingTracing after the remote user joins the channel, this value is the time interval (ms) from calling startMediaRenderingTracing to setting the remote view.
/// If the local user calls startMediaRenderingTracing after setting the remote view, the value is 0 and has no effect.
/// In order to reduce the time of rendering the first frame for remote users, Agora recommends that the local user sets the remote view before the remote user joins the channel, or sets the remote view immediately after the remote user joins the channel to reduce this value.
@JsonKey(name: 'remoteJoined2SetView')
final int? remoteJoined2SetView;

/// If the local user calls startMediaRenderingTracing before the remote user joins the channel, this value is the time interval from the remote user joining the channel to subscribing to the remote video stream. The unit is milliseconds.
/// If the local user calls startMediaRenderingTracing after the remote user joins the channel, this value is the time interval from calling startMediaRenderingTracing to subscribing to the remote video stream. The unit is milliseconds.
/// If the local user calls startMediaRenderingTracing before the remote user joins the channel, this value is the time interval (ms) from the remote user joining the channel to subscribing to the remote video stream.
/// If the local user calls startMediaRenderingTracing after the remote user joins the channel, this value is the time interval (ms) from startMediaRenderingTracing to subscribing to the remote video stream.
/// If the local user calls startMediaRenderingTracing after subscribing to the remote video stream, the value is 0 and has no effect.
/// In order to reduce the time of rendering the first frame for remote users, Agora recommends that after the remote user joins the channel, the local user immediately subscribes to the remote video stream to reduce this value.
@JsonKey(name: 'remoteJoined2UnmuteVideo')
final int? remoteJoined2UnmuteVideo;

/// If the local user calls startMediaRenderingTracing before the remote user joins the channel, this value is the time interval from when the remote user joins the channel to when the local user receives the remote video stream. The unit is milliseconds.
/// If the local user calls startMediaRenderingTracing after the remote user joins the channel, this value is the time interval from calling startMediaRenderingTracing to receiving the remote video stream. The unit is milliseconds.
/// If the local user calls startMediaRenderingTracing before the remote user joins the channel, this value is the time interval (ms) from when the remote user joins the channel to when the local user receives the remote video stream.
/// If the local user calls startMediaRenderingTracing after the remote user joins the channel, this value is the time interval (ms) from startMediaRenderingTracing to receiving the remote video stream.
/// If the local user calls startMediaRenderingTracing after receiving the remote video stream, the value is 0 and has no effect.
/// In order to reduce the time of rendering the first frame for remote users, Agora recommends that the remote user publishes video streams immediately after joining the channel, and the local user immediately subscribes to remote video streams to reduce this value.
@JsonKey(name: 'remoteJoined2PacketReceived')
Expand Down
2 changes: 2 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.

20 changes: 10 additions & 10 deletions lib/src/agora_media_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1504,9 +1504,9 @@ class VideoFrameObserver {
///
/// * [sourceType] Video source types, including cameras, screens, or media player. See VideoSourceType.
/// * [videoFrame] The video frame. See VideoFrame. The default value of the video frame data format obtained through this callback is as follows:
/// Android: I420 or RGB (GLES20.GL_TEXTURE_2D)
/// iOS: I420 or CVPixelBufferRef
/// macOS: I420 or CVPixelBufferRef
/// Android: I420
/// iOS: I420
/// macOS: I420
/// Windows: YUV420
final void Function(VideoSourceType sourceType, VideoFrame videoFrame)?
onCaptureVideoFrame;
Expand All @@ -1518,9 +1518,9 @@ class VideoFrameObserver {
/// The video data that this callback gets has been preprocessed, with its content cropped and rotated, and the image enhanced.
///
/// * [videoFrame] The video frame. See VideoFrame. The default value of the video frame data format obtained through this callback is as follows:
/// Android: I420 or RGB (GLES20.GL_TEXTURE_2D)
/// iOS: I420 or CVPixelBufferRef
/// macOS: I420 or CVPixelBufferRef
/// Android: I420
/// iOS: I420
/// macOS: I420
/// Windows: YUV420
/// * [sourceType] The type of the video source. See VideoSourceType.
final void Function(VideoSourceType sourceType, VideoFrame videoFrame)?
Expand All @@ -1537,9 +1537,9 @@ class VideoFrameObserver {
/// Due to framework limitations, this callback does not support sending processed video data back to the SDK.
///
/// * [videoFrame] The video frame. See VideoFrame. The default value of the video frame data format obtained through this callback is as follows:
/// Android: I420 or RGB (GLES20.GL_TEXTURE_2D)
/// iOS: I420 or CVPixelBufferRef
/// macOS: I420 or CVPixelBufferRef
/// Android: I420
/// iOS: I420
/// macOS: I420
/// Windows: YUV420
/// * [remoteUid] The user ID of the remote user who sends the current video frame.
/// * [channelId] The channel ID.
Expand Down Expand Up @@ -1757,7 +1757,7 @@ class MediaRecorderConfiguration {

/// Facial information observer.
///
/// You can call registerFaceInfoObserver to register or unregister the FaceInfoObserver object.
/// You can call registerFaceInfoObserver to register one FaceInfoObserver observer.
class FaceInfoObserver {
/// @nodoc
const FaceInfoObserver({
Expand Down
Loading