Skip to content

Commit

Permalink
Merge pull request #3686 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 10, 2024
2 parents 41cf49c + a0242d7 commit b90279d
Show file tree
Hide file tree
Showing 34 changed files with 446 additions and 607 deletions.
2 changes: 1 addition & 1 deletion dita/RTC-NG/API/api_irtcengine_setvideoprofile2.dita
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<prolog>
<metadata>
<keywords>
<indexterm keyref="setVideoProfile"/>
<indexterm keyref="setVideoProfile2"/>
</keywords>
</metadata>
</prolog>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,18 @@
<li><ph keyref="CLIENT_ROLE_CHANGE_FAILED_TOO_MANY_BROADCASTERS" />(1): 频道内主播人数达到上限。
<note type="note">该枚举仅在开启 128 人功能后报告。主播人数的上限根据开启 128 人功能时实际配置的人数而定。</note></li>
<li><ph keyref="CLIENT_ROLE_CHANGE_FAILED_NOT_AUTHORIZED" />(2): 请求被服务端拒绝。建议提示用户重新尝试切换用户角色。</li>
<li><ph keyref="CLIENT_ROLE_CHANGE_FAILED_REQUEST_TIME_OUT" />(3): (已废弃)请求超时。建议提示用户检查网络连接状况后重新尝试切换用户角色。</li>
<li><ph keyref="CLIENT_ROLE_CHANGE_FAILED_CONNECTION_FAILED" />(4): (已废弃)网络连接断开。可根据 <xref keyref="onConnectionStateChanged" /> 报告的 <parmname>reason</parmname>,排查网络连接失败的具体原因。</li>
<li><ph keyref="CLIENT_ROLE_CHANGE_FAILED_REQUEST_TIME_OUT" />(3): 请求超时。建议提示用户检查网络连接状况后重新尝试切换用户角色。
<dl outputclass="deprecated">
<dlentry>
<dt>废弃:</dt>
<dd>该枚举值自 v4.4.0 起废弃,不建议使用。</dd>
</dlentry></dl></li>
<li><ph keyref="CLIENT_ROLE_CHANGE_FAILED_CONNECTION_FAILED" />(4): 网络连接断开。可根据 <xref keyref="onConnectionStateChanged" /> 报告的 <parmname>reason</parmname>,排查网络连接失败的具体原因。
<dl outputclass="deprecated">
<dlentry>
<dt>废弃:</dt>
<dd>该枚举值自 v4.4.0 起废弃,不建议使用。</dd>
</dlentry></dl></li>
</ul></pd>
</plentry>
<plentry>
Expand Down
6 changes: 3 additions & 3 deletions dita/RTC-NG/API/class_externalvideoframe.dita
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
@property(strong, nonatomic) IMAGE_CLASS * _Nullable image;
@property(strong, nonatomic) NSData *_Nullable dataBuf;
@property(strong, nonatomic) NSData *_Nullable alphaBuf;
@property(assign, nonatomic) int alphaStitchMode;
@property(assign, nonatomic) AgoraAlphaStitchMode alphaStitchMode;
@property(assign, nonatomic) int cropLeft;
@property(assign, nonatomic) int cropTop;
@property(assign, nonatomic) int cropRight;
Expand Down Expand Up @@ -435,8 +435,8 @@ class ExternalVideoFrame {
<pt props="android apple">fillAlphaData</pt>
<pd>该参数仅适用于 BGRA 或 RGBA 格式的视频数据。设置是否提取视频帧中的 Alpha 通道数据并自动填入到 <parmname>alphaBuffer</parmname> 中:
<ul>
<li><codeph><ph keyref="true"/></codeph>:提取 Alpha 通道数据。</li>
<li><codeph><ph keyref="false"/></codeph>:(默认)不提取 Alpha 通道数据。</li>
<li><codeph><ph keyref="true"/></codeph>:提取并填充 Alpha 通道数据。</li>
<li><codeph><ph keyref="false"/></codeph>:(默认)不提取填充 Alpha 通道数据。</li>
</ul>
<note>对于 BGRA 或 RGBA 格式的视频数据,你可以任选一种方式设置 Alpha 通道数据:
<ul>
Expand Down
20 changes: 9 additions & 11 deletions dita/RTC-NG/API/class_videoframe.dita
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@
@CalledByNative("I422Buffer") int getStrideU();
@CalledByNative("I422Buffer") int getStrideV();
}
public interface RgbaBuffer extends Buffer {
@CalledByNative("RgbaBuffer") ByteBuffer getData();
}
public interface RgbaBuffer extends Buffer { @CalledByNative("RgbaBuffer") ByteBuffer getData(); }
public interface TextureBuffer extends Buffer {
enum Type {
OES(GLES11Ext.GL_TEXTURE_EXTERNAL_OES),
Expand Down Expand Up @@ -295,7 +293,7 @@
@property (nonatomic, assign) int avSyncType;
@property(assign, nonatomic) CVPixelBufferRef _Nullable pixelBuffer;
@property (nonatomic, assign) uint8_t* _Nullable alphaBuffer;
@property (nonatomic, assign) int alphaStitchMode;
@property (nonatomic, assign) AgoraAlphaStitchMode alphaStitchMode;
@property(nonatomic, strong) NSDictionary *_Nonnull metaInfo;
@end</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">struct VideoFrame {
Expand Down Expand Up @@ -730,13 +728,13 @@ class VideoFrame {
</plentry>
<plentry id="alphastitchmode">
<pt>alphaStitchMode</pt>
<pd>当视频帧中包含 Alpha 通道数据时,设置 <parmname>alphaBuffer</parmname> 和视频帧的相对位置
<ul>
<li>0:(默认)仅视频帧,即 <parmname>alphaBuffer</parmname> 不和视频帧拼接。</li>
<li>1:<parmname>alphaBuffer</parmname> 位于视频帧的上方。</li>
<li>2:<parmname>alphaBuffer</parmname> 位于视频帧的下方。</li>
<li>3:<parmname>alphaBuffer</parmname> 位于视频帧的左侧。</li>
<li>4:<parmname>alphaBuffer</parmname> 位于视频帧的右侧。</li>
<pd>当视频帧中包含 Alpha 通道数据时,设置 <parmname>alphaBuffer</parmname> 和视频帧的相对位置。<ph props="cpp apple">详见 <xref keyref="ALPHA_STITCH_MODE"/>。</ph>
<ul props="android">
<li><ph keyref="NO_ALPHA_STITCH"/> (0):(默认)仅视频帧,即 <parmname>alphaBuffer</parmname> 不和视频帧拼接。</li>
<li><ph keyref="ALPHA_STITCH_UP"/> (1):<parmname>alphaBuffer</parmname> 位于视频帧的上方。</li>
<li><ph keyref="ALPHA_STITCH_BELOW"/> (2):<parmname>alphaBuffer</parmname> 位于视频帧的下方。</li>
<li><ph keyref="ALPHA_STITCH_LEFT"/> (3):<parmname>alphaBuffer</parmname> 位于视频帧的左侧。</li>
<li><ph keyref="ALPHA_STITCH_RIGHT"/> (4):<parmname>alphaBuffer</parmname> 位于视频帧的右侧。</li>
</ul></pd>
</plentry>
<plentry>
Expand Down
40 changes: 40 additions & 0 deletions dita/RTC-NG/API/enum_alphastitchmode.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="enum_alphastitchmode">
<title><ph keyref="ALPHA_STITCH_MODE"/></title>
<shortdesc id="short"><ph id="shortdesc"><parmname>alphaBuffer</parmname> 和视频帧的相对位置。</ph></shortdesc>
<refbody>
<section id="detailed_desc">
<dl outputclass="since">
<dlentry props="native">
<dt>自从</dt>
<dd>v4.4.0</dd>
</dlentry>
</dl>
</section>
<section id="parameters">
<title>枚举值</title>
<parml>
<plentry>
<pt><ph keyref="NO_ALPHA_STITCH"/></pt>
<pd>0:(默认)仅视频帧,即 <parmname>alphaBuffer</parmname> 不和视频帧拼接。</pd>
</plentry>
<plentry>
<pt><ph keyref="ALPHA_STITCH_UP"/></pt>
<pd>1:<parmname>alphaBuffer</parmname> 位于视频帧的上方。</pd>
</plentry>
<plentry>
<pt><ph keyref="ALPHA_STITCH_BELOW"/></pt>
<pd>2:<parmname>alphaBuffer</parmname> 位于视频帧的下方。</pd>
</plentry>
<plentry>
<pt><ph keyref="ALPHA_STITCH_LEFT"/></pt>
<pd>3:<parmname>alphaBuffer</parmname> 位于视频帧的左侧。</pd>
</plentry>
<plentry>
<pt><ph keyref="ALPHA_STITCH_RIGHT"/></pt>
<pd>4:<parmname>alphaBuffer</parmname> 位于视频帧的右侧。</pd>
</plentry>
</parml>
</section></refbody>
</reference>
8 changes: 0 additions & 8 deletions dita/RTC-NG/API/rtc_api_overview.dita
Original file line number Diff line number Diff line change
Expand Up @@ -2648,14 +2648,6 @@
<stentry>方法/回调</stentry>
<stentry>描述</stentry>
</sthead>
<strow props="android cpp apple unreal unity cs">
<stentry><xref keyref="startEchoTest1"/></stentry>
<stentry><ph conkeyref="startEchoTest1/shortdesc"/></stentry>
</strow>
<strow props="android cpp apple unreal unity cs">
<stentry><xref keyref="startEchoTest2"/></stentry>
<stentry><ph conkeyref="startEchoTest2/shortdesc"/></stentry>
</strow>
<strow props="android cpp apple framework">
<stentry><xref keyref="startEchoTest3"/></stentry>
<stentry><ph conkeyref="startEchoTest3/shortdesc"/></stentry>
Expand Down
104 changes: 23 additions & 81 deletions dita/RTC-NG/API/rtc_api_sunset.dita
Original file line number Diff line number Diff line change
Expand Up @@ -190,33 +190,23 @@
<colspec colname="c2" colnum="2" colwidth="1*"/>
<colspec colname="c3" colnum="3" colwidth="1*"/>
<colspec colname="c4" colnum="4" colwidth="1*"/>
<tbody>
<thead>
<row>
<entry>API</entry>
<entry>描述</entry>
<entry>替代 API</entry>
<entry>删除版本</entry>
</row>
<row props="android">
<entry>setVideoProfile</entry>
<entry>设置视频编码配置。</entry>
<entry><xref keyref="setVideoEncoderConfiguration"/></entry>
<entry>v4.4.0</entry>
</row>
<row props="apple">
<entry>setVideoProfile [1/2]</entry>
</thead>
<tbody>
<row>
<entry><ph props="android">setVideoProfile</ph><ph props="apple">setVideoProfile:profile:swapWidthAndHeight:</ph></entry>
<entry>设置视频编码配置。</entry>
<entry><xref keyref="setVideoEncoderConfiguration"/></entry>
<entry>v4.4.0</entry>
</row>
<row props="apple">
<entry>setVideoProfile [2/2]</entry>
<entry>手动设置视频编码配置。</entry>
<entry><xref keyref="setVideoEncoderConfiguration"/></entry>
<entry>v4.4.0</entry>
</row>
<row props="android apple">
<entry>setRemoteRenderMode [1/2]</entry>
<entry><ph props="android">setRemoteRenderMode(userId, renderMode)</ph><ph props="apple">setRemoteRenderMode:uid:mode:</ph></entry>
<entry>设置远端视图显示模式。</entry>
<entry><xref keyref="setRemoteRenderMode2"/></entry>
<entry>v4.4.0</entry>
Expand All @@ -233,44 +223,26 @@
<entry>Android 原生的 <xref keyref="TextureView-link"/>。</entry>
<entry>v4.4.0</entry>
</row>
<row props="android cpp">
<entry>openWithCustomSource</entry>
<entry>打开自定义媒体资源文件。</entry>
<entry><xref keyref="openWithMediaSource"/></entry>
<entry>v4.4.0</entry>
</row>
<row props="apple">
<entry>openWithCustomSourceAtStartPos</entry>
<row>
<entry><ph props="android cpp">openWithCustomSource</ph><ph props="apple">openWithCustomSourceAtStartPos</ph></entry>
<entry>打开自定义媒体资源文件。</entry>
<entry><xref keyref="openWithMediaSource"/></entry>
<entry>v4.4.0</entry>
</row>
<row props="apple">
<entry>setVideoQualityParameters</entry>
<entry>设置视频优化选项(仅适用于直播)。</entry>
<entry>建议使用 <xref keyref="VideoEncoderConfiguration"/> 类中的 <parmname>degradationPreference</parmname> 参数设置视频质量偏好。</entry>
<entry>v4.4.0</entry>
</row>
<row props="cpp android">
<entry>startEchoTest [1/3]</entry>
<entry>开始语音通话回路测试。</entry>
<entry><xref keyref="startEchoTest3"/></entry>
<entry>v4.4.0</entry>
</row>
<row props="apple">
<entry>startEchoTest</entry>
<entry>开始语音通话回路测试。</entry>
<entry><xref keyref="startEchoTest3"/></entry>
<entry>使用 <xref keyref="VideoEncoderConfiguration"/> 类中的 <parmname>degradationPreference</parmname> 参数</entry>
<entry>v4.4.0</entry>
</row>
<row props="cpp android">
<entry>startEchoTest [2/3]</entry>
<row>
<entry><ph props="android cpp">startEchoTest()</ph><ph props="apple">startEchoTest</ph></entry>
<entry>开始语音通话回路测试。</entry>
<entry><xref keyref="startEchoTest3"/></entry>
<entry>v4.4.0</entry>
</row>
<row props="apple">
<entry>startEchoTestWithInterval</entry>
<row>
<entry><ph props="android cpp">startEchoTest(intervalInSeconds)</ph><ph props="apple">startEchoTestWithInterval</ph></entry>
<entry>开始语音通话回路测试。</entry>
<entry><xref keyref="startEchoTest3"/></entry>
<entry>v4.4.0</entry>
Expand All @@ -287,63 +259,33 @@
<entry><xref keyref="enableEncryption"/></entry>
<entry>v4.4.0</entry>
</row>
<row props="cpp">
<entry>onExtensionEvent</entry>
<entry>插件事件回调。</entry>
<entry><xref keyref="onExtensionEventWithContext"/></entry>
<entry>v4.4.0</entry>
</row>
<row props="apple android">
<entry>onEvent</entry>
<row >
<entry><ph props="cpp">onExtensionEvent</ph><ph props="apple android">onEvent</ph></entry>
<entry>插件事件回调。</entry>
<entry><xref keyref="onExtensionEventWithContext"/></entry>
<entry>v4.4.0</entry>
</row>
<row props="apple cpp">
<entry>onExtensionStarted</entry>
<entry>插件启用回调。</entry>
<entry><xref keyref="onExtensionStartedWithContext"/></entry>
<entry>v4.4.0</entry>
</row>
<row props="android">
<entry>onStarted</entry>
<row>
<entry><ph props="apple cpp">onExtensionStarted</ph><ph props="android">onStarted</ph></entry>
<entry>插件启用回调。</entry>
<entry><xref keyref="onExtensionStartedWithContext"/></entry>
<entry>v4.4.0</entry>
</row>
<row props="apple cpp">
<entry>onExtensionStopped</entry>
<entry>插件禁用回调。</entry>
<entry><xref keyref="onExtensionStoppedWithContext"/></entry>
<entry>v4.4.0</entry>
</row>
<row props="android">
<entry>onStopped</entry>
<row>
<entry><ph props="apple cpp">onExtensionStopped</ph><ph props="android">onStopped</ph></entry>
<entry>插件禁用回调。</entry>
<entry><xref keyref="onExtensionStoppedWithContext"/></entry>
<entry>v4.4.0</entry>
</row>
<row props="apple cpp">
<entry>onExtensionError</entry>
<entry>插件出错回调。</entry>
<entry><xref keyref="onExtensionErrorWithContext"/></entry>
<entry>v4.4.0</entry>
</row>
<row props="android">
<entry>onError</entry>
<row>
<entry><ph props="apple cpp">onExtensionError</ph><ph props="android">onError</ph></entry>
<entry>插件出错回调。</entry>
<entry><xref keyref="onExtensionErrorWithContext"/></entry>
<entry>v4.4.0</entry>
</row>
<row>
<entry></entry>
<entry></entry>
<entry></entry>
<entry></entry>
</row>
</tbody>
</tbody>
</tgroup>
</table>
</section>
</body>
</topic>
</topic>
Loading

0 comments on commit b90279d

Please sign in to comment.