Skip to content

Commit

Permalink
[AUTO] Generate codes by terra
Browse files Browse the repository at this point in the history
  • Loading branch information
xiayangqun authored Dec 6, 2024
1 parent 292d045 commit 305eb62
Show file tree
Hide file tree
Showing 9 changed files with 183 additions and 57 deletions.
10 changes: 5 additions & 5 deletions ts/Private/AgoraBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,7 @@ export class VideoEncoderConfiguration {
*/
frameRate?: number;
/**
* The encoding bitrate (Kbps) of the video.. This parameter does not need to be set; keeping the default value STANDARD_BITRATE 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. STANDARD_BITRATE (0): (Recommended) Standard bitrate mode. COMPATIBLE_BITRATE (-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 STANDARD_BITRATE 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. STANDARD_BITRATE (0): (Recommended) Standard bitrate mode. COMPATIBLE_BITRATE (-1): Adaptive bitrate mode. In general, Agora suggests that you do not use this value.
*/
bitrate?: number;
/**
Expand Down Expand Up @@ -3014,7 +3014,7 @@ export class LiveTranscoding {
*/
height?: number;
/**
* The encoding bitrate (Kbps) of the video.. This parameter does not need to be set; keeping the default value STANDARD_BITRATE 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.
* The encoding bitrate (Kbps) of the video. This parameter does not need to be set; keeping the default value STANDARD_BITRATE 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.
*/
videoBitrate?: number;
/**
Expand Down Expand Up @@ -3763,11 +3763,11 @@ export enum VideoDenoiserLevel {
*/
export class VideoDenoiserOptions {
/**
* Video noise reduction mode..
* Video noise reduction mode.
*/
mode?: VideoDenoiserMode;
/**
* Video noise reduction level..
* Video noise reduction level.
*/
level?: VideoDenoiserLevel;
}
Expand Down Expand Up @@ -4939,7 +4939,7 @@ export class ScreenVideoParameters {
*/
bitrate?: number;
/**
* The content hint for screen sharing..
* The content hint for screen sharing.
*/
contentHint?: VideoContentHint;
}
Expand Down
10 changes: 6 additions & 4 deletions ts/Private/AgoraMediaBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -772,15 +772,17 @@ export class ContentInspectConfig {
}

/**
* @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 All @@ -796,7 +798,7 @@ export interface IAudioPcmFrameSink {
*
* After registering the audio frame observer, the callback occurs every time the player receives an audio frame, reporting the detailed information of the audio frame.
*
* @param frame The audio frame information.. See AudioPcmFrame.
* @param frame The audio frame information. See AudioPcmFrame.
*/
onFrame?(frame: AudioPcmFrame): void;
}
Expand Down
5 changes: 0 additions & 5 deletions ts/Private/IAgoraMediaEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,4 @@ export abstract class IMediaEngine {
* < 0: Failure.
*/
abstract unregisterFaceInfoObserver(observer: IFaceInfoObserver): number;

/**
* @ignore
*/
abstract setExternalRemoteEglContext(eglContext: any): number;
}
25 changes: 17 additions & 8 deletions ts/Private/IAgoraRtcEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ export class LocalVideoStats {
*/
dualStreamEnabled?: boolean;
/**
* The local video encoding acceleration type..
* The local video encoding acceleration type.
* 0: Software encoding is applied without acceleration.
* 1: Hardware encoding is applied for acceleration.
*/
Expand Down Expand Up @@ -1060,7 +1060,7 @@ export class ScreenCaptureSourceInfo {
*/
isOccluded?: boolean;
/**
* The position of a window relative to the entire screen space (including all shareable screens). See Rectangle..
* The position of a window relative to the entire screen space (including all shareable screens). See Rectangle.
*/
position?: Rectangle;
/**
Expand Down Expand Up @@ -3482,7 +3482,7 @@ export abstract class IRtcEngine {
* If someone subscribes to the low-quality stream, the SDK enables the low-quality stream and resets it to the SimulcastStreamConfig configuration used in the most recent calling of setDualStreamMode. If no configuration has been set by the user previously, the following values are used:
* Resolution: 480 × 272
* Frame rate: 15 fps
* Bitrate: 500 Kbps 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. (3) This is applicable to the scenario. In response to the high demands for first-frame rendering time and image quality, the SDK focuses on reducing first-frame rendering time and enhancing overall image quality, even in poor network conditions or on low-end devices.
* Bitrate: 500 Kbps 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. 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.
*
* @returns
* 0: Success.
Expand Down Expand Up @@ -5468,8 +5468,8 @@ export abstract class IRtcEngine {
*
* You can call this method before sharing a screen or window to get a list of shareable screens and windows, which enables a user to use thumbnails in the list to easily choose a particular screen or window to share. This list also contains important information such as window ID and screen ID, with which you can call startScreenCaptureByWindowId or startScreenCaptureByDisplayId to start the sharing.
*
* @param thumbSize The target size of the screen or window thumbnail (the width and height are in pixels).. The SDK scales the original image to make the length of the longest side of the image the same as that of the target size without distorting the original image. For example, if the original image is 400 × 300 and thumbSize is 100 × 100, the actual size of the thumbnail is 100 × 75. If the target size is larger than the original size, the thumbnail is the original image and the SDK does not scale it.
* @param iconSize The target size of the icon corresponding to the application program (the width and height are in pixels).. The SDK scales the original image to make the length of the longest side of the image the same as that of the target size without distorting the original image. For example, if the original image is 400 × 300 and iconSize is 100 × 100, the actual size of the icon is 100 × 75. If the target size is larger than the original size, the icon is the original image and the SDK does not scale it.
* @param thumbSize The target size of the screen or window thumbnail (the width and height are in pixels). The SDK scales the original image to make the length of the longest side of the image the same as that of the target size without distorting the original image. For example, if the original image is 400 × 300 and thumbSize is 100 × 100, the actual size of the thumbnail is 100 × 75. If the target size is larger than the original size, the thumbnail is the original image and the SDK does not scale it.
* @param iconSize The target size of the icon corresponding to the application program (the width and height are in pixels). The SDK scales the original image to make the length of the longest side of the image the same as that of the target size without distorting the original image. For example, if the original image is 400 × 300 and iconSize is 100 × 100, the actual size of the icon is 100 × 75. If the target size is larger than the original size, the icon is the original image and the SDK does not scale it.
* @param includeScreen Whether the SDK returns the screen information in addition to the window information: true : The SDK returns screen and window information. false : The SDK returns window information only.
*
* @returns
Expand All @@ -5494,7 +5494,7 @@ export abstract class IRtcEngine {
* Captures the video stream of a screen or a part of the screen area.
*
* @param displayId The display ID of the screen to be shared. For the Windows platform, if you need to simultaneously share two screens (main screen and secondary screen), you can set displayId to -1 when calling this method.
* @param regionRect (Optional) Sets the relative location of the region to the screen. Pass in nil to share the entire screen..
* @param regionRect (Optional) Sets the relative location of the region to the screen. Pass in nil to share the entire screen.
* @param captureParams Screen sharing configurations. The default video dimension is 1920 x 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters. The video properties of the screen sharing stream only need to be set through this parameter, and are unrelated to setVideoEncoderConfiguration.
*
* @returns
Expand Down Expand Up @@ -5631,7 +5631,7 @@ export abstract class IRtcEngine {
/**
* @ignore
*/
abstract setExternalMediaProjection(mediaProjection: any): number;
abstract setExternalMediaProjection(): any;

/**
* Sets the screen sharing scenario.
Expand Down Expand Up @@ -6796,7 +6796,16 @@ export abstract class IRtcEngine {
abstract getNativeHandle(): number;

/**
* @ignore
* Takes a screenshot of the video at the specified observation point.
*
* This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path.
*
* @param uid The user ID. Set uid as 0 if you want to take a snapshot of the local user's video.
* @param config The configuration of the snaptshot. See SnapshotConfig.
*
* @returns
* 0: Success.
* < 0: Failure.
*/
abstract takeSnapshotWithConfig(uid: number, config: SnapshotConfig): number;
}
Expand Down
35 changes: 35 additions & 0 deletions ts/Private/IAgoraRtcEngineEx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,41 @@ export abstract class IRtcEngineEx extends IRtcEngine {
/**
* @ignore
*/
abstract preloadEffectEx(
connection: RtcConnection,
soundId: number,
filePath: string,
startPos?: number
): number;

/**
* @ignore
*/
abstract playEffectEx(
connection: RtcConnection,
soundId: number,
filePath: string,
loopCount: number,
pitch: number,
pan: number,
gain: number,
publish?: boolean,
startPos?: number
): number;

/**
* Gets a video screenshot of the specified observation point using the connection ID.
*
* This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path.
*
* @param connection The connection information. See RtcConnection.
* @param uid The user ID. Set uid as 0 if you want to take a snapshot of the local user's video.
* @param config The configuration of the snaptshot. See SnapshotConfig.
*
* @returns
* 0: Success.
* < 0: Failure.
*/
abstract takeSnapshotWithConfigEx(
connection: RtcConnection,
uid: number,
Expand Down
13 changes: 11 additions & 2 deletions ts/Private/IAudioDeviceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,21 @@ export abstract class IAudioDeviceManager {
abstract getPlaybackDeviceMute(): boolean;

/**
* @ignore
* Sets the mute status of the audio capture device.
*
* @param mute Whether to mute the audio recording device: true : Mute the audio capture device. false : Unmute the audio capture device.
*
* @returns
* 0: Success.
* < 0: Failure.
*/
abstract setRecordingDeviceMute(mute: boolean): number;

/**
* @ignore
* Gets whether the audio capture device is muted.
*
* @returns
* true : The microphone is muted. false : The microphone is unmuted.
*/
abstract getRecordingDeviceMute(): boolean;

Expand Down
18 changes: 0 additions & 18 deletions ts/Private/impl/IAgoraMediaEngineImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,24 +468,6 @@ export class IMediaEngineImpl implements IMediaEngine {
): string {
return 'MediaEngine_unregisterFaceInfoObserver';
}

setExternalRemoteEglContext(eglContext: any): number {
const apiType = this.getApiTypeFromSetExternalRemoteEglContext(eglContext);
const jsonParams = {
eglContext: eglContext,
toJSON: () => {
return {
eglContext: eglContext,
};
},
};
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
return jsonResults.result;
}

protected getApiTypeFromSetExternalRemoteEglContext(eglContext: any): string {
return 'MediaEngine_setExternalRemoteEglContext_f337cbf';
}
}

import { callIrisApi } from '../internal/IrisApiEngine';
103 changes: 103 additions & 0 deletions ts/Private/impl/IAgoraRtcEngineExImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1634,6 +1634,109 @@ export class IRtcEngineExImpl extends IRtcEngineImpl implements IRtcEngineEx {
return 'RtcEngineEx_sendAudioMetadataEx_e2bf1c4';
}

preloadEffectEx(
connection: RtcConnection,
soundId: number,
filePath: string,
startPos: number = 0
): number {
const apiType = this.getApiTypeFromPreloadEffectEx(
connection,
soundId,
filePath,
startPos
);
const jsonParams = {
connection: connection,
soundId: soundId,
filePath: filePath,
startPos: startPos,
toJSON: () => {
return {
connection: connection,
soundId: soundId,
filePath: filePath,
startPos: startPos,
};
},
};
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
return jsonResults.result;
}

protected getApiTypeFromPreloadEffectEx(
connection: RtcConnection,
soundId: number,
filePath: string,
startPos: number = 0
): string {
return 'RtcEngineEx_preloadEffectEx_c9fae88';
}

playEffectEx(
connection: RtcConnection,
soundId: number,
filePath: string,
loopCount: number,
pitch: number,
pan: number,
gain: number,
publish: boolean = false,
startPos: number = 0
): number {
const apiType = this.getApiTypeFromPlayEffectEx(
connection,
soundId,
filePath,
loopCount,
pitch,
pan,
gain,
publish,
startPos
);
const jsonParams = {
connection: connection,
soundId: soundId,
filePath: filePath,
loopCount: loopCount,
pitch: pitch,
pan: pan,
gain: gain,
publish: publish,
startPos: startPos,
toJSON: () => {
return {
connection: connection,
soundId: soundId,
filePath: filePath,
loopCount: loopCount,
pitch: pitch,
pan: pan,
gain: gain,
publish: publish,
startPos: startPos,
};
},
};
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
return jsonResults.result;
}

protected getApiTypeFromPlayEffectEx(
connection: RtcConnection,
soundId: number,
filePath: string,
loopCount: number,
pitch: number,
pan: number,
gain: number,
publish: boolean = false,
startPos: number = 0
): string {
return 'RtcEngineEx_playEffectEx_ae5345c';
}

takeSnapshotWithConfigEx(
connection: RtcConnection,
uid: number,
Expand Down
21 changes: 6 additions & 15 deletions ts/Private/impl/IAgoraRtcEngineImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5359,24 +5359,15 @@ export class IRtcEngineImpl implements IRtcEngine {
return 'RtcEngine_queryCameraFocalLengthCapability_2dee6af';
}

setExternalMediaProjection(mediaProjection: any): number {
const apiType =
this.getApiTypeFromSetExternalMediaProjection(mediaProjection);
const jsonParams = {
mediaProjection: mediaProjection,
toJSON: () => {
return {
mediaProjection: mediaProjection,
};
},
};
setExternalMediaProjection(): any {
const apiType = this.getApiTypeFromSetExternalMediaProjection();
const jsonParams = {};
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
return jsonResults.result;
const mediaProjection = jsonResults.mediaProjection;
return mediaProjection;
}

protected getApiTypeFromSetExternalMediaProjection(
mediaProjection: any
): string {
protected getApiTypeFromSetExternalMediaProjection(): string {
return 'RtcEngine_setExternalMediaProjection_f337cbf';
}

Expand Down

0 comments on commit 305eb62

Please sign in to comment.