Skip to content

Commit 810af97

Browse files
[AUTO] Generate code by terra (#972)
Co-authored-by: LichKing-2234 <[email protected]>
1 parent 79ecf8e commit 810af97

8 files changed

+65
-81
lines changed

ts/Private/AgoraBase.ts

+20-6
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ export enum FrameWidth {
682682
/**
683683
* @ignore
684684
*/
685-
FrameWidth640 = 640,
685+
FrameWidth960 = 960,
686686
}
687687

688688
/**
@@ -692,7 +692,7 @@ export enum FrameHeight {
692692
/**
693693
* @ignore
694694
*/
695-
FrameHeight360 = 360,
695+
FrameHeight540 = 540,
696696
}
697697

698698
/**
@@ -786,19 +786,19 @@ export class VideoDimensions {
786786
/**
787787
* @ignore
788788
*/
789-
export enum ScreenCaptureCapabilityLevel {
789+
export enum ScreenCaptureFramerateCapability {
790790
/**
791791
* @ignore
792792
*/
793-
ScreenCaptureCapabilityLevel15Fps = 0,
793+
ScreenCaptureFramerateCapability15Fps = 0,
794794
/**
795795
* @ignore
796796
*/
797-
ScreenCaptureCapabilityLevel30Fps = 1,
797+
ScreenCaptureFramerateCapability30Fps = 1,
798798
/**
799799
* @ignore
800800
*/
801-
ScreenCaptureCapabilityLevel60Fps = 2,
801+
ScreenCaptureFramerateCapability60Fps = 2,
802802
}
803803

804804
/**
@@ -4556,6 +4556,20 @@ export class VideoRenderingTracingInfo {
45564556
remoteJoined2PacketReceived?: number;
45574557
}
45584558

4559+
/**
4560+
* @ignore
4561+
*/
4562+
export enum ConfigFetchType {
4563+
/**
4564+
* @ignore
4565+
*/
4566+
ConfigFetchTypeInitialize = 1,
4567+
/**
4568+
* @ignore
4569+
*/
4570+
ConfigFetchTypeJoinChannel = 2,
4571+
}
4572+
45594573
/**
45604574
* The spatial audio parameters.
45614575
*/

ts/Private/AgoraMediaBase.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,10 @@ export interface IVideoFrameObserver {
986986
* @returns
987987
* When the video processing mode is ProcessModeReadOnly:true: Reserved for future use.false: Reserved for future use.When the video processing mode is ProcessModeReadWrite:true: Sets the SDK to receive the video frame.false: Sets the SDK to discard the video frame.
988988
*/
989-
onCaptureVideoFrame?(type: VideoSourceType, videoFrame: VideoFrame): boolean;
989+
onCaptureVideoFrame?(
990+
sourceType: VideoSourceType,
991+
videoFrame: VideoFrame
992+
): boolean;
990993

991994
/**
992995
* Occurs each time the SDK receives a video frame before encoding.
@@ -1004,7 +1007,7 @@ export interface IVideoFrameObserver {
10041007
* false: Sets the SDK to discard the video frame.
10051008
*/
10061009
onPreEncodeVideoFrame?(
1007-
type: VideoSourceType,
1010+
sourceType: VideoSourceType,
10081011
videoFrame: VideoFrame
10091012
): boolean;
10101013

ts/Private/IAgoraRtcEngine.ts

+17-3
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,10 @@ export class RemoteVideoStats {
554554
* Deprecated:In scenarios where audio and video are synchronized, you can get the video delay data from networkTransportDelay and jitterBufferDelay in RemoteAudioStats .The video delay (ms).
555555
*/
556556
delay?: number;
557+
/**
558+
* @ignore
559+
*/
560+
e2eDelay?: number;
557561
/**
558562
* The width (pixels) of the video.
559563
*/
@@ -990,6 +994,10 @@ export class ScreenCaptureSourceInfo {
990994
* (For Windows only) Whether the window is minimized:true: The window is minimized.false: The window is not minimized.
991995
*/
992996
minimizeWindow?: boolean;
997+
/**
998+
* @ignore
999+
*/
1000+
sourceDisplayId?: any;
9931001
}
9941002

9951003
/**
@@ -4953,14 +4961,20 @@ export abstract class IRtcEngine {
49534961
* @ignore
49544962
*/
49554963
abstract startCameraCapture(
4956-
type: VideoSourceType,
4964+
sourceType: VideoSourceType,
49574965
config: CameraCapturerConfiguration
49584966
): number;
49594967

49604968
/**
4961-
* @ignore
4969+
* Stops the local video preview.
4970+
* After calling startPreview to start the preview, if you want to close the local video preview, call this method.Call this method before joining a channel or after leaving a channel.
4971+
*
4972+
* @param sourceType The type of the video frame, see VideoSourceType .
4973+
*
4974+
* @returns
4975+
* < 0: Failure.
49624976
*/
4963-
abstract stopCameraCapture(type: VideoSourceType): number;
4977+
abstract stopCameraCapture(sourceType: VideoSourceType): number;
49644978

49654979
/**
49664980
* Sets the rotation angle of the captured video.

ts/Private/IAgoraRtcEngineEx.ts

+1-17
Original file line numberDiff line numberDiff line change
@@ -716,16 +716,6 @@ export abstract class IRtcEngineEx extends IRtcEngine {
716716
*/
717717
abstract getUserInfoByUidEx(uid: number, connection: RtcConnection): UserInfo;
718718

719-
/**
720-
* @ignore
721-
*/
722-
abstract setVideoProfileEx(
723-
width: number,
724-
height: number,
725-
frameRate: number,
726-
bitrate: number
727-
): number;
728-
729719
/**
730720
* Enables or disables dual-stream mode on the sender side.
731721
* After you enable dual-stream mode, you can call setRemoteVideoStreamType to choose to receive either the high-quality video stream or the low-quality video stream on the subscriber side.
@@ -768,13 +758,7 @@ export abstract class IRtcEngineEx extends IRtcEngine {
768758
): number;
769759

770760
/**
771-
* Enables interoperability with the Agora Web SDK (applicable only in the live streaming scenarios).
772-
* Deprecated:The SDK automatically enables interoperability with the Web SDK, so you no longer need to call this method.You can call this method to enable or disable interoperability with the Agora Web SDK. If a channel has Web SDK users, ensure that you call this method, or the video of the Native user will be a black screen for the Web user.This method is only applicable in live streaming scenarios, and interoperability is enabled by default in communication scenarios.
773-
*
774-
* @param enabled Whether to enable interoperability:true: Enable interoperability.false: (Default) Disable interoperability.
775-
*
776-
* @returns
777-
* 0: Success.< 0: Failure.
761+
* @ignore
778762
*/
779763
abstract setHighPriorityUserListEx(
780764
uidList: number[],

ts/Private/impl/AgoraMediaBaseImpl.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,19 @@ export function processIVideoFrameObserver(
125125
switch (event) {
126126
case 'onCaptureVideoFrame':
127127
if (handler.onCaptureVideoFrame !== undefined) {
128-
handler.onCaptureVideoFrame(jsonParams.type, jsonParams.videoFrame);
128+
handler.onCaptureVideoFrame(
129+
jsonParams.sourceType,
130+
jsonParams.videoFrame
131+
);
129132
}
130133
break;
131134

132135
case 'onPreEncodeVideoFrame':
133136
if (handler.onPreEncodeVideoFrame !== undefined) {
134-
handler.onPreEncodeVideoFrame(jsonParams.type, jsonParams.videoFrame);
137+
handler.onPreEncodeVideoFrame(
138+
jsonParams.sourceType,
139+
jsonParams.videoFrame
140+
);
135141
}
136142
break;
137143

ts/Private/impl/IAgoraRtcEngineExImpl.ts

-39
Original file line numberDiff line numberDiff line change
@@ -1352,45 +1352,6 @@ export class IRtcEngineExImpl extends IRtcEngineImpl implements IRtcEngineEx {
13521352
return 'RtcEngineEx_getUserInfoByUidEx';
13531353
}
13541354

1355-
setVideoProfileEx(
1356-
width: number,
1357-
height: number,
1358-
frameRate: number,
1359-
bitrate: number
1360-
): number {
1361-
const apiType = this.getApiTypeFromSetVideoProfileEx(
1362-
width,
1363-
height,
1364-
frameRate,
1365-
bitrate
1366-
);
1367-
const jsonParams = {
1368-
width: width,
1369-
height: height,
1370-
frameRate: frameRate,
1371-
bitrate: bitrate,
1372-
toJSON: () => {
1373-
return {
1374-
width: width,
1375-
height: height,
1376-
frameRate: frameRate,
1377-
bitrate: bitrate,
1378-
};
1379-
},
1380-
};
1381-
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
1382-
return jsonResults.result;
1383-
}
1384-
1385-
protected getApiTypeFromSetVideoProfileEx(
1386-
width: number,
1387-
height: number,
1388-
frameRate: number,
1389-
bitrate: number
1390-
): string {
1391-
return 'RtcEngineEx_setVideoProfileEx';
1392-
}
1393-
13941355
enableDualStreamModeEx(
13951356
enabled: boolean,
13961357
streamConfig: SimulcastStreamConfig,

ts/Private/impl/IAgoraRtcEngineImpl.ts

+12-10
Original file line numberDiff line numberDiff line change
@@ -5311,16 +5311,16 @@ export class IRtcEngineImpl implements IRtcEngine {
53115311
}
53125312

53135313
startCameraCapture(
5314-
type: VideoSourceType,
5314+
sourceType: VideoSourceType,
53155315
config: CameraCapturerConfiguration
53165316
): number {
5317-
const apiType = this.getApiTypeFromStartCameraCapture(type, config);
5317+
const apiType = this.getApiTypeFromStartCameraCapture(sourceType, config);
53185318
const jsonParams = {
5319-
type: type,
5319+
sourceType: sourceType,
53205320
config: config,
53215321
toJSON: () => {
53225322
return {
5323-
type: type,
5323+
sourceType: sourceType,
53245324
config: config,
53255325
};
53265326
},
@@ -5330,27 +5330,29 @@ export class IRtcEngineImpl implements IRtcEngine {
53305330
}
53315331

53325332
protected getApiTypeFromStartCameraCapture(
5333-
type: VideoSourceType,
5333+
sourceType: VideoSourceType,
53345334
config: CameraCapturerConfiguration
53355335
): string {
53365336
return 'RtcEngine_startCameraCapture';
53375337
}
53385338

5339-
stopCameraCapture(type: VideoSourceType): number {
5340-
const apiType = this.getApiTypeFromStopCameraCapture(type);
5339+
stopCameraCapture(sourceType: VideoSourceType): number {
5340+
const apiType = this.getApiTypeFromStopCameraCapture(sourceType);
53415341
const jsonParams = {
5342-
type: type,
5342+
sourceType: sourceType,
53435343
toJSON: () => {
53445344
return {
5345-
type: type,
5345+
sourceType: sourceType,
53465346
};
53475347
},
53485348
};
53495349
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
53505350
return jsonResults.result;
53515351
}
53525352

5353-
protected getApiTypeFromStopCameraCapture(type: VideoSourceType): string {
5353+
protected getApiTypeFromStopCameraCapture(
5354+
sourceType: VideoSourceType
5355+
): string {
53545356
return 'RtcEngine_stopCameraCapture';
53555357
}
53565358

ts/Private/ti/AgoraMediaBase-ti.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ export const IVideoEncodedFrameObserver = t.iface([], {
2929
});
3030

3131
export const IVideoFrameObserver = t.iface([], {
32-
"onCaptureVideoFrame": t.opt(t.func("boolean", t.param("type", "VideoSourceType"), t.param("videoFrame", "VideoFrame"))),
33-
"onPreEncodeVideoFrame": t.opt(t.func("boolean", t.param("type", "VideoSourceType"), t.param("videoFrame", "VideoFrame"))),
32+
"onCaptureVideoFrame": t.opt(t.func("boolean", t.param("sourceType", "VideoSourceType"), t.param("videoFrame", "VideoFrame"))),
33+
"onPreEncodeVideoFrame": t.opt(t.func("boolean", t.param("sourceType", "VideoSourceType"), t.param("videoFrame", "VideoFrame"))),
3434
"onMediaPlayerVideoFrame": t.opt(t.func("boolean", t.param("videoFrame", "VideoFrame"), t.param("mediaPlayerId", "number"))),
3535
"onRenderVideoFrame": t.opt(t.func("boolean", t.param("channelId", "string"), t.param("remoteUid", "number"), t.param("videoFrame", "VideoFrame"))),
3636
"onTranscodedVideoFrame": t.opt(t.func("boolean", t.param("videoFrame", "VideoFrame"))),

0 commit comments

Comments
 (0)