Skip to content

Commit

Permalink
Merge branch 'master' into 4.5.0-j
Browse files Browse the repository at this point in the history
  • Loading branch information
jinyuagora authored Oct 29, 2024
2 parents 9265362 + 9bbff5e commit f7f09b8
Show file tree
Hide file tree
Showing 568 changed files with 3,659 additions and 2,610 deletions.
2 changes: 1 addition & 1 deletion dita/RTC-NG/API/api_imediaengine_pushvideoframe.dita
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</section>
<section id="detailed_desc">
<title>详情</title>
<dl outputclass="deprecated" props="android hmos">
<dl outputclass="deprecated" props="android">
<dlentry>
<dt>弃用:</dt>
<dd>如果你需要推送 I422 格式的视频帧,请使用该方法。其他情况下,请改用 <xref keyref="pushVideoFrame3"/>。</dd>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public abstract int registerAudioFrameObserver(IAudioFrameObserver observer);</codeblock>
<codeblock props="hmos" outputclass="language-arkts">public abstract registerAudioFrameObserver(observer:IAudioFrameObserver):number;</codeblock>
<codeblock props="hmos" outputclass="language-arkts"></codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (BOOL)setAudioFrameDelegate:(id&lt;AgoraAudioFrameDelegate&gt; _Nullable)delegate;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual int registerAudioFrameObserver(IAudioFrameObserver* observer) = 0;</codeblock>
<codeblock props="electron" outputclass="language-typescript">abstract registerAudioFrameObserver(observer: IAudioFrameObserver): number;</codeblock>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,10 @@
</section>
<section id="detailed_desc">
<title>详情</title>
<p>如果你只想要观测编码后的视频帧 (如 h.264 格式),而不需要对视频进行解码和渲染,声网推荐你通过该方法注册一个 <xref keyref="IVideoEncodedFrameObserver"/> 类。</p>
<p id="mix">如果你想获取一部分远端用户的原始视频数据 (简称为 A 组)、获取另一部分远端用户的编码后视频数据 (简称为 B 组),可参考以下步骤:

<ol>
<li>在加入频道前调用 <xref keyref="registerVideoFrameObserver"/> 注册原始视频帧观测器。</li>
<li>在加入频道前调用 <xref keyref="registerVideoEncodedFrameObserver"/> 注册编码后的视频帧观测器。</li>
<li>加入频道后通过 <xref keyref="onUserJoined"/> 获取 B 组用户的 ID,然后调用 <xref keyref="setRemoteVideoSubscriptionOptions"/> 设置该组用户的 <parmname>encodedFrameOnly</parmname> 为 <codeph><ph keyref="true"/></codeph>。</li>
<li>调用 <xref keyref="muteAllRemoteVideoStreams"/><codeph>(<ph keyref="false"/>)</codeph>,开始接收所有远端用户的视频流。此时:

