Skip to content

Commit

Permalink
class-method relation
Browse files Browse the repository at this point in the history
  • Loading branch information
Suri539 committed Oct 28, 2024
1 parent 440e5bf commit fa453fd
Show file tree
Hide file tree
Showing 9 changed files with 284 additions and 7 deletions.
44 changes: 44 additions & 0 deletions dita/RTC-NG/API/api_canvasconfig_canvasconfig.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_canvasconfig_canvasconfig">
<title><ph keyref="CanvasConfig_CanvasConfig"/></title>
<shortdesc id="short"><ph id="shortdesc">构造一个 CanvasConfig 对象。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="CanvasConfig_CanvasConfig"/>
</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">CanvasConfig() {RteCanvasConfigInit(&amp;c_canvas_config, nullptr);}</codeblock>
<codeblock props="bp" outputclass="language-cpp"/>
<codeblock props="electron" outputclass="language-typescript"/>
<codeblock props="unity cs" outputclass="language-csharp"/>
<codeblock props="rn" outputclass="language-typescript"/>
<codeblock props="flutter" outputclass="language-dart"/> </p>
</section>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<dl outputclass="since">
<dlentry props="native">
<dt>自从</dt>
<dd>v4.5.0</dd>
</dlentry>
</dl>
<p>在进行视频渲染设置之前,你需要调用该方法构造一个 CanvasConfig 对象并进行初始化。//TODO</p>
</section>
<section id="timing" deliveryTarget="details">
<title>调用时机</title>
<p>//TODO</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>调用限制</title>
<p>无。</p>
</section>
</refbody>
</reference>
67 changes: 67 additions & 0 deletions dita/RTC-NG/API/class_canvas.dita
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,71 @@
<reference id="class_canvas">
<title><ph keyref="Canvas"/></title>
<shortdesc id="short"><ph id="shortdesc">该类提供设置播放器视频渲染的方法。</ph></shortdesc>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public class Canvas {
public Canvas(Rte rte, CanvasInitialConfig config);
public void addView(View view, ViewConfig viewConfig) throws RteException;
public void removeView(View view, ViewConfig viewConfig) throws RteException;
public void getConfigs(CanvasConfig config) throws RteException;
public void setConfigs(CanvasConfig config) throws RteException;
}</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">@interface AgoraRteCanvas : NSObject
- (instancetype _Nonnull)initWithRte:(AgoraRte* _Nonnull)rte initialConfig:(AgoraRteCanvasInitialConfig * _Nullable)config;
- (BOOL)getConfigs:(AgoraRteCanvasConfig* _Nonnull)config error:(AgoraRteError* _Nullable)error;
- (BOOL)setConfigs:(AgoraRteCanvasConfig* _Nonnull)config error:(AgoraRteError* _Nullable)error;
- (BOOL)addView:(AgoraRteView * _Nonnull)view config:(AgoraRteViewConfig* _Nullable)config error:(AgoraRteError* _Nullable)error;
- (BOOL)removeView:(AgoraRteView * _Nonnull)view config:(AgoraRteViewConfig* _Nullable)config error:(AgoraRteError* _Nullable)error;
@end</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">class Canvas {
public:
Canvas(Rte *rte, CanvasInitialConfig *initial_config);
bool GetConfigs(CanvasConfig *config, Error *err);
bool SetConfigs(CanvasConfig *config, Error *err);
bool AddView(View *view, ViewConfig *config, rte::Error *err)
bool RemoveView(View *view, ViewConfig *config, rte::Error *err);

};</codeblock>
<codeblock props="bp" outputclass="language-cpp"/>
<codeblock props="electron" outputclass="language-typescript"/>
<codeblock props="unity cs" outputclass="language-csharp"/>
<codeblock props="rn" outputclass="language-typescript"/>
<codeblock props="flutter" outputclass="language-dart"/> </p>
</section>
<section id="detailed_desc">
<dl outputclass="since">
<dlentry props="native">
<dt>自从</dt>
<dd>v4.5.0</dd>
</dlentry>
</dl>
<p/>
</section>
<section id="sub-method">
<title>方法</title>
<parml>
<plentry>
<pt><ph keyref="Canvas_Canvas"/></pt>
<pd>构造一个 Canvas 对象。详见 <xref keyref="Canvas_Canvas"/>。</pd>
</plentry>
<plentry>
<pt><ph keyref="SetConfigs_Canvas"/></pt>
<pd>设置视频的渲染模式。详见 <xref keyref="SetConfigs_Canvas"/>。</pd>
</plentry>
<plentry>
<pt><apiname keyref="GetConfigs_Canvas"/></pt>
<pd>获取当前设置的视频渲染模式。详见 <xref keyref="GetConfigs_Canvas"/>。</pd>
</plentry>
<plentry>
<pt><ph keyref="AddView"/></pt>
<pd>添加一个视图。详见 <xref keyref="AddView"/>。</pd>
</plentry>
<plentry>
<pt><ph keyref="RemoveView"/></pt>
<pd>移除一个视图。详见 <xref keyref="RemoveView"/>。</pd>
</plentry>
</parml> </section>
</refbody>
</reference>
65 changes: 65 additions & 0 deletions dita/RTC-NG/API/class_canvasconfig.dita
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,69 @@
<reference id="class_canvasconfig">
<title><ph keyref="CanvasConfig"/></title>
<shortdesc id="short"><ph id="shortdesc">该类提供设置视频渲染的相关方法。</ph></shortdesc>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public class CanvasConfig {
public void setVideoRenderMode(Constants.VideoRenderMode mode) throws RteException ;
public Constants.VideoRenderMode getVideoRenderMode() throws RteException ;
public void setVideoMirrorMode(Constants.VideoMirrorMode mode) throws RteException ;
public Constants.VideoMirrorMode getVideoMirrorMode() throws RteException ;
}</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">@interface AgoraRteCanvasConfig : NSObject
- (void)setVideoRenderMode:(AgoraRteVideoRenderMode)mode error:(AgoraRteError * _Nullable)error;
- (AgoraRteVideoRenderMode)videoRenderMode:(AgoraRteError * _Nullable)error;
- (void)setVideoMirrorMode:(AgoraRteVideoMirrorMode)mode error:(AgoraRteError* _Nullable)error;
- (AgoraRteVideoMirrorMode)videoMirrorMode:(AgoraRteError * _Nullable)error;
@end</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">class CanvasConfig {
public:
CanvasConfig() {RteCanvasConfigInit(&amp;c_canvas_config, nullptr);}
void SetRenderMode(VideoRenderMode mode, Error *err = nullptr);
VideoRenderMode GetRenderMode(Error *err = nullptr);
void SetMirrorMode(VideoMirrorMode mode, Error *err = nullptr);
VideoMirrorMode GetMirrorMode(Error *err = nullptr);
};
</codeblock>
<codeblock props="bp" outputclass="language-cpp"/>
<codeblock props="electron" outputclass="language-typescript"/>
<codeblock props="unity cs" outputclass="language-csharp"/>
<codeblock props="rn" outputclass="language-typescript"/>
<codeblock props="flutter" outputclass="language-dart"/> </p>
</section>
<section id="detailed_desc">
<dl outputclass="since">
<dlentry props="native">
<dt>自从</dt>
<dd>v4.5.0</dd>
</dlentry>
</dl>
<p/>
</section>
<section id="sub-method">
<title>方法</title>
<parml>
<plentry props="cpp">
<pt><ph keyref="CanvasConfig_CanvasConfig"/></pt>
<pd>构造一个 CanvasConfig 对象。详见 <xref keyref="CanvasConfig_CanvasConfig"/>。</pd>
</plentry>
<plentry>
<pt><ph keyref="SetRenderMode_CanvasConfig"/></pt>
<pd>设置视频的渲染模式。详见 <xref keyref="SetRenderMode_CanvasConfig"/>。</pd>
</plentry>
<plentry>
<pt><ph keyref="GetRenderMode"/></pt>
<pd>获取当前设置视频的渲染模式。详见 <xref keyref="GetRenderMode"/>。</pd>
</plentry>
<plentry>
<pt><ph keyref="SetMirrorMode"/></pt>
<pd>设置视频的镜像模式。详见 <xref keyref="SetMirrorMode"/>。</pd>
</plentry>
<plentry>
<pt><apiname keyref="GetMirrorMode"/></pt>
<pd>获取当前设置的视频镜像模式。详见 <xref keyref="GetMirrorMode"/>。</pd>
</plentry>
</parml> </section>
</refbody>
</reference>
8 changes: 4 additions & 4 deletions dita/RTC-NG/API/class_config.dita
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@
<title>方法</title>
<parml>
<plentry>
<pt><apiname keyref="SetAppId"/></pt>
<pt><ph keyref="SetAppId"/></pt>
<pd>设置 App ID。详见 <xref keyref="SetAppId"/>。</pd>
</plentry>
<plentry>
<pt><apiname keyref="GetAppId"/></pt>
<pt><ph keyref="GetAppId"/></pt>
<pd>获取设置的 App ID。详见 <xref keyref="GetAppId"/>。</pd>
</plentry>
<plentry>
<pt><apiname keyref="SetJsonParameter_Config"/></pt>
<pt><ph keyref="SetJsonParameter_Config"/></pt>
<pd>设置 SDK 的 JSON 配置信息。详见 <xref keyref="SetJsonParameter_Config"/>。</pd>
</plentry>
<plentry>
<pt><apiname keyref="GetJsonParameter_Config"/></pt>
<pt><ph keyref="GetJsonParameter_Config"/></pt>
<pd>获取设置 SDK 的 JSON 配置信息。详见 <xref keyref="GetJsonParameter_Config"/>。</pd>
</plentry>
</parml> </section>
Expand Down
78 changes: 77 additions & 1 deletion dita/RTC-NG/API/class_playerconfig.dita
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,81 @@
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="class_playerconfig">
<title><ph keyref="PlayerConfig"/></title>
<shortdesc id="short"><ph id="shortdesc">播放器设置的接口类。</ph></shortdesc>
<shortdesc id="short"><ph id="shortdesc">该类提供播放器设置的相关方法。</ph></shortdesc>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public class PlayerConfig {

public PlayerConfig();
public void setAutoPlay(boolean autoPlay) throws RteException;
public boolean getAutoPlay() throws RteException;
public void setAbrSubscriptionLayer(Constants.AbrSubscriptionLayer subscriptionLayer) throws RteException;
public Constants.AbrSubscriptionLayer getAbrSubscriptionLayer() throws RteException;
public void setAbrFallbackLayer(Constants.AbrFallbackLayer fallbackLayer) throws RteException;
public Constants.AbrFallbackLayer getAbrFallbackLayer() throws RteException;
}</codeblock>
<codeblock props="hmos" outputclass="language-arkts"/>
<codeblock props="ios mac" outputclass="language-objectivec">@interface AgoraRtePlayerConfig : NSObject
- (void)setAutoPlay:(BOOL)autoPlay error:(AgoraRteError * _Nullable)error;
- (BOOL)autoPlay:(AgoraRteError * _Nullable)error;
- (void)setAbrSubscriptionLayer:(AgoraRteAbrSubscriptionLayer)layer error:(AgoraRteError * _Nullable)error;
- (AgoraRteAbrSubscriptionLayer)abrSubscriptionLayer:(AgoraRteError * _Nullable)error;
- (void)setAbrFallbackLayer:(AgoraRteAbrFallbackLayer)layer error:(AgoraRteError * _Nullable)error;
- (AgoraRteAbrFallbackLayer)abrFallbackLayer:(AgoraRteError * _Nullable)error;
@end</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">class PlayerConfig {
public:
PlayerConfig();//TODO
void SetAutoPlay(bool auto_play, Error *err = nullptr);
bool GetAutoPlay(Error *err = nullptr);
void SetAbrSubscriptionLayer(AbrSubscriptionLayer abr_subscription_layer, Error *err = nullptr);
AbrSubscriptionLayer GetAbrSubscriptionLayer(Error *err = nullptr);
void SetAbrFallbackLayer(AbrFallbackLayer abr_fallback_layer, Error *err = nullptr);
AbrFallbackLayer GetAbrFallbackLayer(Error *err = nullptr);
};</codeblock>
<codeblock props="bp" outputclass="language-cpp"/>
<codeblock props="electron" outputclass="language-typescript"/>
<codeblock props="unity cs" outputclass="language-csharp"/>
<codeblock props="rn" outputclass="language-typescript"/>
<codeblock props="flutter" outputclass="language-dart"/> </p>
</section>
<section id="detailed_desc">
<dl outputclass="since">
<dlentry props="native">
<dt>自从</dt>
<dd>v4.5.0</dd>
</dlentry>
</dl>
<p/>
</section>
<section id="sub-method">
<title>方法</title>
<parml>
<plentry>
<pt><ph keyref="SetAutoPlay"/></pt>
<pd>设置是否自动播放。详见 <xref keyref="SetAutoPlay"/>。</pd>
</plentry>
<plentry>
<pt><ph keyref="GetAutoPlay"/></pt>
<pd>获取自动播放设置。详见 <xref keyref="GetAutoPlay"/>。</pd>
</plentry>
<plentry>
<pt><apiname keyref="SetAbrSubscriptionLayer"/></pt>
<pd>设置订阅的媒体流的质量层级。详见 <xref keyref="SetAbrSubscriptionLayer"/>。</pd>
</plentry>
<plentry>
<pt><ph keyref="GetAbrSubscriptionLayer"/></pt>
<pd>获取所订阅的视频流的质量层级。详见 <xref keyref="GetAbrSubscriptionLayer"/>。</pd>
</plentry>
<plentry>
<pt><ph keyref="SetAbrFallbackLayer"/></pt>
<pd>设置订阅的视频流的回退选项。详见 <xref keyref="SetAbrFallbackLayer"/>。</pd>
</plentry>
<plentry>
<pt><ph keyref="GetAbrFallbackLayer"/></pt>
<pd>获取设置的视频流回退选项。详见 <xref keyref="GetAbrFallbackLayer"/>。</pd>
</plentry>
</parml> </section>
</refbody>
</reference>
2 changes: 2 additions & 0 deletions dita/RTC-NG/API/rtc_api_data_type.dita
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
<li><xref keyref="BeautyOptions"/></li>
<li><xref keyref="CameraCapturerConfiguration"/></li>
<li><xref keyref="CacheStatistics"/></li>
<li><xref keyref="Canvas"/></li>
<li><xref keyref="CanvasConfig"/></li>
<li><xref keyref="ChannelMediaInfo"/></li>
<li><xref keyref="ChannelMediaOptions"/></li>
<li><xref keyref="ChannelMediaRelayConfiguration"/></li>
Expand Down
3 changes: 1 addition & 2 deletions dita/RTC-NG/RTC_NG_API_CPP.ditamap
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
<topicref keyref="IVideoDeviceManager" toc="no"/>
<topicref keyref="IVideoEncodedFrameObserver" toc="no"/>
<topicref keyref="IVideoFrameObserver" toc="no"/>
<topicref keyref="Canvas" toc="no"/>
<topicref keyref="CanvasConfig" toc="no"/>
<topicref keyref="Player" toc="no"/>
<topicref keyref="PlayerConfig" toc="no"/>
<topicref keyref="PlayerObserver" toc="no"/>
Expand Down Expand Up @@ -457,6 +455,7 @@
</topicref>
<topicref href="API/toc_rte_player.dita" chunk="to-content">
<topicref keyref="AddView" toc="no"/>
<topicref keyref="CanvasConfig_CanvasConfig" toc="no"/>
<topicref keyref="Code" toc="no"/>
<topicref keyref="GetInfo" toc="no"/>
<topicref keyref="Message" toc="no"/>
Expand Down
7 changes: 7 additions & 0 deletions dita/RTC-NG/config/keys-rtc-ng-api-cpp.ditamap
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,13 @@
</keywords>
</topicmeta>
</keydef>
<keydef keys="CanvasConfig_CanvasConfig" href="../API/api_canvasconfig_canvasconfig.dita">
<topicmeta>
<keywords>
<keyword>CanvasConfig</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="Code" href="../API/api_error_code.dita">
<topicmeta>
<keywords>
Expand Down
17 changes: 17 additions & 0 deletions dita/RTC-NG/config/relations-rtc-ng-api.ditamap
Original file line number Diff line number Diff line change
Expand Up @@ -3329,6 +3329,7 @@
</relrow>
<relrow>
<relcell>
<topicref keyref="CanvasConfig_CanvasConfig" props="cpp"/>
<topicref keyref="SetMirrorMode"/>
<topicref keyref="SetRenderMode_CanvasConfig"/>
<topicref keyref="GetMirrorMode"/>
Expand Down Expand Up @@ -3396,5 +3397,21 @@
<topicref keyref="PlayerObserver"/>
</relcell>
</relrow>
<relrow props="android">
<relcell>
<topicref keyref="onResult_AsyncCallback"/>
</relcell>
<relcell>
<topicref keyref="AsyncCallback"/>
</relcell>
</relrow>
<relrow props="android">
<relcell>
<topicref keyref="onResult_PlayerGetStatsCallback"/>
</relcell>
<relcell>
<topicref keyref="PlayerGetStatsCallback"/>
</relcell>
</relrow>
</reltable>
</map>

0 comments on commit fa453fd

Please sign in to comment.