From cf87f348e2f207708cfd201eeb00eda6b1c06cc5 Mon Sep 17 00:00:00 2001 From: Cilla-luodan <85477033+Cilla-luodan@users.noreply.github.com> Date: Fri, 18 Oct 2024 18:11:00 +0800 Subject: [PATCH] 1 --- ...i_irtcengine_setremoterendertargetfps.dita | 6 +- ...cengine_startscreencapturebydisplayid.dita | 2 +- .../API/class_videoencoderconfiguration.dita | 55 ++++----- .../API/enum_compressionpreference.dita | 12 +- dita/RTC-NG/API/rtc_api_overview.dita | 113 ++++++++---------- dita/RTC-NG/RTC_NG_API_iOS.ditamap | 34 +++--- dita/RTC-NG/RTC_NG_API_macOS.ditamap | 36 +++--- .../RTC-NG/config/keys-rtc-ng-api-cpp.ditamap | 7 ++ .../RTC-NG/config/keys-rtc-ng-api-ios.ditamap | 7 ++ .../config/keys-rtc-ng-api-macos.ditamap | 7 ++ 10 files changed, 142 insertions(+), 137 deletions(-) diff --git a/dita/RTC-NG/API/api_irtcengine_setremoterendertargetfps.dita b/dita/RTC-NG/API/api_irtcengine_setremoterendertargetfps.dita index d5ac018f279..bf998b2d33b 100644 --- a/dita/RTC-NG/API/api_irtcengine_setremoterendertargetfps.dita +++ b/dita/RTC-NG/API/api_irtcengine_setremoterendertargetfps.dita @@ -13,10 +13,10 @@

