From 256eadc6f0117cd3fbdf0d5da2b1c1a0814a148f Mon Sep 17 00:00:00 2001 From: Nero-Hu Date: Tue, 3 Sep 2024 15:18:02 +0800 Subject: [PATCH 1/9] remove empty details section --- dita/RTC-NG/API/api_irtcengine_getconnectionstate.dita | 1 + dita/RTC-NG/API/api_irtcengineex_getconnectionstateex.dita | 1 + 2 files changed, 2 insertions(+) diff --git a/dita/RTC-NG/API/api_irtcengine_getconnectionstate.dita b/dita/RTC-NG/API/api_irtcengine_getconnectionstate.dita index 12710150f4f..b3343b077eb 100644 --- a/dita/RTC-NG/API/api_irtcengine_getconnectionstate.dita +++ b/dita/RTC-NG/API/api_irtcengine_getconnectionstate.dita @@ -25,6 +25,7 @@ Future<ConnectionStateType> getConnectionState();

+
调用时机

加入频道前后均可调用。

diff --git a/dita/RTC-NG/API/api_irtcengineex_getconnectionstateex.dita b/dita/RTC-NG/API/api_irtcengineex_getconnectionstateex.dita index 88f2be6d7c4..c18c46e9909 100644 --- a/dita/RTC-NG/API/api_irtcengineex_getconnectionstateex.dita +++ b/dita/RTC-NG/API/api_irtcengineex_getconnectionstateex.dita @@ -26,6 +26,7 @@ Future<ConnectionStateType> getConnectionStateEx(RtcConnection connection);

