Skip to content

Commit

Permalink
New translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Cilla-luodan committed Nov 7, 2024
1 parent d743c09 commit 5847a93
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
return VIDEO_OBSERVER_FRAME_TYPE.FRAME_TYPE_RGBA;
}</codeblock>
<codeblock props="rn" outputclass="language-typescript"/>
<codeblock props="flutter" outputclass="language-dart"/>
<codeblock props="flutter" outputclass="language-dart"/>
<codeblock props="reserve" outputclass="language-cpp"></codeblock></p>
</section>
<section id="detailed_desc">
<p>You need to register the callback when calling the <xref keyref="registerVideoFrameObserver"/> method. After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. You need to set your preferred video data in the return value of this callback.</p>
<note>The default types of pixel format (<ph keyref="VIDEO_PIXEL_DEFAULT"/>) for the raw video are as follows:<ul>
<li props="android cpp bp unreal">On the Android platform, the default video frame type may be I420Buffer or TextureBuffer. As of v4.2.3, the texture formats of TextureBuffer type no longer include OES format, only RGB format is available. You need to add support for I420 and RGB texture formats when processing video data. The cases where the video frame type is fixed as I420Buffer include but are not limited to:<ul>
<li props="android cpp bp unreal">On the Android platform, the default video frame type may be I420Buffer or TextureBuffer. The cases where the video frame type is fixed as I420Buffer include but are not limited to:<ul>
<li>Specific devices, such as: LG G5 SE (H848), Google Pixel 4a, Samsung Galaxy A7, or Xiaomi Mi Max.</li>
<li>Image enhancement extension has been integrated and video noise reduction or low-light enhancement function has been enabled.</li>
</ul></li>
Expand Down
50 changes: 22 additions & 28 deletions en-US/dita/RTC-NG/API/class_channelmediarelayconfiguration.dita
Original file line number Diff line number Diff line change
Expand Up @@ -8,60 +8,53 @@
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public class ChannelMediaRelayConfiguration {
private ChannelMediaInfo srcInfo = null;
private Map&lt;String, ChannelMediaInfo> destInfos = null;

private Map&lt;String, ChannelMediaInfo&gt; destInfos = null;
public ChannelMediaRelayConfiguration() {
destInfos = new HashMap&lt;String, ChannelMediaInfo>();
destInfos = new HashMap&lt;String, ChannelMediaInfo&gt;();
srcInfo = new ChannelMediaInfo(null, null, 0);
}

public void setSrcChannelInfo(ChannelMediaInfo srcInfo) {
this.srcInfo = srcInfo;
}

public void setDestChannelInfo(String channelName, ChannelMediaInfo destInfo) {
destInfos.put(channelName, destInfo);
}

public void removeDestChannelInfo(String channelName) {
destInfos.remove(channelName);
}

public ChannelMediaInfo getSrcChannelMediaInfo() {
return srcInfo;
}

public Map&lt;String, ChannelMediaInfo> getDestChannelMediaInfos() {
public Map&lt;String, ChannelMediaInfo&gt; getDestChannelMediaInfos() {
return destInfos;
}
}
</codeblock>
}</codeblock>
<codeblock props="hmos" outputclass="language-arkts">export class ChannelMediaRelayConfiguration {
public srcInfo:ChannelMediaInfo = new ChannelMediaInfo(null,null,0);
public destInfos:Map&lt;string, ChannelMediaInfo&gt; = new Map&lt;string, ChannelMediaInfo&gt;();

public setSrcChannelInfo(srcInfo: ChannelMediaInfo) {
this.srcInfo = srcInfo;
}</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">__attribute__((visibility("default"))) @interface AgoraChannelMediaRelayConfiguration: NSObject

<codeblock props="ios mac" outputclass="language-objectivec">__attribute__((visibility(&quot;default&quot;))) @interface AgoraChannelMediaRelayConfiguration: NSObject
@property (strong, nonatomic, readonly) NSDictionary&lt;NSString *, AgoraChannelMediaRelayInfo *&gt; *_Nullable destinationInfos;
@property (strong, nonatomic) AgoraChannelMediaRelayInfo *_Nonnull sourceInfo;

- (BOOL)setDestinationInfo:(AgoraChannelMediaRelayInfo *_Nonnull)destinationInfo forChannelName:(NSString *_Nonnull)channelName;
- (BOOL)removeDestinationInfoForChannelName:(NSString *_Nonnull)channelName;
- (BOOL)setDestinationInfo:(AgoraChannelMediaRelayInfo *_Nonnull)destinationInfo forChannelName:(NSString *_Nonnull)channelName NS_SWIFT_NAME(setDestinationInfo(_:forChannelName:));
- (BOOL)removeDestinationInfoForChannelName:(NSString *_Nonnull)channelName NS_SWIFT_NAME(removeDestinationInfo(forChannelName:));
@end</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">struct ChannelMediaRelayConfiguration {
ChannelMediaInfo *srcInfo;
ChannelMediaInfo *destInfos;
int destCount;

ChannelMediaRelayConfiguration()
: srcInfo(nullptr)
, destInfos(nullptr)
, destCount(0)
{}
};</codeblock>

