Skip to content

Commit

Permalink
Merge pull request #3316 from AgoraIO/translation/4.x-api-ref
Browse files Browse the repository at this point in the history
New YiCAT updates
  • Loading branch information
Cilla-luodan authored Sep 1, 2023
2 parents cbad6e7 + 933c9cc commit 287eb93
Show file tree
Hide file tree
Showing 17 changed files with 185 additions and 176 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_imediaengine_registervideoframeobserver">
<title><ph keyref="registerVideoFrameObserver" /></title>
<title><ph keyref="registerVideoFrameObserver"/></title>
<shortdesc id="short"><ph id="shortdesc">Registers a raw video frame observer object.</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="registerVideoFrameObserver" />
<indexterm keyref="registerVideoFrameObserver"/>
</keywords>
</metadata>
</prolog>
Expand All @@ -20,13 +20,13 @@
<codeblock props="unity cs" outputclass="language-csharp">public abstract int RegisterVideoFrameObserver(IVideoFrameObserver videoFrameObserver, VIDEO_OBSERVER_FRAME_TYPE formatPreference, VIDEO_OBSERVER_POSITION position, OBSERVER_MODE mode = OBSERVER_MODE.INTPTR);</codeblock>
<codeblock props="rn" outputclass="language-typescript">abstract registerVideoFrameObserver(observer: IVideoFrameObserver): number;</codeblock>
<codeblock props="flutter" outputclass="language-dart">void registerVideoFrameObserver(VideoFrameObserver observer);</codeblock>
<codeblock props="reserve" outputclass="language-cpp" /></p>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>Details</title>
<p>If you want to observe raw video frames (such as YUV or RGBA format), Agora recommends that you implement one <xref keyref="IVideoFrameObserver" /> class with this method.</p>
<p>When calling this method to register a video observer, you can register callbacks in the <apiname keyref="IVideoFrameObserver" /> class as needed. After you successfully register the video frame observer, the SDK triggers the registered callbacks each time a video frame is received.</p>
<p conkeyref="registerVideoEncodedFrameObserver/mix" />
<p>If you want to observe raw video frames (such as YUV or RGBA format), Agora recommends that you implement one <xref keyref="IVideoFrameObserver"/> class with this method.</p>
<p>When calling this method to register a video observer, you can register callbacks in the <apiname keyref="IVideoFrameObserver"/> class as needed. After you successfully register the video frame observer, the SDK triggers the registered callbacks each time a video frame is received.</p>
<p conkeyref="registerVideoEncodedFrameObserver/mix"/>
<note type="attention">
<ul>
<li>Ensure that you call this method before joining a channel.</li>
Expand All @@ -35,42 +35,39 @@
<li>If the user adjusts the video profile, the resolution of the video returned in the callbacks also changes.</li>
</ul></li>
</ul> </note>
<note type="tip" props="android ios cpp unreal bp unity flutter rn cs">After registering the raw video observer, you can use the obtained raw video data in various video pre-processing scenarios, such as implementing virtual backgrounds and image enhacement scenarios by yourself, Agora provides some open source sample projects on GitHub for your reference.<ul>
<li><xref keyref="faceunity-link" /></li>
<li><xref keyref="bytedeffect-link" /></li></ul>
</note></section>
<note type="tip" props="android ios">After registering the raw video observer, you can use the obtained raw video data in various video pre-processing scenarios, such as implementing virtual backgrounds and image enhacement scenarios by yourself, Agora provides an open source sample project <xref keyref="beautyapi-link"/> on GitHub for your reference.</note></section>
<section id="parameters">
<title>Parameters</title>
<parml>
<plentry>
<pt props="android cpp unreal bp electron rn flutter">observer</pt>
<pt props="ios mac">delegate</pt>
<pt props="unity cs">videoFrameObserver</pt>
<pd><ph>The observer instance. See <xref keyref="IVideoFrameObserver" />. </ph><ph props="android cpp unreal bp ios mac unity cs">To release the instance, set the value as <ph keyref="NULL" />.</ph></pd>
<pd><ph>The observer instance. See <xref keyref="IVideoFrameObserver"/>. </ph><ph props="android cpp unreal bp ios mac unity cs">To release the instance, set the value as <ph keyref="NULL"/>.</ph></pd>
</plentry>
<plentry props="unity cs">
<pt>mode</pt>
<pd>The video data callback mode. See <xref keyref="OBSERVER_MODE" />.</pd>
<pd>The video data callback mode. See <xref keyref="OBSERVER_MODE"/>.</pd>
</plentry>
<plentry props="unity">
<pt>formatPreference</pt>
<pd>The video frame type. See <xref keyref="VIDEO_OBSERVER_FRAME_TYPE" />.</pd>
<pd>The video frame type. See <xref keyref="VIDEO_OBSERVER_FRAME_TYPE"/>.</pd>
</plentry>
<plentry props="unity">
<pt>position</pt>
<pd>A bit mask that controls the frame position of the video observer. See <xref keyref="VIDEO_MODULE_POSITION" />.</pd>
<pd>A bit mask that controls the frame position of the video observer. See <xref keyref="VIDEO_MODULE_POSITION"/>.</pd>
</plentry>
</parml> </section>
<section id="return_values">
<title><ph keyref="return-section-title" /></title>
<p props="flutter">When the method call succeeds, there is no return value; when fails, the <xref keyref="AgoraRtcException" /> exception is thrown; and you need to catch the exception and handle it accordingly.</p>
<title><ph keyref="return-section-title"/></title>
<p props="flutter">When the method call succeeds, there is no return value; when fails, the <xref keyref="AgoraRtcException"/> exception is thrown; and you need to catch the exception and handle it accordingly.</p>
<ul>
<li props="android cpp unreal bp electron rn unity cs">0: Success.</li>
<li>&lt; 0: Failure.</li>
</ul>
<ul props="ios mac">
<li><codeph><ph keyref="true" /></codeph>: Success.</li>
<li><codeph><ph keyref="false" /></codeph>: Failure.</li>
<li><codeph><ph keyref="true"/></codeph>: Success.</li>
<li><codeph><ph keyref="false"/></codeph>: Failure.</li>
</ul> </section>
</refbody>
</reference>
</reference>
6 changes: 3 additions & 3 deletions en-US/dita/RTC-NG/API/api_irtcengine_enablevideo.dita
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<codeblock props="unity cs" outputclass="language-csharp">public abstract int EnableVideo();</codeblock>
<codeblock props="rn" outputclass="language-typescript">abstract enableVideo(): number;</codeblock>
<codeblock props="flutter" outputclass="language-dart">Future&lt;void&gt; enableVideo();</codeblock>
<codeblock props="reserve" outputclass="language-cpp" /></p>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>Details</title>
Expand All @@ -38,8 +38,8 @@
<li>A successful call of this method resets <apiname keyref="enableLocalVideo" />, <apiname keyref="muteRemoteVideoStream" />, and <apiname keyref="muteAllRemoteVideoStreams" />. Proceed it with caution.</li>
</ul> </note> </section>
<section id="return_values">
<title><ph keyref="return-section-title" /></title>
<p props="flutter">When the method call succeeds, there is no return value; when fails, the <xref keyref="AgoraRtcException" /> exception is thrown; and you need to catch the exception and handle it accordingly.</p>
<title><ph keyref="return-section-title"/></title>
<p props="flutter">When the method call succeeds, there is no return value; when fails, the <xref keyref="AgoraRtcException"/> exception is thrown; and you need to catch the exception and handle it accordingly.</p>
<ul>
<li props="native unreal bp electron unity rn cs">0: Success.</li>
<li>&lt; 0: Failure.</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
<codeblock props="unity cs" outputclass="language-csharp">public abstract int MuteAllRemoteVideoStreams(bool mute);</codeblock>
<codeblock props="rn" outputclass="language-typescript">abstract muteAllRemoteVideoStreams(mute: boolean): number;</codeblock>
<codeblock props="flutter" outputclass="language-dart">Future&lt;void&gt; muteAllRemoteVideoStreams(bool mute);</codeblock>
<codeblock props="reserve" outputclass="language-cpp" /></p>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>Details</title>
<p id="desc">After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.</p>
<note type="attention" id="note"><ul>
<li>Call this method after joining a channel.</li>
<li>If you do not want to subscribe the video streams of remote users before joining a channel, you can call <xref keyref="joinChannel2" /> and set <parmname>autoSubscribeVideo</parmname> as <codeph><ph keyref="false" /></codeph>.</li>
<li>If you do not want to subscribe the video streams of remote users before joining a channel, you can call <xref keyref="joinChannel2"/> and set <parmname>autoSubscribeVideo</parmname> as <codeph><ph keyref="false"/></codeph>.</li>
</ul></note>
</section>
<section id="parameters">
Expand All @@ -45,8 +45,8 @@
</plentry>
</parml> </section>
<section id="return_values">
<title><ph keyref="return-section-title" /></title>
<p props="flutter">When the method call succeeds, there is no return value; when fails, the <xref keyref="AgoraRtcException" /> exception is thrown; and you need to catch the exception and handle it accordingly.</p>
<title><ph keyref="return-section-title"/></title>
<p props="flutter">When the method call succeeds, there is no return value; when fails, the <xref keyref="AgoraRtcException"/> exception is thrown; and you need to catch the exception and handle it accordingly.</p>
<ul>
<li props="native unreal bp electron unity rn cs">0: Success.</li>
<li> &lt; 0: Failure.</li>
Expand Down
20 changes: 10 additions & 10 deletions en-US/dita/RTC-NG/API/api_irtcengine_mutelocalvideostream.dita
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_irtcengine_mutelocalvideostream">
<title><ph keyref="muteLocalVideoStream" /> </title>
<title><ph keyref="muteLocalVideoStream"/> </title>
<shortdesc id="short"><ph id="shortdesc">Stops or resumes publishing the local video stream.</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="muteLocalVideoStream" />
<indexterm keyref="muteLocalVideoStream"/>
</keywords>
</metadata>
</prolog>
Expand All @@ -20,14 +20,14 @@
<codeblock props="unity cs" outputclass="language-csharp">public abstract int MuteLocalVideoStream(bool mute);</codeblock>
<codeblock props="rn" outputclass="language-typescript">abstract muteLocalVideoStream(mute: boolean): number;</codeblock>
<codeblock props="flutter" outputclass="language-dart">Future&lt;void&gt; muteLocalVideoStream(bool mute);</codeblock>
<codeblock props="reserve" outputclass="language-cpp" /></p>
<codeblock props="reserve" outputclass="language-cpp"/></p>
</section>
<section id="detailed_desc">
<title>Details</title>
<p>A successful call of this method triggers the <xref keyref="onUserMuteVideo" /> callback on the remote client.</p>
<p>A successful call of this method triggers the <xref keyref="onUserMuteVideo"/> callback on the remote client.</p>
<note type="attention">
<ul id="ul_ogk_hwc_f4b">
<li>This method executes faster than the <xref keyref="enableLocalVideo" />(<codeph><ph keyref="false" /></codeph>) method, which controls the sending of the local video stream.</li>
<li>This method executes faster than the <xref keyref="enableLocalVideo"/>(<codeph><ph keyref="false"/></codeph>) method, which controls the sending of the local video stream.</li>
<li>This method does not affect any ongoing video recording, because it does not disable the camera.</li>
</ul> </note> </section>
<section id="parameters">
Expand All @@ -38,18 +38,18 @@
<pt props="ios mac cpp unreal bp unity flutter rn electron cs">mute</pt>
<pd>
<p>Whether to stop publishing the local video stream.<ul>
<li><codeph><ph keyref="true" /></codeph>: Stop publishing the local video stream.</li>
<li><codeph><ph keyref="false" /></codeph>: (Default) Publish the local video stream.</li>
<li><codeph><ph keyref="true"/></codeph>: Stop publishing the local video stream.</li>
<li><codeph><ph keyref="false"/></codeph>: (Default) Publish the local video stream.</li>
</ul> </p>
</pd>
</plentry>
</parml> </section>
<section id="return_values">
<title><ph keyref="return-section-title" /></title>
<p props="flutter">When the method call succeeds, there is no return value; when fails, the <xref keyref="AgoraRtcException" /> exception is thrown; and you need to catch the exception and handle it accordingly.</p>
<title><ph keyref="return-section-title"/></title>
<p props="flutter">When the method call succeeds, there is no return value; when fails, the <xref keyref="AgoraRtcException"/> exception is thrown; and you need to catch the exception and handle it accordingly.</p>
<ul id="ul_gkv_dxc_f4b">
<li props="native unreal bp electron unity rn cs">0: Success.</li>
<li>&lt; 0: Failure.</li>
</ul> </section>
</refbody>
</reference>
</reference>
22 changes: 16 additions & 6 deletions en-US/dita/RTC-NG/API/api_irtcengine_setchannelprofile.dita
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
<codeblock props="unity cs" outputclass="language-csharp">public abstract int SetChannelProfile(CHANNEL_PROFILE_TYPE profile);</codeblock>
<codeblock props="rn" outputclass="language-typescript">abstract setChannelProfile(profile: ChannelProfileType): number;</codeblock>
<codeblock props="flutter" outputclass="language-dart">Future&lt;void&gt; setChannelProfile(ChannelProfileType profile);</codeblock>
<codeblock props="reserve" outputclass="language-cpp" /></p>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<title>Details</title>
<p>After initializing the SDK, the default channel profile is the live streaming profile. You can call this method to set the usage scenario of the channel. For example, it prioritizes smoothness and low latency for a video call, and prioritizes video quality for the interactive live video streaming.</p>
<p>After initializing the SDK, the default channel profile is the live streaming profile. You can call this method to set the channel profile. The Agora SDK differentiates channel profiles and applies optimization algorithms accordingly. For example, it prioritizes smoothness and low latency for a video call and prioritizes video quality for interactive live video streaming.</p>
<note type="attention">
<ul id="ul_mgd_h2l_b4b">
<li>To ensure the quality of real-time communication, Agora recommends that all users in a channel use the same channel profile.</li>
Expand All @@ -42,15 +42,25 @@
<p props="android">The channel profile.<ul>
<li><ph keyref="CHANNEL_PROFILE_COMMUNICATION" />(0): Communication. Use this profile when there are only two users in the channel.</li>
<li><ph keyref="CHANNEL_PROFILE_LIVE_BROADCASTING" />(1): Live streaming. Use this profile when there are more than two users in the channel.</li>
<li><ph keyref="CHANNEL_PROFILE_GAME" />(2): This profile is deprecated.</li>
<li><ph keyref="CHANNEL_PROFILE_CLOUD_GAMING" />(3): Interaction. The scenario is optimized for latency. Use this profile if the use case requires frequent interactions between users.</li>
<li><ph keyref="CHANNEL_PROFILE_GAME" />(2): Gaming.<dl outputclass="deprecated">
<dlentry>
<dt>Deprecated:</dt>
<dd>Use <ph keyref="CHANNEL_PROFILE_LIVE_BROADCASTING"/> instead.</dd>
</dlentry></dl>
</li>
<li><ph keyref="CHANNEL_PROFILE_CLOUD_GAMING" />(3): Interaction. The scenario is optimized for latency. Use this profile if the use case requires frequent interactions between users.<dl outputclass="deprecated">
<dlentry>
<dt>Deprecated:</dt>
<dd>Use <ph keyref="CHANNEL_PROFILE_LIVE_BROADCASTING"/> instead.</dd>
</dlentry></dl>
</li>
</ul> </p>
</pd>
</plentry>
</parml> </section>
<section id="return_values">
<title><ph keyref="return-section-title" /></title>
<p props="flutter">When the method call succeeds, there is no return value; when fails, the <xref keyref="AgoraRtcException" /> exception is thrown; and you need to catch the exception and handle it accordingly.</p>
<title><ph keyref="return-section-title"/></title>
<p props="flutter">When the method call succeeds, there is no return value; when fails, the <xref keyref="AgoraRtcException"/> exception is thrown; and you need to catch the exception and handle it accordingly.</p>
<ul>
<li props="native unreal bp electron unity rn cs">0(ERR_OK): Success.</li>
<li>&lt; 0: Failure.<ul>
Expand Down
Loading

0 comments on commit 287eb93

Please sign in to comment.