<ul>
<li>可通过 <xref keyref="IVideoFrameObserver"/> 中的回调获取 A 组用户的原始视频数据,SDK 默认对该数据进行渲染。</li>
<li>可通过 <xref keyref="IVideoEncodedFrameObserver"/> 中的回调获取 B 组用户的已编码视频数据。</li>
</ul> </li>
</ol> </p>
<p>如果你只想要观测编码后的视频帧 (如 H.264 格式),而不需要对视频进行解码和渲染,声网推荐你通过该方法注册一个 <xref keyref="IVideoEncodedFrameObserver"/> 类。<ph props="android cpp apple">有关详细的实现步骤,详见<xref keyref="video-processing"/>。</ph></p>
<note type="attention">
<ul>
<li>该方法需要在加入频道前调用。</li>
</ul></note> </section>
<p>该方法需要在加入频道前调用。</p>
</note> </section>
<section id="parameters">
<title>参数</title>
<parml>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public abstract int registerVideoFrameObserver(IVideoFrameObserver observer);</codeblock>
<codeblock props="hmos" outputclass="language-arkts">public abstract registerVideoFrameObserver(observer:IVideoFrameObserver):number;</codeblock>
<codeblock props="hmos" outputclass="language-arkts"></codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (BOOL)setVideoFrameDelegate:(id&lt;AgoraVideoFrameDelegate&gt; _Nullable)delegate;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual int registerVideoFrameObserver(IVideoFrameObserver* observer) = 0;</codeblock>
<codeblock props="electron" outputclass="language-typescript">abstract registerVideoFrameObserver(observer: IVideoFrameObserver): number;</codeblock>
Expand All @@ -26,11 +26,10 @@
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<p>如果你想要观测原始视频帧 (如 YUV 或 RGBA 格式),声网推荐你通过该方法注册一个 <xref keyref="IVideoFrameObserver"/> 类。</p>
<p>调用该方法注册视频观测器时,你可以根据需要注册 <apiname keyref="IVideoFrameObserver"/> 类中的回调。在成功注册视频观测器后,SDK 会在捕捉到每个视频帧时,触发你所注册的上述回调。</p>
<p conkeyref="registerVideoEncodedFrameObserver/mix"/>
</section>
<section id="scenario" deliveryTarget="details">
<title>适用场景</title>
<p>注册原始视频观测器后,你可以将获取到的原始视频数据应用于各种视频前处理场景,例如自行实现虚拟背景、美颜等场景。</p>
<p>注册原始视频观测器后,你可以将获取到的原始视频数据应用于各种视频前处理场景,例如自行实现虚拟背景、美颜等场景。<ph props="android cpp apple">有关详细的实现步骤,详见<xref keyref="video-processing"/>。</ph></p>
<p props="android ios">声网在 GitHub 上提供了开源的示例项目 <xref keyref="beautyapi-link"/> 供你参考。</p>
</section>
<section id="timing" deliveryTarget="details">
Expand Down
3 changes: 2 additions & 1 deletion dita/RTC-NG/API/api_imediaengine_setexternalvideosource.dita
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<p>调用该方法启用外部视频源后,你可以调用 <xref keyref="pushVideoFrame"/> 向 SDK 推送外部视频数据。</p>
<p props="android cpp apple framework">调用该方法启用外部视频源后,你可以调用 <xref keyref="pushVideoFrame"/> 向 SDK 推送外部视频数据。</p>
<p props="hmos">调用该方法启用外部视频源后,你可以调用 <xref keyref="pushVideoFrame3"/> 向 SDK 推送外部视频数据。</p>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
Expand Down
2 changes: 1 addition & 1 deletion dita/RTC-NG/API/api_imediaplayer_adjustplayoutvolume.dita
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">int adjustPlayoutVolume(int volume);</codeblock>
<codeblock props="hmos" outputclass="language-arkts"></codeblock>
<codeblock props="hmos" outputclass="language-arkts">public abstract adjustPlayoutVolume(vol: number): number;</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (int)adjustPlayoutVolume:(int)volume;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual int adjustPlayoutVolume(int volume) = 0;</codeblock>
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|IMediaPlayer&quot;)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">int adjustPublishSignalVolume(int volume);</codeblock>
<codeblock props="hmos" outputclass="language-arkts"></codeblock>
<codeblock props="hmos" outputclass="language-arkts">public abstract adjustPublishSignalVolume(volume:number):number;</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (int)adjustPublishSignalVolume:(int)volume;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual int adjustPublishSignalVolume(int volume) = 0;</codeblock>
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|IMediaPlayer&quot;)
Expand Down
4 changes: 2 additions & 2 deletions dita/RTC-NG/API/api_imediaplayer_getduration.dita
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">long getDuration();</codeblock>
<codeblock props="hmos" outputclass="language-arkts"></codeblock>
<codeblock props="hmos" outputclass="language-arkts">public abstract getDuration():number;</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (NSInteger)getDuration;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual int getDuration(int64_t&amp; duration) = 0;</codeblock>
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|IMediaPlayer&quot;)
Expand All @@ -40,7 +40,7 @@
<li>&lt; 0: 方法调用失败。<ph props="cn">详见<xref keyref="error-code-link"/>了解详情和解决建议。</ph></li>
</ul>
<p props="electron rn flutter">媒体文件总时长(毫秒)。</p>
<ul props="apple android">
<ul props="apple android hmos">
<li>方法调用成功时,返回媒体资源的总时长,单位毫秒。</li>
<li>≤ 0:方法调用失败。<ph props="cn">详见<xref keyref="error-code-link"/>了解详情和解决建议。</ph></li>
</ul></section>
Expand Down
2 changes: 1 addition & 1 deletion dita/RTC-NG/API/api_imediaplayer_getmediaplayerid.dita
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">int getMediaPlayerId();</codeblock>
<codeblock props="hmos" outputclass="language-arkts"></codeblock>
<codeblock props="hmos" outputclass="language-arkts">public abstract getMediaPlayerId():number;</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (int)getMediaPlayerId;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual int getMediaPlayerId() const = 0; </codeblock>
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|IMediaPlayer&quot;)
Expand Down
4 changes: 2 additions & 2 deletions dita/RTC-NG/API/api_imediaplayer_getmute.dita
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">boolean getMute();</codeblock>
<codeblock props="hmos" outputclass="language-arkts"></codeblock>
<codeblock props="hmos" outputclass="language-arkts">public abstract getMute(): boolean;</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (bool)getMute;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual int getMute(bool&amp; mute) = 0;</codeblock>
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|IMediaPlayer&quot;)
Expand Down Expand Up @@ -44,7 +44,7 @@
<li>0: 方法调用成功。</li>
<li>&lt; 0: 方法调用失败。<ph props="cn">详见<xref keyref="error-code-link"/>了解详情和解决建议。</ph></li>
</ul>
<ul props="electron rn flutter ios mac android">
<ul props="electron rn flutter ios mac android hmos">
<li><codeph><ph keyref="true" /></codeph>:当前播放的媒体文件为静音。</li>
<li><codeph><ph keyref="false" /></codeph>:当前播放的媒体文件没有静音。</li></ul></section>
</refbody>
Expand Down
4 changes: 2 additions & 2 deletions dita/RTC-NG/API/api_imediaplayer_getplayoutvolume.dita
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">int getPlayoutVolume();</codeblock>
<codeblock props="hmos" outputclass="language-arkts"></codeblock>
<codeblock props="hmos" outputclass="language-arkts">public abstract getPlayoutVolume():number</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (int)getPlayoutVolume;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual int getPlayoutVolume(int&amp; volume) = 0;</codeblock>
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|IMediaPlayer&quot;)
Expand Down Expand Up @@ -45,7 +45,7 @@
<li>0: 方法调用成功。</li>
<li>&lt; 0: 方法调用失败。<ph props="cn">详见<xref keyref="error-code-link"/>了解详情和解决建议。</ph></li>
</ul>
<p props="android apple electron rn flutter">返回当前本地播放音量,取值范围从 0 到 100:
<p props="android hmos apple electron rn flutter">返回当前本地播放音量,取值范围从 0 到 100:
<ul>
<li> 0: 无声。</li>
<li>100: (默认)媒体文件的原始播放音量。</li>
Expand Down
2 changes: 1 addition & 1 deletion dita/RTC-NG/API/api_imediaplayer_getplayposition.dita
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">long getPlayPosition();</codeblock>
<codeblock props="hmos" outputclass="language-arkts"></codeblock>
<codeblock props="hmos" outputclass="language-arkts">public abstract getPlayPosition():number;</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (NSInteger)getPosition;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual int getPlayPosition(int64_t&amp; pos) = 0;</codeblock>
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|IMediaPlayer&quot;)
Expand Down
2 changes: 1 addition & 1 deletion dita/RTC-NG/API/api_imediaplayer_getplaysrc.dita
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">String getPlaySrc();</codeblock>
<codeblock props="hmos" outputclass="language-arkts"></codeblock>
<codeblock props="hmos" outputclass="language-arkts">public abstract getPlaySrc():string;</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (NSString *)getPlaySrc;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual const char* getPlaySrc() = 0;</codeblock>
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|IMediaPlayer&quot;)
Expand Down
4 changes: 2 additions & 2 deletions dita/RTC-NG/API/api_imediaplayer_getpublishsignalvolume.dita
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">int getPublishSignalVolume();</codeblock>
<codeblock props="hmos" outputclass="language-arkts"></codeblock>
<codeblock props="hmos" outputclass="language-arkts">public abstract getPublishSignalVolume():number;</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (int)getPublishSignalVolume;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual int getPublishSignalVolume(int&amp; volume) = 0;</codeblock>
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|IMediaPlayer&quot;)
Expand All @@ -39,7 +39,7 @@
<li>0: 方法调用成功。</li>
<li>&lt; 0: 方法调用失败。<ph props="cn">详见<xref keyref="error-code-link"/>了解详情和解决建议。</ph></li>
</ul>
<ul props="android ios mac rn electron flutter">
<ul props="android hmos ios mac rn electron flutter">
<li>≥ 0: 播放文件的远端播放音量。</li>
<li>&lt; 0: 方法调用失败。<ph props="cn">详见<xref keyref="error-code-link"/>了解详情和解决建议。</ph></li>
</ul> </section>
Expand Down
2 changes: 1 addition & 1 deletion dita/RTC-NG/API/api_imediaplayer_getstate.dita
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">Constants.MediaPlayerState getState();</codeblock>
<codeblock props="hmos" outputclass="language-arkts"></codeblock>
<codeblock props="hmos" outputclass="language-arkts">public abstract getState():Constants.MediaPlayerState;</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (AgoraMediaPlayerState)getPlayerState;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual media::base::MEDIA_PLAYER_STATE getState() = 0;</codeblock>
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|IMediaPlayer&quot;)
Expand Down
2 changes: 1 addition & 1 deletion dita/RTC-NG/API/api_imediaplayer_getstreamcount.dita
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">int getStreamCount();</codeblock>
<codeblock props="hmos" outputclass="language-arkts"></codeblock>
<codeblock props="hmos" outputclass="language-arkts">public abstract getStreamCount():number;</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (NSInteger)getStreamCount;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual int getStreamCount(int64_t&amp; count) = 0;</codeblock>
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|IMediaPlayer&quot;)
Expand Down
4 changes: 2 additions & 2 deletions dita/RTC-NG/API/api_imediaplayer_getstreaminfo.dita
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">MediaStreamInfo getStreamInfo(int index);</codeblock>
<codeblock props="hmos" outputclass="language-arkts"></codeblock>
<codeblock props="hmos" outputclass="language-arkts">public abstract getStreamInfo(index:number):MediaStreamInfo|undefined;</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (AgoraMediaStreamInfo *_Nullable)getStreamByIndex:(int)index;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual int getStreamInfo(int64_t index, media::base::PlayerStreamInfo* info) = 0;</codeblock>
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|IMediaPlayer&quot;)
Expand All @@ -40,7 +40,7 @@
<plentry>
<pt>index</pt>
<pd props="cpp unreal bp unity cs">媒体流索引值。该参数需小于 <xref keyref="getStreamCount" /> 的 <parmname>count</parmname> 参数。</pd>
<pd props="android ios mac rn electron flutter">媒体流索引值。该参数的值需小于 <xref keyref="getStreamCount" /> 的返回值。</pd>
<pd props="android hmos ios mac rn electron flutter">媒体流索引值。该参数的值需小于 <xref keyref="getStreamCount" /> 的返回值。</pd>
</plentry>
<plentry props="cpp unreal bp unity cs">
<pt>info</pt>
Expand Down
2 changes: 1 addition & 1 deletion dita/RTC-NG/API/api_imediaplayer_mute.dita
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">int mute(boolean muted);</codeblock>
<codeblock props="hmos" outputclass="language-arkts"></codeblock>
<codeblock props="hmos" outputclass="language-arkts">public abstract mute(muted:boolean) : number;</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (int)mute:(bool)isMute NS_SWIFT_NAME(mute(_:));</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual int mute(bool muted) = 0;</codeblock>
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = &quot;Agora|IMediaPlayer&quot;)
Expand Down
Loading

0 comments on commit f7f09b8

Please sign in to comment.