+
From 64f813e356002043293de33cda4422a1e41a092b Mon Sep 17 00:00:00 2001 From: Suri539 Date: Wed, 4 Sep 2024 17:31:58 +0800 Subject: [PATCH 2/9] bugfix --- .../RTC-NG/API/class_channelmediaoptions.dita | 373 +++++++++--------- dita/RTC-NG/config/keys-rtc-ng-links.ditamap | 4 +- 2 files changed, 187 insertions(+), 190 deletions(-) diff --git a/dita/RTC-NG/API/class_channelmediaoptions.dita b/dita/RTC-NG/API/class_channelmediaoptions.dita index 7b38b4d4ebc..f7220a95bd2 100644 --- a/dita/RTC-NG/API/class_channelmediaoptions.dita +++ b/dita/RTC-NG/API/class_channelmediaoptions.dita @@ -38,63 +38,63 @@ public Boolean isAudioFilterable; } export class ChannelMediaOptions { - + public publishCameraTrack?:boolean; - + public publishSecondaryCameraTrack?:boolean; - + public publishMicrophoneTrack?:boolean; - + public publishScreenCaptureVideo?:boolean; - + public publishScreenCaptureAudio?:boolean; - + public publishCustomAudioTrack?:boolean; - + public publishCustomAudioTrackId?:number; - + public publishCustomVideoTrack?:boolean; - + public publishEncodedVideoTrack?:boolean; - + public publishMediaPlayerAudioTrack?:boolean; - + public publishMediaPlayerVideoTrack?:boolean; - + public publishTranscodedVideoTrack?:boolean; - + public publishMixedAudioTrack?:boolean; - + public autoSubscribeAudio?:boolean; - + public autoSubscribeVideo?:boolean; - + public enableAudioRecordingOrPlayout?:boolean; - + public publishMediaPlayerId?:number; - + public clientRoleType?:number; - + public audienceLatencyLevel?:number; - + public defaultVideoStreamType?:number; - + public channelProfile?:number; - + public audioDelayMs?:number; - + public mediaPlayerAudioDelayMs?:number; - + public enableBuiltInMediaEncryption?:boolean; - + public publishRhythmPlayerTrack?:boolean; - + public isInteractiveAudience?:boolean; - + public customVideoTrackId?:number; - + public isAudioFilterable?:boolean; - + public startPreview?:boolean; public constructor() { } @@ -285,7 +285,7 @@ public: FChannelMediaOptions(){} FChannelMediaOptions(const agora::rtc::ChannelMediaOptions & AgoraData){ - + SET_UEBP_OPTIONAL_VAL_BOOL(this->publishCameraTrack, AgoraData.publishCameraTrack) SET_UEBP_OPTIONAL_VAL_BOOL(this->publishSecondaryCameraTrack, AgoraData.publishSecondaryCameraTrack) SET_UEBP_OPTIONAL_VAL_BOOL(this->publishThirdCameraTrack, AgoraData.publishThirdCameraTrack) @@ -314,15 +314,15 @@ public: SET_UEBP_OPTIONAL_VAL_BOOL(this->enableAudioRecordingOrPlayout, AgoraData.enableAudioRecordingOrPlayout) SET_UEBP_OPTIONAL_VAL_DIR_ASSIGN(this->publishMediaPlayerId, AgoraData.publishMediaPlayerId) SET_UEBP_OPTIONAL_VAL_ASSIGN_VAL(this->clientRoleType,AgoraData.clientRoleType,static_cast<ECLIENT_ROLE_TYPE>(AgoraData.clientRoleType.value())) - + SET_UEBP_OPTIONAL_VAL_ASSIGN_VAL(this->audienceLatencyLevel, AgoraData.audienceLatencyLevel, static_cast<EAUDIENCE_LATENCY_LEVEL_TYPE>(AgoraData.audienceLatencyLevel.value())) SET_UEBP_OPTIONAL_VAL_ASSIGN_VAL(this->defaultVideoStreamType, AgoraData.defaultVideoStreamType, static_cast<EVIDEO_STREAM_TYPE>(AgoraData.defaultVideoStreamType.value())) SET_UEBP_OPTIONAL_VAL_ASSIGN_VAL(this->channelProfile, AgoraData.channelProfile, static_cast<ECHANNEL_PROFILE_TYPE>(AgoraData.channelProfile.value())) SET_UEBP_OPTIONAL_VAL_DIR_ASSIGN(this->audioDelayMs, AgoraData.audioDelayMs) SET_UEBP_OPTIONAL_VAL_DIR_ASSIGN(this->mediaPlayerAudioDelayMs, AgoraData.mediaPlayerAudioDelayMs) - + SET_UEBP_OPTIONAL_VAL_FString(this->token,AgoraData.token) - + SET_UEBP_OPTIONAL_VAL_BOOL(this->enableBuiltInMediaEncryption, AgoraData.enableBuiltInMediaEncryption) SET_UEBP_OPTIONAL_VAL_BOOL(this->publishRhythmPlayerTrack, AgoraData.publishRhythmPlayerTrack) SET_UEBP_OPTIONAL_VAL_BOOL(this->isInteractiveAudience, AgoraData.isInteractiveAudience) @@ -731,63 +731,63 @@ class ChannelMediaOptions { public Boolean isAudioFilterable; } export class ChannelMediaOptions { - + public publishCameraTrack?:boolean; - + public publishSecondaryCameraTrack?:boolean; - + public publishMicrophoneTrack?:boolean; - + public publishScreenCaptureVideo?:boolean; - + public publishScreenCaptureAudio?:boolean; - + public publishCustomAudioTrack?:boolean; - + public publishCustomAudioTrackId?:number; - + public publishCustomVideoTrack?:boolean; - + public publishEncodedVideoTrack?:boolean; - + public publishMediaPlayerAudioTrack?:boolean; - + public publishMediaPlayerVideoTrack?:boolean; - + public publishTranscodedVideoTrack?:boolean; - + public publishMixedAudioTrack?:boolean; - + public autoSubscribeAudio?:boolean; - + public autoSubscribeVideo?:boolean; - + public enableAudioRecordingOrPlayout?:boolean; - + public publishMediaPlayerId?:number; - + public clientRoleType?:number; - + public audienceLatencyLevel?:number; - + public defaultVideoStreamType?:number; - + public channelProfile?:number; - + public audioDelayMs?:number; - + public mediaPlayerAudioDelayMs?:number; - + public enableBuiltInMediaEncryption?:boolean; - + public publishRhythmPlayerTrack?:boolean; - + public isInteractiveAudience?:boolean; - + public customVideoTrackId?:number; - + public isAudioFilterable?:boolean; - + public startPreview?:boolean; public constructor() { } @@ -809,7 +809,7 @@ class ChannelMediaOptions { #endif @property(assign, nonatomic) BOOL publishCustomAudioTrack; @property(assign, nonatomic) NSInteger publishCustomAudioTrackId; - + @property(assign, nonatomic) BOOL publishCustomVideoTrack; @property(assign, nonatomic) BOOL publishEncodedVideoTrack; @property(assign, nonatomic) BOOL publishMediaPlayerAudioTrack; @@ -826,14 +826,14 @@ class ChannelMediaOptions { @property(assign, nonatomic) AgoraChannelProfile channelProfile; @property(copy, nonatomic) NSString * _Nullable token; @property(assign, nonatomic) BOOL enableBuiltInMediaEncryption; - + @property(assign, nonatomic) BOOL publishRhythmPlayerTrack; @property(assign, nonatomic) BOOL isInteractiveAudience; - + @property(assign, nonatomic) NSInteger customVideoTrackId; - + @property(assign, nonatomic) BOOL isAudioFilterable; - + @end struct ChannelMediaOptions { Optional<bool> publishCameraTrack; @@ -841,7 +841,7 @@ class ChannelMediaOptions { Optional<bool> publishThirdCameraTrack; Optional<bool> publishFourthCameraTrack; Optional<bool> publishMicrophoneTrack; - + #if defined(__ANDROID__) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) Optional<bool> publishScreenCaptureVideo; Optional<bool> publishScreenCaptureAudio; @@ -851,7 +851,7 @@ class ChannelMediaOptions { Optional<bool> publishThirdScreenTrack; Optional<bool> publishFourthScreenTrack; #endif - + Optional<bool> publishCustomAudioTrack; Optional<int> publishCustomAudioTrackId; Optional<bool> publishCustomVideoTrack; @@ -872,11 +872,11 @@ class ChannelMediaOptions { Optional<bool> enableBuiltInMediaEncryption; Optional<bool> publishRhythmPlayerTrack; Optional<bool> isInteractiveAudience; - + Optional<video_track_id_t> customVideoTrackId; - + Optional<bool> isAudioFilterable; - + ChannelMediaOptions() {} ~ChannelMediaOptions() {} USTRUCT(BlueprintType) @@ -979,7 +979,7 @@ public: FChannelMediaOptions(){} FChannelMediaOptions(const agora::rtc::ChannelMediaOptions & AgoraData){ - + SET_UEBP_OPTIONAL_VAL_BOOL(this->publishCameraTrack, AgoraData.publishCameraTrack) SET_UEBP_OPTIONAL_VAL_BOOL(this->publishSecondaryCameraTrack, AgoraData.publishSecondaryCameraTrack) SET_UEBP_OPTIONAL_VAL_BOOL(this->publishThirdCameraTrack, AgoraData.publishThirdCameraTrack) @@ -1008,15 +1008,15 @@ public: SET_UEBP_OPTIONAL_VAL_BOOL(this->enableAudioRecordingOrPlayout, AgoraData.enableAudioRecordingOrPlayout) SET_UEBP_OPTIONAL_VAL_DIR_ASSIGN(this->publishMediaPlayerId, AgoraData.publishMediaPlayerId) SET_UEBP_OPTIONAL_VAL_ASSIGN_VAL(this->clientRoleType,AgoraData.clientRoleType,static_cast<ECLIENT_ROLE_TYPE>(AgoraData.clientRoleType.value())) - + SET_UEBP_OPTIONAL_VAL_ASSIGN_VAL(this->audienceLatencyLevel, AgoraData.audienceLatencyLevel, static_cast<EAUDIENCE_LATENCY_LEVEL_TYPE>(AgoraData.audienceLatencyLevel.value())) SET_UEBP_OPTIONAL_VAL_ASSIGN_VAL(this->defaultVideoStreamType, AgoraData.defaultVideoStreamType, static_cast<EVIDEO_STREAM_TYPE>(AgoraData.defaultVideoStreamType.value())) SET_UEBP_OPTIONAL_VAL_ASSIGN_VAL(this->channelProfile, AgoraData.channelProfile, static_cast<ECHANNEL_PROFILE_TYPE>(AgoraData.channelProfile.value())) SET_UEBP_OPTIONAL_VAL_DIR_ASSIGN(this->audioDelayMs, AgoraData.audioDelayMs) SET_UEBP_OPTIONAL_VAL_DIR_ASSIGN(this->mediaPlayerAudioDelayMs, AgoraData.mediaPlayerAudioDelayMs) - + SET_UEBP_OPTIONAL_VAL_FString(this->token,AgoraData.token) - + SET_UEBP_OPTIONAL_VAL_BOOL(this->enableBuiltInMediaEncryption, AgoraData.enableBuiltInMediaEncryption) SET_UEBP_OPTIONAL_VAL_BOOL(this->publishRhythmPlayerTrack, AgoraData.publishRhythmPlayerTrack) SET_UEBP_OPTIONAL_VAL_BOOL(this->isInteractiveAudience, AgoraData.isInteractiveAudience) @@ -1074,7 +1074,7 @@ public: Optional<bool> publishCameraTrack; Optional<bool> publishSecondaryCameraTrack; Optional<bool> publishMicrophoneTrack; - + #if defined(__ANDROID__) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) Optional<bool> publishScreenCaptureVideo; Optional<bool> publishScreenCaptureAudio; @@ -1082,7 +1082,7 @@ public: Optional<bool> publishScreenTrack; Optional<bool> publishSecondaryScreenTrack; #endif - + Optional<bool> publishCustomAudioTrack; Optional<int> publishCustomAudioTrackId; Optional<bool> publishCustomVideoTrack; @@ -1102,75 +1102,75 @@ public: Optional<bool> enableBuiltInMediaEncryption; Optional<bool> publishRhythmPlayerTrack; Optional<bool> isInteractiveAudience; - + Optional<video_track_id_t> customVideoTrackId; - + Optional<bool> isAudioFilterable; - + ChannelMediaOptions() {} ~ChannelMediaOptions() {} export class ChannelMediaOptions { - + publishCameraTrack?: boolean; - + publishSecondaryCameraTrack?: boolean; - + publishThirdCameraTrack?: boolean; - + publishFourthCameraTrack?: boolean; - + publishMicrophoneTrack?: boolean; - + publishScreenTrack?: boolean; - + publishSecondaryScreenTrack?: boolean; - + publishThirdScreenTrack?: boolean; - + publishFourthScreenTrack?: boolean; - + publishCustomAudioTrack?: boolean; - + publishCustomAudioTrackId?: number; - + publishCustomVideoTrack?: boolean; - + publishEncodedVideoTrack?: boolean; - + publishMediaPlayerAudioTrack?: boolean; - + publishMediaPlayerVideoTrack?: boolean; - + publishTranscodedVideoTrack?: boolean; - + publishLipSyncTrack?: boolean; - + autoSubscribeAudio?: boolean; - + autoSubscribeVideo?: boolean; - + enableAudioRecordingOrPlayout?: boolean; - + publishMediaPlayerId?: number; - + clientRoleType?: ClientRoleType; - + audienceLatencyLevel?: AudienceLatencyLevelType; - + defaultVideoStreamType?: VideoStreamType; - + channelProfile?: ChannelProfileType; - + token?: string; - + enableBuiltInMediaEncryption?: boolean; - + publishRhythmPlayerTrack?: boolean; - + isInteractiveAudience?: boolean; - + customVideoTrackId?: number; - + isAudioFilterable?: boolean; } public class ChannelMediaOptions : OptionalJsonParse @@ -1207,72 +1207,72 @@ public: public Optional<bool> isInteractiveAudience = new Optional<bool>(); public Optional<video_track_id_t> customVideoTrackId = new Optional<video_track_id_t>(); public Optional<bool> isAudioFilterable = new Optional<bool>(); - + } export class ChannelMediaOptions { - + publishCameraTrack?: boolean; - + publishSecondaryCameraTrack?: boolean; - + publishThirdCameraTrack?: boolean; - + publishFourthCameraTrack?: boolean; - + publishMicrophoneTrack?: boolean; - + publishScreenCaptureVideo?: boolean; - + publishScreenCaptureAudio?: boolean; - + publishSecondaryScreenTrack?: boolean; - + publishThirdScreenTrack?: boolean; - + publishFourthScreenTrack?: boolean; - + publishCustomAudioTrack?: boolean; - + publishCustomAudioTrackId?: number; - + publishCustomVideoTrack?: boolean; - + publishEncodedVideoTrack?: boolean; - + publishMediaPlayerAudioTrack?: boolean; - + publishMediaPlayerVideoTrack?: boolean; - + publishTranscodedVideoTrack?: boolean; - + publishLipSyncTrack?: boolean; - + autoSubscribeAudio?: boolean; - + autoSubscribeVideo?: boolean; - + enableAudioRecordingOrPlayout?: boolean; - + publishMediaPlayerId?: number; - + clientRoleType?: ClientRoleType; - + audienceLatencyLevel?: AudienceLatencyLevelType; - + defaultVideoStreamType?: VideoStreamType; - + channelProfile?: ChannelProfileType; - + token?: string; - + enableBuiltInMediaEncryption?: boolean; - + publishRhythmPlayerTrack?: boolean; - + isInteractiveAudience?: boolean; - + customVideoTrackId?: number; - + isAudioFilterable?: boolean; } @JsonSerializable(explicitToJson: true, includeIfNull: false) @@ -1315,121 +1315,121 @@ public: this.customVideoTrackId, this.isAudioFilterable, this.parameters}); - + @JsonKey(name: 'publishCameraTrack') final bool? publishCameraTrack; - + @JsonKey(name: 'publishSecondaryCameraTrack') final bool? publishSecondaryCameraTrack; - + @JsonKey(name: 'publishThirdCameraTrack') final bool? publishThirdCameraTrack; - + @JsonKey(name: 'publishFourthCameraTrack') final bool? publishFourthCameraTrack; - + @JsonKey(name: 'publishMicrophoneTrack') final bool? publishMicrophoneTrack; - + @JsonKey(name: 'publishScreenCaptureVideo') final bool? publishScreenCaptureVideo; - + @JsonKey(name: 'publishScreenCaptureAudio') final bool? publishScreenCaptureAudio; - + @JsonKey(name: 'publishScreenTrack') final bool? publishScreenTrack; - + @JsonKey(name: 'publishSecondaryScreenTrack') final bool? publishSecondaryScreenTrack; - + @JsonKey(name: 'publishThirdScreenTrack') final bool? publishThirdScreenTrack; - + @JsonKey(name: 'publishFourthScreenTrack') final bool? publishFourthScreenTrack; - + @JsonKey(name: 'publishCustomAudioTrack') final bool? publishCustomAudioTrack; - + @JsonKey(name: 'publishCustomAudioTrackId') final int? publishCustomAudioTrackId; - + @JsonKey(name: 'publishCustomVideoTrack') final bool? publishCustomVideoTrack; - + @JsonKey(name: 'publishEncodedVideoTrack') final bool? publishEncodedVideoTrack; - + @JsonKey(name: 'publishMediaPlayerAudioTrack') final bool? publishMediaPlayerAudioTrack; - + @JsonKey(name: 'publishMediaPlayerVideoTrack') final bool? publishMediaPlayerVideoTrack; - + @JsonKey(name: 'publishTranscodedVideoTrack') final bool? publishTranscodedVideoTrack; - + @JsonKey(name: 'publishMixedAudioTrack') final bool? publishMixedAudioTrack; - + @JsonKey(name: 'publishLipSyncTrack') final bool? publishLipSyncTrack; - + @JsonKey(name: 'autoSubscribeAudio') final bool? autoSubscribeAudio; - + @JsonKey(name: 'autoSubscribeVideo') final bool? autoSubscribeVideo; - + @JsonKey(name: 'enableAudioRecordingOrPlayout') final bool? enableAudioRecordingOrPlayout; - + @JsonKey(name: 'publishMediaPlayerId') final int? publishMediaPlayerId; - + @JsonKey(name: 'clientRoleType') final ClientRoleType? clientRoleType; - + @JsonKey(name: 'audienceLatencyLevel') final AudienceLatencyLevelType? audienceLatencyLevel; - + @JsonKey(name: 'defaultVideoStreamType') final VideoStreamType? defaultVideoStreamType; - + @JsonKey(name: 'channelProfile') final ChannelProfileType? channelProfile; - + @JsonKey(name: 'audioDelayMs') final int? audioDelayMs; - + @JsonKey(name: 'mediaPlayerAudioDelayMs') final int? mediaPlayerAudioDelayMs; - + @JsonKey(name: 'token') final String? token; - + @JsonKey(name: 'enableBuiltInMediaEncryption') final bool? enableBuiltInMediaEncryption; - + @JsonKey(name: 'publishRhythmPlayerTrack') final bool? publishRhythmPlayerTrack; - + @JsonKey(name: 'isInteractiveAudience') final bool? isInteractiveAudience; - + @JsonKey(name: 'customVideoTrackId') final int? customVideoTrackId; - + @JsonKey(name: 'isAudioFilterable') final bool? isAudioFilterable; - + @JsonKey(name: 'parameters') final String? parameters; - + factory ChannelMediaOptions.fromJson(Map<String, dynamic> json) => _$ChannelMediaOptionsFromJson(json); - + Map<String, dynamic> toJson() => _$ChannelMediaOptionsToJson(this); }

@@ -1596,10 +1596,7 @@ public: publishCustomAudioTrackId - 待发布的自定义音频轨道的 ID。默认值为 0。 - -

如果你已在 中设置了 sourceNumber 大于 1,SDK 会创建对应数量的自采集音频轨道,并从 0 开始为每一个音频轨道分配一个 ID。

-
+ 待发布的自定义音频轨道的 ID,默认值为 0。你可以通过 方法来获取自定义音频轨道 ID。
publishCustomVideoTrack diff --git a/dita/RTC-NG/config/keys-rtc-ng-links.ditamap b/dita/RTC-NG/config/keys-rtc-ng-links.ditamap index 067d2f0cdc1..81cd7944327 100644 --- a/dita/RTC-NG/config/keys-rtc-ng-links.ditamap +++ b/dita/RTC-NG/config/keys-rtc-ng-links.ditamap @@ -54,10 +54,10 @@ - + - 使用 Token 鉴权 + 部署 Token 服务器 From b59356eeaa90950b670b07fb388e685013683f71 Mon Sep 17 00:00:00 2001 From: Cilla-luodan <85477033+Cilla-luodan@users.noreply.github.com> Date: Thu, 5 Sep 2024 14:21:16 +0800 Subject: [PATCH 3/9] bugfix0905 --- .../API/api_irtcengine_enableinstantmediarendering.dita | 2 +- .../API/callback_ivideoframeobserver_oncapturevideoframe.dita | 4 ++-- .../callback_ivideoframeobserver_onpreencodevideoframe.dita | 1 + .../API/callback_ivideoframeobserver_onrendervideoframe.dita | 1 + dita/RTC-NG/API/class_externalvideoframe.dita | 4 ++-- dita/RTC-NG/API/class_videoframe.dita | 3 ++- dita/RTC-NG/API/rtc_api_overview.dita | 4 ++-- dita/RTC-NG/config/relations-rtc-ng-api.ditamap | 2 +- 8 files changed, 12 insertions(+), 9 deletions(-) diff --git a/dita/RTC-NG/API/api_irtcengine_enableinstantmediarendering.dita b/dita/RTC-NG/API/api_irtcengine_enableinstantmediarendering.dita index f72f766a8ce..78d6cb4a776 100644 --- a/dita/RTC-NG/API/api_irtcengine_enableinstantmediarendering.dita +++ b/dita/RTC-NG/API/api_irtcengine_enableinstantmediarendering.dita @@ -39,7 +39,7 @@
调用时机 -

声网建议你在加入频道前调用该方法。

+

该方法需要在加入频道前调用。

调用限制 diff --git a/dita/RTC-NG/API/callback_ivideoframeobserver_oncapturevideoframe.dita b/dita/RTC-NG/API/callback_ivideoframeobserver_oncapturevideoframe.dita index 33a6824c336..435e8bee299 100644 --- a/dita/RTC-NG/API/callback_ivideoframeobserver_oncapturevideoframe.dita +++ b/dita/RTC-NG/API/callback_ivideoframeobserver_oncapturevideoframe.dita @@ -33,7 +33,7 @@

你可以在回调中获取本地设备采集到的原始视频数据,并可根据需要进行前处理。完成前处理后,你可以在该回调中直接修改 videoFrame,并将返回值设置为 ,即可将修改后的视频数据发送给 SDK。

-

如果你需要将处理后的数据发送给 SDK,需要先调用 (0) 方法,将视频处理模式设置为读写模式。

+

如果你需要将处理后的数据发送给 SDK,需要先调用 (1) 方法,将视频处理模式设置为读写模式。

你可以在回调中获取本地设备采集到的原始视频数据。

@@ -49,7 +49,7 @@
使用限制
    -
  • 此处获取的视频数据为原始视频数据,即:未经过水印、裁剪和旋转等前处理的视频数据。
  • +
  • 此处获取的视频数据为原始视频数据,即:未经过水印、裁剪和旋转等前处理的视频数据。
  • 如果你获取到的视频数据类型为 RGBA,SDK 不支持对 Alpha 通道的值进行处理。
  • 建议你在修改 videoFrame 中的参数时,需确保修改后的参数跟视频帧缓冲区中的视频帧实际情况保持一致,否则可能导致本地预览画面和对端的视频画面出现非预期的旋转、失真等问题。
  • 建议你通过 C++ API 实现该回调。
  • diff --git a/dita/RTC-NG/API/callback_ivideoframeobserver_onpreencodevideoframe.dita b/dita/RTC-NG/API/callback_ivideoframeobserver_onpreencodevideoframe.dita index 451ec81e26f..a95784a39d6 100644 --- a/dita/RTC-NG/API/callback_ivideoframeobserver_onpreencodevideoframe.dita +++ b/dita/RTC-NG/API/callback_ivideoframeobserver_onpreencodevideoframe.dita @@ -35,6 +35,7 @@

    完成处理后,你可以在该回调中,传入处理后的视频数据将其发送回 SDK。

      +
    • 如果你需要将处理后的数据发送给 SDK,需要先调用 (1) 方法,将视频处理模式设置为读写模式。
    • 你需要通过 设置观测 (1 << 2) 后,才能使用该回调获取本地视频编码前的视频数据。
    • 你需要通过 position 参数设置观测 (1 << 2) 后,才能使用该回调获取本地视频编码前的视频数据。
    • 建议你通过 C++ API 实现该回调。
    • diff --git a/dita/RTC-NG/API/callback_ivideoframeobserver_onrendervideoframe.dita b/dita/RTC-NG/API/callback_ivideoframeobserver_onrendervideoframe.dita index d70b8a27b31..19d1835d2b8 100644 --- a/dita/RTC-NG/API/callback_ivideoframeobserver_onrendervideoframe.dita +++ b/dita/RTC-NG/API/callback_ivideoframeobserver_onrendervideoframe.dita @@ -39,6 +39,7 @@

      成功注册视频数据观测器后,SDK 会在捕捉到每个视频帧时触发该回调。你可以在回调中获取远端发送的渲染前的视频数据,然后根据场景需要,对视频数据进行处理。

        +
      • 如果你需要将处理后的数据发送给 SDK,需要先调用 (1) 方法,将视频处理模式设置为读写模式。
      • 如果你获取到的视频数据类型为 RGBA,SDK 不支持对 Alpha 通道的值进行处理。
      • 建议你通过 C++ API 实现该回调。
      • 由于框架的限制,该回调不支持将处理后的视频数据发送回 SDK。
      • diff --git a/dita/RTC-NG/API/class_externalvideoframe.dita b/dita/RTC-NG/API/class_externalvideoframe.dita index 34f3c13b7d4..505c28c9634 100644 --- a/dita/RTC-NG/API/class_externalvideoframe.dita +++ b/dita/RTC-NG/API/class_externalvideoframe.dita @@ -20,7 +20,7 @@ public static final int BUFFER_TYPE_ARRAY = 2; public static final int BUFFER_TYPE_TEXTURE = 3; public AgoraVideoFrame() { - format = 10; + format = 10; timeStamp = 0; stride = 0; height = 0; @@ -46,7 +46,7 @@ public float[] transform; public javax.microedition.khronos.egl.EGLContext eglContext10; public android.opengl.EGLContext eglContext14; - + public byte[] buf; public int cropLeft; public int cropTop; diff --git a/dita/RTC-NG/API/class_videoframe.dita b/dita/RTC-NG/API/class_videoframe.dita index d1cf26dfd1d..b02124fd4ca 100644 --- a/dita/RTC-NG/API/class_videoframe.dita +++ b/dita/RTC-NG/API/class_videoframe.dita @@ -750,7 +750,8 @@ class VideoFrame {

        采用人像分割算法输出的 Alpha 通道数据。该数据跟视频帧的尺寸一致,每个像素点的取值范围为 [0,255],其中 0 代表背景;255 代表前景(人像)。

        你可以通过设置该参数,实现将视频背景自渲染为各种效果,例如:透明、纯色、图片、视频等。

        - 在自定义视频渲染场景下,需确保传入的视频帧和 alphaBuffer 均为 Full Range 类型;其他类型可能导致 Alpha 数据渲染不正常。 +
        • 在自定义视频渲染场景下,需确保传入的视频帧和 alphaBuffer 均为 Full Range 类型;其他类型可能导致 Alpha 数据渲染不正常。
        • +
        • 请务必确保 alphaBufferalphaBuf 跟视频帧的尺寸 (width × height) 完全一致,否则可能会导致 App 崩溃。
        diff --git a/dita/RTC-NG/API/rtc_api_overview.dita b/dita/RTC-NG/API/rtc_api_overview.dita index 05d2755a4c8..57999b2a9dd 100644 --- a/dita/RTC-NG/API/rtc_api_overview.dita +++ b/dita/RTC-NG/API/rtc_api_overview.dita @@ -951,9 +951,9 @@ - + - (仅适用于 Windows 和 macOS) +
diff --git a/dita/RTC-NG/config/relations-rtc-ng-api.ditamap b/dita/RTC-NG/config/relations-rtc-ng-api.ditamap index 4c40d818993..2f2a04751c0 100644 --- a/dita/RTC-NG/config/relations-rtc-ng-api.ditamap +++ b/dita/RTC-NG/config/relations-rtc-ng-api.ditamap @@ -2465,7 +2465,7 @@ - + From 29807411d7c99b76b581bccaca9816efff7388d9 Mon Sep 17 00:00:00 2001 From: Cilla-luodan <85477033+Cilla-luodan@users.noreply.github.com> Date: Thu, 5 Sep 2024 14:23:49 +0800 Subject: [PATCH 4/9] 1 --- dita/RTC-NG/API/class_videoframe.dita | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dita/RTC-NG/API/class_videoframe.dita b/dita/RTC-NG/API/class_videoframe.dita index b02124fd4ca..0e2de8f9661 100644 --- a/dita/RTC-NG/API/class_videoframe.dita +++ b/dita/RTC-NG/API/class_videoframe.dita @@ -750,7 +750,7 @@ class VideoFrame {

采用人像分割算法输出的 Alpha 通道数据。该数据跟视频帧的尺寸一致,每个像素点的取值范围为 [0,255],其中 0 代表背景;255 代表前景(人像)。

你可以通过设置该参数,实现将视频背景自渲染为各种效果,例如:透明、纯色、图片、视频等。

-
  • 在自定义视频渲染场景下,需确保传入的视频帧和 alphaBuffer 均为 Full Range 类型;其他类型可能导致 Alpha 数据渲染不正常。
  • +
    • 在自定义视频渲染场景下,需确保传入的视频帧和 alphaBuffer 均为 Full Range 类型;其他类型可能导致 Alpha 数据渲染不正常。
    • 请务必确保 alphaBufferalphaBuf 跟视频帧的尺寸 (width × height) 完全一致,否则可能会导致 App 崩溃。
    From 9be5811da46a97797a1622eb8c38105d5981e7f2 Mon Sep 17 00:00:00 2001 From: Suri539 Date: Thu, 29 Aug 2024 15:25:42 +0800 Subject: [PATCH 5/9] Create api_irtcengine_setlocalvideodatasourceposition.dita --- ...ngine_setlocalvideodatasourceposition.dita | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 dita/RTC-NG/api_irtcengine_setlocalvideodatasourceposition.dita diff --git a/dita/RTC-NG/api_irtcengine_setlocalvideodatasourceposition.dita b/dita/RTC-NG/api_irtcengine_setlocalvideodatasourceposition.dita new file mode 100644 index 00000000000..64923617b9e --- /dev/null +++ b/dita/RTC-NG/api_irtcengine_setlocalvideodatasourceposition.dita @@ -0,0 +1,67 @@ + + + + <ph keyref="SetLocalVideoDataSourcePosition"/> + + + + + + + + + +
    +

    + + + + + + + + +

    +
    +
    +
    + +
    自从
    +
    v
    +
    +
    +

    +

    +
    + 适用场景 +

    +

    +
    + 调用时机 +

    +

    +
    + 调用限制 +

    +

    + +
    + 参数 + + + + + +
    +
    + <ph keyref="return-section-title"/> +

    方法成功调用时,无返回值;方法调用失败时,会抛出 异常,你需要捕获异常并进行处理。详见了解详情和解决建议。

    +
      +
    • 0: 方法调用成功。
    • +
    • < 0: 方法调用失败。详见了解详情和解决建议。
    • +
    +
    +
    From 202611608da652efce6a2ca2724e99c37d46a2af Mon Sep 17 00:00:00 2001 From: Suri539 Date: Thu, 29 Aug 2024 17:56:28 +0800 Subject: [PATCH 6/9] add --- ...ngine_setlocalvideodatasourceposition.dita | 36 ++++++------------- dita/RTC-NG/API/rtc_api_overview.dita | 4 +++ dita/RTC-NG/RTC_NG_API_Unity.ditamap | 1 + .../config/keys-rtc-ng-api-unity.ditamap | 7 ++++ .../config/relations-rtc-ng-api.ditamap | 1 + 5 files changed, 24 insertions(+), 25 deletions(-) rename dita/RTC-NG/{ => API}/api_irtcengine_setlocalvideodatasourceposition.dita (63%) diff --git a/dita/RTC-NG/api_irtcengine_setlocalvideodatasourceposition.dita b/dita/RTC-NG/API/api_irtcengine_setlocalvideodatasourceposition.dita similarity index 63% rename from dita/RTC-NG/api_irtcengine_setlocalvideodatasourceposition.dita rename to dita/RTC-NG/API/api_irtcengine_setlocalvideodatasourceposition.dita index 64923617b9e..7696f2c501b 100644 --- a/dita/RTC-NG/api_irtcengine_setlocalvideodatasourceposition.dita +++ b/dita/RTC-NG/API/api_irtcengine_setlocalvideodatasourceposition.dita @@ -1,12 +1,12 @@ - <ph keyref="SetLocalVideoDataSourcePosition"/> - + <ph keyref="setLocalVideoDataSourcePosition"/> + 设置视频帧的观测位置。 - + @@ -19,41 +19,27 @@ - + public abstract int SetLocalVideoDataSourcePosition(VIDEO_MODULE_POSITION position);

-
-
- -
自从
-
v
-
-
-

-

-
- 适用场景 -

-

调用时机 -

+

该方法需要在创建第一个 视图之前调用。

调用限制 -

-

-
参数 - - + position + 视频帧的观测位置,详见 。 + +
  • 该方法目前仅支持将观测位置设为
  • +
  • 处获取的视频帧未经裁剪且帧率较高, 位置获取的视频帧经过发送前的裁剪,帧率小于或等于摄像头采集的帧率。
diff --git a/dita/RTC-NG/API/rtc_api_overview.dita b/dita/RTC-NG/API/rtc_api_overview.dita index 57999b2a9dd..4774af050a7 100644 --- a/dita/RTC-NG/API/rtc_api_overview.dita +++ b/dita/RTC-NG/API/rtc_api_overview.dita @@ -968,6 +968,10 @@ + + + + diff --git a/dita/RTC-NG/RTC_NG_API_Unity.ditamap b/dita/RTC-NG/RTC_NG_API_Unity.ditamap index d49f50f0632..319cac84589 100644 --- a/dita/RTC-NG/RTC_NG_API_Unity.ditamap +++ b/dita/RTC-NG/RTC_NG_API_Unity.ditamap @@ -287,6 +287,7 @@ + diff --git a/dita/RTC-NG/config/keys-rtc-ng-api-unity.ditamap b/dita/RTC-NG/config/keys-rtc-ng-api-unity.ditamap index 4a5fde373e0..b6083d7ce2f 100644 --- a/dita/RTC-NG/config/keys-rtc-ng-api-unity.ditamap +++ b/dita/RTC-NG/config/keys-rtc-ng-api-unity.ditamap @@ -1184,6 +1184,13 @@ + + + + SetLocalVideoDataSourcePosition + + + diff --git a/dita/RTC-NG/config/relations-rtc-ng-api.ditamap b/dita/RTC-NG/config/relations-rtc-ng-api.ditamap index 2f2a04751c0..d189da546bc 100644 --- a/dita/RTC-NG/config/relations-rtc-ng-api.ditamap +++ b/dita/RTC-NG/config/relations-rtc-ng-api.ditamap @@ -2435,6 +2435,7 @@ + From 5585e4e1e1b1771f80f3ea3d41a858379e5f3cf4 Mon Sep 17 00:00:00 2001 From: Cilla-luodan <85477033+Cilla-luodan@users.noreply.github.com> Date: Thu, 5 Sep 2024 14:57:01 +0800 Subject: [PATCH 7/9] fix --- .../API/callback_ivideoframeobserver_oncapturevideoframe.dita | 2 +- .../API/callback_ivideoframeobserver_onpreencodevideoframe.dita | 2 +- .../API/callback_ivideoframeobserver_onrendervideoframe.dita | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dita/RTC-NG/API/callback_ivideoframeobserver_oncapturevideoframe.dita b/dita/RTC-NG/API/callback_ivideoframeobserver_oncapturevideoframe.dita index 435e8bee299..6fef85a9863 100644 --- a/dita/RTC-NG/API/callback_ivideoframeobserver_oncapturevideoframe.dita +++ b/dita/RTC-NG/API/callback_ivideoframeobserver_oncapturevideoframe.dita @@ -33,7 +33,7 @@

你可以在回调中获取本地设备采集到的原始视频数据,并可根据需要进行前处理。完成前处理后,你可以在该回调中直接修改 videoFrame,并将返回值设置为 ,即可将修改后的视频数据发送给 SDK。

-

如果你需要将处理后的数据发送给 SDK,需要先调用 (1) 方法,将视频处理模式设置为读写模式。

+

如果你需要将处理后的数据发送给 SDK,需要先调用 方法,将视频处理模式设置为读写模式()。

你可以在回调中获取本地设备采集到的原始视频数据。

diff --git a/dita/RTC-NG/API/callback_ivideoframeobserver_onpreencodevideoframe.dita b/dita/RTC-NG/API/callback_ivideoframeobserver_onpreencodevideoframe.dita index a95784a39d6..3026c9d2c72 100644 --- a/dita/RTC-NG/API/callback_ivideoframeobserver_onpreencodevideoframe.dita +++ b/dita/RTC-NG/API/callback_ivideoframeobserver_onpreencodevideoframe.dita @@ -35,7 +35,7 @@

完成处理后,你可以在该回调中,传入处理后的视频数据将其发送回 SDK。

    -
  • 如果你需要将处理后的数据发送给 SDK,需要先调用 (1) 方法,将视频处理模式设置为读写模式。
  • +
  • 如果你需要将处理后的数据发送给 SDK,需要先调用 方法,将视频处理模式设置为读写模式()。
  • 你需要通过 设置观测 (1 << 2) 后,才能使用该回调获取本地视频编码前的视频数据。
  • 你需要通过 position 参数设置观测 (1 << 2) 后,才能使用该回调获取本地视频编码前的视频数据。
  • 建议你通过 C++ API 实现该回调。
  • diff --git a/dita/RTC-NG/API/callback_ivideoframeobserver_onrendervideoframe.dita b/dita/RTC-NG/API/callback_ivideoframeobserver_onrendervideoframe.dita index 19d1835d2b8..7647ebb013e 100644 --- a/dita/RTC-NG/API/callback_ivideoframeobserver_onrendervideoframe.dita +++ b/dita/RTC-NG/API/callback_ivideoframeobserver_onrendervideoframe.dita @@ -39,7 +39,7 @@

    成功注册视频数据观测器后,SDK 会在捕捉到每个视频帧时触发该回调。你可以在回调中获取远端发送的渲染前的视频数据,然后根据场景需要,对视频数据进行处理。

      -
    • 如果你需要将处理后的数据发送给 SDK,需要先调用 (1) 方法,将视频处理模式设置为读写模式。
    • +
    • 如果你需要将处理后的数据发送给 SDK,需要先调用 方法,将视频处理模式设置为读写模式()。
    • 如果你获取到的视频数据类型为 RGBA,SDK 不支持对 Alpha 通道的值进行处理。
    • 建议你通过 C++ API 实现该回调。
    • 由于框架的限制,该回调不支持将处理后的视频数据发送回 SDK。
    • From 28b67c155ccf639f5521bb7f377cbca1ebbf127a Mon Sep 17 00:00:00 2001 From: Suri539 Date: Thu, 5 Sep 2024 15:14:52 +0800 Subject: [PATCH 8/9] Update api_irtcengine_setlocalvideodatasourceposition.dita --- .../API/api_irtcengine_setlocalvideodatasourceposition.dita | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dita/RTC-NG/API/api_irtcengine_setlocalvideodatasourceposition.dita b/dita/RTC-NG/API/api_irtcengine_setlocalvideodatasourceposition.dita index 7696f2c501b..f2f2dd39658 100644 --- a/dita/RTC-NG/API/api_irtcengine_setlocalvideodatasourceposition.dita +++ b/dita/RTC-NG/API/api_irtcengine_setlocalvideodatasourceposition.dita @@ -2,7 +2,7 @@ <ph keyref="setLocalVideoDataSourcePosition"/> - 设置视频帧的观测位置。 + 设置本地视频帧的观测位置。 @@ -23,10 +23,11 @@

+
调用时机

该方法需要在创建第一个 视图之前调用。

-
+
调用限制

该方法仅支持观测通过 及其子类渲染的本地视频数据。

From baf19a90f26ed893fc47543f02af4f9a6eee7e51 Mon Sep 17 00:00:00 2001 From: Suri539 Date: Thu, 5 Sep 2024 15:16:42 +0800 Subject: [PATCH 9/9] Update api_irtcengine_setlocalvideodatasourceposition.dita --- .../API/api_irtcengine_setlocalvideodatasourceposition.dita | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dita/RTC-NG/API/api_irtcengine_setlocalvideodatasourceposition.dita b/dita/RTC-NG/API/api_irtcengine_setlocalvideodatasourceposition.dita index f2f2dd39658..681d5cf2bab 100644 --- a/dita/RTC-NG/API/api_irtcengine_setlocalvideodatasourceposition.dita +++ b/dita/RTC-NG/API/api_irtcengine_setlocalvideodatasourceposition.dita @@ -39,8 +39,8 @@ position 视频帧的观测位置,详见 -
  • 该方法目前仅支持将观测位置设为
  • -
  • 处获取的视频帧未经裁剪且帧率较高, 位置获取的视频帧经过发送前的裁剪,帧率小于或等于摄像头采集的帧率。
+
  • 该方法目前仅支持将观测位置设为
  • +
  • 处获取的视频帧未经裁剪且帧率较高, 位置获取的视频帧经过发送前的裁剪,帧率小于或等于摄像头采集的帧率。