Skip to content

Commit

Permalink
[AUTO] Generate codes by terra (#1245)
Browse files Browse the repository at this point in the history
Co-authored-by: guoxianzhe <[email protected]>
  • Loading branch information
sda-rob and guoxianzhe authored Dec 3, 2024
1 parent d9f237d commit bf2be75
Show file tree
Hide file tree
Showing 8 changed files with 183 additions and 98 deletions.
65 changes: 38 additions & 27 deletions ts/Private/AgoraBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -772,11 +772,11 @@ export enum OrientationMode {
*/
export enum DegradationPreference {
/**
* @ignore
* 0: (Default) Automatic mode. The SDK will automatically select MaintainFramerate, MaintainBalanced or MaintainResolution based on the video scenario you set, in order to achieve the best overall quality of experience (QoE).
*/
MaintainAuto = -1,
/**
* 0: (Default) Prefers to reduce the video frame rate while maintaining video resolution during video encoding under limited bandwidth. This degradation preference is suitable for scenarios where video quality is prioritized.
* 0: Prefers to reduce the video frame rate while maintaining video resolution during video encoding under limited bandwidth. This degradation preference is suitable for scenarios where video quality is prioritized. Deprecated: This enumerator is deprecated. Use other enumerations instead.
*/
MaintainQuality = 0,
/**
Expand Down Expand Up @@ -1266,15 +1266,15 @@ export class EncodedVideoFrameInfo {
*/
export enum CompressionPreference {
/**
* @ignore
* -1: (Default) Automatic mode. The SDK will automatically select PreferLowLatency or PreferQuality based on the video scenario you set to achieve the best user experience.
*/
PreferCompressionAuto = -1,
/**
* 0: Low latency preference. The SDK compresses video frames to reduce latency. This preference is suitable for scenarios where smoothness is prioritized and reduced video quality is acceptable.
*/
PreferLowLatency = 0,
/**
* 1: (Default) High quality preference. The SDK compresses video frames while maintaining video quality. This preference is suitable for scenarios where video quality is prioritized.
* 1: High quality preference. The SDK compresses video frames while maintaining video quality. This preference is suitable for scenarios where video quality is prioritized.
*/
PreferQuality = 1,
}
Expand Down Expand Up @@ -2108,11 +2108,11 @@ export enum VideoApplicationScenarioType {
*/
ApplicationScenarioMeeting = 1,
/**
* ApplicationScenario1v1 (2) is suitable for 1v1 video call scenarios. To meet the requirements for low latency and high-quality video in this scenario, the SDK optimizes its strategies, improving performance in terms of video quality, first frame rendering, latency on mid-to-low-end devices, and smoothness under weak network conditions. 2: 1v1 video call scenario.
* ApplicationScenario1v1 (2) This is applicable to the scenario. To meet the requirements for low latency and high-quality video in this scenario, the SDK optimizes its strategies, improving performance in terms of video quality, first frame rendering, latency on mid-to-low-end devices, and smoothness under weak network conditions. 2: 1v1 video call scenario.
*/
ApplicationScenario1v1 = 2,
/**
* @ignore
* ApplicationScenarioLiveshow (3) This is applicable to the scenario. In this scenario, fast video rendering and high image quality are crucial. The SDK implements several performance optimizations, including automatically enabling accelerated audio and video frame rendering to minimize first-frame latency (no need to call enableInstantMediaRendering), and B-frame encoding to achieve better image quality and bandwidth efficiency. The SDK also provides enhanced video quality and smooth playback, even in poor network conditions or on lower-end devices. 3. Live show scenario.
*/
ApplicationScenarioLiveshow = 3,
}
Expand Down Expand Up @@ -2326,11 +2326,11 @@ export enum LocalVideoStreamReason {
*/
LocalVideoStreamReasonDeviceNotFound = 8,
/**
* 9: (macOS only) The video capture device currently in use is disconnected (such as being unplugged).
* 9: The video capture device currently in use is disconnected (such as being unplugged).
*/
LocalVideoStreamReasonDeviceDisconnected = 9,
/**
* 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.
* 10: The SDK cannot find the video device in the video device list. Check whether the ID of the video device is valid.
*/
LocalVideoStreamReasonDeviceInvalidId = 10,
/**
Expand All @@ -2346,11 +2346,11 @@ export enum LocalVideoStreamReason {
*/
LocalVideoStreamReasonDeviceSystemPressure = 101,
/**
* 11: (macOS and Windows only) The shared window is minimized when you call the startScreenCaptureByWindowId method to share a window. The SDK cannot share a minimized window. Please prompt the user to unminimize the shared window.
* 11: The shared window is minimized when you call the startScreenCaptureByWindowId method to share a window. The SDK cannot share a minimized window. Please prompt the user to unminimize the shared window.
*/
LocalVideoStreamReasonScreenCaptureWindowMinimized = 11,
/**
* 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:
* 12: 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:
* The local user closes the shared window.
* 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.
Expand All @@ -2365,7 +2365,7 @@ export enum LocalVideoStreamReason {
*/
LocalVideoStreamReasonScreenCaptureWindowNotSupported = 20,
/**
* 21: (Windows only) The screen has not captured any data available for window sharing.
* 21: (Windows and Android only) The currently captured window has no data.
*/
LocalVideoStreamReasonScreenCaptureFailure = 21,
/**
Expand Down Expand Up @@ -3282,41 +3282,45 @@ export enum VideoTranscoderError {
}

/**
* @ignore
* The source of the audio streams that are mixed locally.
*/
export class MixedAudioStream {
/**
* @ignore
* The type of the audio source. See AudioSourceType.
*/
sourceType?: AudioSourceType;
/**
* @ignore
* The user ID of the remote user. Set this parameter if the source type of the locally mixed audio steams is AudioSourceRemoteUser.
*/
remoteUserUid?: number;
/**
* @ignore
* The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. 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.
* "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", "," Set this parameter if the source type of the locally mixed audio streams is AudioSourceRemoteChannel or AudioSourceRemoteUser.
*/
channelId?: string;
/**
* @ignore
* The audio track ID. Set this parameter to the custom audio track ID returned in createCustomAudioTrack. Set this parameter if the source type of the locally mixed audio steams is AudioSourceCustom.
*/
trackId?: number;
}

/**
* @ignore
* The configurations for mixing the lcoal audio.
*/
export class LocalAudioMixerConfiguration {
/**
* @ignore
* The number of the audio streams that are mixed locally.
*/
streamCount?: number;
/**
* @ignore
* The source of the audio streams that are mixed locally. See MixedAudioStream.
*/
audioInputStreams?: MixedAudioStream[];
/**
* @ignore
* Whether the mxied audio stream uses the timestamp of the audio frames captured by the local microphone. true : (Default) Yes. Set to this value if you want all locally captured audio streams synchronized. false : No. The SDK uses the timestamp of the audio frames at the time when they are mixed.
*/
syncWithLocalMic?: boolean;
}
Expand Down Expand Up @@ -3854,15 +3858,22 @@ export class FaceShapeBeautyOptions {
}

/**
* @ignore
* Filter effect options.
*/
export class FilterEffectOptions {
/**
* @ignore
* The absolute path to the local cube map texture file, which can be used to customize the filter effect. The specified .cude file should strictly follow the Cube LUT Format Specification; otherwise, the filter options do not take effect. The following is a sample of the .cude file:
* LUT_3D_SIZE 32
* 0.0039215689 0 0.0039215682
* 0.0086021447 0.0037950677 0
* ...
* 0.0728652592 0.0039215689 0
* The identifier LUT_3D_SIZE on the first line of the cube map file represents the size of the three-dimensional lookup table. The LUT size for filter effect can only be set to 32.
* The SDK provides a built-in built_in_whiten_filter.cube file. You can pass the absolute path of this file to get the whitening filter effect.
*/
path?: string;
/**
* @ignore
* The intensity of the filter effect, with a range value of [0.0,1.0], in which 0.0 represents no filter effect. The default value is 0.5. The higher the value, the stronger the filter effect.
*/
strength?: number;
}
Expand Down Expand Up @@ -3924,15 +3935,15 @@ export enum VideoDenoiserMode {
}

/**
* The video noise reduction level.
* Video noise reduction level.
*/
export enum VideoDenoiserLevel {
/**
* 0: (Default) Promotes video quality during video noise reduction. balances performance consumption and video noise reduction quality. The performance consumption is moderate, the video noise reduction speed is moderate, and the overall video quality is optimal.
*/
VideoDenoiserLevelHighQuality = 0,
/**
* 1: Promotes reducing performance consumption during video noise reduction. prioritizes reducing performance consumption over video noise reduction quality. The performance consumption is lower, and the video noise reduction speed is faster. To avoid a noticeable shadowing effect (shadows trailing behind moving objects) in the processed video, Agora recommends that you use this settinging when the camera is fixed.
* 1: Promotes reducing performance consumption during video noise reduction. It prioritizes reducing performance consumption over video noise reduction quality. The performance consumption is lower, and the video noise reduction speed is faster. To avoid a noticeable shadowing effect (shadows trailing behind moving objects) in the processed video, Agora recommends that you use this setting when the camera is fixed.
*/
VideoDenoiserLevelFast = 1,
}
Expand Down Expand Up @@ -4088,7 +4099,7 @@ export class AudioTrackConfig {
*/
enableLocalPlayback?: boolean;
/**
* @ignore
* Whether to enable audio processing module: true Enable the audio processing module to apply the Automatic Echo Cancellation (AEC), Automatic Noise Suppression (ANS), and Automatic Gain Control (AGC) effects. false : (Default) Do not enable the audio processing module. This parameter only takes effect on AudioTrackDirect in custom audio capturing.
*/
enableAudioProcessing?: boolean;
}
Expand Down Expand Up @@ -4790,7 +4801,7 @@ export class ChannelMediaRelayConfiguration {
/**
* The information of the target channel ChannelMediaInfo. It contains the following members: channelName : The name of the target channel. token : The token for joining the target channel. It is generated with the channelName and uid you set in destInfos.
* If you have not enabled the App Certificate, set this parameter as the default value null, which means the SDK applies the App ID.
* If you have enabled the App Certificate, you must use the token generated with the channelName and uid. If the token of any target channel expires, the whole media relay stops; hence Agora recommends that you specify the same expiration time for the tokens of all the target channels. uid : The unique user ID to identify the relay stream in the target channel. The value ranges from 0 to (2 32 -1). To avoid user ID conflicts, this user ID must be different from any other user ID in the target channel. The default value is 0, which means the SDK generates a random user ID.
* If you have enabled the App Certificate, you must use the token generated with the channelName and uid. If the token of any target channel expires, the whole media relay stops; hence Agora recommends that you specify the same expiration time for the tokens of all the target channels. uid : The unique user ID to identify the relay stream in the target channel. The value ranges from 0 to (2 32 -1). To avoid user ID conflicts, this user ID must be different from any other user ID in the target channel. The default value is 0, which means the SDK generates a random UID.
*/
destInfos?: ChannelMediaInfo[];
/**
Expand Down
44 changes: 23 additions & 21 deletions ts/Private/AgoraMediaBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,39 +106,39 @@ export enum VideoSourceType {
}

/**
* @ignore
* The audio source type.
*/
export enum AudioSourceType {
/**
* @ignore
* 0: (Default) Microphone.
*/
AudioSourceMicrophone = 0,
/**
* @ignore
* 1: Custom audio stream.
*/
AudioSourceCustom = 1,
/**
* @ignore
* 2: Media player.
*/
AudioSourceMediaPlayer = 2,
/**
* @ignore
* 3: System audio stream captured during screen sharing.
*/
AudioSourceLoopbackRecording = 3,
/**
* @ignore
*/
AudioSourceMixedStream = 4,
/**
* @ignore
* 5: Audio stream from a specified remote user.
*/
AudioSourceRemoteUser = 5,
/**
* @ignore
* 6: Mixed audio streams from all users in the current channel.
*/
AudioSourceRemoteChannel = 6,
/**
* @ignore
* 100: An unknown audio source.
*/
AudioSourceUnknown = 100,
}
Expand Down Expand Up @@ -536,11 +536,11 @@ export enum VideoPixelFormat {
*/
export enum RenderModeType {
/**
* 1: Hidden mode. Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). One dimension of the video may have clipped contents.
* 1: Hidden mode. The priority is to fill the window. Any excess video that does not match the window size will be cropped.
*/
RenderModeHidden = 1,
/**
* 2: Fit mode. Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). Areas that are not filled due to disparity in the aspect ratio are filled with black.
* 2: Fit mode. The priority is to ensure that all video content is displayed. Any areas of the window that are not filled due to the mismatch between video size and window size will be filled with black.
*/
RenderModeFit = 2,
/**
Expand Down Expand Up @@ -876,27 +876,27 @@ export class Hdr10MetadataInfo {
}

/**
* @ignore
* The relative position of alphaBuffer and video frames.
*/
export enum AlphaStitchMode {
/**
* @ignore
* 0: (Default) Only video frame, that is, alphaBuffer is not stitched with the video frame.
*/
NoAlphaStitch = 0,
/**
* @ignore
* 1: alphaBuffer is above the video frame.
*/
AlphaStitchUp = 1,
/**
* @ignore
* 2: alphaBuffer is below the video frame.
*/
AlphaStitchBelow = 2,
/**
* @ignore
* 3: alphaBuffer is to the left of the video frame.
*/
AlphaStitchLeft = 3,
/**
* @ignore
* 4: alphaBuffer is to the right of the video frame.
*/
AlphaStitchRight = 4,
}
Expand Down Expand Up @@ -1032,7 +1032,7 @@ export class ExternalVideoFrame {
*/
hdr10MetadataInfo?: Hdr10MetadataInfo;
/**
* @ignore
* By default, the color space properties of video frames will apply the Full Range and BT.709 standard configurations. You can configure the settings according your needs for custom video capturing and rendering.
*/
colorSpace?: ColorSpace;
}
Expand Down Expand Up @@ -1130,7 +1130,7 @@ export class VideoFrame {
*/
hdr10MetadataInfo?: Hdr10MetadataInfo;
/**
* @ignore
* By default, the color space properties of video frames will apply the Full Range and BT.709 standard configurations. You can configure the settings according your needs for custom video capturing and rendering.
*/
colorSpace?: ColorSpace;
}
Expand Down Expand Up @@ -1178,15 +1178,17 @@ export enum VideoModulePosition {
}

/**
* @ignore
* The snapshot configuration.
*/
export class SnapshotConfig {
/**
* @ignore
* The local path (including filename extensions) of the snapshot. For example:
* Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\example.jpg
* macOS: ~/Library/Logs/example.jpg Ensure that the path you specify exists and is writable.
*/
filePath?: string;
/**
* @ignore
* The position of the snapshot video frame in the video pipeline. See VideoModulePosition.
*/
position?: VideoModulePosition;
}
Expand Down
2 changes: 1 addition & 1 deletion ts/Private/AgoraMediaPlayerTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ export class MediaSource {
*/
startPos?: number;
/**
* Whether to enable autoplay once the media file is opened: true : (Default) Enables autoplay. false : Disables autoplay. If autoplay is disabled, you need to call the play method to play a media file after it is opened.
* Whether to enable autoplay once the media file is opened: true : (Default) Yes. false : No. If autoplay is disabled, you need to call the play method to play a media file after it is opened.
*/
autoPlay?: boolean;
/**
Expand Down
Loading

0 comments on commit bf2be75

Please sign in to comment.