Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.5.0 framework #3838

Merged
merged 4 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@
<pt/>
<pd/>
</plentry>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里删掉是因为 bp 和其他框架用的都是另外一个方法,为了方便后面维护就做了一下清理

<plentry props="cpp unreal bp rn unity electron flutter cs" id="type">
<pt>type</pt>
<pd>媒体资源类型,详见 <xref keyref="MEDIA_SOURCE_TYPE"/>。</pd>
</plentry>
<plentry conkeyref="enableVirtualBackground2/sourcetype">
<pt/>
<pd/>
Expand Down
9 changes: 2 additions & 7 deletions dita/RTC-NG/API/api_irtcengine_setvideodenoiseroptions2.dita
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
boolean enabled, VideoDenoiserOptions options, Constants.MediaSourceType sourceType);</codeblock>
<codeblock props="hmos" outputclass="language-arkts"></codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (int)setVideoDenoiserOptions:(BOOL)enable options:(AgoraVideoDenoiserOptions* _Nullable)options sourceType:(AgoraMediaSourceType)sourceType NS_SWIFT_NAME(setVideoDenoiserOptions(_:options:sourceType:));</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">virtual int setVideoDenoiserOptions(bool enabled, const VideoDenoiserOptions&amp; options, agora::media::MEDIA_SOURCE_TYPE type = agora::media::PRIMARY_CAMERA_SOURCE) = 0;</codeblock>
<codeblock props="bp" outputclass="language-cpp">UFUNCTION(BlueprintCallable, Category = "Agora|IRtcEngine")
int SetVideoDenoiserOptions(bool enabled, const FUABT_VideoDenoiserOptions& options, EUABT_MEDIA_SOURCE_TYPE type);</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp"></codeblock>
<codeblock props="bp" outputclass="language-cpp"></codeblock>
<codeblock props="electron" outputclass="language-typescript"></codeblock>
<codeblock props="unity cs" outputclass="language-csharp"></codeblock>
<codeblock props="rn" outputclass="language-typescript"></codeblock>
Expand All @@ -45,10 +44,6 @@
<pt/>
<pd/>
</plentry>
<plentry props="cpp unreal bp rn unity electron flutter cs" conkeyref="setVideoDenoiserOptions/type">
<pt/>
<pd/>
</plentry>
<plentry conkeyref="enableVirtualBackground2/sourcetype">
<pt/>
<pd/>
Expand Down
87 changes: 63 additions & 24 deletions dita/RTC-NG/API/class_mediarecorderconfiguration.dita
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@
}
}</codeblock>
<codeblock props="hmos" outputclass="language-arkts">export class MediaRecorderConfiguration {

public storagePath: string;

public containerFormat: number = AgoraMediaRecorder.CONTAINER_MP4;

public streamType: number = AgoraMediaRecorder.STREAM_TYPE_BOTH;

public maxDurationMs: number = 120000;

public recorderInfoUpdateInterval: number = 0;
public constructor(storagePath: string, containerFormat: number, streamType: number,
maxDurationMs: number, recorderInfoUpdateInterval: number) {
Expand Down Expand Up @@ -138,38 +138,59 @@ struct FMediaRecorderConfiguration
int recorderInfoUpdateInterval;
};</codeblock>
<codeblock props="electron" outputclass="language-typescript">export class MediaRecorderConfiguration {
recorderInfoUpdateInterval?: number;
storagePath?: string;
containerFormat?: MediaRecorderContainerFormat;
streamType?: MediaRecorderStreamType;
maxDurationMs?: number;
recorderInfoUpdateInterval?: number;
width?: number;
height?: number;
fps?: number;
sample_rate?: number;
channel_num?: number;
videoSourceType?: VideoSourceType;
}</codeblock>
}</codeblock>
<codeblock props="unity cs" outputclass="language-csharp">public struct MediaRecorderConfiguration {
public string storagePath;
public MediaRecorderContainerFormat containerFormat;
public MediaRecorderStreamType streamType;
public int maxDurationMs;
public int recorderInfoUpdateInterval;
public int width;
public int height;
public int fps;
public int sample_rate;
public int channel_num;
public VIDEO_SOURCE_TYPE videoSourceType;
};</codeblock>
<codeblock props="rn" outputclass="language-typescript">export class MediaRecorderConfiguration {
recorderInfoUpdateInterval?: number;
storagePath?: string;
containerFormat?: MediaRecorderContainerFormat;
streamType?: MediaRecorderStreamType;
maxDurationMs?: number;
recorderInfoUpdateInterval?: number;
width?: number;
height?: number;
fps?: number;
sample_rate?: number;
channel_num?: number;
videoSourceType?: VideoSourceType;
}</codeblock>
<codeblock props="flutter" outputclass="language-dart">class MediaRecorderConfiguration {

}</codeblock>
<codeblock props="flutter" outputclass="language-dart">@JsonSerializable(explicitToJson: true, includeIfNull: false)
class MediaRecorderConfiguration {
/// @nodoc
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个 nodoc 是不是删掉比较好

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,贴⭕️的时候漏删了,我删一下

const MediaRecorderConfiguration(
{this.storagePath,
this.containerFormat,
this.streamType,
this.maxDurationMs,
this.recorderInfoUpdateInterval});
this.recorderInfoUpdateInterval,
this.width,
this.height,
this.fps,
this.sampleRate,
this.channelNum,
this.videoSourceType});

