From c87552015bbfffcbe460b08fec0c5473717cd13a Mon Sep 17 00:00:00 2001
From: Cilla-luodan <85477033+Cilla-luodan@users.noreply.github.com>
Date: Fri, 12 Jul 2024 13:22:05 +0800
Subject: [PATCH] NMS-21800
---
dita/RTC-NG/API/class_externalvideoframe.dita | 32 ++++++++++--------
.../API/class_videoencoderconfiguration.dita | 33 ++++++++++---------
dita/RTC-NG/release/release_notes.dita | 7 ++++
en-US/dita/RTC-NG/release/release_notes.dita | 22 +++++++++----
4 files changed, 58 insertions(+), 36 deletions(-)
diff --git a/dita/RTC-NG/API/class_externalvideoframe.dita b/dita/RTC-NG/API/class_externalvideoframe.dita
index b6a7e96bd6c..bbe1d8f9ab2 100644
--- a/dita/RTC-NG/API/class_externalvideoframe.dita
+++ b/dita/RTC-NG/API/class_externalvideoframe.dita
@@ -99,13 +99,13 @@
eglContext(NULL),
eglType(EGL_CONTEXT10),
textureId(0),
- metadata_buffer(NULL),
- metadata_size(0),
+ metadataBuffer(NULL),
+ metadataSize(0),
alphaBuffer(NULL),
fillAlphaBuffer(false),
alphaStitchMode(0),
- d3d11_texture_2d(NULL),
- texture_slice_index(0){}
+ d3d11Texture2d(NULL),
+ textureSliceIndex(0){}
enum EGL_CONTEXT_TYPE {
EGL_CONTEXT10 = 0,
EGL_CONTEXT14 = 1,
@@ -130,13 +130,13 @@
EGL_CONTEXT_TYPE eglType;
int textureId;
float matrix[16];
- uint8_t* metadata_buffer;
- int metadata_size;
+ uint8_t* metadataBuffer;
+ int metadataSize;
uint8_t* alphaBuffer;
bool fillAlphaBuffer;
int alphaStitchMode;
- void *d3d11_texture_2d;
- int texture_slice_index;
+ void *d3d11Texture2d;
+ int textureSliceIndex;
};
export class ExternalVideoFrame {
type?: VideoBufferType;
@@ -408,13 +408,13 @@ class ExternalVideoFrame {
该参数仅适用于 Texture 格式的视频数据。为一个输入的 4x4 变换矩阵,典型值为一个单位矩阵。
- metadata_buffer
- metadataBuffer
+ metadata_buffer
+ metadataBuffer
该参数仅适用于 Texture 格式的视频数据。指 MetaData 的数据缓冲区,默认值为 NULL。
- metadata_size
- metadataSize
+ metadata_size
+ metadataSize
该参数仅适用于 Texture 格式的视频数据。指 MetaData 的大小,默认值为 0。
@@ -448,9 +448,13 @@ class ExternalVideoFrame {
+
+
+
+
- texture_slice_index
- textureSliceIndex
+ texture_slice_index
+ textureSliceIndex
该参数仅适用于 Windows Texture 格式的视频数据。表示在 ID3D11Texture2D 数组中,被视频帧使用的某一个 ID3D11Texture2D 纹理对象的索引。
diff --git a/dita/RTC-NG/API/class_videoencoderconfiguration.dita b/dita/RTC-NG/API/class_videoencoderconfiguration.dita
index 8525f357782..485434e7bce 100644
--- a/dita/RTC-NG/API/class_videoencoderconfiguration.dita
+++ b/dita/RTC-NG/API/class_videoencoderconfiguration.dita
@@ -93,14 +93,17 @@
static public class AdvanceOptions {
public ENCODING_PREFERENCE encodingPreference;
public COMPRESSION_PREFERENCE compressionPreference;
- public AdvanceOptions(
- ENCODING_PREFERENCE encodingPreference, COMPRESSION_PREFERENCE compressionPreference) {
+ public boolean encodeAlpha;
+ public AdvanceOptions(ENCODING_PREFERENCE encodingPreference,
+ COMPRESSION_PREFERENCE compressionPreference, boolean encodeAlpha) {
this.encodingPreference = encodingPreference;
this.compressionPreference = compressionPreference;
+ this.encodeAlpha = encodeAlpha;
}
public AdvanceOptions() {
this.encodingPreference = ENCODING_PREFERENCE.PREFER_AUTO;
this.compressionPreference = COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY;
+ this.encodeAlpha = false;
}
}
public enum DEGRADATION_PREFERENCE {
@@ -187,8 +190,8 @@
this.degradationPrefer = DEGRADATION_PREFERENCE.MAINTAIN_QUALITY;
this.mirrorMode = MIRROR_MODE_TYPE.MIRROR_MODE_DISABLED;
this.advanceOptions = new AdvanceOptions(
- ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY);
- this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_H265;
+ ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY, false);
+ this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_NONE;
}
public VideoEncoderConfiguration(VideoDimensions dimensions, FRAME_RATE frameRate, int bitrate,
ORIENTATION_MODE orientationMode) {
@@ -201,8 +204,8 @@
this.degradationPrefer = DEGRADATION_PREFERENCE.MAINTAIN_QUALITY;
this.mirrorMode = MIRROR_MODE_TYPE.MIRROR_MODE_DISABLED;
this.advanceOptions = new AdvanceOptions(
- ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY);
- this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_H265;
+ ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY, false);
+ this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_NONE;
}
public VideoEncoderConfiguration(VideoDimensions dimensions, FRAME_RATE frameRate, int bitrate,
ORIENTATION_MODE orientationMode, MIRROR_MODE_TYPE mirrorMode) {
@@ -215,8 +218,8 @@
this.degradationPrefer = DEGRADATION_PREFERENCE.MAINTAIN_QUALITY;
this.mirrorMode = mirrorMode;
this.advanceOptions = new AdvanceOptions(
- ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY);
- this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_H265;
+ ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY, false);
+ this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_NONE;
}
public VideoEncoderConfiguration(
int width, int height, FRAME_RATE frameRate, int bitrate, ORIENTATION_MODE orientationMode) {
@@ -229,8 +232,8 @@
this.degradationPrefer = DEGRADATION_PREFERENCE.MAINTAIN_QUALITY;
this.mirrorMode = MIRROR_MODE_TYPE.MIRROR_MODE_DISABLED;
this.advanceOptions = new AdvanceOptions(
- ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY);
- this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_H265;
+ ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY, false);
+ this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_NONE;
}
public VideoEncoderConfiguration(int width, int height, FRAME_RATE frameRate, int bitrate,
ORIENTATION_MODE orientationMode, MIRROR_MODE_TYPE mirrorMode) {
@@ -243,8 +246,8 @@
this.degradationPrefer = DEGRADATION_PREFERENCE.MAINTAIN_QUALITY;
this.mirrorMode = mirrorMode;
this.advanceOptions = new AdvanceOptions(
- ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY);
- this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_H265;
+ ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY, false);
+ this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_NONE;
}
}
export class VideoEncoderConfiguration{
@@ -300,7 +303,7 @@
orientationMode(m),
degradationPreference(MAINTAIN_QUALITY),
mirrorMode(mirror),
- advanceOptions(PREFER_AUTO, PREFER_LOW_LATENCY) {}
+ advanceOptions(PREFER_AUTO, PREFER_LOW_LATENCY, 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),
@@ -310,7 +313,7 @@
orientationMode(m),
degradationPreference(MAINTAIN_QUALITY),
mirrorMode(mirror),
- advanceOptions(PREFER_AUTO, PREFER_LOW_LATENCY) {}
+ advanceOptions(PREFER_AUTO, PREFER_LOW_LATENCY, false) {}
VideoEncoderConfiguration(const VideoEncoderConfiguration& config)
: codecType(config.codecType),
dimensions(config.dimensions),
@@ -330,7 +333,7 @@
orientationMode(ORIENTATION_MODE_ADAPTIVE),
degradationPreference(MAINTAIN_QUALITY),
mirrorMode(VIDEO_MIRROR_MODE_DISABLED),
- advanceOptions(PREFER_AUTO, PREFER_LOW_LATENCY) {}
+ advanceOptions(PREFER_AUTO, PREFER_LOW_LATENCY, false) {}
VideoEncoderConfiguration& operator=(const VideoEncoderConfiguration& rhs) {
if (this == &rhs) return *this;
codecType = rhs.codecType;
diff --git a/dita/RTC-NG/release/release_notes.dita b/dita/RTC-NG/release/release_notes.dita
index 1d2266c76ed..b9439461a75 100644
--- a/dita/RTC-NG/release/release_notes.dita
+++ b/dita/RTC-NG/release/release_notes.dita
@@ -40,6 +40,13 @@
在 v4.4.0 之前,当你的用户角色为观众时,调用 将音频场景设为聊天室场景()会收到申请麦克风权限的弹窗提示。自 v4.4.0 起,SDK 通过 iOS 原生的 API 控制麦克风开关,因此观众角色在聊天室场景下不会再收到申请麦克风权限的弹窗。
该版本将 receiveMetadata 回调改名为 ,并删除了回调中的 data、timeStamp 参数,你可以通过新增的 metadata 参数来获取 Metadata 的相关信息,包括 timeStamp(发送数据的时间戳)、uid(用户 ID)、channelId(源频道名称)等。
该版本删除了 回调中的 buffer、uid、timeStampMs 参数,你可以通过新增的 metadata 参数来获取 Metadata 的相关信息,包括 timeStampMs(发送数据的时间戳)、uid(用户 ID)、channelId(源频道名称)等。
+ 该版本修改了 中的以下成员名称:
+
+ - d3d11_texture_2d 更名为 d3d11Texture2d。
+ - texture_slice_index 更名为 textureSliceIndex。
+ - metadata_buffer 更名为 metadataBuffer。
+ - metadata_size 更名为 metadataSize。
+