Skip to content

[AUTO] Generate code by terra #972

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions ts/Private/AgoraBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ export enum FrameWidth {
/**
* @ignore
*/
FrameWidth640 = 640,
FrameWidth960 = 960,
}

/**
Expand All @@ -692,7 +692,7 @@ export enum FrameHeight {
/**
* @ignore
*/
FrameHeight360 = 360,
FrameHeight540 = 540,
}

/**
Expand Down Expand Up @@ -786,19 +786,19 @@ export class VideoDimensions {
/**
* @ignore
*/
export enum ScreenCaptureCapabilityLevel {
export enum ScreenCaptureFramerateCapability {
/**
* @ignore
*/
ScreenCaptureCapabilityLevel15Fps = 0,
ScreenCaptureFramerateCapability15Fps = 0,
/**
* @ignore
*/
ScreenCaptureCapabilityLevel30Fps = 1,
ScreenCaptureFramerateCapability30Fps = 1,
/**
* @ignore
*/
ScreenCaptureCapabilityLevel60Fps = 2,
ScreenCaptureFramerateCapability60Fps = 2,
}

/**
Expand Down Expand Up @@ -4556,6 +4556,20 @@ export class VideoRenderingTracingInfo {
remoteJoined2PacketReceived?: number;
}

/**
* @ignore
*/
export enum ConfigFetchType {
/**
* @ignore
*/
ConfigFetchTypeInitialize = 1,
/**
* @ignore
*/
ConfigFetchTypeJoinChannel = 2,
}

/**
* The spatial audio parameters.
*/
Expand Down
7 changes: 5 additions & 2 deletions ts/Private/AgoraMediaBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,10 @@ export interface IVideoFrameObserver {
* @returns
* 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.
*/
onCaptureVideoFrame?(type: VideoSourceType, videoFrame: VideoFrame): boolean;
onCaptureVideoFrame?(
sourceType: VideoSourceType,
videoFrame: VideoFrame
): boolean;

/**
* Occurs each time the SDK receives a video frame before encoding.
Expand All @@ -1004,7 +1007,7 @@ export interface IVideoFrameObserver {
* false: Sets the SDK to discard the video frame.
*/
onPreEncodeVideoFrame?(
type: VideoSourceType,
sourceType: VideoSourceType,
videoFrame: VideoFrame
): boolean;

Expand Down
20 changes: 17 additions & 3 deletions ts/Private/IAgoraRtcEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,10 @@ export class RemoteVideoStats {
* 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).
*/
delay?: number;
/**
* @ignore
*/
e2eDelay?: number;
/**
* The width (pixels) of the video.
*/
Expand Down Expand Up @@ -990,6 +994,10 @@ export class ScreenCaptureSourceInfo {
* (For Windows only) Whether the window is minimized:true: The window is minimized.false: The window is not minimized.
*/
minimizeWindow?: boolean;
/**
* @ignore
*/
sourceDisplayId?: any;
}

/**
Expand Down Expand Up @@ -4953,14 +4961,20 @@ export abstract class IRtcEngine {
* @ignore
*/
abstract startCameraCapture(
type: VideoSourceType,
sourceType: VideoSourceType,
config: CameraCapturerConfiguration
): number;

/**
* @ignore
* Stops the local video preview.
* 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.
*
* @param sourceType The type of the video frame, see VideoSourceType .
*
* @returns
* < 0: Failure.
*/
abstract stopCameraCapture(type: VideoSourceType): number;
abstract stopCameraCapture(sourceType: VideoSourceType): number;

/**
* Sets the rotation angle of the captured video.
Expand Down
18 changes: 1 addition & 17 deletions ts/Private/IAgoraRtcEngineEx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -716,16 +716,6 @@ export abstract class IRtcEngineEx extends IRtcEngine {
*/
abstract getUserInfoByUidEx(uid: number, connection: RtcConnection): UserInfo;

/**
* @ignore
*/
abstract setVideoProfileEx(
width: number,
height: number,
frameRate: number,
bitrate: number
): number;

/**
* Enables or disables dual-stream mode on the sender side.
* 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.
Expand Down Expand Up @@ -768,13 +758,7 @@ export abstract class IRtcEngineEx extends IRtcEngine {
): number;

/**
* Enables interoperability with the Agora Web SDK (applicable only in the live streaming scenarios).
* 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.
*
* @param enabled Whether to enable interoperability:true: Enable interoperability.false: (Default) Disable interoperability.
*
* @returns
* 0: Success.< 0: Failure.
* @ignore
*/
abstract setHighPriorityUserListEx(
uidList: number[],
Expand Down
10 changes: 8 additions & 2 deletions ts/Private/impl/AgoraMediaBaseImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,19 @@ export function processIVideoFrameObserver(
switch (event) {
case 'onCaptureVideoFrame':
if (handler.onCaptureVideoFrame !== undefined) {
handler.onCaptureVideoFrame(jsonParams.type, jsonParams.videoFrame);
handler.onCaptureVideoFrame(
jsonParams.sourceType,
jsonParams.videoFrame
);
}
break;

case 'onPreEncodeVideoFrame':
if (handler.onPreEncodeVideoFrame !== undefined) {
handler.onPreEncodeVideoFrame(jsonParams.type, jsonParams.videoFrame);
handler.onPreEncodeVideoFrame(
jsonParams.sourceType,
jsonParams.videoFrame
);
}
break;

Expand Down
39 changes: 0 additions & 39 deletions ts/Private/impl/IAgoraRtcEngineExImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1352,45 +1352,6 @@ export class IRtcEngineExImpl extends IRtcEngineImpl implements IRtcEngineEx {
return 'RtcEngineEx_getUserInfoByUidEx';
}

setVideoProfileEx(
width: number,
height: number,
frameRate: number,
bitrate: number
): number {
const apiType = this.getApiTypeFromSetVideoProfileEx(
width,
height,
frameRate,
bitrate
);
const jsonParams = {
width: width,
height: height,
frameRate: frameRate,
bitrate: bitrate,
toJSON: () => {
return {
width: width,
height: height,
frameRate: frameRate,
bitrate: bitrate,
};
},
};
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
return jsonResults.result;
}

protected getApiTypeFromSetVideoProfileEx(
width: number,
height: number,
frameRate: number,
bitrate: number
): string {
return 'RtcEngineEx_setVideoProfileEx';
}

enableDualStreamModeEx(
enabled: boolean,
streamConfig: SimulcastStreamConfig,
Expand Down
22 changes: 12 additions & 10 deletions ts/Private/impl/IAgoraRtcEngineImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5311,16 +5311,16 @@ export class IRtcEngineImpl implements IRtcEngine {
}

startCameraCapture(
type: VideoSourceType,
sourceType: VideoSourceType,
config: CameraCapturerConfiguration
): number {
const apiType = this.getApiTypeFromStartCameraCapture(type, config);
const apiType = this.getApiTypeFromStartCameraCapture(sourceType, config);
const jsonParams = {
type: type,
sourceType: sourceType,
config: config,
toJSON: () => {
return {
type: type,
sourceType: sourceType,
config: config,
};
},
Expand All @@ -5330,27 +5330,29 @@ export class IRtcEngineImpl implements IRtcEngine {
}

protected getApiTypeFromStartCameraCapture(
type: VideoSourceType,
sourceType: VideoSourceType,
config: CameraCapturerConfiguration
): string {
return 'RtcEngine_startCameraCapture';
}

stopCameraCapture(type: VideoSourceType): number {
const apiType = this.getApiTypeFromStopCameraCapture(type);
stopCameraCapture(sourceType: VideoSourceType): number {
const apiType = this.getApiTypeFromStopCameraCapture(sourceType);
const jsonParams = {
type: type,
sourceType: sourceType,
toJSON: () => {
return {
type: type,
sourceType: sourceType,
};
},
};
const jsonResults = callIrisApi.call(this, apiType, jsonParams);
return jsonResults.result;
}

protected getApiTypeFromStopCameraCapture(type: VideoSourceType): string {
protected getApiTypeFromStopCameraCapture(
sourceType: VideoSourceType
): string {
return 'RtcEngine_stopCameraCapture';
}

Expand Down
4 changes: 2 additions & 2 deletions ts/Private/ti/AgoraMediaBase-ti.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export const IVideoEncodedFrameObserver = t.iface([], {
});

export const IVideoFrameObserver = t.iface([], {
"onCaptureVideoFrame": t.opt(t.func("boolean", t.param("type", "VideoSourceType"), t.param("videoFrame", "VideoFrame"))),
"onPreEncodeVideoFrame": t.opt(t.func("boolean", t.param("type", "VideoSourceType"), t.param("videoFrame", "VideoFrame"))),
"onCaptureVideoFrame": t.opt(t.func("boolean", t.param("sourceType", "VideoSourceType"), t.param("videoFrame", "VideoFrame"))),
"onPreEncodeVideoFrame": t.opt(t.func("boolean", t.param("sourceType", "VideoSourceType"), t.param("videoFrame", "VideoFrame"))),
"onMediaPlayerVideoFrame": t.opt(t.func("boolean", t.param("videoFrame", "VideoFrame"), t.param("mediaPlayerId", "number"))),
"onRenderVideoFrame": t.opt(t.func("boolean", t.param("channelId", "string"), t.param("remoteUid", "number"), t.param("videoFrame", "VideoFrame"))),
"onTranscodedVideoFrame": t.opt(t.func("boolean", t.param("videoFrame", "VideoFrame"))),
Expand Down