Skip to content

Commit

Permalink
Merge pull request #3740 from AgoraIO/4.4.0-framework-unity
Browse files Browse the repository at this point in the history
4.4.0 framework unity
  • Loading branch information
Suri539 authored Aug 15, 2024
2 parents a114d4f + c6118e1 commit 5c03586
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
<parml>
<plentry>
<pt props="android">player</pt>
<pt props="apple">musicPlayer</pt>
<pt props="cpp">music_player</pt>
<pd props="apple android"><xref keyref="IMusicPlayer"/> 对象。</pd>
<pt props="apple rn electron flutter">musicPlayer</pt>
<pt props="cpp unreal unity cs bp">music_player</pt>
<pd props="apple android framework"><xref keyref="IMusicPlayer"/> 对象。</pd>
<pd props="cpp">指向 <xref keyref="IMusicPlayer"/> 对象的指针。</pd>
</plentry>
</parml> </section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
</section>
<section id="timing" deliveryTarget="details">
<title>触发时机</title>
<p props="android cpp cs apple unity unreal">当你调用 <xref keyref="joinChannel1"/>、<xref keyref="joinChannel2"/>、<xref keyref="joinChannelWithUserAccount1"/>、<xref keyref="joinChannelWithUserAccount2"/>、 <xref keyref="joinChannelEx"/> 或 <xref keyref="joinChannelWithUserAccountEx"/> 方法成功加入频道后,SDK 会触发该回调。</p>
<p props="android cpp cs apple unreal">当你调用 <xref keyref="joinChannel1"/>、<xref keyref="joinChannel2"/>、<xref keyref="joinChannelWithUserAccount1"/>、<xref keyref="joinChannelWithUserAccount2"/>、 <xref keyref="joinChannelEx"/> 或 <xref keyref="joinChannelWithUserAccountEx"/> 方法成功加入频道后,SDK 会触发该回调。</p>
<p props="unity">当你调用 <xref keyref="joinChannel1"/>、<xref keyref="joinChannel2"/>、<xref keyref="joinChannelWithUserAccount1"/>、<xref keyref="joinChannelWithUserAccount2"/>、 <xref keyref="joinChannelEx"/> 方法成功加入频道后,SDK 会触发该回调。</p>
<p props="bp electron flutter rn">当你调用 <xref keyref="joinChannel2"/>、<xref keyref="joinChannelWithUserAccount2"/>、 <xref keyref="joinChannelEx"/> 或 <xref keyref="joinChannelWithUserAccountEx"/> 方法成功加入频道后,SDK 会触发该回调。</p>
<p props="hmos">当你调用 <xref keyref="joinChannel1"/>、<xref keyref="joinChannel2"/> 或 <xref keyref="joinChannelEx"/> 方法成功加入频道后,SDK 会触发该回调。</p>
</section>
Expand Down Expand Up @@ -70,4 +71,4 @@
</plentry>
</parml> </section>
</refbody>
</reference>
</reference>
13 changes: 7 additions & 6 deletions dita/RTC-NG/API/class_externalvideoframe.dita
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@
public EGL_CONTEXT_TYPE eglType;
public int textureId;
public byte[] metadata_buffer;
public int metadata_size;
public int metadataSize;
public byte[] alphaBuffer;
public bool fillAlphaBuffer;
public ALPHA_STITCH_MODE alphaStitchMode;
public IntPtr d3d11_texture_2d;
Expand Down Expand Up @@ -431,25 +432,25 @@ class ExternalVideoFrame {
<pd>该参数仅适用于 Texture 格式的视频数据。指 MetaData 的数据缓冲区,默认值为 <codeph>NULL</codeph>。</pd>
</plentry>
<plentry props="cpp unreal bp unity electron rn cs flutter">
<pt props="bp unity electron rn cs">metadata_size</pt>
<pt props="cpp unreal flutter">metadataSize</pt>
<pt props="bp electron rn cs">metadata_size</pt>
<pt props="cpp unity unreal flutter">metadataSize</pt>
<pd>该参数仅适用于 Texture 格式的视频数据。指 MetaData 的大小,默认值为 <codeph>0</codeph>。</pd>
</plentry>
<plentry conkeyref="VideoFrame/d3d" props="cpp unity electron">
<pt/>
<pd/>
</plentry>
<plentry id="alphabuffer">
<pt props="cpp android">alphaBuffer</pt>
<pt props="cpp android framework">alphaBuffer</pt>
<pt props="apple">alphaBuf</pt>
<pd>
<p>采用人像分割算法输出的 Alpha 通道数据。该数据跟视频帧的尺寸一致,每个像素点的取值范围为 [0,255],其中 0 代表背景;255 代表前景(人像)。</p>
<p>你可以通过设置该参数,实现将视频背景自渲染为各种效果,例如:透明、纯色、图片、视频等。</p>
<note type="attention" props="android">在自定义视频渲染场景下,需确保传入的视频帧和 <parmname>alphaBuffer</parmname> 均为 Full Range 类型;其他类型可能导致 Alpha 数据渲染不正常。</note>
<note type="attention" props="android apple framework">在自定义视频渲染场景下,需确保传入的视频帧和 <parmname>alphaBuffer</parmname> 均为 Full Range 类型;其他类型可能导致 Alpha 数据渲染不正常。</note>
</pd>
</plentry>
<plentry>
<pt props="cpp">fillAlphaBuffer</pt>
<pt props="cpp framework">fillAlphaBuffer</pt>
<pt props="android apple">fillAlphaData</pt>
<pd>该参数仅适用于 BGRA 或 RGBA 格式的视频数据。设置是否提取视频帧中的 Alpha 通道数据并自动填入到 <parmname>alphaBuffer</parmname> 中:
<ul>
Expand Down
8 changes: 5 additions & 3 deletions dita/RTC-NG/API/class_videoframe.dita
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,8 @@ struct FVideoFrame {

public int textureId;

public IntPtr d3d11Texture2d;

public float[] matrix;

public byte[] alphaBuffer;
Expand Down Expand Up @@ -743,17 +745,17 @@ class VideoFrame {
<pd>单个像素的宽高比,即每个像素宽度与高度的比值。</pd>
</plentry>
<plentry id="alphabuffer">
<pt props="cpp android">alphaBuffer</pt>
<pt props="cpp android framework">alphaBuffer</pt>
<pt props="apple">alphaBuf</pt>
<pd>
<p>采用人像分割算法输出的 Alpha 通道数据。该数据跟视频帧的尺寸一致,每个像素点的取值范围为 [0,255],其中 0 代表背景;255 代表前景(人像)。</p>
<p>你可以通过设置该参数,实现将视频背景自渲染为各种效果,例如:透明、纯色、图片、视频等。</p>
<note type="attention" props="android apple">在自定义视频渲染场景下,需确保传入的视频帧和 <parmname>alphaBuffer</parmname> 均为 Full Range 类型;其他类型可能导致 Alpha 数据渲染不正常。</note>
<note type="attention" props="android framework">在自定义视频渲染场景下,需确保传入的视频帧和 <parmname>alphaBuffer</parmname> 均为 Full Range 类型;其他类型可能导致 Alpha 数据渲染不正常。</note>
</pd>
</plentry>
<plentry id="alphastitchmode">
<pt>alphaStitchMode</pt>
<pd>当视频帧中包含 Alpha 通道数据时,设置 <parmname>alphaBuffer</parmname> 和视频帧的相对位置。<ph props="cpp apple">详见 <xref keyref="ALPHA_STITCH_MODE"/>。</ph>
<pd>当视频帧中包含 Alpha 通道数据时,设置 <parmname>alphaBuffer</parmname> 和视频帧的相对位置。<ph props="cpp apple framework">详见 <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>
Expand Down
1 change: 1 addition & 0 deletions dita/RTC-NG/API/rtc_api_data_type.dita
Original file line number Diff line number Diff line change
Expand Up @@ -1628,6 +1628,7 @@
<li><xref keyref="VOICE_CONVERSION_PRESET"/></li>
</ul>
<ul props="unity">
<li><xref keyref="ALPHA_STITCH_MODE"/></li>
<li><xref keyref="AREA_CODE"/></li>
<li><xref keyref="AUDIENCE_LATENCY_LEVEL_TYPE"/></li>
<li><xref keyref="AUDIO_AINS_MODE"/></li>
Expand Down
5 changes: 0 additions & 5 deletions dita/RTC-NG/RTC_NG_API_Unity.ditamap
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,6 @@
<topicref href="API/toc_mediaplayer_open.dita" chunk="to-content">
<topicref keyref="open" toc="no"/>
<topicref keyref="open2" toc="no" processing-role="resource-only"/>
<topicref keyref="openWithCustomSource" toc="no"/>
<topicref keyref="openWithMediaSource" toc="no"/>
<topicref keyref="preloadSrc" toc="no"/>
<topicref keyref="switchSrc" toc="no"/>
Expand Down Expand Up @@ -745,8 +744,6 @@
<topicref keyref="sendCustomReportMessageEx" toc="no"/>
<topicref keyref="setAVSyncSource" toc="no" props="cn"/>
<topicref keyref="setCloudProxy" toc="no"/>
<topicref keyref="setEncryptionMode" toc="no"/>
<topicref keyref="setEncryptionSecret" toc="no"/>
<topicref keyref="setLocalAccessPoint" toc="no" props="cn"/>
<topicref keyref="setLogFile" toc="no"/>
<topicref keyref="setLogFileSize" toc="no"/>
Expand All @@ -755,8 +752,6 @@
<topicref keyref="setParameters" toc="no"/>
<topicref keyref="setParameters_IAgoraParameter" toc="no"/>
<topicref keyref="setRemoteSubscribeFallbackOption" toc="no"/>
<topicref keyref="startEchoTest1" toc="no"/>
<topicref keyref="startEchoTest2" toc="no"/>
<topicref keyref="startEchoTest3" toc="no"/>
<topicref keyref="startLastmileProbeTest" toc="no"/>
<topicref keyref="stopEchoTest" toc="no"/>
Expand Down
95 changes: 55 additions & 40 deletions dita/RTC-NG/config/keys-rtc-ng-api-unity.ditamap
Original file line number Diff line number Diff line change
Expand Up @@ -797,13 +797,7 @@
</keywords>
</topicmeta>
</keydef>
<keydef keys="openWithCustomSource" href="../API/api_imediaplayer_openwithcustomsource.dita">
<topicmeta>
<keywords>
<keyword>OpenWithCustomSource</keyword>
</keywords>
</topicmeta>
</keydef>

<keydef keys="openWithAgoraCDNSrc" href="../API/api_imediaplayer_openwithagoracdnsrc.dita" props="hide">
<topicmeta>
<keywords>
Expand Down Expand Up @@ -2464,24 +2458,10 @@
</keydef>
</topichead>
<topichead navtitle="通话前网络测试">
<keydef keys="startEchoTest1" href="../API/api_irtcengine_startechotest.dita">
<topicmeta>
<keywords>
<keyword>StartEchoTest [1/3]</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="startEchoTest2" href="../API/api_irtcengine_startechotest2.dita">
<topicmeta>
<keywords>
<keyword>StartEchoTest [2/3]</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="startEchoTest3" href="../API/api_irtcengine_startechotest3.dita">
<topicmeta>
<keywords>
<keyword>StartEchoTest [3/3]</keyword>
<keyword>StartEchoTest</keyword>
</keywords>
</topicmeta>
</keydef>
Expand Down Expand Up @@ -2767,28 +2747,28 @@
</keywords>
</topicmeta>
</keydef>
<keydef keys="OnExtensionEventWithContext" href="../API/callback_irtcengineeventhandler_onextensioneventwithcontext.dita">
<keydef keys="onExtensionEventWithContext" href="../API/callback_irtcengineeventhandler_onextensioneventwithcontext.dita">
<topicmeta>
<keywords>
<keyword>OnExtensionEventWithContext</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="OnExtensionStartedWithContext" href="../API/callback_irtcengineeventhandler_onextensionstartedwithcontext.dita">
<keydef keys="onExtensionStartedWithContext" href="../API/callback_irtcengineeventhandler_onextensionstartedwithcontext.dita">
<topicmeta>
<keywords>
<keyword>OnExtensionStartedWithContext</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="OnExtensionStoppedWithContext" href="../API/callback_irtcengineeventhandler_onextensionstoppedwithcontext.dita">
<keydef keys="onExtensionStoppedWithContext" href="../API/callback_irtcengineeventhandler_onextensionstoppedwithcontext.dita">
<topicmeta>
<keywords>
<keyword>OnExtensionStoppedWithContext</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="OnExtensionErrorWithContext" href="../API/callback_irtcengineeventhandler_onextensionerrorwithcontext.dita">
<keydef keys="onExtensionErrorWithContext" href="../API/callback_irtcengineeventhandler_onextensionerrorwithcontext.dita">
<topicmeta>
<keywords>
<keyword>OnExtensionErrorWithContext</keyword>
Expand Down Expand Up @@ -2889,20 +2869,6 @@
</keywords>
</topicmeta>
</keydef>
<keydef keys="setEncryptionMode" href="../API/api_irtcengine_setencryptionmode.dita">
<topicmeta>
<keywords>
<keyword>SetEncryptionMode</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="setEncryptionSecret" href="../API/api_irtcengine_setencryptionsecret.dita">
<topicmeta>
<keywords>
<keyword>SetEncryptionSecret</keyword>
</keywords>
</topicmeta>
</keydef>
</topichead>
<topichead navtitle="音频采集">
<keydef keys="startAudioRecording1" href="../API/api_irtcengine_startaudiorecording.dita">
Expand Down Expand Up @@ -5050,6 +5016,13 @@
<keyword>ExternalVideoFrame</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="ExtensionContext" href="../API/class_extensioncontext.dita">
<topicmeta>
<keywords>
<keyword>ExtensionContext</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="FocalLengthInfo" href="../API/class_focallengthinfo.dita">
<topicmeta>
Expand Down Expand Up @@ -5566,6 +5539,48 @@
</keydef>
</topichead>
<topichead navtitle="Enums">
<keydef keys="ALPHA_STITCH_MODE" href="../API/enum_alphastitchmode.dita">
<topicmeta>
<keywords>
<keyword>ALPHA_STITCH_MODE</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="NO_ALPHA_STITCH">
<topicmeta>
<keywords>
<keyword>NO_ALPHA_STITCH</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="ALPHA_STITCH_UP">
<topicmeta>
<keywords>
<keyword>ALPHA_STITCH_UP</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="ALPHA_STITCH_BELOW">
<topicmeta>
<keywords>
<keyword>ALPHA_STITCH_BELOW</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="ALPHA_STITCH_LEFT">
<topicmeta>
<keywords>
<keyword>ALPHA_STITCH_LEFT</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="ALPHA_STITCH_RIGHT">
<topicmeta>
<keywords>
<keyword>ALPHA_STITCH_RIGHT</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="AREA_CODE" href="../API/enum_areacode.dita">
<topicmeta>
<keywords>
Expand Down

0 comments on commit 5c03586

Please sign in to comment.