From 4e125d453728eba1dc8a5742b2936d663b56a9c3 Mon Sep 17 00:00:00 2001 From: guoxianzhe <53285945+guoxianzhe@users.noreply.github.com> Date: Fri, 29 Dec 2023 17:42:01 +0900 Subject: [PATCH] feat: adapt nativeSDK to 4.2.6.3 (#1148) * chore: upgrade native sdk to 4.2.6.3 * chore: upgrade terra config * [AUTO] Generate codes by terra (#1147) Co-authored-by: guoxianzhe * chore: set startPreviewWithoutSourceType --------- Co-authored-by: sda-rob <149643938+sda-rob@users.noreply.github.com> Co-authored-by: guoxianzhe --- package.json | 4 ++-- scripts/terra/code_config.yaml | 21 ++++++++++----------- scripts/terra/package.json | 2 +- scripts/terra/yarn.lock | 8 ++++---- ts/Private/AgoraBase.ts | 12 ++++++++++++ ts/Private/AgoraMediaBase.ts | 4 ++++ ts/Private/IAgoraRtcEngine.ts | 9 +++++++++ ts/Private/IAgoraRtcEngineEx.ts | 5 +++++ ts/Private/impl/IAgoraRtcEngineExImpl.ts | 19 +++++++++++++++++++ ts/Private/impl/IAgoraRtcEngineImpl.ts | 11 +++++++++++ ts/Private/internal/RtcEngineExInternal.ts | 4 ++++ 11 files changed, 81 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index e2b205a93..ccf4e959e 100644 --- a/package.json +++ b/package.json @@ -136,7 +136,7 @@ "yuv-canvas": "1.2.6" }, "agora_electron": { - "iris_sdk_win": "https://download.agora.io/sdk/release/iris_4.2.6.121-build.1_DCG_Windows_Video_20231215_0426.zip", - "iris_sdk_mac": "https://download.agora.io/sdk/release/iris_4.2.6.121-build.1_DCG_Mac_Video_20231215_0431.zip" + "iris_sdk_win": "https://download.agora.io/sdk/release/iris_4.2.6.3-build.1_DCG_Windows_Video_20231227_0710.zip", + "iris_sdk_mac": "https://download.agora.io/sdk/release/iris_4.2.6.3-build.1_DCG_Mac_Video_20231227_0710.zip" } } diff --git a/scripts/terra/code_config.yaml b/scripts/terra/code_config.yaml index 7c76b4c5a..105ca91c5 100644 --- a/scripts/terra/code_config.yaml +++ b/scripts/terra/code_config.yaml @@ -3,24 +3,23 @@ parsers: package: '@agoraio-extensions/terra-legacy-cxx-parser' args: includeHeaderDirs: - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.6.2/include' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.6.3/include' parseFiles: include: - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.6.2/include/*.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.6.3/include/*.h' exclude: - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.6.2/include/AgoraRefPtr.h' - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.6.2/include/time_utils.h' - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.6.2/include/AgoraOptional.h' - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.6.2/include/AgoraRefPtr.h' - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.6.2/include/IAgoraH265Transcoder.h' - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.6.2/include/IAgoraMediaComponentFactory.h' - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.6.2/include/IAgoraParameter.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.6.3/include/AgoraRefPtr.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.6.3/include/time_utils.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.6.3/include/AgoraOptional.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.6.3/include/AgoraRefPtr.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.6.3/include/IAgoraH265Transcoder.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.6.3/include/IAgoraMediaComponentFactory.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.6.3/include/IAgoraParameter.h' customHeaders: - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.6.2/custom_headers/*.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.6.3/custom_headers/*.h' language: ts definesMacros: - __ELECTRON__ legacyRenders: - TsInterfaceRender - TsImplRender - diff --git a/scripts/terra/package.json b/scripts/terra/package.json index 99bdde2bd..05ebde048 100644 --- a/scripts/terra/package.json +++ b/scripts/terra/package.json @@ -15,7 +15,7 @@ "@agoraio-extensions/terra": "git@github.com:AgoraIO-Extensions/terra.git#commit=5dd8149d5ab9f3b472b7715916b6217f9745f066&workspace=terra", "@agoraio-extensions/terra-core": "git@github.com:AgoraIO-Extensions/terra.git#commit=5dd8149d5ab9f3b472b7715916b6217f9745f066&workspace=terra-core", "@agoraio-extensions/terra-legacy-cxx-parser": "git@github.com:AgoraIO-Extensions/terra-legacy-cxx-parser.git#commit=5455afd2c5e29013d9a3cb8d06150c162450a5ed", - "@agoraio-extensions/terra_shared_configs": "git@github.com:AgoraIO-Extensions/terra_shared_configs.git#commit=1611360e8aefc3c24bcbf99d8209e7cbac9fa773", + "@agoraio-extensions/terra_shared_configs": "git@github.com:AgoraIO-Extensions/terra_shared_configs.git#commit=311e37658bdbe639ada903e9af53896cd2ee84ab", "ts-node": "^10.9.1", "typescript": "^5.1.6" }, diff --git a/scripts/terra/yarn.lock b/scripts/terra/yarn.lock index d4d13abd0..0f71f885f 100644 --- a/scripts/terra/yarn.lock +++ b/scripts/terra/yarn.lock @@ -57,14 +57,14 @@ __metadata: languageName: node linkType: hard -"@agoraio-extensions/terra_shared_configs@git@github.com:AgoraIO-Extensions/terra_shared_configs.git#commit=1611360e8aefc3c24bcbf99d8209e7cbac9fa773": +"@agoraio-extensions/terra_shared_configs@git@github.com:AgoraIO-Extensions/terra_shared_configs.git#commit=311e37658bdbe639ada903e9af53896cd2ee84ab": version: 1.0.2 - resolution: "@agoraio-extensions/terra_shared_configs@git@github.com:AgoraIO-Extensions/terra_shared_configs.git#commit=1611360e8aefc3c24bcbf99d8209e7cbac9fa773" + resolution: "@agoraio-extensions/terra_shared_configs@git@github.com:AgoraIO-Extensions/terra_shared_configs.git#commit=311e37658bdbe639ada903e9af53896cd2ee84ab" dependencies: "@agoraio-extensions/cxx-parser": "git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=cxx-parser" "@agoraio-extensions/terra-core": "git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=terra-core" mustache: "npm:^4.2.0" - checksum: 6b5b110988dc541bbd4809e523ead7a78a8df49ced4454125f9f7fc994416834ff771ccaa5acb81b95814d85258ca0e3153bcbefbb402dc0537b997220ca5ba4 + checksum: 5e55be729b777f6d03018140b8b8c5bb52c72a59b2962c8fbbe1cec65ddbd9f93fa17d6c73953cc89730e5e58151384007f07745b295858ee9a784257570322e languageName: node linkType: hard @@ -3450,7 +3450,7 @@ __metadata: "@agoraio-extensions/terra": "git@github.com:AgoraIO-Extensions/terra.git#commit=5dd8149d5ab9f3b472b7715916b6217f9745f066&workspace=terra" "@agoraio-extensions/terra-core": "git@github.com:AgoraIO-Extensions/terra.git#commit=5dd8149d5ab9f3b472b7715916b6217f9745f066&workspace=terra-core" "@agoraio-extensions/terra-legacy-cxx-parser": "git@github.com:AgoraIO-Extensions/terra-legacy-cxx-parser.git#commit=5455afd2c5e29013d9a3cb8d06150c162450a5ed" - "@agoraio-extensions/terra_shared_configs": "git@github.com:AgoraIO-Extensions/terra_shared_configs.git#commit=1611360e8aefc3c24bcbf99d8209e7cbac9fa773" + "@agoraio-extensions/terra_shared_configs": "git@github.com:AgoraIO-Extensions/terra_shared_configs.git#commit=311e37658bdbe639ada903e9af53896cd2ee84ab" "@types/node": "npm:^20.6.0" ts-node: "npm:^10.9.1" typescript: "npm:^5.1.6" diff --git a/ts/Private/AgoraBase.ts b/ts/Private/AgoraBase.ts index 371e65121..0e92b6bf2 100644 --- a/ts/Private/AgoraBase.ts +++ b/ts/Private/AgoraBase.ts @@ -2211,6 +2211,14 @@ export enum RemoteAudioStateReason { * 7: The remote user leaves the channel. */ RemoteAudioReasonRemoteOffline = 7, + /** + * @ignore + */ + RemoteAudioReasonRemoteNoPacketReceive = 8, + /** + * @ignore + */ + RemoteAudioReasonRemoteLocalPlayFailed = 9, } /** @@ -4677,6 +4685,10 @@ export enum EarMonitoringFilterType { * 1<<2: Enable noise suppression to the in-ear monitor. */ EarMonitoringFilterNoiseSuppression = 1 << 2, + /** + * @ignore + */ + EarMonitoringFilterReusePostProcessingFilter = 1 << 15, } /** diff --git a/ts/Private/AgoraMediaBase.ts b/ts/Private/AgoraMediaBase.ts index b5cab9555..4a58740d3 100644 --- a/ts/Private/AgoraMediaBase.ts +++ b/ts/Private/AgoraMediaBase.ts @@ -839,6 +839,10 @@ export class AudioFrame { * @ignore */ audioTrackNumber?: number; + /** + * @ignore + */ + rtpTimestamp?: number; } /** diff --git a/ts/Private/IAgoraRtcEngine.ts b/ts/Private/IAgoraRtcEngine.ts index efc079ba9..768a78812 100644 --- a/ts/Private/IAgoraRtcEngine.ts +++ b/ts/Private/IAgoraRtcEngine.ts @@ -1118,6 +1118,10 @@ export class ChannelMediaOptions { * Whether to publish the local transcoded video: true : Publish the local transcoded video. false : Do not publish the local transcoded video. */ publishTranscodedVideoTrack?: boolean; + /** + * @ignore + */ + publishMixedAudioTrack?: boolean; /** * Whether to automatically subscribe to all remote audio streams when the user joins a channel: true : Subscribe to all remote audio streams. false : Do not automatically subscribe to any remote audio streams. */ @@ -3201,6 +3205,11 @@ export abstract class IRtcEngine { */ abstract startPreview(sourceType?: VideoSourceType): number; + /** + * @ignore + */ + abstract startPreviewWithoutSourceType(): number; + /** * Stops the local video preview. * diff --git a/ts/Private/IAgoraRtcEngineEx.ts b/ts/Private/IAgoraRtcEngineEx.ts index e86ffdfca..cd765d06c 100644 --- a/ts/Private/IAgoraRtcEngineEx.ts +++ b/ts/Private/IAgoraRtcEngineEx.ts @@ -949,4 +949,9 @@ export abstract class IRtcEngineEx extends IRtcEngine { * < 0: Failure. */ abstract startMediaRenderingTracingEx(connection: RtcConnection): number; + + /** + * @ignore + */ + abstract getCallIdEx(connection: RtcConnection): string; } diff --git a/ts/Private/impl/IAgoraRtcEngineExImpl.ts b/ts/Private/impl/IAgoraRtcEngineExImpl.ts index b48f9a5d1..5c5ee83e0 100644 --- a/ts/Private/impl/IAgoraRtcEngineExImpl.ts +++ b/ts/Private/impl/IAgoraRtcEngineExImpl.ts @@ -1547,6 +1547,25 @@ export class IRtcEngineExImpl extends IRtcEngineImpl implements IRtcEngineEx { ): string { return 'RtcEngineEx_startMediaRenderingTracingEx'; } + + getCallIdEx(connection: RtcConnection): string { + const apiType = this.getApiTypeFromGetCallIdEx(connection); + const jsonParams = { + connection: connection, + toJSON: () => { + return { + connection: connection, + }; + }, + }; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + const callId = jsonResults.callId; + return callId; + } + + protected getApiTypeFromGetCallIdEx(connection: RtcConnection): string { + return 'RtcEngineEx_getCallIdEx'; + } } import { callIrisApi } from '../internal/IrisApiEngine'; diff --git a/ts/Private/impl/IAgoraRtcEngineImpl.ts b/ts/Private/impl/IAgoraRtcEngineImpl.ts index 45765a86c..8f8888c81 100644 --- a/ts/Private/impl/IAgoraRtcEngineImpl.ts +++ b/ts/Private/impl/IAgoraRtcEngineImpl.ts @@ -1508,6 +1508,17 @@ export class IRtcEngineImpl implements IRtcEngine { return 'RtcEngine_startPreview'; } + startPreviewWithoutSourceType(): number { + const apiType = this.getApiTypeFromStartPreviewWithoutSourceType(); + const jsonParams = {}; + const jsonResults = callIrisApi.call(this, apiType, jsonParams); + return jsonResults.result; + } + + protected getApiTypeFromStartPreviewWithoutSourceType(): string { + return 'RtcEngine_startPreviewWithoutSourceType'; + } + stopPreview( sourceType: VideoSourceType = VideoSourceType.VideoSourceCameraPrimary ): number { diff --git a/ts/Private/internal/RtcEngineExInternal.ts b/ts/Private/internal/RtcEngineExInternal.ts index 4598255ca..babe9ff9d 100644 --- a/ts/Private/internal/RtcEngineExInternal.ts +++ b/ts/Private/internal/RtcEngineExInternal.ts @@ -360,6 +360,10 @@ export class RtcEngineExInternal extends IRtcEngineExImpl { return 'RtcEngine_startPreview2'; } + protected override getApiTypeFromStartPreviewWithoutSourceType(): string { + return 'RtcEngine_startPreview'; + } + protected override getApiTypeFromStopPreview( sourceType: VideoSourceType = VideoSourceType.VideoSourceCameraPrimary ): string {