@JsonKey(name: 'storagePath')
final String? storagePath;
Expand All @@ -186,6 +207,24 @@ struct FMediaRecorderConfiguration
@JsonKey(name: 'recorderInfoUpdateInterval')
final int? recorderInfoUpdateInterval;

@JsonKey(name: 'width')
final int? width;

@JsonKey(name: 'height')
final int? height;

@JsonKey(name: 'fps')
final int? fps;

@JsonKey(name: 'sample_rate')
final int? sampleRate;

@JsonKey(name: 'channel_num')
final int? channelNum;

@JsonKey(name: 'videoSourceType')
final VideoSourceType? videoSourceType;

factory MediaRecorderConfiguration.fromJson(Map&lt;String, dynamic> json) =>
_$MediaRecorderConfigurationFromJson(json);

Expand Down Expand Up @@ -233,49 +272,49 @@ struct FMediaRecorderConfiguration
<pt>recorderInfoUpdateInterval</pt>
<pd>录制信息更新间隔,单位为毫秒,取值范围为 [1000,10000]。SDK 会根据该值的设置触发 <xref keyref="onRecorderInfoUpdated" /> 回调,报告更新后的录制信息。</pd>
</plentry>
<plentry>
<plentry props="cpp apple android unity flutter rn electron cs unreal">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是不是可以不用动,基本上就是除了 bp 之外的所有平台。bp 本身 ditamap 里就没有放这个方法,所以不会有问题。后面 bp 如果要加的话,直接在 map 和 key 里加一下就可以,这里就不需要再弄了

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

鸿蒙也有这个方法,而且加了 map,但是目前没有这几个参数,所以还是得把它 props 出去

