From 1ace1af284de34d010e838d0065f5394e032d3cf Mon Sep 17 00:00:00 2001 From: guoxianzhe Date: Fri, 27 Sep 2024 11:14:38 +0000 Subject: [PATCH] [AUTO] Generate codes by terra --- ts/Private/IAgoraMediaEngine.ts | 2 +- ts/Private/IAgoraRtcEngine.ts | 21 ++--- ts/Private/IAgoraRtcEngineEx.ts | 40 +++------- ts/Private/impl/IAgoraMediaEngineImpl.ts | 18 +++-- ts/Private/impl/IAgoraRtcEngineExImpl.ts | 97 +++++++++--------------- ts/Private/impl/IAgoraRtcEngineImpl.ts | 46 +++++------ 6 files changed, 87 insertions(+), 137 deletions(-) diff --git a/ts/Private/IAgoraMediaEngine.ts b/ts/Private/IAgoraMediaEngine.ts index cae2b1e29..540274f2b 100644 --- a/ts/Private/IAgoraMediaEngine.ts +++ b/ts/Private/IAgoraMediaEngine.ts @@ -159,7 +159,7 @@ export abstract class IMediaEngine { /** * @ignore */ - abstract setExternalRemoteEglContext(): any; + abstract setExternalRemoteEglContext(eglContext: any): number; /** * Sets the external audio source parameters. diff --git a/ts/Private/IAgoraRtcEngine.ts b/ts/Private/IAgoraRtcEngine.ts index c43f01575..9002bab8e 100644 --- a/ts/Private/IAgoraRtcEngine.ts +++ b/ts/Private/IAgoraRtcEngine.ts @@ -6481,22 +6481,6 @@ export abstract class IRtcEngine { */ abstract takeSnapshot(uid: number, filePath: string): number; - /** - * Takes a snapshot of a video stream. - * - * 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 filePath The local path (including filename extensions) of the snapshot. For example: - * Windows: C:\Users\\AppData\Local\Agora\\example.jpg - * macOS: ~/Library/Logs/example.jpg Ensure that the path you specify exists and is writable. - * - * @returns - * 0: Success. - * < 0: Failure. - */ - abstract takeSnapshot(uid: number, config: SnapshotConfig): number; - /** * Enables or disables video screenshot and upload. * @@ -6888,6 +6872,11 @@ export abstract class IRtcEngine { * The native handle of the SDK. */ abstract getNativeHandle(): number; + + /** + * @ignore + */ + abstract takeSnapshotWithConfig(uid: number, config: SnapshotConfig): number; } /** diff --git a/ts/Private/IAgoraRtcEngineEx.ts b/ts/Private/IAgoraRtcEngineEx.ts index f36c47dab..487665e56 100644 --- a/ts/Private/IAgoraRtcEngineEx.ts +++ b/ts/Private/IAgoraRtcEngineEx.ts @@ -97,21 +97,13 @@ export abstract class IRtcEngineEx extends IRtcEngine { options?: LeaveChannelOptions ): number; - /** - * @ignore - */ - abstract leaveChannelWithUserAccountEx( - channelId: string, - userAccount: string - ): number; - /** * @ignore */ abstract leaveChannelWithUserAccountEx( channelId: string, userAccount: string, - options: LeaveChannelOptions + options?: LeaveChannelOptions ): number; /** @@ -916,27 +908,6 @@ export abstract class IRtcEngineEx extends IRtcEngine { filePath: string ): number; - /** - * Takes a snapshot of a video stream using 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 filePath The local path (including filename extensions) of the snapshot. For example: - * Windows: C:\Users\\AppData\Local\Agora\\example.jpg - * macOS: ~/Library/Logs/example.jpg Ensure that the path you specify exists and is writable. - * - * @returns - * 0: Success. - * < 0: Failure. - */ - abstract takeSnapshotEx( - connection: RtcConnection, - uid: number, - config: SnapshotConfig - ): number; - /** * Enables or disables video screenshot and upload. * @@ -999,4 +970,13 @@ export abstract class IRtcEngineEx extends IRtcEngine { metadata: string, length: number ): number; + + /** + * @ignore + */ + abstract takeSnapshotWithConfigEx( + connection: RtcConnection, + uid: number, + config: SnapshotConfig + ): number; } diff --git a/ts/Private/impl/IAgoraMediaEngineImpl.ts b/ts/Private/impl/IAgoraMediaEngineImpl.ts index ee94322f9..4598eded7 100644 --- a/ts/Private/impl/IAgoraMediaEngineImpl.ts +++ b/ts/Private/impl/IAgoraMediaEngineImpl.ts @@ -172,15 +172,21 @@ export class IMediaEngineImpl implements IMediaEngine { return 'MediaEngine_setExternalVideoSource_fff99b6'; } - setExternalRemoteEglContext(): any { - const apiType = this.getApiTypeFromSetExternalRemoteEglContext(); - const jsonParams = {}; + setExternalRemoteEglContext(eglContext: any): number { + const apiType = this.getApiTypeFromSetExternalRemoteEglContext(eglContext); + const jsonParams = { + eglContext: eglContext, + toJSON: () => { + return { + eglContext: eglContext, + }; + }, + }; const jsonResults = callIrisApi.call(this, apiType, jsonParams); - const eglContext = jsonResults.eglContext; - return eglContext; + return jsonResults.result; } - protected getApiTypeFromSetExternalRemoteEglContext(): string { + protected getApiTypeFromSetExternalRemoteEglContext(eglContext: any): string { return 'MediaEngine_setExternalRemoteEglContext_f337cbf'; } diff --git a/ts/Private/impl/IAgoraRtcEngineExImpl.ts b/ts/Private/impl/IAgoraRtcEngineExImpl.ts index 1e08d49e8..f454f6d2a 100644 --- a/ts/Private/impl/IAgoraRtcEngineExImpl.ts +++ b/ts/Private/impl/IAgoraRtcEngineExImpl.ts @@ -92,39 +92,10 @@ export class IRtcEngineExImpl extends IRtcEngineImpl implements IRtcEngineEx { return 'RtcEngineEx_leaveChannelEx_b03ee9a'; } - leaveChannelWithUserAccountEx( - channelId: string, - userAccount: string - ): number { - const apiType = this.getApiTypeFromLeaveChannelWithUserAccountEx( - channelId, - userAccount - ); - const jsonParams = { - channelId: channelId, - userAccount: userAccount, - toJSON: () => { - return { - channelId: channelId, - userAccount: userAccount, - }; - }, - }; - const jsonResults = callIrisApi.call(this, apiType, jsonParams); - return jsonResults.result; - } - - protected getApiTypeFromLeaveChannelWithUserAccountEx( - channelId: string, - userAccount: string - ): string { - return 'RtcEngineEx_leaveChannelWithUserAccountEx_ccad422'; - } - leaveChannelWithUserAccountEx( channelId: string, userAccount: string, - options: LeaveChannelOptions + options?: LeaveChannelOptions ): number { const apiType = this.getApiTypeFromLeaveChannelWithUserAccountEx( channelId, @@ -150,7 +121,7 @@ export class IRtcEngineExImpl extends IRtcEngineImpl implements IRtcEngineEx { protected getApiTypeFromLeaveChannelWithUserAccountEx( channelId: string, userAccount: string, - options: LeaveChannelOptions + options?: LeaveChannelOptions ): string { return 'RtcEngineEx_leaveChannelWithUserAccountEx_8bbe372'; } @@ -1533,36 +1504,6 @@ export class IRtcEngineExImpl extends IRtcEngineImpl implements IRtcEngineEx { return 'RtcEngineEx_takeSnapshotEx_de1c015'; } - takeSnapshotEx( - connection: RtcConnection, - uid: number, - config: SnapshotConfig - ): number { - const apiType = this.getApiTypeFromTakeSnapshotEx(connection, uid, config); - const jsonParams = { - connection: connection, - uid: uid, - config: config, - toJSON: () => { - return { - connection: connection, - uid: uid, - config: config, - }; - }, - }; - const jsonResults = callIrisApi.call(this, apiType, jsonParams); - return jsonResults.result; - } - - protected getApiTypeFromTakeSnapshotEx( - connection: RtcConnection, - uid: number, - config: SnapshotConfig - ): string { - return 'RtcEngineEx_takeSnapshotEx_b856417'; - } - enableContentInspectEx( enabled: boolean, config: ContentInspectConfig, @@ -1692,6 +1633,40 @@ export class IRtcEngineExImpl extends IRtcEngineImpl implements IRtcEngineEx { ): string { return 'RtcEngineEx_sendAudioMetadataEx_e2bf1c4'; } + + takeSnapshotWithConfigEx( + connection: RtcConnection, + uid: number, + config: SnapshotConfig + ): number { + const apiType = this.getApiTypeFromTakeSnapshotWithConfigEx( + connection, + uid, + config + ); + const jsonParams = { + connection: connection, + uid: uid, + config: config, + toJSON: () => { + return { + connection: connection, + uid: uid, + config: config, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromTakeSnapshotWithConfigEx( + connection: RtcConnection, + uid: number, + config: SnapshotConfig + ): string { + return 'RtcEngineEx_takeSnapshotEx_b856417'; + } } import { callIrisApi } from '../internal/IrisApiEngine'; diff --git a/ts/Private/impl/IAgoraRtcEngineImpl.ts b/ts/Private/impl/IAgoraRtcEngineImpl.ts index 04a876407..d17ed6588 100644 --- a/ts/Private/impl/IAgoraRtcEngineImpl.ts +++ b/ts/Private/impl/IAgoraRtcEngineImpl.ts @@ -6706,29 +6706,6 @@ export class IRtcEngineImpl implements IRtcEngine { return 'RtcEngine_takeSnapshot_1922dd1'; } - takeSnapshot(uid: number, config: SnapshotConfig): number { - const apiType = this.getApiTypeFromTakeSnapshot(uid, config); - const jsonParams = { - uid: uid, - config: config, - toJSON: () => { - return { - uid: uid, - config: config, - }; - }, - }; - const jsonResults = callIrisApi.call(this, apiType, jsonParams); - return jsonResults.result; - } - - protected getApiTypeFromTakeSnapshot( - uid: number, - config: SnapshotConfig - ): string { - return 'RtcEngine_takeSnapshot_5669ea6'; - } - enableContentInspect(enabled: boolean, config: ContentInspectConfig): number { const apiType = this.getApiTypeFromEnableContentInspect(enabled, config); const jsonParams = { @@ -7338,6 +7315,29 @@ export class IRtcEngineImpl implements IRtcEngine { protected getApiTypeFromGetNativeHandle(): string { return 'RtcEngine_getNativeHandle'; } + + takeSnapshotWithConfig(uid: number, config: SnapshotConfig): number { + const apiType = this.getApiTypeFromTakeSnapshotWithConfig(uid, config); + const jsonParams = { + uid: uid, + config: config, + toJSON: () => { + return { + uid: uid, + config: config, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromTakeSnapshotWithConfig( + uid: number, + config: SnapshotConfig + ): string { + return 'RtcEngine_takeSnapshot_5669ea6'; + } } import { callIrisApi } from '../internal/IrisApiEngine';