Skip to content

Commit

Permalink
Merge pull request #3700 from AgoraIO/release/rtc-ng/4.4.0
Browse files Browse the repository at this point in the history
Release/rtc ng/4.4.0
  • Loading branch information
Cilla-luodan authored Jul 12, 2024
2 parents 245206e + 82f469b commit df0d6cb
Show file tree
Hide file tree
Showing 10 changed files with 145 additions and 84 deletions.
2 changes: 1 addition & 1 deletion dita/RTC-NG/API/api_irtcengine_pushaudioframe2.dita
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>调用该方法推送外部音频数据前,请先进行以下操作:<ol>
<p id="sequence">调用该方法推送外部音频数据前,请先进行以下操作:<ol>
<li>调用 <xref keyref="createCustomAudioTrack"/> 创建音频轨道并获得音频轨道 ID。</li>
<li>调用 <xref keyref="joinChannel2"/> 加入频道时,将 <xref keyref="ChannelMediaOptions"/> 中的 <parmname>publishCustomAudioTrackId</parmname> 设置为你想要发布的音频轨道 ID,并将 <parmname>publishCustomAudioTrack</parmname> 设置为 <codeph><ph keyref="true"/></codeph>。</li>
</ol></p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<dd>v4.3.1</dd>
</dlentry>
</dl>
<note type="attention" conkeyref="pushAudioFrame2/sequence"/>
<p conkeyref="pushAudioFrame2/sequence"/>
</section>
<section id="parameters">
<title>参数</title>
Expand Down
32 changes: 18 additions & 14 deletions dita/RTC-NG/API/class_externalvideoframe.dita
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
};</codeblock>
<codeblock props="electron" outputclass="language-typescript">export class ExternalVideoFrame {
type?: VideoBufferType;
Expand Down Expand Up @@ -408,13 +408,13 @@ class ExternalVideoFrame {
<pd>该参数仅适用于 Texture 格式的视频数据。为一个输入的 4x4 变换矩阵,典型值为一个单位矩阵。</pd>
</plentry>
<plentry props="cpp unreal bp unity electron rn cs flutter">
<pt props="cpp unreal bp unity electron rn cs">metadata_buffer</pt>
<pt props="flutter">metadataBuffer</pt>
<pt props="bp unity electron rn cs">metadata_buffer</pt>
<pt props="cpp unreal flutter">metadataBuffer</pt>
<pd>该参数仅适用于 Texture 格式的视频数据。指 MetaData 的数据缓冲区,默认值为 <codeph>NULL</codeph>。</pd>
</plentry>
<plentry props="cpp unreal bp unity electron rn cs flutter">
<pt props="cpp unreal bp unity electron rn cs">metadata_size</pt>
<pt props="flutter">metadataSize</pt>
<pt props="bp unity electron rn cs">metadata_size</pt>
<pt props="cpp unreal flutter">metadataSize</pt>
<pd>该参数仅适用于 Texture 格式的视频数据。指 MetaData 的大小,默认值为 <codeph>0</codeph>。</pd>
</plentry>
<plentry conkeyref="VideoFrame/d3d" props="cpp unity electron">
Expand Down Expand Up @@ -448,9 +448,13 @@ class ExternalVideoFrame {
<pt/>
<pd/>
</plentry>
<plentry conkeyref="VideoFrame/d3d">
<pt/>
<pd/>
</plentry>
<plentry props="cpp unity electron flutter">
<pt props="cpp unity electron">texture_slice_index</pt>
<pt props="flutter">textureSliceIndex</pt>
<pt props="unity electron">texture_slice_index</pt>
<pt props="cpp flutter">textureSliceIndex</pt>
<pd>该参数仅适用于 Windows Texture 格式的视频数据。表示在 <codeph>ID3D11Texture2D</codeph> 数组中,被视频帧使用的某一个 <codeph>ID3D11Texture2D</codeph> 纹理对象的索引。</pd>
</plentry>
<plentry>
Expand Down
33 changes: 18 additions & 15 deletions dita/RTC-NG/API/class_videoencoderconfiguration.dita
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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;
}
}</codeblock>
<codeblock props="hmos" outputclass="language-arkts">export class VideoEncoderConfiguration{
Expand Down Expand Up @@ -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),
Expand All @@ -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&amp; config)
: codecType(config.codecType),
dimensions(config.dimensions),
Expand All @@ -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&amp; operator=(const VideoEncoderConfiguration&amp; rhs) {
if (this == &amp;rhs) return *this;
codecType = rhs.codecType;
Expand Down
15 changes: 14 additions & 1 deletion dita/RTC-NG/config/keys-rtc-ng-api-java.ditamap
Original file line number Diff line number Diff line change
Expand Up @@ -2589,7 +2589,13 @@
</keywords>
</topicmeta>
</keydef>
<keydef keys="enableDualStreamMode2" href="../API/api_irtcengine_enabledualstreammode2.dita"/>
<keydef keys="enableDualStreamMode2" href="../API/api_irtcengine_enabledualstreammode2.dita">
<topicmeta>
<keywords>
<keyword>enableDualStreamMode</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="enableDualStreamMode3" href="../API/api_irtcengine_enabledualstreammode3.dita">
<topicmeta>
<keywords>
Expand Down Expand Up @@ -5286,6 +5292,13 @@
</keywords>
</topicmeta>
</keydef>
<keydef keys="ScreenCaptureParameters" href="../API/class_screencaptureparameters.dita">
<topicmeta>
<keywords>
<keyword>ScreenCaptureParameters</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="ScreenCaptureParameters2" href="../API/class_screencaptureparameters2.dita">
<topicmeta>
<keywords>
Expand Down
Loading

0 comments on commit df0d6cb

Please sign in to comment.