Skip to content

Commit

Permalink
feat: adapt nativeSDK to 4.2.6.3 (#1148)
Browse files Browse the repository at this point in the history
* chore: upgrade native sdk to 4.2.6.3

* chore: upgrade terra config

* [AUTO] Generate codes by terra (#1147)

Co-authored-by: guoxianzhe <[email protected]>

* chore: set startPreviewWithoutSourceType

---------

Co-authored-by: sda-rob <[email protected]>
Co-authored-by: guoxianzhe <[email protected]>
  • Loading branch information
3 people authored Dec 29, 2023
1 parent 5c02520 commit 4e125d4
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 18 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
21 changes: 10 additions & 11 deletions scripts/terra/code_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

2 changes: 1 addition & 1 deletion scripts/terra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@agoraio-extensions/terra": "[email protected]:AgoraIO-Extensions/terra.git#commit=5dd8149d5ab9f3b472b7715916b6217f9745f066&workspace=terra",
"@agoraio-extensions/terra-core": "[email protected]:AgoraIO-Extensions/terra.git#commit=5dd8149d5ab9f3b472b7715916b6217f9745f066&workspace=terra-core",
"@agoraio-extensions/terra-legacy-cxx-parser": "[email protected]:AgoraIO-Extensions/terra-legacy-cxx-parser.git#commit=5455afd2c5e29013d9a3cb8d06150c162450a5ed",
"@agoraio-extensions/terra_shared_configs": "[email protected]:AgoraIO-Extensions/terra_shared_configs.git#commit=1611360e8aefc3c24bcbf99d8209e7cbac9fa773",
"@agoraio-extensions/terra_shared_configs": "[email protected]:AgoraIO-Extensions/terra_shared_configs.git#commit=311e37658bdbe639ada903e9af53896cd2ee84ab",
"ts-node": "^10.9.1",
"typescript": "^5.1.6"
},
Expand Down
8 changes: 4 additions & 4 deletions scripts/terra/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ __metadata:
languageName: node
linkType: hard

"@agoraio-extensions/terra_shared_configs@[email protected]:AgoraIO-Extensions/terra_shared_configs.git#commit=1611360e8aefc3c24bcbf99d8209e7cbac9fa773":
"@agoraio-extensions/terra_shared_configs@[email protected]:AgoraIO-Extensions/terra_shared_configs.git#commit=311e37658bdbe639ada903e9af53896cd2ee84ab":
version: 1.0.2
resolution: "@agoraio-extensions/terra_shared_configs@[email protected]:AgoraIO-Extensions/terra_shared_configs.git#commit=1611360e8aefc3c24bcbf99d8209e7cbac9fa773"
resolution: "@agoraio-extensions/terra_shared_configs@[email protected]:AgoraIO-Extensions/terra_shared_configs.git#commit=311e37658bdbe639ada903e9af53896cd2ee84ab"
dependencies:
"@agoraio-extensions/cxx-parser": "[email protected]:AgoraIO-Extensions/terra.git#head=main&workspace=cxx-parser"
"@agoraio-extensions/terra-core": "[email protected]:AgoraIO-Extensions/terra.git#head=main&workspace=terra-core"
mustache: "npm:^4.2.0"
checksum: 6b5b110988dc541bbd4809e523ead7a78a8df49ced4454125f9f7fc994416834ff771ccaa5acb81b95814d85258ca0e3153bcbefbb402dc0537b997220ca5ba4
checksum: 5e55be729b777f6d03018140b8b8c5bb52c72a59b2962c8fbbe1cec65ddbd9f93fa17d6c73953cc89730e5e58151384007f07745b295858ee9a784257570322e
languageName: node
linkType: hard

Expand Down Expand Up @@ -3450,7 +3450,7 @@ __metadata:
"@agoraio-extensions/terra": "[email protected]:AgoraIO-Extensions/terra.git#commit=5dd8149d5ab9f3b472b7715916b6217f9745f066&workspace=terra"
"@agoraio-extensions/terra-core": "[email protected]:AgoraIO-Extensions/terra.git#commit=5dd8149d5ab9f3b472b7715916b6217f9745f066&workspace=terra-core"
"@agoraio-extensions/terra-legacy-cxx-parser": "[email protected]:AgoraIO-Extensions/terra-legacy-cxx-parser.git#commit=5455afd2c5e29013d9a3cb8d06150c162450a5ed"
"@agoraio-extensions/terra_shared_configs": "[email protected]:AgoraIO-Extensions/terra_shared_configs.git#commit=1611360e8aefc3c24bcbf99d8209e7cbac9fa773"
"@agoraio-extensions/terra_shared_configs": "[email protected]: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"
Expand Down
12 changes: 12 additions & 0 deletions ts/Private/AgoraBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2211,6 +2211,14 @@ export enum RemoteAudioStateReason {
* 7: The remote user leaves the channel.
*/
RemoteAudioReasonRemoteOffline = 7,
/**
* @ignore
*/
RemoteAudioReasonRemoteNoPacketReceive = 8,
/**
* @ignore
*/
RemoteAudioReasonRemoteLocalPlayFailed = 9,
}

/**
Expand Down Expand Up @@ -4677,6 +4685,10 @@ export enum EarMonitoringFilterType {
* 1<<2: Enable noise suppression to the in-ear monitor.
*/
EarMonitoringFilterNoiseSuppression = 1 << 2,
/**
* @ignore
*/
EarMonitoringFilterReusePostProcessingFilter = 1 << 15,
}

/**
Expand Down
4 changes: 4 additions & 0 deletions ts/Private/AgoraMediaBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,10 @@ export class AudioFrame {
* @ignore
*/
audioTrackNumber?: number;
/**
* @ignore
*/
rtpTimestamp?: number;
}

/**
Expand Down
9 changes: 9 additions & 0 deletions ts/Private/IAgoraRtcEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -3201,6 +3205,11 @@ export abstract class IRtcEngine {
*/
abstract startPreview(sourceType?: VideoSourceType): number;

/**
* @ignore
*/
abstract startPreviewWithoutSourceType(): number;

/**
* Stops the local video preview.
*
Expand Down
5 changes: 5 additions & 0 deletions ts/Private/IAgoraRtcEngineEx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -949,4 +949,9 @@ export abstract class IRtcEngineEx extends IRtcEngine {
* < 0: Failure.
*/
abstract startMediaRenderingTracingEx(connection: RtcConnection): number;

/**
* @ignore
*/
abstract getCallIdEx(connection: RtcConnection): string;
}
19 changes: 19 additions & 0 deletions ts/Private/impl/IAgoraRtcEngineExImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
11 changes: 11 additions & 0 deletions ts/Private/impl/IAgoraRtcEngineImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions ts/Private/internal/RtcEngineExInternal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4e125d4

Please sign in to comment.