Skip to content

Commit

Permalink
Auto generate codes for native sdk (#1792)
Browse files Browse the repository at this point in the history
Auto generate codes for native sdk version 

*This pull request is opened by bot*

Co-authored-by: littleGnAl <[email protected]>
  • Loading branch information
github-actions[bot] and littleGnAl committed Jun 5, 2024
1 parent 8266d09 commit be84fc8
Show file tree
Hide file tree
Showing 16 changed files with 262 additions and 218 deletions.
72 changes: 38 additions & 34 deletions lib/src/agora_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -587,19 +587,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 @@ -1723,7 +1723,7 @@ extension VideoMirrorModeTypeExt on VideoMirrorModeType {
}
}

/// The bit mask that indicates the device codec capability.
/// The bit mask of the codec type.
@JsonEnum(alwaysCreate: true)
enum CodecCapMask {
/// (0): The device does not support encoding or decoding.
Expand Down Expand Up @@ -1782,7 +1782,7 @@ class CodecCapLevels {
Map<String, dynamic> toJson() => _$CodecCapLevelsToJson(this);
}

/// The codec capability of the device.
/// The codec capability of the SDK.
@JsonSerializable(explicitToJson: true, includeIfNull: false)
class CodecCapInfo {
/// @nodoc
Expand All @@ -1792,11 +1792,11 @@ class CodecCapInfo {
@JsonKey(name: 'codecType')
final VideoCodecType? codecType;

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

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

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

/// 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, frame rate, and bitrate, please refer to. standardBitrate (0): (Recommended) Standard bitrate mode. compatibleBitrate (-1): Adaptive bitrate mode. In general, Agora suggests that you do not use this value.
/// 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. standardBitrate (0): (Recommended) Standard bitrate mode. compatibleBitrate (-1): Adaptive bitrate mode. In general, Agora suggests that you do not use this value.
@JsonKey(name: 'bitrate')
final int? bitrate;

Expand Down Expand Up @@ -3266,7 +3266,6 @@ class VideoTrackInfo {
this.ownerUid,
this.trackId,
this.channelId,
this.streamType,
this.codecType,
this.encodedFrameOnly,
this.sourceType,
Expand All @@ -3288,10 +3287,6 @@ class VideoTrackInfo {
@JsonKey(name: 'channelId')
final String? channelId;

/// @nodoc
@JsonKey(name: 'streamType')
final VideoStreamType? streamType;

/// @nodoc
@JsonKey(name: 'codecType')
final VideoCodecType? codecType;
Expand Down Expand Up @@ -3985,7 +3980,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 @@ -4364,33 +4359,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 @@ -4408,7 +4412,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 @@ -5503,7 +5507,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 @@ -6630,41 +6634,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
3 changes: 0 additions & 3 deletions lib/src/agora_base.g.dart

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

24 changes: 12 additions & 12 deletions lib/src/agora_media_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1317,12 +1317,12 @@ class AudioFrameObserver extends AudioFrameObserverBase {
onEarMonitoringAudioFrame: onEarMonitoringAudioFrame,
);

/// Retrieves the audio frame of a specified user before mixing.
/// Retrieves the audio frame before mixing of subscribed remote users.
///
/// Due to framework limitations, this callback does not support sending processed audio data back to the SDK.
///
/// * [channelId] The channel ID.
/// * [uid] The user ID of the specified user.
/// * [uid] The ID of subscribed remote users.
/// * [audioFrame] The raw audio data. See AudioFrame.
final void Function(String channelId, int uid, AudioFrame audioFrame)?
onPlaybackAudioFrameBeforeMixing;
Expand Down Expand Up @@ -1434,9 +1434,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 @@ -1448,9 +1448,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 @@ -1467,9 +1467,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 @@ -1687,7 +1687,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

0 comments on commit be84fc8

Please sign in to comment.