Skip to content

Commit

Permalink
Merge pull request #3772 from AgoraIO/4.4.0-bugfix-0905
Browse files Browse the repository at this point in the history
4.4.0 bugfix 0905
  • Loading branch information
Cilla-luodan authored Sep 5, 2024
2 parents 8112c82 + 0e9eb4d commit d68fbdb
Show file tree
Hide file tree
Showing 15 changed files with 268 additions and 199 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>声网建议你在加入频道前调用该方法。</p>
<p>该方法需要在加入频道前调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
Expand Down
1 change: 1 addition & 0 deletions dita/RTC-NG/API/api_irtcengine_getconnectionstate.dita
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<codeblock props="flutter" outputclass="language-dart">Future&lt;ConnectionStateType&gt; getConnectionState();</codeblock>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title"/>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>加入频道前后均可调用。</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_irtcengine_setlocalvideodatasourceposition">
<title><ph keyref="setLocalVideoDataSourcePosition"/></title>
<shortdesc id="short"><ph id="shortdesc">设置本地视频帧的观测位置。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="setLocalVideoDataSourcePosition"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java"/>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec"/>
<codeblock props="cpp unreal" outputclass="language-cpp"/>
<codeblock props="bp" outputclass="language-cpp"/>
<codeblock props="electron" outputclass="language-typescript"/>
<codeblock props="unity cs" outputclass="language-csharp">public abstract int SetLocalVideoDataSourcePosition(VIDEO_MODULE_POSITION position);</codeblock>
<codeblock props="rn" outputclass="language-typescript"/>
<codeblock props="flutter" outputclass="language-dart"/> </p>
</section>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title"/>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>该方法需要在创建第一个 <xref keyref="VideoSurface"/> 视图之前调用。</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>该方法仅支持观测通过 <xref keyref="VideoSurface"/> 及其子类渲染的本地视频数据。</p>
</section>
<section id="parameters" deliveryTarget="details">
<title>参数</title>
<parml>
<plentry>
<pt>position</pt>
<pd>视频帧的观测位置,详见 <xref keyref="VIDEO_MODULE_POSITION"/>。
<note type="attention">
<ul><li>该方法目前仅支持将观测位置设为 <ph keyref="POSITION_POST_CAPTURER"/> 或 <ph keyref="POSITION_PRE_ENCODER"/>。</li>
<li>在 <ph keyref="POSITION_POST_CAPTURER"/> 处获取的视频帧未经裁剪且帧率较高,<ph keyref="POSITION_PRE_ENCODER"/> 位置获取的视频帧经过发送前的裁剪,帧率小于或等于摄像头采集的帧率。</li></ul></note></pd>
</plentry>
</parml> </section>
<section id="return_values">
<title><ph keyref="return-section-title"/></title>
<p props="flutter">方法成功调用时,无返回值;方法调用失败时,会抛出 <xref keyref="AgoraRtcException"/> 异常,你需要捕获异常并进行处理。<ph props="cn">详见<xref keyref="error-code-link"/>了解详情和解决建议。</ph></p>
<ul props="native unreal bp electron unity rn cs">
<li>0: 方法调用成功。</li>
<li>&lt; 0: 方法调用失败。<ph props="cn">详见<xref keyref="error-code-link"/>了解详情和解决建议。</ph></li>
</ul> </section>
</refbody>
</reference>
1 change: 1 addition & 0 deletions dita/RTC-NG/API/api_irtcengineex_getconnectionstateex.dita
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<codeblock props="flutter" outputclass="language-dart">Future&lt;ConnectionStateType&gt; getConnectionStateEx(RtcConnection connection);</codeblock>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title"/>
<section id="timing" deliveryTarget="details" conkeyref="getConnectionState/timing"/>
<section id="restriction" deliveryTarget="details" conkeyref="getConnectionState/restriction"/>
<section id="parameters" deliveryTarget="details">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</section>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<p props="native unreal bp unity cs">你可以在回调中获取本地设备采集到的原始视频数据,并可根据需要进行前处理。完成前处理后,你可以在该回调中直接修改 <parmname>videoFrame</parmname>,并将返回值设置为 <codeph><ph keyref="true"/></codeph>,即可将修改后的视频数据发送给 SDK。</p>
<p props="native unreal bp">如果你需要将处理后的数据发送给 SDK,需要先调用 <xref keyref="getVideoFrameProcessMode"/><codeph>(0)</codeph> 方法,将视频处理模式设置为读写模式。</p>
<p props="native unreal bp">如果你需要将处理后的数据发送给 SDK,需要先调用 <xref keyref="getVideoFrameProcessMode"/> 方法,将视频处理模式设置为读写模式(<ph keyref="PROCESS_MODE_READ_WRITE"/>)。</p>
<p props="flutter rn electron">你可以在回调中获取本地设备采集到的原始视频数据。</p>
</section>
<section id="scenario" deliveryTarget="details">
Expand All @@ -49,7 +49,7 @@
<section id="restriction" deliveryTarget="details">
<title>使用限制</title>
<ul>
<li>此处获取的视频数据为原始视频数据,即:未经过水印、裁剪和旋转等前处理的视频数据。</li>
<li props="hide">此处获取的视频数据为原始视频数据,即:未经过水印、裁剪和旋转等前处理的视频数据。</li>
<li>如果你获取到的视频数据类型为 RGBA,SDK 不支持对 Alpha 通道的值进行处理。</li>
<li id="restric1">建议你在修改 <parmname>videoFrame</parmname> 中的参数时,需确保修改后的参数跟视频帧缓冲区中的视频帧实际情况保持一致,否则可能导致本地预览画面和对端的视频画面出现非预期的旋转、失真等问题。</li>
<li props="rn electron">建议你通过 C++ API 实现该回调。</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<p props="native unreal bp unity electron rn cs">完成处理后,你可以在该回调中,传入处理后的视频数据将其发送回 SDK。</p>
<note type="attention">
<ul>
<li props="native unreal bp">如果你需要将处理后的数据发送给 SDK,需要先调用 <xref keyref="getVideoFrameProcessMode"/> 方法,将视频处理模式设置为读写模式(<ph keyref="PROCESS_MODE_READ_WRITE"/>)。</li>
<li props="native unreal bp cs">你需要通过 <xref keyref="getObservedFramePosition"/> 设置观测 <apiname keyref="POSITION_PRE_ENCODER"/>(1 &lt;&lt; 2) 后,才能使用该回调获取本地视频编码前的视频数据。</li>
<li props="unity">你需要通过 <xref keyref="registerVideoFrameObserver"/> 的 <parmname>position</parmname> 参数设置观测 <apiname keyref="POSITION_PRE_ENCODER"/>(1 &lt;&lt; 2) 后,才能使用该回调获取本地视频编码前的视频数据。</li>
<li props="rn electron">建议你通过 C++ API 实现该回调。</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<p>成功注册视频数据观测器后,SDK 会在捕捉到每个视频帧时触发该回调。你可以在回调中获取远端发送的渲染前的视频数据,然后根据场景需要,对视频数据进行处理。</p>
<note type="attention" props="native unreal bp electron rn flutter">
<ul>
<li props="native unreal bp">如果你需要将处理后的数据发送给 SDK,需要先调用 <xref keyref="getVideoFrameProcessMode"/> 方法,将视频处理模式设置为读写模式(<ph keyref="PROCESS_MODE_READ_WRITE"/>)。</li>
<li>如果你获取到的视频数据类型为 RGBA,SDK 不支持对 Alpha 通道的值进行处理。</li>
<li props="rn electron">建议你通过 C++ API 实现该回调。</li>
<li props="flutter rn electron">由于框架的限制,该回调不支持将处理后的视频数据发送回 SDK。</li>
Expand Down
Loading

0 comments on commit d68fbdb

Please sign in to comment.