From d6836f7933438416fe544fedaa5dfb49fcc8e97f Mon Sep 17 00:00:00 2001 From: jinyu Date: Wed, 30 Oct 2024 11:35:31 +0800 Subject: [PATCH 1/2] + --- .../class_channelmediarelayconfiguration.dita | 52 ++++++++----------- dita/RTC-NG/API/rtc_api_data_type.dita | 12 ++++- 2 files changed, 33 insertions(+), 31 deletions(-) diff --git a/dita/RTC-NG/API/class_channelmediarelayconfiguration.dita b/dita/RTC-NG/API/class_channelmediarelayconfiguration.dita index eb5d3ac69cf..9f9d9537df9 100644 --- a/dita/RTC-NG/API/class_channelmediarelayconfiguration.dita +++ b/dita/RTC-NG/API/class_channelmediarelayconfiguration.dita @@ -8,34 +8,31 @@

public class ChannelMediaRelayConfiguration { private ChannelMediaInfo srcInfo = null; - private Map<String, ChannelMediaInfo> destInfos = null; - + private Map<String, ChannelMediaInfo> destInfos = null; + public ChannelMediaRelayConfiguration() { - destInfos = new HashMap<String, ChannelMediaInfo>(); + destInfos = new HashMap<String, ChannelMediaInfo>(); 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<String, ChannelMediaInfo> getDestChannelMediaInfos() { + public Map<String, ChannelMediaInfo> getDestChannelMediaInfos() { return destInfos; } -} - +} export class ChannelMediaRelayConfiguration { public srcInfo:ChannelMediaInfo = new ChannelMediaInfo(null,null,0); public destInfos:Map<string, ChannelMediaInfo> = new Map<string, ChannelMediaInfo>(); @@ -43,25 +40,21 @@ public setSrcChannelInfo(srcInfo: ChannelMediaInfo) { this.srcInfo = srcInfo; } - __attribute__((visibility("default"))) @interface AgoraChannelMediaRelayConfiguration: NSObject - + __attribute__((visibility("default"))) @interface AgoraChannelMediaRelayConfiguration: NSObject @property (strong, nonatomic, readonly) NSDictionary<NSString *, AgoraChannelMediaRelayInfo *> *_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 struct ChannelMediaRelayConfiguration { - ChannelMediaInfo *srcInfo; - ChannelMediaInfo *destInfos; - int destCount; - - ChannelMediaRelayConfiguration() - : srcInfo(nullptr) - , destInfos(nullptr) - , destCount(0) - {} - }; + + ChannelMediaInfo* srcInfo; + + ChannelMediaInfo* destInfos; + + int destCount; + ChannelMediaRelayConfiguration() : srcInfo(OPTIONAL_NULLPTR), destInfos(OPTIONAL_NULLPTR), destCount(0) {} +}; USTRUCT(BlueprintType) struct FChannelMediaRelayConfiguration { @@ -153,8 +146,9 @@ public: setSrcChannelInfo 设置源频道信息。详见 - - setDestChannelInfo + + setDestChannelInfo + setDestinationInfo 设置目标频道信息。详见 @@ -205,7 +199,7 @@ public:

  • 如已启用 App Certificate,则务必填入使用 channelNameuid 生成的 token
  • 由于目标频道中任意频道的 token 过期会导致所有跨频道推流停止,因此建议你将目标频道的 token 设置为相同的过期时长。

  • - uid:标识目标频道中的转发媒体流的 UID。取值范围为 0 到(2 32-1),请确保与目标频道中的所有 UID 不同。默认值为 0,表示 SDK 随机分配一个 UID。
  • + uid:标识目标频道中的转发媒体流的 UID。取值范围为 0 到 (2 32-1),请确保与目标频道中的所有 UID 不同。默认值为 0,表示 SDK 随机分配一个 UID。

    diff --git a/dita/RTC-NG/API/rtc_api_data_type.dita b/dita/RTC-NG/API/rtc_api_data_type.dita index 44a21308a77..61a4ddae16e 100644 --- a/dita/RTC-NG/API/rtc_api_data_type.dita +++ b/dita/RTC-NG/API/rtc_api_data_type.dita @@ -376,7 +376,11 @@
  • -
  • +
  • +
      +
    • +
    • +
  • @@ -480,7 +484,11 @@
  • -
  • +
  • +
      +
    • +
    • +
  • From 890c97d2c264dcdb3b7af62ce5a66c838258d1ab Mon Sep 17 00:00:00 2001 From: Suri539 Date: Thu, 7 Nov 2024 14:30:05 +0800 Subject: [PATCH 2/2] DOC-4556 --- ...callback_ivideoframeobserver_getvideoformatpreference.dita | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dita/RTC-NG/API/callback_ivideoframeobserver_getvideoformatpreference.dita b/dita/RTC-NG/API/callback_ivideoframeobserver_getvideoformatpreference.dita index ab6b3b89b21..f947e14ae73 100644 --- a/dita/RTC-NG/API/callback_ivideoframeobserver_getvideoformatpreference.dita +++ b/dita/RTC-NG/API/callback_ivideoframeobserver_getvideoformatpreference.dita @@ -26,13 +26,13 @@ return VIDEO_OBSERVER_FRAME_TYPE.FRAME_TYPE_RGBA; } - +

    你需要在调用 方法时注册该回调。成功注册视频数据观测器后,SDK 会在捕捉到每个视频帧时触发该回调,你需要在该回调的返回值中设置期望的视频数据格式。

    在默认情况下,原始视频像素格式 () 存在以下类型:
      -
    • 在 Android 平台上,默认的视频帧类型可能为 I420Buffer 或 TextureBuffer。自 v4.2.3 起,TextureBuffer 类型的纹理格式不再包括 OES 格式,仅为 RGB 格式。你需要在处理视频数据时增加对 I420、RGB 纹理格式的适配。视频帧类型固定为 I420Buffer 的情况包括但不限于:
        +
      • 在 Android 平台上,默认的视频帧类型可能为 I420Buffer 或 TextureBuffer。视频帧类型固定为 I420Buffer 的情况包括但不限于:
        • 特定机型,例如:LG G5 SE (H848),Google Pixel 4a,Samsung Galaxy A7 或 Xiaomi Mi Max。
        • 已集成视频增强插件并开启视频降噪或暗光增强功能。