- + public abstract int setRemoteRenderTargetFps(int targetFps); - - + - (int)setRemoteRenderTargetFps:(int)targetFps; + virtual int setRemoteRenderTargetFps(int targetFps) = 0; diff --git a/dita/RTC-NG/API/api_irtcengine_startscreencapturebydisplayid.dita b/dita/RTC-NG/API/api_irtcengine_startscreencapturebydisplayid.dita index a60de8c5707..a910e52c60f 100644 --- a/dita/RTC-NG/API/api_irtcengine_startscreencapturebydisplayid.dita +++ b/dita/RTC-NG/API/api_irtcengine_startscreencapturebydisplayid.dita @@ -19,7 +19,7 @@ regionRect:(CGRect)regionRect captureParams:(AgoraScreenCaptureParameters *_Nonnull)captureParams; - virtual int startScreenCaptureByDisplayId(uint32_t displayId, const Rectangle& regionRect, + virtual int startScreenCaptureByDisplayId(int64_t displayId, const Rectangle& regionRect, const ScreenCaptureParameters& captureParams) = 0; UFUNCTION(BlueprintCallable, Category = "Agora|IRtcEngine") diff --git a/dita/RTC-NG/API/class_videoencoderconfiguration.dita b/dita/RTC-NG/API/class_videoencoderconfiguration.dita index c05e0a09590..b844d174ef4 100644 --- a/dita/RTC-NG/API/class_videoencoderconfiguration.dita +++ b/dita/RTC-NG/API/class_videoencoderconfiguration.dita @@ -80,6 +80,7 @@ } } public enum COMPRESSION_PREFERENCE { + PREFER_COMPRESSION_AUTO(-1), PREFER_LOW_LATENCY(0), PREFER_QUALITY(1); private int value; @@ -102,11 +103,12 @@ } public AdvanceOptions() { this.encodingPreference = ENCODING_PREFERENCE.PREFER_AUTO; - this.compressionPreference = COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY; + this.compressionPreference = COMPRESSION_PREFERENCE.PREFER_COMPRESSION_AUTO; this.encodeAlpha = false; } } public enum DEGRADATION_PREFERENCE { + MAINTAIN_AUTO(-1), MAINTAIN_QUALITY(0), MAINTAIN_FRAMERATE(1), MAINTAIN_BALANCED(2), @@ -153,7 +155,6 @@ VIDEO_CODEC_H264(2), VIDEO_CODEC_H265(3), VIDEO_CODEC_GENERIC(6), - VIDEO_CODEC_GENERIC_H264(7), VIDEO_CODEC_AV1(12), VIDEO_CODEC_VP9(13), VIDEO_CODEC_GENERIC_JPEG(20); @@ -187,10 +188,10 @@ this.bitrate = STANDARD_BITRATE; this.minBitrate = DEFAULT_MIN_BITRATE; this.orientationMode = ORIENTATION_MODE.ORIENTATION_MODE_ADAPTIVE; - this.degradationPrefer = DEGRADATION_PREFERENCE.MAINTAIN_QUALITY; + this.degradationPrefer = DEGRADATION_PREFERENCE.MAINTAIN_AUTO; this.mirrorMode = MIRROR_MODE_TYPE.MIRROR_MODE_DISABLED; this.advanceOptions = new AdvanceOptions( - ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY, false); + ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_COMPRESSION_AUTO, false); this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_NONE; } public VideoEncoderConfiguration(VideoDimensions dimensions, FRAME_RATE frameRate, int bitrate, @@ -201,10 +202,10 @@ this.bitrate = bitrate; this.minBitrate = DEFAULT_MIN_BITRATE; this.orientationMode = orientationMode; - this.degradationPrefer = DEGRADATION_PREFERENCE.MAINTAIN_QUALITY; + this.degradationPrefer = DEGRADATION_PREFERENCE.MAINTAIN_AUTO; this.mirrorMode = MIRROR_MODE_TYPE.MIRROR_MODE_DISABLED; this.advanceOptions = new AdvanceOptions( - ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY, false); + ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_COMPRESSION_AUTO, false); this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_NONE; } public VideoEncoderConfiguration(VideoDimensions dimensions, FRAME_RATE frameRate, int bitrate, @@ -215,10 +216,10 @@ this.bitrate = bitrate; this.minBitrate = DEFAULT_MIN_BITRATE; this.orientationMode = orientationMode; - this.degradationPrefer = DEGRADATION_PREFERENCE.MAINTAIN_QUALITY; + this.degradationPrefer = DEGRADATION_PREFERENCE.MAINTAIN_AUTO; this.mirrorMode = mirrorMode; this.advanceOptions = new AdvanceOptions( - ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY, false); + ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_COMPRESSION_AUTO, false); this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_NONE; } public VideoEncoderConfiguration( @@ -229,10 +230,10 @@ this.bitrate = bitrate; this.minBitrate = DEFAULT_MIN_BITRATE; this.orientationMode = orientationMode; - this.degradationPrefer = DEGRADATION_PREFERENCE.MAINTAIN_QUALITY; + this.degradationPrefer = DEGRADATION_PREFERENCE.MAINTAIN_AUTO; this.mirrorMode = MIRROR_MODE_TYPE.MIRROR_MODE_DISABLED; this.advanceOptions = new AdvanceOptions( - ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY, false); + ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_COMPRESSION_AUTO, false); this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_NONE; } public VideoEncoderConfiguration(int width, int height, FRAME_RATE frameRate, int bitrate, @@ -243,10 +244,10 @@ this.bitrate = bitrate; this.minBitrate = DEFAULT_MIN_BITRATE; this.orientationMode = orientationMode; - this.degradationPrefer = DEGRADATION_PREFERENCE.MAINTAIN_QUALITY; + this.degradationPrefer = DEGRADATION_PREFERENCE.MAINTAIN_AUTO; this.mirrorMode = mirrorMode; this.advanceOptions = new AdvanceOptions( - ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY, false); + ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_COMPRESSION_AUTO, false); this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_NONE; } } @@ -301,9 +302,9 @@ bitrate(b), minBitrate(DEFAULT_MIN_BITRATE), orientationMode(m), - degradationPreference(MAINTAIN_QUALITY), + degradationPreference(MAINTAIN_AUTO), mirrorMode(mirror), - advanceOptions(PREFER_AUTO, PREFER_LOW_LATENCY, false) {} + advanceOptions(PREFER_AUTO, PREFER_COMPRESSION_AUTO, false) {} VideoEncoderConfiguration(int width, int height, int f, int b, ORIENTATION_MODE m, VIDEO_MIRROR_MODE_TYPE mirror = VIDEO_MIRROR_MODE_DISABLED) : codecType(VIDEO_CODEC_NONE), dimensions(width, height), @@ -311,19 +312,19 @@ bitrate(b), minBitrate(DEFAULT_MIN_BITRATE), orientationMode(m), - degradationPreference(MAINTAIN_QUALITY), + degradationPreference(MAINTAIN_AUTO), mirrorMode(mirror), - advanceOptions(PREFER_AUTO, PREFER_LOW_LATENCY, false) {} + advanceOptions(PREFER_AUTO, PREFER_COMPRESSION_AUTO, false) {} VideoEncoderConfiguration(const VideoEncoderConfiguration& config) - : codecType(config.codecType), - dimensions(config.dimensions), - frameRate(config.frameRate), - bitrate(config.bitrate), - minBitrate(config.minBitrate), - orientationMode(config.orientationMode), - degradationPreference(config.degradationPreference), - mirrorMode(config.mirrorMode), - advanceOptions(config.advanceOptions) {} + : codecType(config.codecType), + dimensions(config.dimensions), + frameRate(config.frameRate), + bitrate(config.bitrate), + minBitrate(config.minBitrate), + orientationMode(config.orientationMode), + degradationPreference(config.degradationPreference), + mirrorMode(config.mirrorMode), + advanceOptions(config.advanceOptions) {} VideoEncoderConfiguration() : codecType(VIDEO_CODEC_NONE), dimensions(FRAME_WIDTH_960, FRAME_HEIGHT_540), @@ -331,9 +332,9 @@ bitrate(STANDARD_BITRATE), minBitrate(DEFAULT_MIN_BITRATE), orientationMode(ORIENTATION_MODE_ADAPTIVE), - degradationPreference(MAINTAIN_QUALITY), + degradationPreference(MAINTAIN_AUTO), mirrorMode(VIDEO_MIRROR_MODE_DISABLED), - advanceOptions(PREFER_AUTO, PREFER_LOW_LATENCY, false) {} + advanceOptions(PREFER_AUTO, PREFER_COMPRESSION_AUTO, false) {} VideoEncoderConfiguration& operator=(const VideoEncoderConfiguration& rhs) { if (this == &rhs) return *this; codecType = rhs.codecType; diff --git a/dita/RTC-NG/API/enum_compressionpreference.dita b/dita/RTC-NG/API/enum_compressionpreference.dita index 8dc8df4cdaf..c9289ccea9d 100644 --- a/dita/RTC-NG/API/enum_compressionpreference.dita +++ b/dita/RTC-NG/API/enum_compressionpreference.dita @@ -15,17 +15,17 @@

枚举值 - + + + -1:(默认)自动模式。SDK 会根据你设置的视频场景,自动选择 ;并在网络状态发生变化时,自动在 之间切换,以获得最佳的用户体验。 + + 0: 低延时偏好。SDK 会对视频帧进行压缩处理,以降低延时。该偏好适用于流畅性优先且允许画质降低的场景。 - - - 1:(默认)高质量偏好。SDK 会对视频帧进行压缩处理,同时保持视频质量。该偏好适用于画质优先的场景。 - - + 1:(默认)高质量偏好。SDK 会对视频帧进行压缩处理,同时保持视频质量。该偏好适用于画质优先的场景。
diff --git a/dita/RTC-NG/API/rtc_api_overview.dita b/dita/RTC-NG/API/rtc_api_overview.dita index cde4add44f6..fd135501db8 100644 --- a/dita/RTC-NG/API/rtc_api_overview.dita +++ b/dita/RTC-NG/API/rtc_api_overview.dita @@ -269,6 +269,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1004,6 +1040,22 @@ + + + + + + + + + + + + + + + + @@ -1098,67 +1150,6 @@
-
- 视频编码功能 - - - 方法/回调 - 描述 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
视频渲染 diff --git a/dita/RTC-NG/RTC_NG_API_iOS.ditamap b/dita/RTC-NG/RTC_NG_API_iOS.ditamap index 7939ae02880..5a1363dd248 100644 --- a/dita/RTC-NG/RTC_NG_API_iOS.ditamap +++ b/dita/RTC-NG/RTC_NG_API_iOS.ditamap @@ -358,10 +358,6 @@ - - - - @@ -523,21 +519,21 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/dita/RTC-NG/RTC_NG_API_macOS.ditamap b/dita/RTC-NG/RTC_NG_API_macOS.ditamap index 1300565d1dd..01eca50c633 100644 --- a/dita/RTC-NG/RTC_NG_API_macOS.ditamap +++ b/dita/RTC-NG/RTC_NG_API_macOS.ditamap @@ -85,6 +85,10 @@ + + + + @@ -97,6 +101,12 @@ + + + + + + @@ -306,6 +316,12 @@ + + + + + + @@ -335,26 +351,6 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/dita/RTC-NG/config/keys-rtc-ng-api-cpp.ditamap b/dita/RTC-NG/config/keys-rtc-ng-api-cpp.ditamap index 0ad30a70918..a7f2b11dfcd 100644 --- a/dita/RTC-NG/config/keys-rtc-ng-api-cpp.ditamap +++ b/dita/RTC-NG/config/keys-rtc-ng-api-cpp.ditamap @@ -6657,6 +6657,13 @@ + + + + PREFER_COMPRESSION_AUTO + + + diff --git a/dita/RTC-NG/config/keys-rtc-ng-api-ios.ditamap b/dita/RTC-NG/config/keys-rtc-ng-api-ios.ditamap index 212a37a8f25..035ac2c3476 100644 --- a/dita/RTC-NG/config/keys-rtc-ng-api-ios.ditamap +++ b/dita/RTC-NG/config/keys-rtc-ng-api-ios.ditamap @@ -7687,6 +7687,13 @@ + + + + AgoraCompressionAuto + + + diff --git a/dita/RTC-NG/config/keys-rtc-ng-api-macos.ditamap b/dita/RTC-NG/config/keys-rtc-ng-api-macos.ditamap index e8d46dcf048..976b0166822 100644 --- a/dita/RTC-NG/config/keys-rtc-ng-api-macos.ditamap +++ b/dita/RTC-NG/config/keys-rtc-ng-api-macos.ditamap @@ -7249,6 +7249,13 @@ + + + + AgoraCompressionAuto + + +