<pt>width</pt>
<pd>录制视频的宽度 (px),宽 × 高的最大值不应超过 3840 × 2160。
<ph props="cpp apple framework">该参数仅在 调用 <xref keyref="createMediaRecorder"/> 且将 <apiname keyref="RecorderStreamInfo"/> 中的 <parmname>type</parmname>设置为 <ph keyref="PREVIEW" /> 时需要传入。</ph>
<ph props="cpp apple unity flutter rn electron cs unreal">该参数仅在 调用 <xref keyref="createMediaRecorder"/> 且将 <apiname keyref="RecorderStreamInfo"/> 中的 <parmname>type</parmname>设置为 <ph keyref="PREVIEW" /> 时需要传入。</ph>
<ph props="android">该参数仅在 调用 <xref keyref="createMediaRecorder"/> 且将 <apiname keyref="RecorderStreamInfo"/> 的 <parmname>recorderStreamType</parmname> 为 0 时需要传入。</ph>
</pd>
</plentry>
<plentry>
<plentry props="cpp apple android unity flutter rn electron cs unreal">
<pt>height</pt>
<pd>录制视频的高度 (px),宽 × 高的最大值不超过 3840 × 2160。
<ph props="cpp apple framework">该参数仅在 调用 <xref keyref="createMediaRecorder"/> 且将 <apiname keyref="RecorderStreamInfo"/> 中的 <parmname>type</parmname>设置为 <ph keyref="PREVIEW" /> 时需要传入。</ph>
<ph props="cpp apple unity flutter rn electron cs unreal">该参数仅在 调用 <xref keyref="createMediaRecorder"/> 且将 <apiname keyref="RecorderStreamInfo"/> 中的 <parmname>type</parmname>设置为 <ph keyref="PREVIEW" /> 时需要传入。</ph>
<ph props="android">该参数仅在 调用 <xref keyref="createMediaRecorder"/> 且将 <apiname keyref="RecorderStreamInfo"/> 的 <parmname>recorderStreamType</parmname> 为 0 时需要传入。</ph>
</pd>
</plentry>
<plentry>
<plentry props="cpp apple android unity flutter rn electron cs unreal">
<pt>fps</pt>
<pd>录制视频的帧率,最高值不超过 30,如: 5、10、15、24、30 等。
<ph props="cpp apple framework">该参数仅在 调用 <xref keyref="createMediaRecorder"/> 且将 <apiname keyref="RecorderStreamInfo"/> 中的 <parmname>type</parmname>设置为 <ph keyref="PREVIEW" /> 时需要传入。</ph>
<ph props="cpp apple unity flutter rn electron cs unreal">该参数仅在 调用 <xref keyref="createMediaRecorder"/> 且将 <apiname keyref="RecorderStreamInfo"/> 中的 <parmname>type</parmname>设置为 <ph keyref="PREVIEW" /> 时需要传入。</ph>
<ph props="android">该参数仅在 调用 <xref keyref="createMediaRecorder"/> 且将 <apiname keyref="RecorderStreamInfo"/> 的 <parmname>recorderStreamType</parmname> 为 0 时需要传入。</ph>
</pd>
</plentry>
<plentry>
<plentry props="cpp apple android unity flutter rn electron cs unreal">
<pt>sample_rate</pt>
<pd>录制音频的采样率 (Hz),可设置为 16000,32000,44100 或 48000。
<ph props="cpp apple framework">该参数仅在 调用 <xref keyref="createMediaRecorder"/> 且将 <apiname keyref="RecorderStreamInfo"/> 中的 <parmname>type</parmname>设置为 <ph keyref="PREVIEW" /> 时需要传入。</ph>
<ph props="cpp apple unity flutter rn electron cs unreal">该参数仅在 调用 <xref keyref="createMediaRecorder"/> 且将 <apiname keyref="RecorderStreamInfo"/> 中的 <parmname>type</parmname>设置为 <ph keyref="PREVIEW" /> 时需要传入。</ph>
<ph props="android">该参数仅在 调用 <xref keyref="createMediaRecorder"/> 且将 <apiname keyref="RecorderStreamInfo"/> 的 <parmname>recorderStreamType</parmname> 为 0 时需要传入。</ph>
</pd>
</plentry>
<plentry>
<plentry props="cpp apple android unity flutter rn electron cs unreal">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flutter 这个参数是 channelNum

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

<pt>channel_num</pt>
<pd>录制音频的声道数:
<ul>
<li>1: 单声道</li>
<li>2: 双声道</li>
</ul>
<ph props="cpp apple framework">该参数仅在 调用 <xref keyref="createMediaRecorder"/> 且将 <apiname keyref="RecorderStreamInfo"/> 中的 <parmname>type</parmname>设置为 <ph keyref="PREVIEW" /> 时需要传入。</ph>
<ph props="cpp apple unity flutter rn electron cs unreal">该参数仅在 调用 <xref keyref="createMediaRecorder"/> 且将 <apiname keyref="RecorderStreamInfo"/> 中的 <parmname>type</parmname>设置为 <ph keyref="PREVIEW" /> 时需要传入。</ph>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里“在”后面多了一个空格

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

