Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_agorartcmediaplayervideoframedelegate_agorartcmediaplayergetvideopixelformat">
<title><ph keyref="AgoraRtcMediaPlayerGetVideoPixelFormat"/></title>
<shortdesc id="short"><ph id="shortdesc">设置原始视频数据的格式。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="AgoraRtcMediaPlayerGetVideoPixelFormat"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="ios" outputclass="language-objectivec">- (AgoraVideoFormat)AgoraRtcMediaPlayerGetVideoPixelFormat NS_SWIFT_NAME(AgoraRtcMediaPlayerGetVideoPixelFormat());</codeblock>
<codeblock props="mac" outputclass="language-objectivec">- (AgoraVideoFormat)AgoraRtcMediaPlayerGetVideoPixelFormat NS_SWIFT_NAME(AgoraRtcMediaPlayerGetVideoPixelFormat());</codeblock>
</p>
</section>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title" props="ios mac">
<p props="ios">你需要在调用 <xref keyref="registerVideoFrameObserver"/> 方法时注册回调。当媒体播放器接收到每一帧视频时,会触发该回调。你可以在该回调的返回值中设置期望的视频数据格式。</p>
<p props="mac">你需要在调用 <xref keyref="registerVideoFrameObserver"/> 方法时注册回调。当媒体播放器接收到每一帧视频时,会触发该回调。你可以在该回调的返回值中设置期望的视频数据格式。</p>
</section>
<section id="timing" deliveryTarget="details" props="ios mac">
<title>调用时机</title>
<p props="ios">加入频道前后均可调用。</p>
<p props="mac">加入频道前后均可调用。</p>
</section>
<section id="restriction" deliveryTarget="details" props="ios mac">
<title>调用限制</title>
<p props="ios">无。</p>
<p props="mac">无。</p>
</section>
<section id="return_values" props="ios mac">
<title>返回值</title>
<p props="ios">你为原始视频数据设置的期望格式,详见 <xref keyref="VIDEO_PIXEL_FORMAT"/>。默认情况下,原始视频像素格式(<codeph>AgoraVideoFormatDefault</codeph>)可能是 <codeph>I420</codeph> 或 <codeph>CVPixelBufferRef</codeph>。</p>
<p props="mac">你为原始视频数据设置的期望格式,详见 <xref keyref="VIDEO_PIXEL_FORMAT"/>。默认情况下,原始视频像素格式(<codeph>AgoraVideoFormatDefault</codeph>)可能是 <codeph>I420</codeph> 或 <codeph>CVPixelBufferRef</codeph>。</p>
</section>
</refbody>
</reference>
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_agorartcmediaplayervideoframedelegate_didreceivepixelbuffer">
<title><ph keyref="didReceivePixelBuffer"/></title>
<shortdesc id="short"><ph id="shortdesc">媒体播放器接收到视频源的像素缓冲区时触发的回调。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="didReceivePixelBuffer"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="ios" outputclass="language-objectivec">- (void)AgoraRtcMediaPlayer:(id&lt;AgoraRtcMediaPlayerProtocol&gt; _Nonnull)playerKit
didReceivePixelBuffer:(CVPixelBufferRef _Nonnull)pixelBuffer NS_SWIFT_NAME(AgoraRtcMediaPlayer(_:didReceivePixelBuffer:));</codeblock>
<codeblock props="mac" outputclass="language-objectivec">- (void)AgoraRtcMediaPlayer:(id&lt;AgoraRtcMediaPlayerProtocol&gt; _Nonnull)playerKit
didReceivePixelBuffer:(CVPixelBufferRef _Nonnull)pixelBuffer NS_SWIFT_NAME(AgoraRtcMediaPlayer(_:didReceivePixelBuffer:));</codeblock>
</p>
</section>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title" props="ios mac">
<p props="ios">触发该回调以报告类型为 <codeph>CVPixelBufferRef</codeph> 的像素缓冲区的详细信息。你可以使用这些信息进行图像处理与分析、自定义渲染等。</p>
<p props="mac">触发该回调以报告类型为 <codeph>CVPixelBufferRef</codeph> 的像素缓冲区的详细信息。你可以使用这些信息进行图像处理与分析、自定义渲染等。</p>
</section>
<section id="timing" deliveryTarget="details" props="ios mac">
<title>调用时机</title>
<p props="ios">该回调在媒体播放器接收到视频源的像素缓冲区时被触发。</p>
<p props="mac">该回调在媒体播放器接收到视频源的像素缓冲区时被触发。</p>
</section>
<section id="restriction" deliveryTarget="details" props="ios mac">
<title>调用限制</title>
<p props="ios">无。</p>
<p props="mac">无。</p>
</section>
<section id="parameters" deliveryTarget="details" props="ios mac">
<title>参数</title>
<parml>
<plentry props="ios">
<pt>playerKit</pt>
<pd>媒体播放器对象,详见 <xref keyref="IMediaPlayer"/>。</pd>
</plentry>
<plentry props="ios">
<pt>pixelBuffer</pt>
<pd>包含像素缓冲区详细信息的 <codeph>CVPixelBufferRef</codeph> 对象。</pd>
</plentry>
<plentry props="mac">
<pt>playerKit</pt>
<pd>媒体播放器对象,详见 <xref keyref="IMediaPlayer"/>。</pd>
</plentry>
<plentry props="mac">
<pt>pixelBuffer</pt>
<pd>包含像素缓冲区详细信息的 <codeph>CVPixelBufferRef</codeph> 对象。</pd>
</plentry>
</parml>
</section>
</refbody>
</reference>
145 changes: 145 additions & 0 deletions dita/RTC-AIDOC/API/api_canvas_addview.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_canvas_addview">
<title><ph keyref="AddView"/></title>
<shortdesc id="short"><ph id="shortdesc">添加一个渲染视图。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="AddView"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="cpp" outputclass="language-cpp">bool AddView(View *view, ViewConfig *config, rte::Error *err = nullptr)</codeblock>
<codeblock props="android" outputclass="language-java">public void addView(View view, ViewConfig viewConfig) throws RteException</codeblock>
<codeblock props="ios" outputclass="language-objectivec">- (BOOL)addView:(AgoraRteView * _Nonnull)view config:(AgoraRteViewConfig* _Nullable)config error:(AgoraRteError* _Nullable)error;</codeblock>
<codeblock props="mac" outputclass="language-objectivec">- (BOOL)addView:(AgoraRteView * _Nonnull)view config:(AgoraRteViewConfig* _Nullable)config error:(AgoraRteError* _Nullable)error;</codeblock>
</p>
</section>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title" props="android cpp ios mac">
<dl outputclass="since">
<dlentry props="cpp">
<dt>自从</dt>
<dd>自 v4.4.0 版本新增。</dd>
</dlentry>
<dlentry props="android">
<dt>自从</dt>
<dd>自 v4.4.0 版本新增。</dd>
</dlentry>
<dlentry props="ios">
<dt>自从</dt>
<dd>自 v4.4.0 版本新增。</dd>
</dlentry>
<dlentry props="mac">
<dt>自从</dt>
<dd>自 v4.4.0 版本新增。</dd>
</dlentry>
</dl>
<p props="cpp">调用该方法可向视频渲染器添加一个视图,用于显示视频内容。该方法适用于使用播放器播放视频的场景。此方法必须在调用 <xref keyref="SetCanvas"/> 之前调用。</p>
<p props="android">调用该方法可将一个视图添加到视频渲染器中,以显示视频内容。</p>
<p props="ios">你可以调用该方法将视图添加到视频渲染器中,以显示视频内容。</p>
<p props="mac">你可以调用该方法将视图添加到视频渲染器中,以显示视频内容。</p>
<note props="cpp">当前仅支持一个视图。</note>
<note props="android">当前仅支持一个视图。</note>
<note props="ios">当前仅支持一个视图。</note>
<note props="mac">当前仅支持一个视图。</note>
</section>
<section id="timing" deliveryTarget="details" props="android cpp ios mac">
<title>调用时机</title>
<p props="cpp">此方法必须在调用 <xref keyref="SetCanvas"/> 之前调用。</p>
<p props="android">必须在调用 <xref keyref="SetCanvas"/> 之前调用该方法。</p>
<p props="ios">你必须在调用 <xref keyref="SetCanvas"/> 之前调用此方法。</p>
<p props="mac">你必须在调用 <xref keyref="SetCanvas"/> 之前调用此方法。</p>
</section>
<section id="restriction" deliveryTarget="details" props="android cpp ios mac">
<title>调用限制</title>
<p props="cpp">无。</p>
<p props="android">无。</p>
<p props="ios">无。</p>
<p props="mac">无。</p>
</section>
<section id="parameters" deliveryTarget="details" props="android cpp ios mac">
<title>参数</title>
<parml>
<plentry props="cpp">
<pt>view</pt>
<pd>窗口句柄。</pd>
</plentry>
<plentry props="cpp">
<pt>config</pt>
<pd><codeph>View</codeph> 对象的设置,目前传入 <xref keyref="NULL"/>。</pd>
</plentry>
<plentry props="cpp">
<pt>err</pt>
<pd>输出参数,状态或错误信息,详见 <xref keyref="Error"/>。</pd>
</plentry>
<plentry props="android">
<pt>view</pt>
<pd><codeph>SurfaceView</codeph> 对象。</pd>
</plentry>
<plentry props="android">
<pt>viewConfig</pt>
<pd><codeph>View</codeph> 对象的设置。详见 <codeph>ViewConfig</codeph>。</pd>
</plentry>
<plentry props="ios">
<pt>view</pt>
<pd>视图对象的指针。
<ul>
<li>iOS:一个 <codeph>UIView</codeph> 对象。</li>
<li>macOS:一个 <codeph>NSView</codeph> 对象。</li>
</ul>
</pd>
</plentry>
<plentry props="ios">
<pt>config</pt>
<pd>视图对象的配置。当前请传入 <xref keyref="NULL"/>。详见 <codeph>AgoraRteViewConfig</codeph>。</pd>
</plentry>
<plentry props="ios">
<pt>error</pt>
<pd>状态或错误信息,详见 <xref keyref="Error"/>。</pd>
</plentry>
<plentry props="mac">
<pt>view</pt>
<pd>视图对象的指针。
<ul>
<li>iOS:一个 <codeph>UIView</codeph> 对象。</li>
<li>macOS:一个 <codeph>NSView</codeph> 对象。</li>
</ul>
</pd>
</plentry>
<plentry props="mac">
<pt>config</pt>
<pd>视图对象的配置。当前请传入 <xref keyref="NULL"/>。详见 <codeph>AgoraRteViewConfig</codeph>。</pd>
</plentry>
<plentry props="mac">
<pt>error</pt>
<pd>状态或错误信息,详见 <xref keyref="Error"/>。</pd>
</plentry>
</parml>
</section>
<section id="return_values" props="cpp ios mac">
<title>返回值</title>
<p props="cpp">
<ul>
<li><xref keyref="true"/>:视图添加成功。</li>
<li><xref keyref="false"/>:添加视图失败。</li>
</ul>
</p>
<p props="ios">
<ul>
<li><xref keyref="true"/>:添加视图成功。</li>
<li><xref keyref="false"/>:添加视图失败。</li>
</ul>
</p>
<p props="mac">
<ul>
<li><xref keyref="true"/>:添加视图成功。</li>
<li><xref keyref="false"/>:添加视图失败。</li>
</ul>
</p>
</section>
</refbody>
</reference>
87 changes: 87 additions & 0 deletions dita/RTC-AIDOC/API/api_canvas_canvas_canvas.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_canvas_canvas_canvas">
<title><ph keyref="Canvas_Canvas"/></title>
<shortdesc id="short"><ph id="shortdesc">构造一个 <codeph>Canvas</codeph> 对象。</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="Canvas_Canvas"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="cpp" outputclass="language-cpp">Canvas(Rte *rte, CanvasInitialConfig *initial_config = nullptr)</codeblock>
<codeblock props="android" outputclass="language-java">public Canvas(Rte rte, CanvasInitialConfig config)</codeblock>
<codeblock props="ios" outputclass="language-objectivec">- (instancetype _Nonnull)initWithRte:(AgoraRte* _Nonnull)rte initialConfig:(AgoraRteCanvasInitialConfig * _Nullable)config;</codeblock>
<codeblock props="mac" outputclass="language-objectivec">- (instancetype _Nonnull)initWithRte:(AgoraRte* _Nonnull)rte initialConfig:(AgoraRteCanvasInitialConfig * _Nullable)config;</codeblock>
</p>
</section>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title" props="android ios mac">
<dl outputclass="since">
<dlentry props="android">
<dt>自从</dt>
<dd>自 v4.4.0 版本新增。</dd>
</dlentry>
<dlentry props="ios">
<dt>自从</dt>
<dd>自 v4.4.0 版本新增。</dd>
</dlentry>
<dlentry props="mac">
<dt>自从</dt>
<dd>自 v4.4.0 版本新增。</dd>
</dlentry>
</dl>
</section>
<section id="timing" deliveryTarget="details" props="cpp">
<title>调用时机</title>
<p props="cpp">在调用 <xref keyref="InitMediaEngine"/> 之后调用该方法。</p>
</section>
<section id="restriction" deliveryTarget="details" props="android cpp ios mac">
<title>调用限制</title>
<p props="cpp">无。</p>
<p props="android">无。</p>
<p props="ios">无。</p>
<p props="mac">无。</p>
</section>
<section id="parameters" deliveryTarget="details" props="android cpp ios mac">
<title>参数</title>
<parml>
<plentry props="cpp">
<pt>rte</pt>
<pd><xref keyref="Rte"/> 对象。详见 <xref keyref="Rte"/>。</pd>
</plentry>
<plentry props="cpp">
<pt>initial_config</pt>
<pd><xref keyref="Canvas_Canvas"/> 的配置对象。你可以传入 <xref keyref="NULL"/>。详见 <codeph>CanvasInitialConfig</codeph>。</pd>
</plentry>
<plentry props="android">
<pt>rte</pt>
<pd>用于构造 <xref keyref="Canvas_Canvas"/> 的 <xref keyref="Rte"/> 对象。详见 <xref keyref="Rte"/>。</pd>
</plentry>
<plentry props="android">
<pt>config</pt>
<pd>初始化配置对象。你可以传入 <xref keyref="NULL"/>。详见 <codeph>CanvasInitialConfig</codeph>。</pd>
</plentry>
<plentry props="ios">
<pt>rte</pt>
<pd>用于构造 <xref keyref="Canvas"/> 的 <xref keyref="Rte"/> 对象。详见 <xref keyref="Rte"/>。</pd>
</plentry>
<plentry props="ios">
<pt>config</pt>
<pd>用于初始化的配置对象。你可以传入 <xref keyref="NULL"/>。详见 <codeph>AgoraRteCanvasInitialConfig</codeph>。</pd>
</plentry>
<plentry props="mac">
<pt>rte</pt>
<pd>用于构造 <xref keyref="Canvas"/> 的 <xref keyref="Rte"/> 对象。详见 <xref keyref="Rte"/>。</pd>
</plentry>
<plentry props="mac">
<pt>config</pt>
<pd>用于初始化的配置对象。你可以传入 <xref keyref="NULL"/>。详见 <codeph>AgoraRteCanvasInitialConfig</codeph>。</pd>
</plentry>
</parml>
</section>
</refbody>
</reference>
Loading
Loading