ChannelMediaInfo* srcInfo;

ChannelMediaInfo* destInfos;

int destCount;
ChannelMediaRelayConfiguration() : srcInfo(OPTIONAL_NULLPTR), destInfos(OPTIONAL_NULLPTR), destCount(0) {}
};</codeblock>
<codeblock props="bp" outputclass="language-cpp">USTRUCT(BlueprintType)
struct FChannelMediaRelayConfiguration
{
Expand Down Expand Up @@ -153,8 +146,9 @@ public:
<pt>setSrcChannelInfo</pt>
<pd>Sets the information of the source channel. See <xref keyref="setSrcChannelInfo"/>.</pd>
</plentry>
<plentry props="android">
<pt>setDestChannelInfo</pt>
<plentry props="android apple">
<pt props="android">setDestChannelInfo</pt>
<pt props="apple">setDestinationInfo</pt>
<pd>Sets the information of the target channel. See <xref keyref="setDestChannelInfo"/>.</pd>
</plentry>
<plentry props="android apple">
Expand Down
4 changes: 2 additions & 2 deletions en-US/dita/RTC-NG/API/enum_rendermodetype.dita
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<parml>
<plentry>
<pt><ph keyref="RENDER_MODE_HIDDEN"/></pt>
<pd>1: Hidden mode. Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). One dimension of the video may have clipped contents.</pd>
<pd>1: Hidden mode. The priority is to fill the window. Any excess video that does not match the window size will be cropped.</pd>
</plentry>
</parml>
<parml>
<plentry>
<pt><ph keyref="RENDER_MODE_FIT"/></pt>
<pd>2: Fit mode. Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). Areas that are not filled due to disparity in the aspect ratio are filled with black.</pd>
<pd>2: Fit mode. The priority is to ensure that all video content is displayed. Any areas of the window that are not filled due to the mismatch between video size and window size will be filled with black.</pd>
</plentry>
</parml>
<parml>
Expand Down
16 changes: 8 additions & 8 deletions en-US/dita/RTC-NG/API/enum_rteplayerstate.dita
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,35 @@
<parml>
<plentry>
<pt><ph keyref="kRtePlayerStateIdle"/></pt>
<pd>0:空闲状态。</pd>
<pd>0: Idle.</pd>
</plentry>
<plentry>
<pt><ph keyref="kRtePlayerStateOpening"/></pt>
<pd>1:正在打开 URL 资源。 当调用 <xref keyref="OpenWithUrl"/> 后会报告该状态码。</pd>
<pd>1: Opening URL resource. This state code is reported when <xref keyref="OpenWithUrl"/> is called.</pd>
</plentry>
<plentry>
<pt><ph keyref="kRtePlayerStateOpenCompleted"/></pt>
<pd>2:成功打开 URL 资源。 当调用 <xref keyref="OpenWithUrl"/> 成功打开 URL 资源后会报告该状态码。</pd>
<pd>2: Successfully opened URL resource. This state code is reported when <xref keyref="OpenWithUrl"/> successfully opens the URL resource.</pd>
</plentry>
<plentry>
<pt><ph keyref="kRtePlayerStatePlaying"/></pt>
<pd>3:播放中。</pd>
<pd>3: Currently playing.</pd>
</plentry>
<plentry>
<pt><ph keyref="kRtePlayerStatePaused"/></pt>
<pd>4:暂停播放。 当成功调用 <xref keyref="Pause_Player"/> 后会报告该状态码。</pd>
<pd>4: Playback paused. This state code is reported when <xref keyref="Pause_Player"/> is successfully called.</pd>
</plentry>
<plentry>
<pt><ph keyref="kRtePlayerStatePlaybackCompleted"/></pt>
<pd>5:播放完成。 当主播结束推流退出房间后,会报告该状态码。</pd>
<pd>5: Playback completed. This state code is reported when the host ends the stream and exits the room.</pd>
</plentry>
<plentry>
<pt><ph keyref="kRtePlayerStateStopped"/></pt>
<pd>6:停止播放。 当成功调用 <xref keyref="Stop_Player"/> 后会报告该状态码。</pd>
<pd>6: Playback stopped. This state code is reported when <xref keyref="Stop_Player"/> is successfully called.</pd>
</plentry>
<plentry>
<pt><ph keyref="kRtePlayerStateFailed"/></pt>
<pd>7:失败状态。 当内部发生错误时会报告该状态码。 如果你收到该状态,需要先调用 <xref keyref="Stop_Player"/> 然后再调用 <xref keyref="OpenWithUrl"/> 重新打开该资源。</pd>
<pd>7: Failed. This state code is reported when an internal error occurs. If you receive this state, you should first call <xref keyref="Stop_Player"/> and then call <xref keyref="OpenWithUrl"/> to reopen the resource.</pd>
</plentry>
</parml>
</section></refbody>
Expand Down
4 changes: 2 additions & 2 deletions en-US/dita/RTC-NG/API/enum_rtevideorendermode.dita
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<parml>
<plentry>
<pt><ph keyref="kRteVideoRenderModeHidden"/></pt>
<pd>Uniformly scale the video until it fills the visible boundaries (zoomed to fit). Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). One dimension of the video may have clipped contents.</pd>
<pd>0: Video size is scaled proportionally. The priority is to fill the window. Any excess video that does not match the window size will be cropped.</pd>
</plentry>
<plentry>
<pt><ph keyref="kRteVideoRenderModeFit"/></pt>
<pd>1: Hidden mode. Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). Areas that are not filled due to disparity in the aspect ratio are filled with black.</pd>
<pd>1: Video size is scaled proportionally. The priority is to ensure that all video content is displayed. Any areas of the window that are not filled due to the mismatch between video size and window size will be filled with black.</pd>
</plentry>
</parml>
</section></refbody>
Expand Down
12 changes: 10 additions & 2 deletions en-US/dita/RTC-NG/API/rtc_api_data_type.dita
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,11 @@
<li><xref keyref="CanvasConfig"/></li>
<li><xref keyref="ChannelMediaInfo"/></li>
<li><xref keyref="ChannelMediaOptions"/></li>
<li><xref keyref="ChannelMediaRelayConfiguration"/></li>
<li><xref keyref="ChannelMediaRelayConfiguration"/>
<ul>
<li><xref keyref="removeDestChannelInfo"/></li>
<li><xref keyref="setDestChannelInfo"/></li>
</ul> </li>
<li><xref keyref="ClientRoleOptions"/></li>
<li props="cn"><xref keyref="ClimaxSegment"/></li>
<li><xref keyref="ColorEnhanceOptions"/></li>
Expand Down Expand Up @@ -517,7 +521,11 @@
<li><xref keyref="CanvasConfig"/></li>
<li><xref keyref="ChannelMediaInfo"/></li>
<li><xref keyref="ChannelMediaOptions"/></li>
<li><xref keyref="ChannelMediaRelayConfiguration"/></li>
<li><xref keyref="ChannelMediaRelayConfiguration"/>
<ul>
<li><xref keyref="removeDestChannelInfo"/></li>
<li><xref keyref="setDestChannelInfo"/></li>
</ul> </li>
<li><xref keyref="ClientRoleOptions"/></li>
<li><xref keyref="ColorEnhanceOptions"/></li>
<li><xref keyref="CodecCapInfo"/></li>
Expand Down
2 changes: 1 addition & 1 deletion en-US/dita/RTC-NG/API/toc_audiomixer.dita
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="toc_audio_mixing">
<title>本地音频合流</title>
<title>Local audio mixing</title>
<shortdesc id="short"/>
<refbody/>
</reference>

0 comments on commit 5847a93

Please sign in to comment.