<ph props="android">该参数仅在 调用 <xref keyref="createMediaRecorder"/> 且将 <apiname keyref="RecorderStreamInfo"/> 的 <parmname>recorderStreamType</parmname> 为 0 时需要传入。</ph>
</pd>
</plentry>
<plentry>
<plentry props="cpp apple android unity flutter rn electron cs unreal">
<pt>videoSourceType</pt>
<pd>录制视频源的类型。详见 <xref keyref="VIDEO_SOURCE_TYPE"/>。
<ph props="cpp apple framework">该参数仅在 调用 <xref keyref="createMediaRecorder"/> 且将 <apiname keyref="RecorderStreamInfo"/> 中的 <parmname>type</parmname>设置为 <ph keyref="PREVIEW" /> 时需要传入。</ph>
<ph props="cpp apple unity flutter rn electron cs unreal">该参数仅在 调用 <xref keyref="createMediaRecorder"/> 且将 <apiname keyref="RecorderStreamInfo"/> 中的 <parmname>type</parmname>设置为 <ph keyref="PREVIEW" /> 时需要传入。</ph>
<ph props="android">该参数仅在 调用 <xref keyref="createMediaRecorder"/> 且将 <apiname keyref="RecorderStreamInfo"/> 的 <parmname>recorderStreamType</parmname> 为 0 时需要传入。</ph>
</pd>
</plentry>
Expand Down
10 changes: 7 additions & 3 deletions dita/RTC-NG/API/class_recorderstreaminfo.dita
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
public int recorderStreamType;
}</codeblock>
<codeblock props="hmos" outputclass="language-arkts">export class RecorderStreamInfo {

public uid: number = 0;

public channelId: string;
public constructor() {
this.uid = 0;
Expand Down Expand Up @@ -59,6 +59,7 @@ struct FRecorderStreamInfo {
{
public string channelId;
public uint uid;
public RecorderStreamType type;

};</codeblock>
<codeblock props="rn" outputclass="language-typescript">RecorderStreamInfo {
Expand All @@ -76,6 +77,9 @@ class RecorderStreamInfo {
@JsonKey(name: 'uid')
final int? uid;

@JsonKey(name: 'type')
final RecorderStreamType? type;

factory RecorderStreamInfo.fromJson(Map&lt;String, dynamic> json) =>
_$RecorderStreamInfoFromJson(json);

Expand All @@ -101,7 +105,7 @@ class RecorderStreamInfo {
<pt>uid</pt>
<pd>需录制的用户 ID。</pd>
</plentry>
<plentry props="cpp apple framework">
<plentry props="cpp apple unity rn electron flutter cs unreal">
<pt>type</pt>
<pd>需录制的视频流类型,详见 <xref keyref="RecorderStreamType"/>。</pd>
</plentry>
Expand Down
6 changes: 6 additions & 0 deletions dita/RTC-NG/API/rtc_api_data_type.dita
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,8 @@
<li><xref keyref="EncryptionConfig"/></li>
<li><xref keyref="ExtensionContext"/></li>
<li><xref keyref="ExternalVideoFrame"/></li>
<li props="cn"><xref keyref="FaceShapeAreaOptions"/></li>
<li props="cn"><xref keyref="FaceShapeBeautyOptions"/></li>
<li><xref keyref="FocalLengthInfo"/></li>
<li><xref keyref="FilterEffectOptions"/></li>
<li><xref keyref="ImageTrackOptions"/></li>
Expand All @@ -666,6 +668,7 @@
<li><xref keyref="LiveTranscoding"/></li>
<li props="cn"><xref keyref="LocalAccessPointConfiguration"/></li>
<li><xref keyref="LocalAudioStats"/></li>
<li><xref keyref="LocalAudioMixerConfiguration"/></li>
<li><xref keyref="LocalSpatialAudioConfig"/></li>
<li><xref keyref="LocalTranscoderConfiguration"/></li>
<li><xref keyref="LocalVideoStats"/></li>
Expand Down Expand Up @@ -1112,6 +1115,8 @@
<li><xref keyref="EncryptionConfig"/></li>
<li><xref keyref="ExtensionContext"/></li>
<li><xref keyref="ExternalVideoFrame"/></li>
<li props="cn"><xref keyref="FaceShapeAreaOptions"/></li>
<li props="cn"><xref keyref="FaceShapeBeautyOptions"/></li>
<li><xref keyref="FilterEffectOptions"/></li>
<li><xref keyref="FocalLengthInfo"/></li>
<li><xref keyref="ImageTrackOptions"/></li>
Expand All @@ -1122,6 +1127,7 @@
<li><xref keyref="LiveStreamAdvancedFeature"/></li>
<li><xref keyref="LiveTranscoding"/></li>
<li props="cn"><xref keyref="LocalAccessPointConfiguration"/></li>
<li><xref keyref="LocalAudioMixerConfiguration"/></li>
<li><xref keyref="LocalAudioStats"/></li>
<li><xref keyref="LocalTranscoderConfiguration"/></li>
<li><xref keyref="LocalVideoStats"/></li>
Expand Down
2 changes: 1 addition & 1 deletion dita/RTC-NG/API/rtc_api_overview.dita
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@
<stentry><xref keyref="takeSnapshot"/></stentry>
<stentry><ph conkeyref="takeSnapshot/shortdesc"/></stentry>
</strow>
<strow>
<strow props="android cpp apple framework">
<stentry><xref keyref="takeSnapshot2"/></stentry>
<stentry><ph conkeyref="takeSnapshot2/shortdesc"/></stentry>
</strow>
Expand Down
20 changes: 18 additions & 2 deletions dita/RTC-NG/RTC_NG_API_Flutter.ditamap
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,16 @@
<topicref keyref="updateScreenCapture" toc="no"/>
<topicref keyref="updateScreenCaptureParameters" toc="no"/>
<topicref keyref="updateScreenCaptureRegion1" toc="no"/>
</topicref>
<topicref keyref="setExternalMediaProjection" toc="no"/>
</topicref>
<topicref href="API/toc_video_prenpro.dita" chunk="to-content">
<topicref href="API/toc_snapshot.dita" chunk="to-content">
<topicref keyref="enableContentInspect" toc="no"/>
<topicref keyref="enableContentInspectEx" toc="no"/>
<topicref keyref="takeSnapshot" toc="no"/>
<topicref keyref="takeSnapshotEx" toc="no"/>
<topicref keyref="takeSnapshot2" toc="no"/>
<topicref keyref="takeSnapshotEx2" toc="no"/>
<topicref keyref="onSnapshotTaken" toc="no"/>
</topicref>
<topicref href="API/toc_virtualbackground.dita" chunk="to-content">
Expand All @@ -322,8 +325,13 @@
<topicref keyref="onLocalVideoTranscoderError" toc="no"/>
</topicref>
<topicref href="API/toc_video_enhance_option.dita" chunk="to-content">
<topicref keyref="getFaceShapeAreaOptions" toc="no" props="cn"/>
<topicref keyref="getFaceShapeBeautyOptions" toc="no" props="cn"/>
<topicref keyref="setBeautyEffectOptions" toc="no"/>
<topicref keyref="setColorEnhanceOptions" toc="no"/>
<topicref keyref="setFaceShapeAreaOptions" toc="no" props="cn"/>
<topicref keyref="setFaceShapeBeautyOptions" toc="no" props="cn"/>
<topicref keyref="setFilterEffectOptions" toc="no"/>
<topicref keyref="setLowlightEnhanceOptions" toc="no"/>
<topicref keyref="setVideoDenoiserOptions" toc="no"/>
</topicref>
Expand Down Expand Up @@ -362,8 +370,15 @@
<topicref keyref="setupRemoteVideoEx" toc="no"/>
<topicref keyref="startMediaRenderingTracing" toc="no"/>
<topicref keyref="startMediaRenderingTracingEx" toc="no"/>
<topicref keyref="setLocalRenderTargetFps" toc="no"/>
<topicref keyref="setRemoteRenderTargetFps" toc="no"/>
<topicref keyref="onTranscodedStreamLayoutInfo" toc="no"/>
<topicref keyref="onVideoRenderingTracingResult" toc="no"/>
</topicref>
<topicref href="API/toc_audiomixer.dita" chunk="to-content">
<topicref keyref="startLocalAudioMixer" toc="no"/>
<topicref keyref="stopLocalAudioMixer" toc="no"/>
<topicref keyref="updateLocalAudioMixerConfiguration" toc="no"/>
</topicref>
<topicref href="API/toc_video_raw.dita" chunk="to-content">
<topicref keyref="registerVideoFrameObserver" toc="no"/>
Expand All @@ -383,7 +398,8 @@
<topicref keyref="destroyCustomVideoTrack" toc="no"/>
<topicref keyref="pushVideoFrame" toc="no"/>
<topicref keyref="setExternalVideoSource" toc="no"/>
</topicref>
<topicref keyref="setExternalRemoteEglContext" toc="no"/>
</topicref>
</topicref>
<topicref href="API/toc_play.dita" chunk="to-content">
<topicref href="API/toc_audio_mixing.dita" chunk="to-content">
Expand Down
Loading
Loading